Cross-subject brain-to-image retrieval aims to identify viewed images from unseen subjects' brain signals. However, inter-subject variability hinders alignment of brain-image representations, while independent query ranking tends to concentrate predictions on a few candidates, making accurate retrieval difficult without target labels. We propose STAGE (Structured Test-Time Adaptation with Global Entropic Soft-coupling), a structured test-time adaptation framework for recovering cross-subject alignment from uncertain brain-image correspondences. Moment calibration reduces statistical discrepancies between features, while coupling-weighted initialization establishes initial alignment. Coupling-guided adaptation further refines residual feature mismatches, and soft-coupling ranking coordinates candidate competition across queries to prevent overly concentrated matching assignments. Using only unlabeled target batches, STAGE maintains consistent matching from feature calibration to image retrieval while keeping both encoders frozen. Experiments on three public datasets validate STAGE's retrieval performance. On THINGS-EEG2, STAGE achieves 68.25% Top-1 and 90.47% Top-5, improving Top-1 by 18.52 percentage points over SCORE recovery and CSLS on identical frozen NICE features. Calibrated on 200 queries and a 200-image gallery covering their identities, STAGE retains 42.05% Top-1 when ranking 1,854 images with the transform frozen.
Figures & tables
Figure 1: Cross-subject retrieval with global soft correspondences. (a) A brain encoder trained on remaining subjects retrieves images for a held-out subject using unlabeled brain signals and a gallery, with both encoders frozen. (b) Hard landmark selection discards uncertain pairs, while independent ranking crowds a few candidates. (c) STAGE preserves soft correspondences for alignment and coordinates retrieval via shared candidate capacities. Blue circles and gold triangles denote brain and image embeddings; link widths and bars illustrate pairwise support and candidate weights.
Figure 2: The STAGE test-time adaptation pipeline. Frozen encoders map an unlabeled target batch and the gallery to neural and image embeddings. After moment calibration, global entropic soft-coupling (GES) supplies initialization weights, teacher targets for feature adaptation, and final ranking scores; only initialization and adaptation modify neural features. The coupling-matching loss guides feature alignment, while the feature anchor limits deviation from the initialized embeddings.
Method
THINGS-EEG2 [ 8 ]
THINGS-MEG [ 11 ]
Alljoined-1.6M [ 33 ]
Top-1
Top-5
Top-1
Top-5
Top-1
Top-5
SAMGA base (Unadapted) [ 14 ]
26.22
57.98
3.88
14.00
6.08
20.55
EA [ 10 ]
27.45
59.37
4.00
15.88
6.31
20.47
SAW [ 13 ]
30.98
60.85
4.50
14.88
8.93
27.54
SATTC [ 13 ]
26.12
52.73
5.13
13.38
6.78
20.70
CSLS [ 4 ]
35.78
67.85
4.75
16.25
8.04
25.39
Table 1: Cross-subject retrieval accuracy (%). Above the divider, EEG2 and Alljoined use published SAMGA-based baselines from SCORE [ 5 ] ; MEG uses four held-out subjects. Below it, SCORE recovery + CSLS and STAGE share frozen NICE features, queries, galleries and source seeds (0/1/2). Subject-paired intervals are reported in Supplementary Table S40.
Figure 3: Retrieval performance with expanded galleries. Top-1 over 30 subject–seed cases. Geometry is fitted without pair labels on 200 queries and 200 candidates covering their identities, then frozen for gallery expansion. Coupling, row-wise, and equal-mass Sinkhorn rankings share the fitted geometry. SCORE and SATTC curves use published values; full numerical results are reported in Supplementary Table S28.
Stage
SAMGA- TSConv [ 14 , 28 ]
EEGNet [ 18 ]
Shallow- FBCSP [ 24 ]
UBP [ 32 ]
None (raw)
18.87
16.65
8.22
20.60
Calibration
44.25
29.70
17.43
36.75
Init.+adapt.
56.98
47.50
27.20
51.05
Ranking
66.30
56.25
33.10
61.65
Table 2: Retrieval performance across EEG encoders. Top-1 (%) of each stage of the pipeline on four EEG encoders.
Figure 4: Qualitative retrieval comparison with SCORE. THINGS-EEG2, subject 01, seed 0, 200-image gallery. SCORE (reproduced coordinate recovery with CSLS) and STAGE share one frozen base. Each shows its top three; green borders mark the viewed image. Right: its SCORE-to- STAGE rank.
Moment
Coupled init.
Coupled adapt.
Coupling ranking
THINGS-EEG2
THINGS-MEG
Alljoined-1.6M
Top-1
Top-5
Top-1
Top-5
Top-1
Top-5
×
×
×
×
26.80
58.45
3.13
14.00
6.20
20.60
✓
×
×
×
30.80
63.10
3.50
13.71
8.23
25.50
✓
✓
×
×
53.03
81.90
5.00
17.42
9.95
29.92
✓
✓
✓
×
58.63
85.18
5.17
17.13
10.28
30.03
✓
✓
✓
✓
68.25
90.47
6.25
20.17
12.89
34.74
Table 3: Progressive component ablation (Top-1/Top-5, %). The unadapted baseline and subsequent feature stages use row-wise radial-distance ranking; the last row switches to coupling ranking.
Enabled stages
Row-wise
Coupled
Δ
Moment calibration
30.80
48.08
+17.28
+ coupling-weighted init.
53.03
65.68
+12.65
+ coupling-guided adapt.
58.63
68.25
+9.62
Table 4: Ranking at fixed features (THINGS-EEG2, Top-1, 30 cases). Each row adds one stage to the row above it; the two ranking columns share the same features and the same cost matrix, so Δ is the gain of the coupling ranking over the row-wise ranking at that stage set.
Initialization
Init. only
Init. + adapt.
Radial MNN
58.40
63.07
CSLS MNN
62.93
66.52
Soft correspondence
65.20
68.02
Table 5: Matched correspondence recovery. EEG2 Top-1 (%), 30 subject–seed cases. Initializers share the regularized estimator, twelve rounds, uniform query multipliers and GES ranking; adaptation uses forty identical global updates. Cross-dataset results appear in Supplementary Table S41.
Figure 5: Effects of coupling constraints and optimization settings. THINGS-EEG2 Top-1. (a) Row-only, column-only and joint constraints at fixed calibrated and aligned features. (b) Ranking entropy ε . (c) Initialization rounds. (d) Adaptation steps without initialization. Rings mark the adopted ε=0.035 and K=12 ; the dashed line in (d) marks the full pipeline.
Objective
EEG2
MEG
Alljoined
Direct OT ( η=ε )
61.48
5.29
10.93
Direct OT ( η=τ )
52.53
5.58
10.43
STAGE (soft teacher)
68.25
6.25
12.89
Table 6: Matched adaptation objectives (Top-1, %). All other settings are shared (Supplementary Table S45).
Figure 6: Distribution of top-1 predictions across candidates. The distributions compare (a) row-wise ranking, (b) CSLS and (c) coupling ranking on one cost matrix. Candidates are sorted by their prediction counts. Dashed line: gallery coverage; leftmost bar: the most-cited candidate. THINGS-EEG2, subject 01, seed 0.
Figure 7: Effects of correspondence support, weights, and initialization rounds. THINGS-EEG2, 30 subject–seed cases, coupling ranking, no adaptation. MNN and all-pair support are compared under uniform, margin and coupling weights at K=1 and K=12 . The hollow circle marks the degenerate all-pair fit with uniform weights.
Appendix figures & tables57 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
Channels × samples
Sampling and window
Preprocessing
Test-trial aggregation
THINGS-EEG2 [ 8 ]
63×250
250 Hz; first post-stimulus second
Baseline correction and session-wise MVNN
Mean of 80 repetitions per image across four sessions
THINGS-MEG [ 11 ]
271×201
200 Hz; 0–1 s, both endpoints included
Released preprocessed MEG epochs; temporal crop
Mean of 12 repetitions per image across twelve sessions
Alljoined-1.6M [ 33 ]
32×250
250 Hz; first post-stimulus second
Baseline-corrected, MVNN-preprocessed EEG; released trial-retention mask
Mean of all retained trials per image across sessions
Appendix
Table S1: Neural inputs used to construct test queries. Shapes describe one averaged response before encoding. EEG windows retain their preprocessed sampling grids. Every dataset provides one query for each of the 200 test images; trial averaging precedes feature extraction.
Setting
Value
Optimizer
AdamW, β1=0.9 , β2=0.999
Weight decay
10−4
Training epochs
50 (20 + 30)
Learning rate
10−4 ; 5×10−5 from epoch 21
Batch size (EEG2/MEG/AJ)
1,024 / 128 / 1,024
Contrastive logit scale
softplus(log(1/0.07)) , fixed
Appendix
Table S2: Source-model training settings. These settings train the frozen base before STAGE. The optimizer is recreated at epoch 21 after freezing the shared map. The contrastive scale follows SAMGA’s fixed softplus parameterization.
Stage
EEG2
MEG
AJ
Moment calibration
0.07
0.07
0.07
Soft initialization
5.37
0.36
0.82
Feature-map setup
0.09
0.09
0.09
Feature adaptation
6.99
0.47
0.95
Coupling ranking
1.55
0.14
0.08
Total
14.09
1.13
2.01
Appendix
Table S3: Batch processing time (seconds). Each batch contains 200 queries and 200 candidates. Measurements use an Intel Xeon Gold 6458Q CPU with four threads, subject 01 and source seed 0 for each dataset. Entries are medians of three runs after one warm-up.
Quantity
Maximum error or count
Moment scale/offset
4.44e-16
Initialization map/centroids
6.63e-09
Final pairwise cost
3.77e-03
Cases below 10−7
28 / 30
Direct truth-rank changes
2
CSLS truth-rank changes
0
Appendix
Table S4: Independent query/gallery row permutations. Complete K12/40 pipeline, thirty EEG2 cases. Errors are maxima over cases and entries. Rank changes count true-image ranks over all 6,000 query–seed evaluations after inverse permutation and identity-stable tie breaking.
Symbol
Meaning
Symbol
Meaning
N,M
number of queries and candidates (200 each in the closed set)
T,T(k),T⋆
teacher, initialization, and final couplings
d
feature dimension (512)
Zb0
features after calibration and initialization
a=1N/N
row marginal of every coupling
wi
confidence weight of query i
cj
upper bound on the mass a candidate may receive
R
orthogonal map fitted at initialization
Π(a,c)
feasible set of couplings
ρ
ridge coefficient of that fit
P
primal transport variable
λ
weight of the anchoring term
Appendix
Table S5: Notation and definitions.
Use
Solves
Coefficient
Updated object
Initialization
12
ε=0.035
Procrustes map
Teacher refresh
4
ε=0.035
Detached target
Student
40
τ=0.070
Feature gradient
Final ranking
1
ε=0.035
Retrieval scores
Appendix
Table S6: Transport solver evaluations for EEG2. The teacher is refreshed at steps 0,10,20,30 ; each student solve contributes to one feature update. MEG uses two initialization solves, eight student solves and one teacher refresh; Alljoined uses five initialization solves, thirteen student solves and two teacher refreshes.
Figure S1 : Coupling-based alignment, adaptation, and ranking. Top: the EEG2 route uses moment calibration, twelve rounds of coupling-weighted initialization, 40 steps of query-only subspace adaptation, and fixed-feature ranking. MEG uses two initialization rounds and eight adaptation steps; Alljoined uses five rounds and thirteen steps. At each refresh, teacher and student use the same cost at coefficients 0.035 and 0.070; between refreshes the teacher remains fixed while the student follows the current cost. The teacher is detached and refreshed every ten steps. The cost gradient is (T−Tθ)/τ , with a separate feature-anchoring term. Bottom: alternating scaling of one fixed synthetic 3×3 cost. Candidate 1 initially receives mass 0.58; convergence gives row and column mass 1/3 and changes query 2’s top-ranked image from 1 to 2. The closed-set example illustrates soft mass reallocation; for M>N , the column constraint is a capacity. Cell values and marginals are rounded.
Symbol
Meaning
Value
K
initialization rounds (EEG2 / MEG / Alljoined)
12 / 2 / 5
ε
entropy coefficient, teacher/ranking
0.035
τ
entropy coefficient, student
0.07
r
rank of the adaptation subspace
16
λ
anchoring weight
0.15
ρ
ridge of the initialization fit
0.1
Appendix
Table S7: Representation, optimization, and solver settings. These are defaults; individual controls specify changed values and stage switches. Constants that carry a symbol in the paper are listed with it; the remaining rows are named by their role.
Dataset
Direct
CSLS
GES
EEG2
58.63/85.18
63.15/87.67
68.25 / 90.47
MEG
5.00/16.75
6.13/19.63
7.25 / 20.38
AJ
10.65/30.18
11.80/32.83
13.25 / 35.00
Appendix
Table S8: Ranking comparisons across datasets with the NICE encoder. Top-1/Top-5 (%). Ranking rules in a row use exactly the same final features and costs. Initialization/update budgets match the main results: EEG2 12/40, MEG 2/8 and Alljoined 5/13.
Stage
EEG2
MEG
AJ
Encoder cosine
27.65/59.52
3.88/14.00
5.90/20.90
Encoder dot
18.70/49.37
2.13/8.63
2.95/11.20
Radial baseline
26.80/58.45
3.13/14.00
6.20/20.60
Moment calib.
30.80/63.10
3.50/13.63
8.25/25.95
Soft init.
53.03/81.90
4.75/16.75
10.18/30.00
Adaptation
58.63/85.18
5.00/16.75
10.65/30.18
Appendix
Table S9: Cumulative feature stages and final ranking. Top-1/Top-5 (%). The first two rows are unadapted score references. The radial baseline and subsequent feature stages use Direct ranking of the same radial squared-distance definition. Only the final row switches to coupling ranking. Bold marks the best entry per dataset and metric.
Subject
Direct
CSLS
Coupling
01
66.67
72.67
77.67
02
64.33
68.83
76.67
03
56.17
57.67
59.33
04
49.00
52.00
53.83
05
54.33
61.33
65.83
06
63.83
71.00
80.33
Appendix
Table S10: Per-subject NICE EEG2 Top-1. Three source seeds are averaged within each subject; accuracy (%).
Seed
Direct
CSLS
Coupling
0
58.40
62.60
68.40
1
58.70
63.45
67.80
2
58.80
63.40
68.55
Appendix
Table S11: Source-model seed variation. Mean NICE EEG2 Top-1 (%) across ten held-out subjects.
Table S14: Between-subject variability. Mean and sample standard deviation of Top-1/Top-5 (%). EEG2 averages its three source seeds within each subject first. MEG and Alljoined use seed 0; n is the number of subjects.
Figure S2 : Effects of soft correspondences on geometric alignment. (a) Final Top-1 for the three ranking rules after changing initialization correspondences, keeping reference row-confidence weights, estimator and later optimization fixed. (b) Soft-OT minus control Top-1: dots are subjects after averaging source seeds; diamonds and whiskers are means and descriptive 95% subject-bootstrap intervals. All arms evaluate the complete 200-candidate gallery.
Pairs
Direct
CSLS
GES
Row-hard
58.37/84.38
62.32/86.77
66.53/89.90
Assignment
56.30/83.42
60.35/86.07
64.42/89.08
Row-softmax
48.38/79.50
57.35/85.48
65.78/89.42
Soft coupling
58.63 / 85.18
63.15 / 87.67
68.25 / 90.47
Appendix
Table S15: Matched initialization constructions on NICE EEG2. Final Top-1/Top-5 (%) after the same K12 initialization and 40 updates. Each intervention replays the reference query-confidence weights at every round and uses the same regularized Procrustes estimator. Only correspondence construction changes. Bold is per ranking rule and metric across constructions.
Control
Mean
95% interval
+ / = / -
Row-hard
1.72
[0.85, 2.65]
9 / 1 / 0
Assignment
3.83
[2.15, 5.45]
9 / 0 / 1
Row-softmax
2.47
[1.62, 3.63]
10 / 0 / 0
Appendix
Table S16: Soft-initialization paired differences. Final coupled Top-1 change (percentage points); descriptive 95% subject-bootstrap interval. Signs are over ten subjects after averaging their three source seeds.
Row-confidence source
Top-1
Top-5
Coupling entropy
68.25
90.47
Uniform
68.02
90.28
Similarity row
68.03
90.32
Row-softmax entropy
68.02
90.32
Appendix
Table S17: Query-confidence sources at initialization. NICE EEG2 final coupled accuracy (%). The coupling matrix is retained in all four arms; only the additional row-confidence weights change.
Initialization
Updates
Top-1
Top-5
K12
0
65.68
89.68
K12
5
67.48
90.70
K12
10
67.30
90.52
K12
20
67.85
90.43
K12
30
68.20
90.53
K12
40
68.25
90.47
Appendix
Table S18: Initialization and longer optimization. NICE EEG2 coupled accuracy (%), with the same learning rate 0.01 and rank-16 transform. Each optimization budget is fitted independently.
Objective
Top-1
Top-5
Initialization only (0)
65.68
89.68
Scaled attraction (40)
65.03
88.55
Row cross-entropy (40)
67.75
89.47
Coupling matching (40)
68.25
90.47
Appendix
Table S19: Objectives with a shared teacher construction. NICE EEG2 accuracy (%); parentheses give update counts. The teacher recipe is unweighted and identical across arms; refreshed teacher values follow each arm’s feature trajectory. All use K12 initialization and final coupling ranking.
Weighted objective
Top-1
Top-5
Attraction (40)
66.62
89.62
Attraction (80)
66.32
89.67
Row cross-entropy (40)
67.50
89.48
Row cross-entropy (80)
66.58
88.97
Appendix
Table S20: Confidence-weighted teacher references. NICE EEG2 accuracy (%); parentheses give updates. These arms multiply each teacher row by its entropy-confidence weight before unit-mass normalization, comparing complete weighted strategies alongside Table S19 .
Setting
Value
Top-1
Top-5
Default
K12 / 40
68.25
90.47
Refresh
1
67.57
90.07
Refresh
5
68.73
90.30
Refresh
20
68.00
90.53
Refresh
40
67.35
90.50
Anchor
0.0
68.28
90.42
Appendix
Table S21: One-factor sensitivity on NICE EEG2. Final coupled accuracy (%). Each row uses 30 cases; changing one setting leaves the remaining defaults unchanged.
Setting
Value
Top-1
Top-5
Learning rate
0.003
68.78
90.63
Learning rate
0.005
68.55
90.60
Learning rate
0.01 †
68.25
90.47
Learning rate
0.02
68.55
90.62
Learning rate
0.03
68.63
90.50
Learning rate
0.1
67.50
89.88
Appendix
Table S22: Learning rate, student entropy, and initialization budget. NICE EEG2 coupled accuracy (%). Each row changes one factor from K12/40; † denotes the reference setting.
Figure S3 : NICE EEG2 optimization and configuration sensitivity. (a,b) Sensitivity to adaptation steps with K12 and K0 initialization, respectively. (c–f) Sensitivity to teacher refresh interval, feature-anchor weight, subspace rank and initialization ridge. The dashed line marks the reported 68.25% reference; red diamonds mark its setting in each sweep. Every point averages the same thirty subject–seed cases.
Dataset
η
Row only
Ratio 1
Ratio 10
Exact balance
EEG2
0.0175
58.63/85.18
61.52/87.50
67.38/89.63
68.25 / 90.03
EEG2
0.035
58.63/85.18
63.20/88.07
67.95/90.17
68.25 / 90.47
EEG2
0.07
58.63/85.18
64.22/88.02
66.92/89.83
67.27 / 89.97
MEG
0.0175
5.00/16.75
5.63/18.63
6.88/20.00
7.00 / 20.13
MEG
0.035
5.00/16.75
6.00/19.00
7.13/20.25
7.25 / 20.38
MEG
0.07
5.00/16.75
6.00/19.13
7.00/ 20.88
7.25 /20.63
Appendix
Table S23: Effects of column constraints and entropy at fixed costs. Top-1/Top-5 (%). Columns use penalty ratio ξ/η=0,1,10,∞ ; the last enforces uniform column mass exactly. Each setting is evaluated on the same 54 subject–seed cases.
Figure S4 : Effects of column constraints and entropy at fixed costs. Each cell prints Top-1 (%). Color gives the gain over the row-only cell at the same entropy, in percentage points. Columns vary only the penalty ratio in Eq. ( S22 ); Exact denotes uniform column balance. All costs use the stated dataset-specific budgets.
Data
From
Corr.
Harm
Both+
Both–
Net
EEG2
Direct
795
218
3300
1687
9.62
EEG2
CSLS
495
189
3600
1716
5.10
MEG
Direct
32
14
26
728
2.25
MEG
CSLS
18
9
40
733
1.13
AJ
Direct
266
162
264
3308
2.60
AJ
CSLS
185
127
345
3343
1.45
Appendix
Table S24: Prediction changes with coupling ranking. Counts include all queries and both corrected and newly incorrect predictions. EEG2 totals cover ten subjects, each evaluated with three source seeds.
Figure S5 : Prediction changes under joint coupling ranking. (a) Corrected and harmed predictions relative to Direct, as percentages of all query evaluations; labels give net Top-1 changes. (b) EEG2 changes within groups whose Direct candidate attracts one, two, or at least three queries. (c) EEG2 subject changes after averaging three source seeds. Features and costs remain fixed.
Ranking
EEG2
MEG
AJ
Direct
58.63/85.18
5.00/16.75
10.65/30.18
CSLS
63.15/87.67
6.13/19.63
11.80/32.83
Batch IS, β=20
63.52/88.43
7.13/ 20.75
12.58/33.60
IS, 1/ε
63.17/88.30
6.88/20.00
12.48/33.53
GES
68.25 / 90.47
7.25 /20.38
13.25 / 35.00
Appendix
Table S25: Ranking methods at fixed costs. Top-1/Top-5 (%). Batch IS computes normalizers from the current query batch. The matched inverse temperature is 1/0.035 .
η
Top-1
Top-5
Coupling cost
Coverage
0
67.32
—
0.4915
100.00
0.001
67.18
89.63
0.4915
99.83
0.005
67.28
89.87
0.4919
98.73
0.014
68.18
89.98
0.4938
96.22
0.02
68.37
90.18
0.4962
94.87
0.035
68.25
90.47
0.5081
91.95
Appendix
Table S26: Entropy sensitivity at fixed EEG2 costs. Accuracy and argmax coverage (%). Cost is ⟨P,C⟩/∑P . The hard assignment has no defined Top-5 ordering, so that entry is omitted.
Preferred set
Top-1
Top-5
Edges
Outside
Full
68.25
90.47
100.00
0.00e+00
MNN
63.22
83.65
0.27
4.70e-01
Top-5 union
67.78
88.03
3.68
8.43e-07
Top-10 union
68.28
89.95
7.19
2.83e-08
Top-20 union
68.30
90.42
13.81
3.49e-09
Top-50 union
68.25
90.47
32.19
7.55e-11
Appendix
Table S27: Preferred-edge controls on NICE EEG2. Accuracy and edge density (%). Edges outside the preferred set retain kernel multiplier 10−6 ; outside mass is a fraction of total coupling mass. These are fixed-cost support interventions.
Candidates
Direct
CSLS
Equal mass
Capacity
200
58.63/85.18
63.15/87.67
68.25 / 90.47
68.25 / 90.47
700
50.30/74.63
51.62/ 75.70
42.13/68.83
52.22 /75.45
1200
45.42/69.63
45.58/ 70.22
34.65/61.08
46.30 /70.03
1854
41.55/65.78
41.40/65.63
29.18/54.43
42.05 / 65.93
Appendix
Table S28: Gallery expansion with geometry fitted on 200 candidates. NICE EEG2 Top-1/Top-5 (%). Geometry, encoders and query set remain fixed; the ranking gallery and its associated cost normalization are recomputed. Equal mass uses column target 1/M; capacity uses upper bound 1/200.
Candidates
Column rule
True pairs
Direct winners
Unvisited
200
Equal mass
57.17
59.32
26.23
200
Capacity
57.17
59.32
26.23
700
Equal mass
14.97
17.45
76.36
700
Capacity
38.75
53.51
32.64
1200
Equal mass
8.71
10.59
85.63
1200
Capacity
31.98
47.63
40.24
Appendix
Table S29: Matching-mass distribution as the ranking gallery expands. Percent of total mass. Unvisited candidates receive no Direct top-1 votes and retain positive entropic coupling mass.
Candidates
Direct
CSLS
Equal mass
Capacity
100
57.37/88.57
64.67/92.33
75.47 / 95.43
75.47 / 95.43
200
51.07/83.03
54.23/ 85.33
50.83/84.70
57.37 /85.07
700
37.00/67.57
38.50 /68.00
26.20/57.03
38.23/ 68.13
1754
25.57/53.20
26.03 / 53.47
15.57/38.40
25.80/53.27
Appendix
Table S30: Complete-map transfer to disjoint queries. NICE EEG2 Top-1/Top-5 (%). Fit on 100 calibration identities, evaluate 100 different identities with all transform components frozen. Calibration images are excluded from the retrieval gallery; adding 1,654 training concepts gives maximum M=1,754.
Candidates
SCORE
STAGE
700
27.83/ 57.48
30.08 /53.95
1854
17.02 / 38.50
16.97/33.23
Appendix
Table S31: Adaptation with the full expanded gallery. NICE EEG2 Top-1/Top-5 (%). Both methods fit using all candidates at the stated gallery size. STAGE uses capacity constraints throughout fitting and ranking; SCORE uses its recovery and CSLS. Each row averages three source seeds within each of ten subjects.
Figure S6 : Gallery expansion and transfer to disjoint queries. (a,b) Fit geometry on 200 queries/200 images, then expand only the ranking gallery: Top-1 and mass retained on true pairs. (c) Fit on 100 identities and transfer the complete frozen map to 100 different query identities, using equal-mass or capacity ranking; calibration images are excluded, giving maximum gallery size 1,754. (d) The frozen 200-fit geometry evaluated at 1,854 is compared with full-gallery capacity fitting at 700 and 1,854. All three bars use capacity ranking. Every point or bar uses all thirty NICE EEG2 cases.
Query batch size
SCORE
STAGE
10
31.37
28.68
25
38.03
36.87
50
41.22
41.67
100
44.48
48.82
Appendix
Table S32: Small-batch cross-subject retrieval on THINGS-EEG2. Top-1 accuracy (%) with a 200-image gallery.
Identities
SCORE
STAGE
150
46.68/79.89
51.79 / 82.54
100
42.20 / 75.83
40.78/71.20
Appendix
Table S33: Retrieval with repeated identities at fixed batch and gallery sizes. NICE EEG2 Top-1/Top-5 (%). Each row averages two resamplings and three source seeds within each of ten subjects. STAGE includes initialization, adaptation, and capacity ranking.
Row-only adaptation
Global adaptation
Final ranking
Top-1
Top-5
Top-1
Top-5
Direct
49.10
77.10
58.63
85.18
CSLS
55.12
83.57
63.15
87.67
GES
66.25
89.48
68.25
90.47
Appendix
Table S34: Global competition during adaptation. EEG2 accuracy (%) over ten subjects and three source seeds. Teacher and student constraints change together; the final ranking rule is identical within each row. Bold marks the better adaptation arm for each metric.
Figure S7 : Correspondence recovery during alternating initialization. (a) GES Top-1 and (b) conditional coupling weight on the true image through twelve initialization rounds, before feature adaptation. The initially excluded group contains queries whose true pair is absent from the fixed initial MNN landmark set. Curves average three source seeds within each of ten EEG2 subjects; shaded regions are 95% subject-bootstrap intervals. Labels give the initial and final means.
Table 55
Figure S8 : Recovered matches. Ten cases from subjects 1, 3, 5, 7, and 9, two per subject. SCORE ranks the viewed image below fifth place and STAGE retrieves it first. Cases are randomly sampled within each prescribed subject and outcome; all thirty viewed images are distinct.
Figure S9 : Residual errors despite rank improvement. Ten cases from subjects 2, 4, 6, 8, and 10, two per subject. Both methods miss the viewed image at Top-1, although STAGE improves its rank. The top-ten lists show both near misses and matches that remain below tenth place. Labels and green borders follow Fig. S8 .
Figure S10 : Errors introduced relative to SCORE. Ten cases from subjects 1, 3, 5, 7, and 9, two per subject. SCORE retrieves the viewed image first; STAGE ranks it lower. These panels include near misses and larger rank losses under the same protocol.
Data
Encoder dot
Direct
CSLS
GES
EEG2
18.87/49.58
56.98/83.20
60.80/86.00
66.30 / 88.95
MEG
2.38/10.75
5.75/16.88
6.13 / 18.25
5.75/17.00
AJ
3.50/12.75
10.03/27.55
11.10/29.15
11.38 / 30.83
Appendix
Table S37: Additional frozen encoder: SAMGA–TSConv. Top-1/Top-5 (%). All three datasets here use K12 and 40 updates. EEG2 averages ten subjects and three source seeds; MEG four subjects and Alljoined twenty subjects, both at seed 0. Unadapted is the original dot-product score; final ranking rules share the learned radial cost.
Dataset
Encoder
Seed 0
Seed 1
Seed 2
EEG2
NICE
68.40/90.50
67.80/90.60
68.55/90.30
EEG2
TSConv
67.65/90.80
66.75/87.90
64.50/88.15
MEG
NICE
5.63/18.88
5.00/17.50
5.00/19.50
MEG
TSConv
5.75/17.00
7.13/17.00
6.00/18.13
AJ
NICE
12.43/33.75
12.03/32.20
12.70/34.13
AJ
TSConv
11.38/30.83
11.65/32.55
11.40/30.70
Appendix
Table S38: Source-seed replication at a uniform K12/40 budget. Final coupling Top-1/Top-5 (%), averaged over all held-out subjects per seed. NICE and TSConv use the same frozen inference protocol. The uniform budget is K12/40; the dataset-specific MEG and Alljoined budgets in the main evaluation are K2/8 and K5/13, respectively.
Method
EEG2
MEG
Alljoined
SCORE + CSLS [ 5 ]
49.73
5.00
10.18
SCORE + SN (cosine)
53.25
6.25
10.39
SCORE + SN (radial)
58.20
5.63
11.78
STAGE init. + SN
65.68
6.21
12.67
Complete STAGE + SN
68.25
6.25
12.89
Appendix
Table S39: Geometric alignment under a shared ranking rule. Top-1 accuracy (%) on identical frozen NICE features. SCORE denotes its coordinate recovery. Below the divider, the cost construction and standard SN ranking are shared across the three geometries. Above it, SCORE uses its native cosine-based scores. All SN comparisons use uniform row and column mass 1/200 and ε=0.035 . Source seeds are averaged within each subject before averaging subjects. Bold marks the best value in each dataset, including ties.
Dataset
Subjects
Δ Top-1
95% interval
EEG2
10
+18.52
[16.32, 20.68]
MEG
4
+1.25
[-0.13, 2.58]
Alljoined
20
+2.72
[1.73, 3.73]
Appendix
Table S40: Subject-paired gains over SCORE recovery with CSLS. Differences are in percentage points on matched frozen NICE features. Subjects are the resampling units after averaging source seeds. The independent subject counts are 10, 4, and 20.
Dataset
Initialization
None
Row
Global
EEG2
Radial MNN
58.40
57.22
63.07
CSLS MNN
62.93
62.90
66.52
Soft coupling
65.20
66.17
68.02
MEG
Radial MNN
5.79
5.58
5.75
CSLS MNN
5.67
5.63
5.58
Soft coupling
6.00
6.25
6.13
Appendix
Table S41: Correspondence recovery and adaptation with matched budgets. Top-1 accuracy (%) on frozen NICE features with uniform query multipliers and shared standard SN ranking. None, Row, and Global denote no adaptation, row-normalized teacher/student adaptation, and globally balanced teacher/student adaptation. The three source seeds are averaged within each subject before averaging 10 EEG2, 4 MEG, or 20 Alljoined subjects. Bold marks the best initializer in each adaptation column within a dataset.
Figure S11 : Recovery of initially excluded correspondences. Top-1 accuracy on EEG2 queries whose true pairs are excluded by the common initial CSLS MNN selection. Each curve uses the initialization settings in Table S41 , before feature adaptation, with shared standard SN ranking at every round. The query group remains fixed across initializers and rounds. Lines average seeds within subjects and then subjects; bands are pointwise 95% subject-bootstrap intervals over ten subjects.
Adaptation
Top-1
None (initialization)
65.68
Full (rotation, scale, translation)
68.25
Rotation
68.30
Scale
66.00
Rotation + scale
68.38
Rotation + translation (fixed scale)
68.25
Appendix
Table S42: Directional and scale updates after initialization. EEG2 Top-1 accuracy (%) with identical initialization and final GES ranking. Each row specifies the parameters learned during adaptation; the remaining blocks stay fixed at their identity values. Source seeds are averaged within each subject before averaging subjects. Bold marks the highest mean.
Subsequent update
EEG2
MEG
Alljoined
No further update
65.68
6.21
12.67
WP-style projected updates
50.00
5.92
12.53
Hard alternating Procrustes
65.00
6.04
12.12
Entropic OT–Procrustes
68.08
5.71
10.22
Hard-teacher adaptation
67.02
5.88
12.39
STAGE (soft teacher)
68.25
6.25
12.89
Appendix
Table S43: Post-initialization updates from shared features. Top-1 accuracy (%) with identical STAGE initialization and final GES ranking. The rigid controls vary the subsequent update rule; the teacher comparison varies only the teacher’s soft or hard correspondences while learning the same constrained feature transform. All 200 queries and candidates are retained. Three source seeds are averaged within each subject before averaging 10 EEG2, 4 MEG, or 20 Alljoined subjects. Bold marks the highest mean in each dataset.
Ranking rule
Top-1
Top-5
Selected-pair cost
Ground-truth matching
100.00
–
0.5165
Max-cost matching
0.00
–
1.8559
Row-wise
58.63
85.18
0.4681
Hard assignment
67.32
–
0.4915
Coupling (ours)
68.25
90.47
0.4854
Appendix
Table S44: Retrieval accuracy and selected-pair cost. Top-1/Top-5 (%) over 30 cases at fixed costs. Mean selected-pair cost is normalized by the median squared distance within the gallery. Ground-truth and max-cost matchings are reference controls. Dashes denote inapplicable Top-5 for rules that return a single match without a candidate ranking.
Figure S12 : Correspondence support and coupling weights. (a) Pairs the MNN rule admits, 0.40 per query and 21.5% of them correct; (b) coupling weight per cell; (c) available pairs per query, 0.40 for MNN and 200 for the dense coupling. One held-out fold (THINGS-EEG2, subject 01, seed 0, 200×200 ).
Adaptation objective
EEG2
MEG
Alljoined
Direct OT ( η=ε )
61.48
5.29
10.93
Direct OT ( η=τ )
52.53
5.58
10.43
STAGE (soft teacher)
68.25
6.25
12.89
Appendix
Table S45: Adaptation objectives under matched geometry. Top-1 accuracy (%) on identical initialized features, constrained transforms and final rankings. Budgets are 40, 8 and 13 updates for EEG2, MEG and Alljoined. Three seeds are averaged within each subject, then across 10, 4 and 20 subjects. Bold marks the best mean.
EEG2
MEG
Alljoined
Subsequent update
Fit
GES
Fit
GES
Fit
GES
Direct OT ( η=ε )
28.90
1.01
2.03
0.33
1.58
0.24
Direct OT ( η=τ )
2.58
0.67
0.31
0.18
0.71
0.25
Hard teacher
3.37
4.24
0.32
0.35
0.75
0.25
OT–Procrustes
425.54
10.11
46.61
9.21
60.56
9.69
OT–Procrustes + confidence/ridge
39.22
4.51
2.89
0.84
2.12
0.26
Appendix
Table S46: Timing of post-initialization updates. Median seconds on a 200-query/200-candidate batch, four CPU threads, subject 01 and source seed 0. Fit measures subsequent feature updates; GES measures the final coupling solve. The ordinary OT–Procrustes control uses uniform query weights without ridge; the confidence/ridge variant retains STAGE’s query confidence and identity regularization. Both use 44/9/15 transport–Procrustes updates on EEG2/MEG/Alljoined. Teacher and direct-objective variants use 40/8/13 feature updates. Bold marks the lowest time in each column.
Accurate visual decoding can reveal how the brain represents visual information and recover perceived content from neural signals such as electroencephalography (EEG), with potential for neural communication. However, current EEG-to-image retrieval methods perform far below their within-subject counterparts for new users without labeled calibration, limiting real-world deployment. To understand this gap, we analyze EEG features across subjects and find that different subjects preserve similar relationships among concepts but express them along different coordinate directions. We therefore propose Subject Coordinate Recovery (SCORE), a target label-free framework combining recovery-aware source training with coordinate alignment at deployment. During training, SCORE aligns source subject EEG with a common image space and simulates unseen-subject recovery through source-only episodes. At deployment, with both encoders frozen, SCORE selects reliable EEG-image landmarks through hubness-corrected matching and estimates an orthogonal transformation to recover target EEG coordinates without source data or target labels. In 200-way retrieval on two public benchmarks, SCORE outperforms the unadapted baseline for every target subject and achieves the best overall accuracy. It reaches 53.23%/83.55% and 12.01%/32.16% Top-1/Top-5 on THINGS-EEG2 and Alljoined-1.6M, respectively, surpassing the strongest baselines by 17.45/15.70 and 3.08/4.62 percentage points. Without target labels or encoder updates, SCORE brings brain-based visual decoding closer to robust, practical, low-latency deployment across users.
Zhenyao Cui, Siyuan Kan, Siyang Li +2
School of Artificial Intelligence and Automation, Huazhong University of Science and Technology, Wuhan, China
Cross-subject EEG-to-image retrieval suffers from substantial performance degradation on new subjects due to subject shift. Test-time adaptation (TTA) can mitigate this shift by adapting pretrained models with unlabeled target-subject EEG. However, most existing TTA methods struggle to match supervision granularity to each query's prediction confidence, leaving many queries without reliable pseudo-labels. To address this, we propose a novel framework named Hierarchical Selective Test-Time Adaptation (HSTTA). HSTTA builds a hierarchy over gallery image embeddings, uses hierarchical selective prediction to assign each EEG query a supervision granularity matching its current prediction confidence, and constructs adaptation objectives accordingly. We further propose Cross-Session Consistency Calibration (CSCC), an unsupervised method that calibrates the global confidence threshold to target a predefined accuracy level for hierarchical predictions. Moreover, we introduce Reciprocal Hierarchical Backoff (RHB), which moves queries lacking reverse-matching support to coarser nodes to mitigate error reinforcement. Experiments on two public benchmarks and ablation studies validate the effectiveness of HSTTA and its key components. On THINGS-EEG2, HSTTA outperforms the strongest EEG-specific TTA baseline by 17.9 (13.4) and 8.9 (3.7) percentage points in Top-1/Top-5 accuracy, respectively, under cosine (CSLS) ranking. Further analyses show that HSTTA yields more accurate pseudo-labels during adaptation, supporting more reliable model updates.
Hongzhou Chen, Yuhao Wei, Lianghua He +2
School of Computer Science and Technology, Tongji University · Shanghai Eye Disease Prevention and Treatment Center
In cross-subject neural--image retrieval, comparing the mean of a few stimulus-matched target observations with the global source mean conflates subject-specific representation shifts with stimulus-composition effects. To address this problem, we propose Stimulus-Anchored Latent Bias Calibration (SA-LBC), which estimates the first-order shift under fixed preprocessing and a frozen source-trained representation by averaging residuals between target responses and same-stimulus source-population anchors, then shrinks the correction using source-derived uncertainty. Under uniform sampling without replacement from a finite stimulus population, we derive exact finite-population MSE expressions for the unshrunk anchored and global-mean estimators, including residual--anchor cross-covariance, and establish a necessary and sufficient condition for anchoring to reduce MSE relative to global-mean estimation. In a 10-subject leave-one-subject-out evaluation on THINGS-EEG2, SA-LBC increases mean reciprocal rank (MRR) for the Attention--CLIP ViT-B/32 configuration from 0.1867 without calibration to 0.2013 and 0.2336 with M=2 and M=16 stimulus-level calibration samples, respectively. Across six neural--visual configurations and all calibration budgets, stimulus-matched anchors yield higher MRR than anchors with shuffled stimulus identities, but retrieval gains over no calibration remain representation-dependent. At (M=2), shrinkage improves MRR over the unshrunk anchored estimator in all six configurations, but its effects at larger budgets vary across representations; the relative ranking of translation and orientation corrections also depends on regularization strength. Thus, lower shift-estimation MSE does not guarantee higher retrieval performance. The source code is publicly available at: https://github.com/Xizhang-Yao/SA-LBC.
Xizhang Yao, Li Zhang, Gan Huang +1
School of Biomedical Engineering, Health Science Center, Shenzhen University, and the Guangdong Provincial Key Laboratory of Biomedical Measurements and Ultrasound Imaging, Shenzhen, China