TL;DR
Pretraining foundation models for clinical time series requires balancing different inductive biases to ensure representations transfer well to both classification and regression tasks. This paper introduces PATHOFM, a multi-objective transformer framework for pathological gait analysis that combines local reconstruction, temporal forecasting, and in-context learning. The authors demonstrate that a dynamics-centric mixture of these objectives avoids the typical trade-offs of single-bias methods, achieving robust generalization across diverse downstream clinical tasks under strict subject holdout.
What Problem Does This Paper Address?
Clinical time-series data—such as gait kinematics and kinetics—are notoriously difficult to model. Medical datasets typically feature small cohorts, expensive labels, and high heterogeneity across different clinics, sensors, and patient populations. This leads to two common failure modes: supervised models overfit to cohort idiosyncrasies (generalizing poorly to new subjects), and representations optimized for one endpoint (like diagnosis classification) transfer poorly to another (like continuous kinetic regression).
While self-supervised pretraining offers a way to leverage unlabeled data, the choice of inductive bias—the structural assumptions built into the pretraining objective—creates a fundamental trade-off. For instance, contrastive "grouping" objectives excel at classification but discard absolute magnitude and fine-grained waveform details needed for regression. Conversely, pure reconstruction preserves local morphology but struggles with class separability. This paper addresses how to design pretraining objectives that achieve balanced cross-task transfer while generalizing to entirely unseen subjects.
Methods
The authors propose PATHOFM, an encoder-centric transformer architecture. Instead of relying on a single self-supervised task, it uses a multi-objective pretraining strategy combining three complementary biases:
- Local Completion (LC): Reconstructs contiguous masked spans within a window to capture local signal morphology and cross-channel correlations (a masked-autoencoding bias).
- Temporal Continuity (TC): Predicts a masked mid-horizon future from an observed prefix, forcing the model to learn phase-consistent latent dynamics and smoothness (a dynamics bias).
- Unsupervised In-Context Dynamics (uICD): Organizes a support-query table of windows from the same subject. The model reconstructs a masked query window by attending to unmasked exemplar "support" windows, enabling non-parametric adaptation via attention without explicit parameter updates at test time.
The implementation also features critical clinical data engineering steps: linear interpolation with edge filling to handle missing values smoothly, and a subject-balanced batch sampler to prevent high-volume subjects from dominating the pretraining phase.
Datasets
The study utilizes a clinical dataset of multivariate gait time series from 230 patients with Spinal Cord Injury (SCI). The data includes biomechanical variables such as joint angles, progression, power, and moments.
Evaluation is conducted under a strict subject holdout protocol: 10 subjects are completely held out for testing, 10 for validation, and the remaining 210 are used for training. This ensures the model is evaluated on its ability to generalize to entirely new patients, mimicking real-world clinical deployment where new patients appear at test time.
Key Insights and Ideas
- Inductive Biases Dictate Downstream Success: The paper provides a clear taxonomy showing that pretraining objectives are not interchangeable. Grouping biases (like contrastive learning) compress out magnitude information to achieve class separation, making them poor fits for continuous kinetic regression.
- Dynamics-Centric Mixtures Provide Balance: Combining local reconstruction (LC) with temporal forecasting (TC) and in-context conditioning (uICD) avoids single-task optimization traps, yielding a versatile representation.
- uICD acts as Attention-Based Exemplar Regression: By using row-aware attention over same-subject windows, the transformer performs a learned similarity search to reconstruct missing data, effectively mimicking how clinicians compare a patient's current measurements to reference exemplars.
Key Results
On pretext tasks evaluated on held-out subjects, PATHOFM achieves high reconstruction fidelity, with an $R^2$ of 0.90 for Local Completion and 0.85 for Temporal Continuity.
In downstream evaluations, the full multi-objective mixture (LC+TC+uICD) achieves the most balanced performance across three classification tasks (pathology category, gender, SCIM independence level) and Ground Reaction Force (GRF) regression:
- Pathology Classification: PATHOFM achieves an F1 score of 0.69 and an AUC of 0.66, outperforming pure diffusion or subject identification baselines.
- GRF Regression: For continuous kinetic targets along the Z-axis, it achieves a strong Pearson correlation ($\rho$) of 0.88 and a low RMSE of 0.202, demonstrating excellent magnitude and phase preservation.
Limitations and Future Work
The main practical constraint of the in-context adaptation component (uICD) is its sensitivity to support selection; choosing irrelevant or noisy support windows can mislead the attention mechanism. Additionally, while the learned representations transfer effectively without requiring test-time exemplars, the full benefits of test-time exemplar conditioning (e.g., for longitudinal patient monitoring) were not fully explored in downstream tasks. Finally, the study is focused on a specific clinical domain (pathological gait in SCI), so validating this taxonomy and multi-objective approach on other diverse clinical time-series modalities (like ECG or EEG) remains an open direction.
Summary updated