Source-linked AI summary

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

Iason Skylitsis, Dimitrios Karkalousos, Ivana Išgum

arXiv:2605.20405v1eess.IVcs.AIcs.CVphysics.med-ph

TL;DR

Class imbalance in medical image segmentation leaves rare-class exposure insufficiently controlled by loss weighting and image-level sampling. The paper applies episodic sampling to supervised CT body-composition segmentation and separates sampler effects from training-iteration budgets. Episodic sampling’s apparent advantage is largely explained by iteration differences, although a smaller residual advantage remains under matched budgets.

  • Problem

    Existing loss and sampling strategies mitigate class imbalance but do not explicitly control which classes appear within each training batch.

  • Method

    The study compares episodic, random, and weighted sampling for nine tissue classes under full-data, low-data, and matched-iteration training while holding the model and optimization settings constant.

  • Results

    Under matched fixed-iteration budgets, the three samplers performed comparably, while episodic sampling retained a small advantage associated with delayed overfitting.

  • Takeaways & Limitations

    Sampling-strategy evaluations should use iteration-aware protocols to distinguish algorithmic effects from differences in effective training budgets.

  • Takeaways & Limitations

    Evaluation was limited to a single task, baseline model, and loss configuration, and the calibrated schedule used episodic sampling’s 500 iterations per epoch as its reference budget.

Abstract

from arXiv · show

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.

1 Introduction

Medical image segmentation suffers when frequent classes dominate pixel-level learning, while existing loss and image-sampling methods do not explicitly control class composition within batches. This work evaluates episodic sampling in supervised CT body-composition segmentation while separating sampling effects from training-iteration budgets.

  • Motivation: Frequent classes dominate per-pixel loss and gradient updates, biasing models against rare tissues and reducing segmentation accuracy.The imbalance also contributes to overfitting under dense prediction.
  • Existing approaches: Loss-based methods mitigate imbalance through class reweighting, overlap objectives, hard-example focus, or compound loss functions.Examples include weighted cross-entropy, Dice loss, focal loss, and cross-entropy combined with Dice.
  • Existing approaches: Input-level methods alter how often images, patches, volumes, or slices are sampled, but generally do not explicitly control class composition within each batch.This limitation applies across weighted, oversampling, undersampling, class-aware, repeat-factor, and importance-sampling approaches.
  • Contribution: Episodic sampling draws batches from controlled subsets of classes, adapting a few-shot learning mechanism to supervised segmentation.The paper decouples episodic batch construction from metric-based learning and evaluates it on multi-class CT body-composition segmentation.
  • Contribution: Epoch-based comparisons can confound sampling strategies with effective training iterations because samplers may produce different numbers of iterations per epoch.The study therefore compares random, weighted, and episodic sampling across full-data and low-data regimes and under matched iteration budgets.
  • Application: Fine-grained CT body-composition segmentation contains large compartments alongside small, spatially localized muscle and adipose structures.This setting is under-explored relative to single-slice or coarse-label body-composition pipelines.

2 Methods

The study uses 210 SAROS CT scans to compare random, weighted, and episodic slice sampling for nine tissue classes under full- and low-data conditions. Experiments hold the model and optimization settings constant while examining class-structured batches and iteration-aware training schedules.

  • Dataset: The experiments use 210 publicly available SAROS CT scans, with annotations refined into nine muscle and adipose tissue classes.The nine classes include ESM, IMAT, PEM, PSM, QLM, RAM, SAT, SM, and VAT.
  • Dataset: Reference annotations were expanded and refined using BOA-derived segmentations and Hounsfield Unit thresholds for physiologically plausible tissue masks.VAT was further refined using organ-and-bone masks, and small isolated clusters were removed by 3D connected-component analysis.
  • Dataset: The dataset was standardized to RAS orientation, cropped between relevant thoracic and lumbar vertebral levels, and reduced to 10,920 slices.Figure 1 reports slice-wise prevalence across the nine tissue classes.
  • Sampling Strategies: Random sampling draws slices uniformly, whereas weighted sampling favors slices containing rare classes without constraining within-batch composition.Weighted probabilities are proportional to the inverse frequency of the rarest foreground class present in each slice.
  • Training and evaluation: All strategies use the same supervised training model, loss, optimization settings, and evaluation metrics, differing only in slice selection.Performance is assessed with per-class Dice and HD95 across foreground classes.
  • Sampling Strategies: Episodic sampling selects foreground-class subsets and draws support and query slices from class-restricted pools, producing approximately balanced class exposure.Classes are sampled uniformly rather than in proportion to frequency, while both support and query slices retain full multi-class labels.
  • Experimental design: The study evaluates full-data training with 100% of development scans and low-data training with 10% patient-level subsampling.The data split uses 85% for development and 15% for testing, with patient-level five-fold cross-validation in development.
  • Experimental design: Low-data epoch-based schedules create a 12× iteration disparity: 1,290 versus 15,000 iterations at epoch 30 and 860 versus 10,000 under 20-epoch early-stopping patience.These figures correspond to random/weighted versus episodic sampling, respectively.

