TL;DR
PitRSDNet is a new deep learning model designed to predict the remaining duration of endoscopic pituitary surgeries in real-time. By feeding previous surgical step predictions back into a spatio-temporal neural network, the model achieves a clinically acceptable error of under 5 minutes during the critical final phase of an operation.
What Problem Does This Paper Address?
Operating rooms (ORs) are among the most expensive assets in a hospital, costing upwards of $36 per minute. Minimizing idle time through precise scheduling is crucial for reducing healthcare costs. For anaesthetists, knowing the Remaining Surgery Duration (RSD) is vital to safely taper off anesthetic agents, manage post-operative pain relief, and ensure a prompt, safe patient wake-up.
However, predicting RSD during an endoscopic TransSphenoidal Approach (eTSA) for pituitary tumors is uniquely challenging. Unlike highly standardized surgeries, eTSA involves highly variable, non-sequential workflows with multiple optional steps and unpredictable durations. Standard machine learning models that look at video frames in isolation struggle to navigate these non-linear surgical paths.
Methods
The authors propose PitRSDNet, a multi-task deep neural network trained in two distinct stages to explicitly leverage workflow sequence knowledge:
- Stage 1 (Spatial Feature Extraction): A pre-trained ConvNeXt encoder is fine-tuned for surgical step classification. The network takes a 4-channel input consisting of the video frame plus the elapsed timestamp to capture spatial context.
- Stage 2 (Temporal Contextualization): The weights of the ConvNeXt encoder are frozen. Its outputs are concatenated with prior step prediction probabilities (both from the immediate last frame and averaged over a short historical window) and fed into a Long Short-Term Memory (LSTM) network.
The LSTM features two output heads that concurrently predict the current surgical step and the RSD. By feeding its own historical step predictions back into the temporal loop, the model maintains an awareness of where it is in the overall surgical narrative.
Datasets
The model was trained and evaluated on two newly introduced datasets collected from a single specialized neurosurgery center between 2018 and 2023:
- Pit-88: Contains 88 surgical videos annotated with 14 distinct surgical steps (8 core steps and 6 optional steps).
- Pit-33: A subset of 33 videos that includes both the 14 surgical steps and detailed annotations for 19 different surgical instruments. A portion of this dataset is publicly available via the PitVis-EndoVis MICCAI 2023 challenge.
Key Insights and Ideas
- Workflow Context is Essential: Purely vision-based models get disoriented by non-linear workflows. Explicitly tracking what step just happened provides the necessary temporal anchor to correct duration estimates when a surgeon performs steps out of standard order.
- The Resilience of Statistical Baselines: Interestingly, a simple statistical sequence-matching baseline (using Levenshtein distance to match the current step sequence against historical videos) significantly outperformed standard deep learning models like RSDNet and CataNet. This underscored the fact that standard architectures were failing to capture sequence dynamics properly.
- Data Scale Unlocks Contextual Power: On the smaller Pit-33 dataset, adding step context actually introduced noise due to step misclassifications. However, on the larger Pit-88 dataset, PitRSDNet successfully minimized these errors, demonstrating that deep temporal context models require a critical mass of data to outperform simpler statistical matching.
Key Results
- Meets Clinical Benchmarks: In the final 10 minutes of surgery—the most critical window for anaesthetists—PitRSDNet achieved a Mean Absolute Error (MAE) of 4.08 minutes on the Pit-88 dataset. In the final 20 minutes, the error was 6.20 minutes. This satisfies the clinical requirement of an error under 5 minutes near the end of a procedure.
- Outperforms Existing Models: PitRSDNet consistently beat state-of-the-art architectures adapted to this task, lowering the final 10-minute MAE compared to RSDNet (9.06 minutes) and CataNet (6.79 minutes).
Limitations and Future Work
- Vulnerability to Outliers: Like most data-driven models, PitRSDNet struggles with extreme outliers—surgeries that run exceptionally short or long compared to the typical training distribution.
- Lack of Pre-operative Context: The model currently operates blindly regarding patient-specific factors. Integrating pre-operative data (such as tumor size or patient anatomy from scans) could help the network anticipate unusually difficult or lengthy surgeries.
- Center and Surgeon Bias: The dataset represents only two consultant surgeons at a single hospital. Testing the model's transferability across multiple institutions and varying levels of surgical experience remains an open task for future research.
Summary updated