Test-time structure-aware inference can improve cross-subject EEG-to-image retrieval by exploiting relations among unlabeled test queries, but it also makes predictions depend on query-set composition. Existing evaluations typically report accuracy under a single full-query context, leaving unclear whether gains and comparative conclusions hold as context changes. We introduce Context-Marginalized Retrieval Evaluation (CMRE), which repeatedly evaluates each target query in sampled contexts using the corresponding rows of a fixed query-gallery similarity matrix. CMRE distinguishes structural exploitability, quantified by gains over independent retrieval, from context robustness, measured by same-query Top-1 context consistency. Under leave-one-subject-out evaluation on THINGS-EEG2 across six frozen representations and six structure-aware inference rules, structure-aware inference improves full-context Top-1 accuracy by up to 20.40 percentage points over independent retrieval. However, the rule selected under full-context evaluation is no longer optimal in 17 of 24 representation-context-size conditions (70.8%). Selecting the full-context winner incurs an average loss of 2.70 percentage points and a maximum loss of 8.29 percentage points under reduced contexts. Representation rankings are likewise inference- and context-dependent: the ordering under independent retrieval is not consistently preserved under structure-aware inference. Moreover, larger retrieval gains do not necessarily imply greater context robustness, showing that retrieval effectiveness and prediction stability provide complementary views of structure-aware inference. Full-context accuracy captures one operating point of context-dependent inference. CMRE complements it by characterizing how structural gains, context consistency, and comparisons of rules and representations change with query context.
Figures & tables
Figure 1: Overview of the frozen-similarity retrieval setting and the three test-time inference regimes considered in this work. (a) Frozen EEG–image representations are used to construct the similarity matrix S . (b) Independent retrieval performs row-wise ranking without cross-query interaction. (c) Set-level inference exploits cross-query statistics to recalibrate similarity scores while retaining query-wise prediction. (d) Assignment-based inference jointly couples query–gallery correspondences through global coupling.
Figure 2: Overview of Context-Marginalized Retrieval Evaluation (CMRE). Repeated context construction and context-wise inference generate per-query observations from a fixed query–gallery similarity matrix; query-wise aggregation yields CM-TopK, structural exploitability relative to independent retrieval, and same-query Context Consistency (CC).
Type
Method
NICE
ATM
UBP
BLUR
HyFI
BrainHIVE
Mean SE
Independent
Independent
6.95
11.50
10.45
20.05
13.70
22.25
–
Set-level
CSLS
7.65
14.50
17.20
26.95
20.90
30.35
5.44
IS
8.15
14.25
21.65
30.20
27.70
35.50
8.76
GC
7.10
15.60
20.95
27.20
26.05
30.90
7.15
Assignment
Sinkhorn
9.05
15.50
20.15
35.25
26.90
42.30
10.71
Hungarian
7.85
15.35
23.60
40.15
34.10
41.60
12.96
Table 1: Full-context Top-1 retrieval accuracy (%) across six representations. Mean SE denotes the average gain (pp) over independent retrieval.
Figure 3: Context-marginalized retrieval performance and context robustness on BLUR across query-context sizes m . (a) Context-marginalized Top-1 retrieval accuracy (CM-Top1); shaded bands indicate standard deviation across subjects. (b) Same-query Context Consistency (CC)
Type
Method
NICE
ATM
UBP
BLUR
HyFI
BrainHIVE
Average
Set-level
CSLS
0.68
2.51
6.34
6.43
7.45
7.46
5.15
IS
0.36
1.14
10.34
8.22
12.69
5.62
6.40
GC
0.02
2.28
7.37
4.88
7.91
5.22
4.61
Assignment
Sinkhorn
1.32
2.28
9.38
12.82
12.14
10.02
7.99
Hungarian
0.46
2.36
6.78
6.96
8.37
7.01
5.32
Partial OT
0.99
2.40
8.08
10.44
9.75
9.47
6.85
Table 2: CM-Top1 structural exploitability (SE, pp), averaged over the reduced query-context sizes. The final column reports the average across the six frozen representations.
Figure 4: Joint profiles of structural exploitability and context robustness. (a) Mean reduced-context Top-1 SE versus mean Context Consistency (CC), across six frozen representations and four reduced context sizes. (b) Context-size-specific SE and CC, averaged across representations and standardized across rules within each metric and context size.
Type
Method
NICE
ATM
UBP
BLUR
HyFI
BrainHIVE
Average
Set-level
CSLS
83.81
84.81
85.79
83.14
85.78
86.89
85.04
IS
54.78
47.32
76.23
67.99
74.72
49.17
61.70
GC
65.28
77.24
63.07
65.92
66.34
78.81
69.44
Assignment
Sinkhorn
58.06
43.34
77.32
72.42
75.64
45.24
62.00
Hungarian
65.69
64.66
62.03
68.27
64.01
67.17
65.31
Partial OT
60.90
46.28
81.04
76.51
80.19
48.45
65.56
Table 3: Average same-query context consistency (CC,%) across reduced query contexts. Final column reports the average across the six frozen representations.
Figure 5: CM-Top1 and CC across query-context sizes for BLUR (a,b) and UBP (c,d).
Representation
Method
Full Context
Reduced Contexts
Top-1 (%)
SE (pp)
CM-Top1 (%)
SE (pp)
CC (%)
BLUR
Independent
5.38
–
–
–
100.00
CSLS
6.13
+0.75
6.14
+0.76
85.58
IS
6.63
+1.25
7.13
+1.75
67.67
GC
7.25
+1.88
7.01
+1.63
63.35
Sinkhorn
8.38
+3.00
8.01
+2.63
73.39
Table 4: Validation on THINGS-MEG. Full-context Top-1 is averaged across four held-out subjects. Reduced-context results are averaged over m∈{25,50,100,150} . SE denotes Top-1 structural exploitability relative to independent retrieval.
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Fixed configuration
Complexity
Independent
None
O(NqNg)
CSLS
k=10
O(NqNg)
IS
β=30
O(NqNg)
GC
None
O(NqNglogNq)
Sinkhorn
ε=0.05
O(LNqNg)
Partial OT
τ=0.90,ε=0.05
O(LNqNg)
Appendix
Table 5: Fixed configurations and test-time complexity of the compared inference methods. Nq and Ng denote the numbers of EEG queries and gallery candidates, respectively, and L denotes the number of transport iterations.
Context
Contexts
Query appearances
T
Rm
size m
per round
per round
25
8
1
10
10
50
4
1
10
10
100
2
1
10
10
150
4
3
10
30
Appendix
Table 6: Relationship between partition rounds and per-query context counts in CMRE.
Figure 6: Origin of full-context Top-1 structural gains. For each inference method, the diverging bars show the average numbers of wrong-to-correct (W → C; blue) and correct-to-wrong (C → W; orange) transitions relative to independent retrieval. The flows show the ground-truth (GT) rank under independent retrieval for W → C queries. Results are averaged across six representations and ten LOSO folds.
Type
Method
NICE
ATM
UBP
BLUR
HyFI
BrainHIVE
Mean SE
Independent
Independent
20.95
30.60
30.20
49.25
36.05
47.10
–
Set-level
CSLS
22.95
36.35
41.80
58.65
50.75
57.85
9.03
IS
24.10
37.60
47.40
60.95
57.40
65.10
13.07
GC
24.55
40.35
49.20
58.60
59.60
64.95
13.85
Assignment
Sinkhorn
27.90
41.30
46.50
66.90
56.65
73.15
16.38
Hungarian
–
–
–
–
–
–
–
Appendix
Table 7: Full-context Top-5 retrieval accuracy (%) across six representations. Mean SE denotes the average gain (pp) over independent retrieval. Top-5 is not reported for Hungarian because hard one-to-one assignment produces a single discrete assignment rather than a ranked candidate list.
Representation
Method
m=25
m=50
m=100
m=150
NICE
CSLS
7.67±2.31
7.63±2.40
7.66±2.50
7.58±2.63
IS
6.99±1.37
7.29±1.69
7.28±1.97
7.67±2.18
GC
6.88±2.16
7.07±2.09
6.91±2.00
7.01±2.32
Sinkhorn
7.61±1.76
8.28±1.82
8.47±2.06
8.71±2.18
Hungarian
7.07±2.24
7.42±2.06
7.55±2.12
7.61±2.38
Partial OT
7.53±1.68
7.90±1.93
8.14±2.06
8.18±2.29
Appendix
Table 8: Detailed CM-Top1 accuracy (%) under reduced query contexts m∈{25,50,100,150} . Each entry reports mean ± standard deviation across all ten LOSO folds.
Method
Mean SE (pp)
95% bootstrap CI
pHolm
CSLS
+5.14
[4.32, 5.92]
0.0117
IS
+6.39
[5.08, 7.56]
0.0117
GC
+4.61
[3.74, 5.45]
0.0117
Sinkhorn
+7.99
[6.38, 9.45]
0.0117
Hungarian
+5.32
[4.29, 6.33]
0.0117
Partial OT
+6.85
[5.32, 8.12]
0.0117
Appendix
Table 9: Statistical significance of reduced-context CM-Top1 gains over independent retrieval. Each comparison uses the ten held-out subjects as independent observations after averaging over six representations and four reduced query context sizes. Reported p -values are Holm-adjusted across the six inference methods.
Type
Method
NICE
ATM
UBP
BLUR
HyFI
BrainHIVE
Average
Set-level
CSLS
2.43
4.98
10.81
9.24
14.01
10.95
8.74
IS
2.80
6.02
16.56
9.24
20.53
14.01
11.53
GC
2.27
6.75
15.15
6.71
18.67
12.61
10.36
Assignment
Sinkhorn
5.55
7.41
15.52
15.66
19.80
18.45
13.73
Hungarian
–
–
–
–
–
–
–
Partial OT
4.43
7.52
11.85
12.58
16.91
17.41
11.78
Appendix
Table 10: CM-Top5 structural exploitability (SE, pp), averaged over the reduced query-context sizes.
Representation
Method
m=25
m=50
m=100
m=150
NICE
CSLS
76.95±2.08
81.30±1.87
86.36±1.10
90.61±1.03
IS
35.96±0.85
46.01±1.23
61.47±1.40
75.67±1.30
GC
63.04±3.10
58.07±2.23
64.25±2.52
75.74±1.08
Sinkhorn
37.42±1.36
50.01±1.89
65.68±1.04
79.16±1.30
Hungarian
73.29±4.58
64.66±4.33
60.57±2.57
64.26±1.82
Partial OT
40.60±1.14
53.12±1.97
68.93±1.58
80.94±1.40
Appendix
Table 11: Detailed Context Consistency (CC, %) under reduced query contexts m . Each entry reports mean ± standard deviation across ten LOSO folds.
Figure 7: Decomposition of same-query Context Consistency. Queries are categorized as Stable Correct, Stable Wrong, or Context-Sensitive according to their CM-Top1 predictions across sampled query contexts. (a) Average proportions of the three categories across m . (b) Stable-Correct and Context-Sensitive proportions at each context size. (c) Average CC versus Stable-Correct rate, where color denotes the representation, marker shape denotes the inference method, and bubble size represents the Stable-Wrong rate.
Figure 8: CMRE convergence over context-construction rounds on BLUR. Absolute deviations of (a) CM-Top1 and (b) Context Consistency (CC) from the T=50 reference as the number of partition rounds increases. Curves correspond to CSLS, Sinkhorn, and Hungarian and are averaged across context sizes. The dashed line marks the T=10 setting used in the main experiments. Both metrics are already close to the high-budget reference at T=10 .
m
Method
CM-Top1
CC
Stable Correct
Stable Wrong
Context-sensitive
25
CSLS
26.13 → 26.02
76.92 → 76.76
17.65 → 17.48
30.70 → 30.93
51.65 → 51.59
25
Sinkhorn
30.13 → 30.05
55.19 → 54.30
12.15 → 11.80
6.70 → 6.76
81.15 → 81.45
25
Hungarian
22.02 → 22.12
76.69 → 76.25
15.55 → 15.52
28.60 → 28.01
55.85 → 56.47
50
CSLS
26.43 → 26.30
80.53 → 80.72
19.10 → 18.85
36.40 → 36.63
44.50 → 44.52
50
Sinkhorn
32.54 → 32.47
67.29 → 67.39
18.35 → 18.43
15.40 → 15.60
66.25 → 65.97
50
Hungarian
24.25 → 24.36
67.84 → 68.37
14.85 → 15.15
19.45 → 19.70
65.70 → 65.16
Appendix
Table 12: Comparison of the original CMRE protocol and independently sampled contexts on BLUR. Each entry reports reference → independent-sampling results (%). Independent sampling uses ten contexts per query and ten seeds. At m=150 , the reference for the three stable-prediction categories uses a matched budget of ten evaluations per query.
Ng
m
CSLS
Sinkhorn
Hungarian
Partial OT
200
25
26.13+6.08
30.13+10.08
22.02+1.97
29.57+9.52
50
26.43+6.38
32.54+12.49
24.25+4.20
30.42+10.37
100
26.61+6.56
34.14+14.09
28.43+8.38
30.98+10.93
150
26.75+6.70
34.66+14.61
33.36+13.31
31.00+10.95
200
26.95+6.90
35.25+15.20
40.15+20.10
30.90+10.85
500
25
15.49+2.63
15.39+2.53
13.57+0.71
16.59+3.73
Appendix
Table 13: Joint effects of query-context size m and gallery size Ng on BLUR. Top-1 accuracy (%) is reported with SE (pp) as a subscript. bold indicates the best rule.
Ng
m
CSLS
Sinkhorn
Hungarian
Partial OT
200
25
16.30+5.85
19.04+8.59
13.95+3.50
18.11+7.66
50
16.66+6.21
19.89+9.44
15.57+5.12
18.60+8.15
100
17.01+6.56
20.15+9.70
18.48+8.03
18.69+8.24
150
17.19+6.74
20.22+9.77
20.91+10.46
18.71+8.26
200
17.20+6.75
20.15+9.70
23.60+13.15
18.75+8.30
500
25
8.42+2.97
9.53+4.08
6.76+1.31
9.36+3.91
Appendix
Table 14: Joint effects of query-context size m and gallery size Ng on UBP. Top-1 accuracy (%) is reported with SE (pp) as a subscript. bold indicates the best rule.
Figure 9: Robustness to gallery expansion on BLUR. (a) Top-1 retrieval accuracy as the gallery size increases from Ng=200 to Ng=2000 while keeping all 200 EEG queries fixed. (b) Corresponding Top-1 gain over independent retrieval.
Information Retrieval (IR) Evaluation measures how well search systems find, rank, and cover useful evidence across queries, collections, and settings.
College of Information Science and Engineering, Northeastern University, Shenyang 110819, China · Institute of Automation, Chinese Academy of Sciences, Beijing, China · College of Computing and Data Science, Nanyang Technological University, Singapore +1
School of Automation, Hangzhou Dianzi University, and also with Zhejiang Provincial Key Laboratory of Brain Computer Collaborative Intelligence Technology and Applications, Hangzhou, Zhejiang 310018, China