Test-time adaptation (TTA) promises to personalize medical time series classifiers to a new subject from a few unlabeled recordings. Its standard recipe, entropy minimization over normalization parameters, follows the model's uncertainty rather than the ways in which subjects actually differ, and with few windows it can turn correct predictions into errors. We argue that where to adapt should itself be learned. Because inter-subject shift is plausibly driven by a few shared physiological and recording factors, we propose Learned Subspace Test-Time Adaptation (LSTA), which meta-learns from past subjects a low-rank space of LayerNorm updates and restricts each new subject's adaptation to it. During meta-training, unlabeled support windows determine an entropy step within this space, and the classification loss on labeled query windows from the same subject shapes it. At test time the space is fixed, the parameters outside LayerNorm remain frozen, and each subject adapts from at most eight unlabeled windows. On five EEG and ECG benchmarks with subject-exclusive splits, LSTA obtains the highest mean accuracy and macro-F1 among seven TTA baselines, and a learned subspace outperforms a random one in 22 of 25 dataset-seed pairs. Across all eight datasets we evaluate, LSTA is the only method whose macro-F1 never falls below that of the frozen model, and under contaminated support it degrades far less than direct LayerNorm adaptation and turns fewer correct predictions into errors. On clean data, its gain over direct LayerNorm adaptation is concentrated on one dataset.
LSTA learns, from past subjects, the directions in which a new subject's LayerNorm parameters are allowed to move, and adapts only along them.
Inter-subject shift is plausibly driven by a few shared physiological and recording factors, so subject-specific LayerNorm updates are restricted to a shared low-rank subspace.
Unlabeled support windows of a training subject determine an entropy step within the subspace; the classification loss on labeled query windows from the same subject shapes it.
The subspace is fixed, all parameters outside LayerNorm stay frozen, and each new subject adapts from at most eight unlabeled windows.
Macro-F1 on five subject-labeled EEG and ECG benchmarks (mean over five backbone seeds). All numbers are from the paper.
| Method | ADFTD | APAVA | TDBrain | PTB | PTB-XL | Mean |
|---|---|---|---|---|---|---|
| Frozen backbone | 48.44±1.72 | 85.71±0.49 | 92.36±1.27 | 81.60±2.31 | 62.39±0.30 | 74.10 |
| Tent | 52.70±3.00 | 88.17±2.00 | 95.14±2.05 | 81.54±2.63 | 64.10±0.45 | 76.33 |
| T3A | 49.95±2.60 | 87.64±1.28 | 92.66±1.32 | 81.70±2.94 | 64.44±0.42 | 75.28 |
| SAR | 50.54±3.47 | 87.25±2.52 | 97.18±0.56 | 81.68±2.71 | 63.81±0.38 | 76.09 |
| MemBN | 45.93±1.84 | 81.05±0.72 | 89.42±1.17 | 72.99±3.66 | 57.95±0.49 | 69.47 |
| SHOT | 50.73±3.21 | 88.64±1.94 | 94.22±1.69 | 80.99±2.78 | 63.97±0.46 | 75.71 |
| UCon | 51.70±3.36 | 89.05±3.64 | 92.92±3.35 | 82.02±1.72 | 64.62±0.44 | 76.06 |
| MedTS-TTT | 48.80±2.79 | 73.15±9.25 | 96.88±2.86 | 73.89±4.49 | 63.33±1.00 | 71.21 |
| LSTA (ours) | 55.32±1.86 | 93.18±3.60 | 98.88±0.76 | 84.09±3.53 | 64.66±0.51 | 79.23 |
| Variant | APAVA | TDBrain | PTB | ADFTD | PTB-XL | Mean |
|---|---|---|---|---|---|---|
| Frozen Backbone | 85.71±0.49 | 92.36±1.27 | 81.60±2.31 | 48.44±1.72 | 62.39±0.30 | 74.10 |
| LN-TTA | 92.36±3.68 | 98.91±0.79 | 83.56±3.27 | 51.42±3.71 | 64.71±0.45 | 78.19 |
| LSTA | 93.18±3.60 | 98.88±0.76 | 84.09±3.53 | 55.32±1.86 | 64.66±0.51 | 79.23 |
| Random-Subspace | 91.07±5.96 | 98.65±0.98 | 81.47±4.31 | 51.08±3.46 | 64.06±0.44 | 77.26 |
| LN-TTA-Learnable | 92.41±3.75 | 98.93±0.79 | 83.60±3.25 | 52.51±3.39 | 64.71±0.46 | 78.43 |
Figures and tables from the paper's appendix. Click any image to open it at full resolution.















@article{dukre2026lsta,
title={Learning Where to Adapt: Learned Subspace Test-Time Adaptation for Medical Time Series},
author={Dukre, Adinath and Herath, Sandun and Razzak, Imran},
journal={arXiv preprint},
year={2026}
}