cs.CVJul 29, 2026

Beyond Random Partitioning: Unsupervised Spatio-Temporal Stratification for Cohort Balancing in Longitudinal Medical Imaging

Authors: Qinghui Liu, Jon André Ottesen, Atle Bjørnerud, Kyrre Eeg Emblem

Organizations: Department of Physics and Computational Radiology, Oslo University Hospital, Norway

Abstract

Rigorous dataset partitioning is a foundational, yet frequently overlooked, prerequisite for reliable deep learning in longitudinal medical imaging. Naively shuffling small clinical cohorts routinely introduces covariate shifts and temporal sampling imbalances across training, validation, and test subsets, exposing downstream models to out-of-distribution evaluation. We address this vulnerability with an auditable Tripartite Dataset Analytics Framework that systematically characterizes spatial grid integrity, multi-parametric intensity fingerprints, and longitudinal temporal trajectories, quantifying the heavy-tailed feature dispersion and irregular, episodic sampling intervals typical of real-world clinical cohorts. Building on this characterization, we formalize an unsupervised spatio-temporal cohort-balancing standard operating procedure (SOP) that combines elbow-optimized K-means clustering over a standardized, six-dimensional joint intensity-temporal feature space with intra-cluster proportionate stratified sampling. On a longitudinal, contrast-enhanced T1T1-weighted brain MRI cohort (N=149), the protocol reduces the maximum cross-subset intensity bias from 34.1% under conventional random shuffling to under 2.1%, while aligning longitudinal follow-up intervals closely around the population mean. Monte Carlo stress testing across ten random seeds and three split configurations confirms that this alignment remains tightly bounded, in clear contrast to the substantial variability of random partitioning. The resulting protocol offers a reproducible, generalizable procedure for cohort engineering in variable-length longitudinal clinical imaging workflows.

Explore similar work

May 19, 2026eess.IV

Disentangling Sampling from Training Budget in Class-Imbalanced CT Body Composition Segmentation

Class imbalance is a fundamental challenge in medical image segmentation, where frequent classes typically dominate training at the expense of rare classes. Loss-based approaches mitigate imbalance by reweighting the per-pixel loss within the batch, while sampling strategies control which images enter the batch. Yet neither explicitly controls which classes appear within the batch, leaving rare-class exposure only partially rebalanced. In this work, we adopt episodic sampling from few-shot learning to promote class-balanced batch construction in a fully supervised setting. We decouple episodic sampling from its conventional metric-learning context and evaluate it in body composition segmentation in CT. We compare episodic sampling against random and weighted sampling on nine muscle and adipose tissues, derived from 210 scans of the public SAROS dataset. Training is performed under full- and low-data regimes, with additional comparisons under matched training iteration budgets. Under full-data training, all three strategies performed comparably (mean Dice 0.882 for episodic, 0.878 for random and weighted). Under low-data training, episodic sampling outperformed random and weighted (0.787 vs. 0.758 and 0.762), driven by a 12-fold difference in training iterations. Under matched training budgets, random and weighted overfit earlier, while episodic improved for approximately three times more iterations before plateauing. Our findings identify the training iteration budget as under-recognized confound in sampling strategies, motivating iteration-aware evaluation protocols for small datasets. Furthermore, the residual advantage of episodic sampling is consistent with an implicit regularization effect of class-balanced batches, offering a low-cost, model-agnostic strategy for class-imbalanced medical image segmentation. Code is available at https://github.com/iasonsky/episodic-sampling.
Iason Skylitsis, Dimitrios Karkalousos, Ivana Išgum
Jul 2, 2026cs.LG

Beyond the Performance Illusion: Structure-Aware Stratified Partitioning and Curriculum Distributionally Robust Optimization for Spatially Correlated Domains

Performance evaluation in AI systems commonly assumes that random dataset splits produce independent and identically distributed (i.i.d.) subsets. We show that this assumption often breaks down in spatiotemporally correlated domains such as aerial surveillance, precision agriculture, and medical imaging, leading to two systematic failures: data leakage, where correlated samples span training and validation splits and inflate performance estimates, and hidden stratification, where errors on minority subpopulations are obscured by aggregate metrics. To address these issues, we propose a unified evaluation and training framework for spatially correlated data. We introduce Structure-Aware Stratified Partitioning (SASP), which constructs validation splits that reduce spatiotemporal leakage while preserving meaningful class balance, and Curriculum Distributionally Robust Optimization (CDRO), a curriculum-based relaxation of distributionally robust training that stabilizes optimization under these stricter splits. Across multiple benchmarks, this combination yields consistently improved generalization, more reliable confidence calibration, and exposes failure modes that remain hidden under conventional random-split evaluation.
Prathamesh Patil, Arpit Jain, Aswanth Krishnan
Jul 5, 2026cs.CV

Beyond Random Sampling: Distribution-Aware Alignment for Semi-Supervised Medical Image Segmentation

Precise medical image segmentation is crucial for clinical diagnosis and treatment planning, yet relies heavily on expensive expert annotations. Semi-supervised medical image segmentation (SSMIS) offers a cost-effective solution but typically operates under the assumption of independent and identically distributed (i.i.d.) data, defaulting to random sampling. While statistically valid at scale, this strategy suffers from severe representation bias in low-data regimes, failing to capture the heterogeneous medical data manifold. To address this, we propose a highly data-efficient framework driven by distribution alignment. First, we introduce an offline Distribution-Aware Sample Selection strategy. By leveraging Vision Foundation Models (VFMs) and our designed Density-K-Center algorithm, we explicitly identify representative structural anchors, establishing a more representative labeled domain. Second, to bridge the remaining distribution gap, we propose the Memory-guided Copy-Paste (MCP) module. Tailored for the inherent class imbalance in medical scans, MCP leverages a semantic memory mechanism to retrieve historically consistent priors for cross-domain alignment, encouraging semantic consistency. Coupled with an easy-to-hard progressive schedule, this framework effectively mitigates early-stage pseudo-label noise. Extensive experiments on six diverse 2D and 3D datasets demonstrate strong segmentation performance, particularly in extremely low-labeled scenarios (\eg, 1/16 ratio).
Weihao Yan, Yeqiang Qian, Yi Dong +1