Surgical Gym: A high-performance GPU-based platform for reinforcement learning with surgical robots

Samuel Schmidgall, Axel Krieger, Jason Eshraghian

TL;DR

Surgical Gym is a new open-source, GPU-accelerated platform designed to drastically speed up reinforcement learning (RL) for surgical robotics. By keeping both physics simulations and RL computations entirely on the GPU, it achieves training speeds up to 5,000× faster than existing CPU-based simulators, potentially turning weeks of training into minutes.

What Problem Does This Paper Address?

The dream of autonomous surgery—where robots handle repetitive tasks like suturing or tissue retraction—relies heavily on Deep Reinforcement Learning. However, RL is notoriously "data-hungry," often requiring millions of interactions to learn even basic control policies.

Until now, the surgical robotics community has been bottlenecked by simulation speed. Existing platforms like dVRL or SurRoL rely on CPU-based physics engines. This creates a massive performance lag because data must constantly be shuffled back and forth between the CPU (for physics) and the GPU (for the neural network). This "data transfer tax" makes large-scale experimentation prohibitively slow and expensive for most research labs.

Methods

The authors built Surgical Gym on top of NVIDIA’s Isaac Gym, leveraging the PhysX engine to perform massively parallel physics simulations directly on the GPU.

The GPU-Native Pipeline

Unlike traditional pipelines that cycle data between hardware components, Surgical Gym keeps the entire loop—simulation, sensor data calculation, reward computation, and policy updates—on the GPU. As shown in the comparison below, this eliminates the communication bottleneck:

Comparison between traditional CPU-based RL pipelines and the streamlined Surgical Gym GPU pipeline.

Key Technical Features:

  • Solver: Uses the Temporal Gauss-Seidel (TGS) solver for faster convergence in physics calculations.
  • Robot Support: Includes high-fidelity models for the da Vinci Research Kit (dVRK)—specifically the Patient Side Manipulator (PSM) and Endoscopic Camera Manipulator (ECM)—and the Smart Tissue Autonomous Robot (STAR).
  • Algorithm: Utilizes a GPU-optimized implementation of Proximal Policy Optimization (PPO), adapted for parallel learning across thousands of robot instances simultaneously.

Datasets and Environments

Rather than a static dataset, the paper introduces five diverse training environments designed to build foundational surgical skills:

  1. Target Reaching: Aligning an end-effector with a random 3D point.
  2. Active Tracking: Following a moving target in 3D space.
  3. Endoscopic Image Matching: Positioning a camera to match a target reference image.
  4. Path Following: Navigating a tool along a complex, nonlinear trajectory (e.g., for suturing).
  5. Multi-Tool Target Reaching: Coordinating multiple arms (bimanual or trimanual) while avoiding self-collisions.
The variety of surgical robots and multi-manual configurations supported in Surgical Gym.

Key Insights and Ideas

  • The Power of Parallelism: By running up to 20,000 environments in parallel on a single mid-range GPU (NVIDIA Quadro RTX 4000), the authors demonstrate that hardware efficiency is just as important as algorithmic efficiency.
  • End-to-End Tensorization: Because observations and rewards are stored directly as PyTorch tensors on the GPU, the "learning dynamics" (the actual training) add very little overhead compared to the raw physics simulation.
  • Democratizing Research: By providing an open-source tool that runs on standard consumer GPUs, the authors aim to lower the barrier to entry for surgical autonomy research, which previously required massive compute clusters or weeks of waiting.

Key Results

The performance gains are staggering. In head-to-head benchmarks against established simulators:

  • Raw Simulation Speed: Surgical Gym reached 344,828 frames per second (FPS). For context, the next fastest simulator, SurRoL, clocked in at 4,124 FPS. Surgical Gym is ~80x faster than the fastest competitor and ~7,000x faster than the slowest (UnityFlexML).
  • Training Throughput: When incorporating the neural network training (PPO), Surgical Gym maintained 147,059 FPS. It trained on 1 million timesteps in just 6.8 seconds.
  • Scaling: The platform successfully trained complex behaviors, such as the STAR robot following a nonlinear path, with high precision.
Demonstration of the STAR robot precisely following a randomly generated nonlinear path.

Limitations and Future Work

While the speedup is a game-changer, the authors acknowledge several hurdles:

  • Soft Body Physics: The current environments focus on rigid-body interactions. Real surgery involves deformable tissues. While Isaac Gym supports soft bodies, integrating them into Surgical Gym tasks is a primary goal for future versions.
  • Sim-to-Real Gap: Training at high speeds in simulation is only useful if the policies work on real hardware. The authors suggest that future work should integrate more sophisticated kinematic models (like V-REP) to make the transfer to physical robots more seamless.
  • Task Complexity: The current tasks are "low-level" primitives. The next step is to combine these into high-level surgical procedures like full autonomous suturing or tissue dissection.

Summary updated

BibTeX
@inproceedings{schmidgall2024surgical,
  author = {Samuel Schmidgall and Axel Krieger and Jason Eshraghian},
  title = {{Surgical Gym: A high-performance GPU-based platform for reinforcement learning with surgical robots}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2024},
  doi = {10.1109/icra57147.2024.10610448},
}
Figure