3 Results

Across full-data and low-data regimes, episodic sampling performed best under standard epoch-based training, but matched-budget evaluations substantially reduced its apparent advantage. Training dynamics further showed that episodic sampling continued improving longer before plateauing.

  • Standard epoch-based training: 0.882 mean Dice under full-data training for episodic sampling versus 0.878 for both random and weighted sampling.The corresponding HD95 values were 6.77 mm, 7.98 mm, and 7.80 mm, respectively.
  • Standard epoch-based training: 0.787 mean Dice under low-data training for episodic sampling versus 0.758 for random and 0.762 for weighted sampling.Episodic improved on eight of nine foreground classes, with the largest gains on IMAT, QLM, PEM, and PSM.
  • Ablation: Query- and support-based episodic supervision yielded near-identical performance, with query supervision selected for subsequent experiments.At 100%, mean Dice was 0.882 for queries versus 0.881 for supports; at 10%, both achieved 0.787.
  • Matched training budgets: 0.778, 0.773, and 0.773 mean Dice for episodic, random, and weighted sampling under fixed 3,000-iteration training, respectively.No sampler consistently dominated across classes or HD95, whose best average was 15.09 mm for weighted sampling.
  • Matched training budgets: Iteration calibration improved random sampling from 0.758 to 0.777 mean Dice and weighted sampling from 0.762 to 0.778, substantially narrowing the gap.Random still led average HD95, 15.95 mm versus 16.05 mm for episodic.
  • Training dynamics: Under iteration-calibrated training, random and weighted sampling peaked at 5,100 and 7,800 iterations, whereas episodic peaked at approximately 15,000.Under uncalibrated low-data training, random and weighted stopped near 2,500 iterations while episodic ran to approximately 30,000.

4 Discussion

The discussion identifies epoch-based training budgets as a major confound in sampling comparisons, while finding a smaller residual advantage for episodic sampling that may reflect implicit regularization. It also highlights practical benefits and methodological boundaries for CT body-composition segmentation.

  • Episodic sampling was evaluated as a model-agnostic, plug-and-play strategy alongside random and weighted sampling for imbalanced CT tissue segmentation.
  • Sampling strategies were strongly affected by epoch-based scheduling because different iterations per epoch produce different effective training budgets.
  • Under matched budgets, the three samplers performed comparably, while episodic sampling retained a narrower advantage under iteration-calibrated training.
  • Episodic sampling continued improving for approximately three times as many iterations before overfitting, consistent with implicit regularization from class-balanced batches.
  • Weighted sampling matched random sampling across conditions, suggesting that slice-level reweighting alone may not address within-image pixel imbalance.
  • The approach offers a low-cost input-level intervention for rare muscle and adipose structures without changing the loss or requiring additional annotations.
  • The study is limited by refined annotations that may contain label noise, one calibrated reference budget, and evaluation on a single task, baseline, and loss configuration.

5 Conclusion

The conclusion presents episodic sampling as a practical strategy whose apparent gains largely reflect training-budget differences, while supporting iteration-aware comparisons and a smaller residual benefit under matched budgets.

  • Episodic sampling was evaluated as a plug-and-play class-imbalance strategy against random and weighted sampling in medical image segmentation.
  • The apparent advantage of episodic sampling stemmed primarily from epoch-based scheduling rather than the sampling mechanism itself.
  • Under matched training budgets, episodic sampling retained a small advantage while random and weighted sampling overfit earlier during extended training.
  • The findings motivate iteration-aware protocols on small datasets to separate algorithmic improvements from incidental compute differences.

A Appendix

The appendix compares episodic, random, and weighted sampling across full-data, low-data, fixed-iteration, and iteration-calibrated regimes using training and validation losses and per-class Dice.

  • Table 5 reports held-out test performance for episodic query-based and support-based training under full-data and low-data regimes.
  • Figures 6 and 7 show training loss, validation loss, and per-class validation Dice for episodic, random, and weighted sampling in full-data and low-data regimes.
  • Figure 8 presents the same comparisons under a low-data fixed 3,000-iteration constant-learning-rate regime.
  • Figure 9 presents the same comparisons under a low-data iteration-calibrated regime.
Loading 2605.20405v1…