Manuscript Offprint

arXiv:2611.08352

USB Gym: A Gymnasium Testbed for Closed-Loop Ultrasound View Matching

Thanapong Intharah, Zhichao Gao, Yiliang Liu, Hao Dong

Abstract

Background and Objective: Our main goal is ultrasound guidance: moving a probe until its image matches a target view. Published methods for each part of a guide are evaluated in separate simulators. We asked whether these methods, combined into one guide, are good enough.

Methods: We built USB Gym, a testbed whose standard engine simulates ultrasound from public patient CT, with a network drawing organ textures from CT labels. Its guide has three replaceable parts (slots), an organ segmenter, a controller and a reward, which received 20 published methods, each run on the same 60 episodes of six held-out patients. In each slot, a published method replaced ours only if detectably better on these patients. The better of this combination and our original guide on 20 new CTs is the benchmark baseline. A pose oracle, reading the exact probe pose available only in simulation, set the reference. The results below are exploratory.

Results: On these CTs, the probe started on average 16.0 mm from the target view; the pose oracle brought it to 1.5 mm. Of the results known when the combination was fixed, only an image-similarity reward (SSIM) was slightly but detectably better, so the combination was our guide with that reward. This combination was the benchmark baseline, ending at 13.7 mm (16% of the oracle's progress).

Conclusions: Combining untuned published methods with ours did not guide the probe near the target view; the task remains under-explored. The testbed accepts new methods; no guide was tested on hardware.

Keywords: Ultrasound simulation, Robotic ultrasound, Reinforcement learning, Medical image segmentation, Visual servoing, Benchmarking

1. Introduction

Our main goal is ultrasound guidance for view matching: a closed loop that moves a probe until its image matches a target view. Such a guide combines several parts, among them a probe-navigation policy, an ultrasound segmenter and, in simulation, a B-mode renderer, but the groups that propose them rarely share a closed loop in which to compare them [1]. Without a shared loop, their errors on view matching share no scale.

*Corresponding author. ORCID: 0000-0003-0965-680X. Email address: thanin@kku.ac.th (Thanapong Intharah)

Preprint submitted to Computer Methods and Programs in Biomedicine

November 6, 2026

To the best of our knowledge, no public testbed lets published methods replace any of several loop components and be evaluated against a privileged oracle ladder on identical episodes. We therefore asked whether existing published components, combined into one guide, are good enough for this task, and built a testbed into which research components plug and are scored. Here, a guide is good enough, and solves the task, if it ends as close to the target as the privileged pose oracle without privileged input at run time; we report how far each pipeline remains from it.

USB Gym (UltraSound B-mode Gym) is that testbed, built on Gymnasium [2] and patient CT [3]. Its standard simulation engine renders patient CT with a physics renderer and the SonoSPADE texture stage, and its guide has three plug slots: mask source, controller and reward (Fig. 1, Table 2). We plugged 20 published methods into the guide's slots, each in place of its slot's reference component, on that component's 60 held-out episodes; seven more, in the engine's three slots, are in Appendix B. An oracle ladder runs from a pose oracle, which reads privileged simulator state that no physical rig provides, down to a static probe (Section 5.2). SonoSPADE [4], our published method, is the engine's texture stage, unchanged and retrained once.

Here, existing published components, untuned, do not close the gap to the pose oracle, whether plugged one slot at a time or combined with our published pipeline [5] (Section 7.4). From a 16.0 mm start on six held-out patients, the pose oracle ends at 1.5 mm, but the CT-mask servo, steering by the CT's true organ masks (privileged CT masks), ends at 11.6 to 11.8 mm. No published controller in place of ours, given the same input, ends detectably closer (exploratory). Steering by a segmenter's masks, the learned-mask servo ends above the start with the ladder's three other texture settings. With SonoSPADE, the standard stage and the only one reading the CT label, it ends at 13.1 mm, 3.4 to 3.8 mm closer than with any of them.

Only the pre-specified analyses of the reference pipeline and of real frames are primary; every other result, including the comparison of published methods, is exploratory (Section 5.4). All closed-loop results come from simulation with rigid tissue, never from a probe, phantom or robot, and we make no claim about clinical usability.

The contributions are:

  1. A closed-loop testbed on patient CT (Sections 3 to 6), with privileged state kept out of the policy's observation.

  2. A slot-by-slot reference set for the guide (Section 7): every method's error on the standard engine, paired with its slot's reference component.

  3. Controls and replication (Section 8): a positive control, label-input controls, an offline real-frame score and two replication cohorts in simulation.

  4. A benchmark baseline (Box 1; Section 7.4): to test the testbed, slot components chosen on six held-out patients are combined and tested on 20 new CTs (exploratory). On the standard engine, it is that combination, 13.70 mm from the target (pose oracle 1.47 mm; conditional on this renderer).

References (69)