Reinforcement Learning for Unsupervised Domain Adaptation in Spatio-Temporal Echocardiography Segmentation

Arnaud Judge, Nicolas Duchateau, Thierry Judge, Roman A. Sandler, Joseph Z. Sokol, Christian Desrosiers, Olivier Bernard, Pierre-Marc JodoinarXiv 2025 · DOI

Abstract

Deep learning models for echocardiography often fail when applied to new clinical environments due to domain shift. This paper presents RL4Seg3D, a reinforcement learning-based framework for unsupervised domain adaptation. By treating segmentation as a sequential decision-making process and optimizing against non-differentiable clinical priors—such as anatomical validity and temporal consistency—RL4Seg3D achieves state-of-the-art performance on large-scale unlabeled datasets. The method eliminates the need for target-domain manual annotations while ensuring anatomically sound and temporally smooth results.

Introduction

The deployment of deep learning models in clinical settings is frequently hindered by "domain shift," where variations in ultrasound hardware and hospital protocols degrade model performance. In echocardiography, this challenge is compounded by noise, artifacts, and the high-speed motion of cardiac structures. While general-purpose foundation models like Segment Anything (SAM) have emerged, they often lack the domain-specific knowledge required for anatomically consistent spatio-temporal segmentation, frequently producing "flickering" results that violate clinical logic.

To address these issues, RL4Seg3D bridges the gap between a small, labeled source dataset and a massive, unlabeled target dataset. Our approach leverages reinforcement learning (RL) to incorporate clinical "common sense" as training signals, ensuring that segmentations are both accurate and anatomically plausible over time.

Methodology

RL4Seg3D reformulates the segmentation task as a reinforcement learning problem. A 3D U-Net serves as the Policy Agent, generating segmentation maps for temporal patches of echocardiography video. Unlike standard supervised learning, which requires pixel-level ground truth, RL4Seg3D is optimized using a suite of reward mechanisms designed to enforce clinical and physical constraints.

Reward Mechanisms

  1. Anatomical Reward ($r^{ANAT}$): An adaptive neural network trained to distinguish between valid and invalid cardiac morphologies based on clinical metrics like wall thickness and chamber connectivity.
  2. Landmark Reward ($r^{LM}$): A static reward that penalizes misalignments at critical anchor points, such as the mitral valve commissures.
  3. Temporal Penalty ($P_{Temporal}$): A mechanism that enforces smoothness across frames, reducing the "protrusions" and jitter common in 2D models.

Optimization and Inference

The framework utilizes Proximal Policy Optimization (PPO) to handle the non-differentiable nature of these rewards. A "reward fusion" strategy, employing a minimum operator, ensures the model prioritizes correcting the most significant anatomical errors. Furthermore, at inference time, the reward network serves as an uncertainty estimator, enabling Test-Time Optimization (TTO) to refine results for particularly challenging video sequences.

The RL4Seg3D framework for policy optimization on the target domain, illustrating the interaction between the policy agent, reward networks, and the PPO optimization loop.

Experimental Setup

The model was trained using a source domain ($D_S$) consisting of 579 annotated videos from the University Hospital of Lyon. It was then adapted to a target domain ($D_T$) comprising a heterogeneous dataset of 31,053 unlabeled videos from 357 centers across the United States. Performance was validated against a "gold standard" set of 128 expert-annotated videos from the target domain.

Results and Discussion

RL4Seg3D demonstrated superior performance across multiple metrics compared to unsupervised domain adaptation baselines and foundation models:

  • Accuracy: Achieved a mean Dice score of 94.2%, rivaling supervised models.
  • Anatomical Validity: Reached 99.2%, a significant improvement over the baseline 3D U-Net (27.3%) and SAM-based models (0%).
  • Temporal Consistency: Achieved 93.0% temporal validity, vastly outperforming 2D RL-based predecessors.
  • Landmark Precision: Reduced mitral valve errors to 1.0 per cycle, compared to 5.4 for the baseline.

These results highlight the power of RL as a bridge for domain adaptation, allowing the model to learn from clinical priors when labels are unavailable. However, the high computational cost—requiring significant GPU resources—and challenges with extremely rapid cardiac motion remain areas for future improvement.

Conclusion

RL4Seg3D provides a robust framework for adapting medical imaging models to new domains without manual labeling. By encoding clinical knowledge into a reward-driven optimization process, the system ensures that automated cardiac analysis is both accurate and anatomically reliable across diverse clinical settings. Future work will explore extending this framework to full 3D volumetric data and enhancing temporal rewards for high-heart-rate scenarios.

Summary updated

BibTeX
@misc{judge2025reinforcement,
  author = {Arnaud Judge and Nicolas Duchateau and Thierry Judge and Roman A. Sandler and Joseph Z. Sokol and Christian Desrosiers and Olivier Bernard and Pierre-Marc Jodoin},
  title = {{Reinforcement Learning for Unsupervised Domain Adaptation in Spatio-Temporal Echocardiography Segmentation}},
  year = {2025},
  eprint = {2510.14244},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.14244},
}
Figure