Skip to Content
  • Article
  • Open Access

2 June 2026

16 Pages

Surgical Phase Recognition in Laparoscopic Cholecystectomy Using Artificial Intelligence

,
,
,
,
,
,
,
,
and
1
Department of Informatics, Ionian University, 49100 Corfu, Greece
2
Department of Surgery, University of Colorado, Anschutz Medical Campus, Aurora, CO 80045, USA
3
Department of Electrical and Computer Engineering, National and Technical University of Athens, 15780 Athens, Greece
4
Programme Committee for the Biomedicine Programmes, Karolinska Institutet, 171 77 Stockholm, Sweden

Abstract

Background/Objectives: The global adoption of minimally invasive surgery has generated extensive video repositories, creating new opportunities for data-driven surgical education and quality assessment. Automated surgical phase recognition enables objective trainee evaluation, standardized competency assessment, and systematic procedural documentation. However, class imbalance in surgical workflows, where certain phases comprise 30–35% of frames while others represent only 5–10%, remains a significant challenge. This imbalance causes models to underperform on underrepresented yet clinically important phases. Methods: A retrospective analysis of laparoscopic cholecystectomy videos is performed with the implementation of a frame—based deep learning framework to develop and validate a surgical phase recognition pipeline based on ResNet-50 architecture with transfer learning. The model was designed to extract features from surgical video frames and classify them into seven distinct phases, without incorporating temporal context. We used the Cholec80 dataset and applied class balancing techniques to address inherent class imbalance. Results: The model achieved a mean balanced accuracy of 91.80% across five folds with consistent performance across all surgical phases. Per-phase F1-scores ranged from 0.89 to 0.95, demonstrating balanced classification without significant performance degradation on underrepresented phases. The confusion matrix revealed prediction errors primarily among adjacent or visually similar phases, reflecting the inherent ambiguity of surgical phase transitions. In practical terms, the model correctly identified the surgical phase in more than 9 out of 10 frames, enabling reliable automated segmentation of the operative workflow. Conclusions: This study demonstrates that artificial intelligence can reliably analyze surgical video data, achieving consistent and accurate phase recognition in laparoscopic cholecystectomy.

1. Introduction

The operating room has become a rich source of data owing to the regular recording of minimally invasive surgical procedures. Operative videos have long been used by surgeons for case reviews, mortality talks, and education. It has recently become evident that these recordings may additionally enable automated analysis of surgical workflow, offering an additional layer of information beyond manual review and written operative notes. Technologies that can automatically determine “where we are” in a procedure, either in real time or after the fact, are becoming increasingly popular as digital systems are incorporated into operating rooms. This need is met by surgical phase recognition, which uses endoscopic video to directly identify distinct phases of an operation [1,2,3].
Accurate phase recognition has various useful applications from a clinical perspective. Context-aware systems could enable timely instrument and device preparation and predict the next operational action. By offering unbiased feedback on procedural flow, automated progress tracking could support post-operative review and structured debriefing, and in future validated systems may contribute to intraoperative workflow awareness. Without the complexity of manual video annotation, phase recognition provides surgeons and trainees with an objective framework for self-evaluation and feedback, allowing for structured analysis of operative performance outside of the operating room [1,2,3].
Laparoscopic cholecystectomy (LC) represents an ideal entry point for the development and evaluation of automated workflow analysis. It is one of the most performed minimally invasive procedures worldwide and follows a standardized sequence of steps, making it familiar to surgeons across institutions and training backgrounds [3,4,5]. This procedural consistency has enabled the successful application of deep learning (DL) methods, and more specifically convolutional neural networks (CNNs), regarding surgical phase recognition using endoscopic video alone. Reported overall accuracies range from 90% to 97% [1,2,3,4,5,6]. Single-center studies that combine spatial feature extraction with temporal smoothing have achieved performance near 97% [1], while multicenter evaluations report accuracies around 91% [3]. More recent architectures incorporating attention mechanisms and temporal modeling have shown slightly lower overall accuracy but offer added capabilities such as tool awareness and richer contextual and temporal understanding [4].
Despite these promising results, systematic reviews point out significant drawbacks that have a direct bearing on clinical translation. Comparisons between publications are challenging given that surgical phases, dataset curation, and performance evaluation vary widely amongst studies [7]. As the “de facto” benchmark for this task, the Cholec80 dataset is used in the majority of LC phase recognition research [8]. Dependence on a single dataset raises concerns regarding generalizability, despite being extremely helpful for method development. Visual appearance and workflow patterns can be affected by variations in surgeon technique, patient anatomy, camera systems, and institutional practices [3,7,9]. Furthermore, the phase length of LC videos is naturally unbalanced given variable anatomy and intraoperative findings in case of extensive local inflammation. Algorithms may perform well on common phases, but poorly where dependable recognition is most clinically significant if this imbalance is not addressed during model development. Numerous studies have documented significant variation in phase-specific performance, indicating that step-level flaws may be concealed by overall accuracy alone [10,11]. Strong headline metrics alone are insufficient for meaningful clinical deployment, as recent research has increasingly highlighted. To guarantee that models perform consistently in various surgical settings, larger, multicenter datasets, advanced validation techniques, and explicit management of class imbalance and domain shift are needed [2,12].
The aim of this study was to develop and evaluate an automated surgical phase recognition pipeline specifically designed to achieve consistent performance across all phases of LC. By incorporating under-sampling strategies, stratified cross-validation, and detailed phase-level performance analysis, the proposed approach aims to align technical evaluation with clinical expectations. The goal is to support reliable AI workflow analysis that can be meaningfully integrated into surgical training, quality assessment, and procedural review.

2. Materials and Methods

2.1. Methodology Overview

The first step for surgical phase recognition pipeline as shown in Figure 1 is data acquisition during LC procedures, where the operation field, including anatomical structures shown and the surgical instruments being used, are captured on video. To transform continuous surgical video into discrete image sequences proper for computational analysis, video frame extraction follows and is conducted at a sampling rate of one frame per second (fps). An essential step in creating ground truth labels is expert frame annotation, in which experienced surgeons categorize every extracted frame based on the surgical phase it corresponds to. Preparation, Clipping and Cutting, and Dissection are three out of the seven different phases that make up the annotation schema in this work. More specifically, from this annotated dataset are used 46,340 frames that undergo preprocessing steps that involve resizing to a standard resolution of 224 × 224 pixels, data augmentation, center cropping, random horizontal flipping, and random rotation—all supporting the generalization of the model. During the model training phase, ResNet-50 that follows an architecture similar to CNNs is used. This architecture has sequential convolutional layers for hierarchical feature extraction, pooling layers for reducing spatial dimensionality, and fully connected layers that link learned representations to phase probability distributions. The network makes predictions for every phase of surgery, which makes it possible to learn and classify the surgical phases. Cross-validation techniques are used for model evaluation, and training curves show model convergence and performance metrics over several folds. Additionally, explainability analysis is integrated using attention visualization techniques and Gradient-weighted Class Activation Mapping (Grad-Cam), offering comprehensible insights into the spatial regions influencing model predictions. By highlighting the anatomical features and tool configurations that the model links to surgical stages, these visualization techniques improve clinical confidence and aid in model validation training.
Figure 1. Methodology overview diagram.

2.2. Dataset and Class Balancing

We used the publicly available Cholec80 dataset [8], which contains 80 laparoscopic cholecystectomy videos performed between 2012 and 2014 at University Hospital of Strasbourg, France, recorded at 25 fps with frame-level surgical phase annotations provided by experienced surgeons as detailed in the original publication. The dataset encompasses seven standardized surgical phases including: Preparation (initial port placement and camera insertion), Calot Triangle Dissection (exposure of cystic duct and artery), Clipping and Cutting (ligation and division of cystic structures), Gallbladder Dissection (separation from gallbladder fossa), Gallbladder Packaging (preparation for extraction), Cleaning and Coagulation (hemostasis verification), and Gallbladder Retraction (final organ removal).
The dataset exhibits significant class imbalance, typical of surgical workflows, with phase distributions ranging from 5% to 35% of total frames [10]. It is known from previous literature and practice, that such imbalance can cause models to overfit dominant phases while failing on underrepresented phases, particularly shorter late-stage phases (P5–P7) [10,11]. To address this, a random undersampling technique is employed, selecting each phase to contain exactly 6620 frames, resulting in a balanced dataset of 46,340 frames in total. The undersampling approach was preferred over alternatives for several reasons. Oversampling techniques such as SMOTE (Synthetic Minority Over-sampling Technique) are inappropriate for natural surgical images, as interpolation between video frames in pixel or feature space does not produce anatomically valid surgical states and risks introducing artifacts that degrade model generalization. Simple frame duplication increases overfitting risk on minority phases without adding new visual information. Class-weighted loss functions are theoretically equivalent but introduce gradient instability under severe imbalance ratios (in this dataset ranging from 5–35%), where amplified minority-class weights can destabilize dynamic optimization, particularly with deep architectures. Crucially, undersampling here does not discard unique information and at this fps sampling, frames within a single phase are visually similar and temporally redundant, meaning longer phases contain proportionally more redundancy rather than more diversity. Furthermore, the 6620 frames per phase were drawn randomly across all 80 procedures, ensuring that anatomical variability, surgeon technique, and imaging conditions remain represented despite the reduced volume. This design is consistent with prior undersampling approaches on the Cholec80 dataset [13].
In terms of data flow, the 80 videos underwent frame extraction at 1 fps, yielding a fully annotated frame pool from which random undersampling produced 46,340 balanced frames, subsequently partitioned into five stratified folds for cross-validation. The resulting sample size derives directly from the undersampling strategy rather than a formal statistical power calculation. No frames were excluded for quality, corruption, or annotation ambiguity, and no missing data were encountered during processing; all extracted frames after undersampling were retained for analysis.
All images underwent standardized preprocessing following ImageNet protocols [14], a widely used benchmark in computer vision. Specifically, frames were resized, cropped to 224 × 224 pixels, and normalized to ensure compatibility with pretrained network weights. Training augmentation included random horizontal flipping (probability 0.5) and color jittering (±10% brightness, contrast, saturation). The validation set frames underwent resizing, cropping, and normalization preprocessing without augmentation.

2.3. Model Architecture

We implemented a DL pipeline for automated phase recognition, with ResNet-50 [15] serving as the core architecture based on its established performance in surgical video analysis [1]. ResNet-50 balances model capacity with computational efficiency, making it suitable for both research validation and educational applications. The network was initialized with ImageNet-pretrained weights (ImageNet1K_V2), leveraging transfer learning from large-scale natural image classification. The original 1000-class classification layer was replaced with a 7-class output layer corresponding to the seven available surgical phases. All network layers underwent fine-tuning during training, allowing adaptation of low-level feature extractors to surgical images while retaining generalized visual representations from ImageNet pretraining [1,5]. The frame-based approach enables real-time inference and simplifies deployment, though it does not capture temporal dependencies exploited by recurrent or temporal convolutional architectures [4]. Research indicates that temporal models achieve 89–92% accuracy by incorporating sequential information [16].

2.4. Training Protocol

Models were trained using the Adam optimizer with initial learning rate of 0.001. It was applied cosine annealing learning rate scheduling [17] to gradually reduce the learning rate from 0.001 to 0.00001 over 50 epochs, facilitating fine-grained optimization as training progresses. Cross-entropy loss served as the training objective, appropriate for balanced multi-class classification. Training proceeded with batch size 64 and maximum 50 epochs per fold. Early stopping was implemented with patience of 10 epochs and minimum improvement threshold of 0.001 (0.1%) in validation balanced accuracy and the model checkpoint with highest validation balanced accuracy was retained for each fold. All model training cycles and tests were performed on NVIDIA RTX 3060 GPU with 12 GB memory. Training time per fold averaged ~680 min (approximately 11.3 h), with complete 5-fold cross-validation requiring approximately 57 h. Models were implemented in PyTorch 1.9.0 with CUDA 11.1 [16,18].

2.5. Cross Validation

We employed stratified 5-fold cross-validation for performance evaluation. The complete balanced dataset (46,340 frames) was partitioned into five folds using stratified sampling to ensure proportional representation of all surgical phases in each fold. Each fold served as the validation set once, with the remaining four folds used for training (80–20 split: 37,072 training, 9268 validation frames per fold). Stratification was performed using scikit-learn’s StratifiedKFold function with fixed random seed (seed = 42) to ensure reproducibility.
Each fold maintained proportional representation of all seven surgical phases, with 9268 frames per fold used for validation while the remaining 37,072 frames were used for training. A new model was initialized by ImageNet weights for each fold to prevent information leakage between folds, ensuring independent performance estimates, providing both average performance metrics and variance quantification across different data subsets.
While video-level splitting would eliminate the possibility of temporally correlated frames from the same procedure appearing in both training and validation sets, frame-level stratification was deliberately chosen here for two reasons. First, the undersampling strategy (6620 frames per phase drawn across all 80 videos) distributes frames from each video broadly across all folds, substantially reducing—though not eliminating—correlation within video. Second, frame-level evaluation is consistent with the evaluation protocol used in the original Cholec80 benchmark [8] and several subsequent studies on this dataset [2,10], allowing direct comparison with published results. We acknowledge this as a drawback as compared to more advanced technologies and discuss its implications in Section 4.3.

2.6. Evaluation Metrics

Balanced accuracy served as the primary evaluation metric, computed as the arithmetic mean of per-class recall values [7]. Secondary metrics included per-class precision, recall, F1-score, and confusion matrices. Precision quantifies the proportion of correct predictions among all predictions for a given phase (positive predictive value), while recall measures the proportion of correctly identified instances among all true instances of that phase (sensitivity). F1-score provides the harmonic means of precision and recall, offering balanced assessment particularly valuable when class sizes differ [10,19].

3. Results

3.1. Overall Training Performance

The ResNet-50 model achieved a mean balanced accuracy of 91.80% ± 0.35% across all five folds (Figure 2).
Figure 2. Cross-validation fold performance.
Individual fold performance ranged from 91.41% (Fold 4) to 92.36% (Fold 1), demonstrating consistent recognition capability across different data subsets. The results demonstrate that stratified cross-validation with class balancing achieves strong performance (91.80%) with minimal variability (SD = 0.35%), supporting generalization reliability.

3.2. Per-Phase Performance Analysis

As visualized in (Figure 3) the model achieved highest F1-scores for Clipping and Cutting (0.95), followed by Gallbladder Dissection (0.93), and three phases at 0.92 (Preparation, Calot Triangle Dissection, Cleaning and Coagulation). Gallbladder Packaging and Gallbladder Retraction showed slightly lower at 0.89. This balanced performance distribution (F1 range: 0.89–0.95) indicates that class balancing successfully prevented bias toward dominant phases. The highest-performing phase, Clipping and Cutting (precision 0.94, recall 0.95, F1 0.95), benefits from distinct visual characteristics involving clear instrument manipulation and anatomical landmarks [2].
Figure 3. Per-phase performance.
The small variation of performance across folds (91.41–92.36%) and a low standard deviation (SD = 0.35%) shown in (Table 1) reveal that the model generalizes well regardless of the subset of frames used for validation. This stability is especially significant in the context of the class-balancing strategy used: even though the model was trained on an artificially balanced distribution, it did not overfit any particular dominant phase and continued to recognize all seven phases equitably. Fold 1 yielded the highest balanced accuracy (92.36%) while Fold 4 displayed the lowest (91.41%), a margin that points to slight variation in data composition rather than structural instability. All five folds completed the entire 50 epoch training schedule with no early stopping, indicating the cosine annealing learning rate schedule successfully directed optimization during training without premature convergence. Taken together, the consistency of these results supports the reproducibility of the proposed pipeline and its robustness to different data partitions.
Table 1. Balanced accuracy per phase across folds.

3.3. Confusion Matrix Analysis

Figure 4 presents the aggregated confusion matrix across all validation folds. Diagonal elements demonstrated strong true positive rates, ranging from 0.89 (Gallbladder Packaging, 5933/6620) to 0.95 (Clipping and Cutting, 6315/6620 correct). Off-diagonal elements reveal systematic confusion patterns primarily between adjacent or visually similar phases, consistent with known challenges in surgical phase recognition. It is also revealed systematic misclassification patterns between adjacent or visually similar surgical phases. The most frequent errors were Gallbladder Packaging misclassified as Gallbladder Retraction (4.5%, 296 frames), Cleaning Coagulation as Gallbladder Retraction (3.8%, 251 frames), and Gallbladder Retraction as Gallbladder Packaging (3.7%, 247 frames). Notable bidirectional confusion occurs between Gallbladder Packaging and Gallbladder Retraction (8.2% combined, 543 combined frames), reflecting difficulty distinguishing gallbladder positioning states. Similarly, Calot Triangle Dissection presented confusion with Clipping Cutting (5.3% combined, 351 combined frames). Misclassifications between distant phases are not presented, indicating successful discrimination of frames with distinct visual characteristics. The predominance of adjacent-phase errors suggests future improvements should prioritize temporal modeling approaches rather than enhanced spatial feature extraction. Temporal models incorporating LSTM or temporal convolutional networks could potentially reduce adjacent-phase errors [20].
Figure 4. Overall confusion matrix.

3.4. Model Explainability Analysis

To understand model decision-making, two complementary interpretability techniques Gradient-weighted Class Activation Mapping (Grad-CAM) and Attention Map—were applied [17,21]. Grad-CAM generates heatmaps highlighting spatial regions most influential for the predicted class by computing gradients of the output with respect to feature maps in the final convolutional layer [21]. Attention maps have been extracted by using the feature map of each frame in the trained dataset and answer the question; “where or what does the model looks at to predict the seven different phases overall?” [17]. Grad-CAM activations are derived directly from the model’s learned feature representations and are, therefore, an objective reflection of the model’s decision process. The clinical interpretation of these activations, that correspond to anatomically relevant structures, is supported by consistent alignment across all seven phases and both visualization methods, though formal quantitative validation against expert-annotated regions of interest was not performed.
The Grad-CAM visualizations and “per-phase” Attention Maps (Figure 5) together show that the model focuses on clinically important anatomical areas and surgical activity zones. Both methods focus on the Calot’s triangle area during preparation, especially the area where the gallbladder infundibulum and cystic structures meet. In the Calot triangle dissection phase, Grad-CAM strongly highlights the grasping instrument, while the Attention Map broadly covers the surrounding hepatocystic workspace. During clipping and cutting, Grad-CAM shows intense activation on the surgical clips and cystic duct transection site, whereas the Attention Map concentrates more generally around the cystic pedicle region. For the gallbladder dissection phase, both approaches emphasize the hook location and focus less on the tissue. In the packaging phase, Grad-CAM highlights the detached gallbladder and extraction instrument or bag, while the Attention Maps emphasize the overall specimen handling region. While in cleaning and coagulation, Grad-CAM localizes bleeding points and the coagulation instrument, while the Attention Map presents that the model focuses on the broader liver bed surface during broader laparoscopy to ensure no residual fluid and bleeding points. Finally, while the Attention Map focuses on the central operative cavity, which includes the retracted gallbladder region and exposed liver bed, Grad-CAM highlights the gallbladder fundus and abdominal wall port site during gallbladder retraction. Both visualization techniques exhibit noteworthy anatomical consistency, with Attention Maps capturing stable phase-level spatial importance and Grad-CAM offering accurate, frame-level explanations. Notably, the convergence between Grad-CAM and Attention Map visual comparison across all seven phases provides cross-method consistency that strengthens confidence in the anatomical relevance of the highlighted regions, even in the absence of formal quantitative validation against expert-annotated ground truth.
Figure 5. Model explainability using Grad-CAM and attention map.

3.5. Training Dynamics

Training and validation loss curves exhibited smooth, monotonic decrease across all folds, with no evidence of overfitting or instability. The gap between training and validation loss remained minimal throughout training, suggesting appropriate model capacity and effective regularization through data augmentation. The cosine annealing learning rate schedule showed clear benefits, with periodic learning rate reductions corresponding to improved validation performance plateaus.
Training curves demonstrated consistent convergence patterns across all folds (Figure 6). Validation balanced accuracy increased rapidly in the first 10 epochs, reaching approximately 88–90%, then continued gradual improvement to plateau around 92% by epoch 40–45. Cross-entropy loss decreased smoothly throughout training. Training loss approached near-zero values by epoch 50, while validation loss stabilized around 0.49–0.51. The absence of erratic fluctuations or divergence in loss curves indicated stable optimization dynamics and appropriate hyperparameter selection [22,23,24,25,26].
Figure 6. Model training and validation accuracy across epochs.

4. Discussion

4.1. Methodological Contributions

Our pipeline using a ResNet-50 backbone achieved 91.80% ± 0.35% balanced accuracy, with consistently low variability across folds, indicating stable generalization. The balanced per-phase F1-scores (0.89–0.95) confirm equitable recognition across surgical phases, addressing the common limitation whereby models report high overall accuracy but underperform in less represented phases [2,27]. These results are comparable to more complex temporal architectures. For instance, single-center CNN models with temporal smoothing have reported ~97% accuracy, often on smaller validation cohorts [1], while a ResNet-LSTM approach achieved 91.2% frame-level accuracy on Cholec80 combined with institutional data [2], and multicenter studies have reported 91.1% accuracy [3]. Reported F1-scores for phases such as clipping and cutting vary between 0.78 and 0.94 depending on dataset and model design [2], which aligns with the performance range observed in this study. In addition, confusion patterns in later phases (P5–P7) are consistent with prior findings that visually similar late-stage phases are particularly prone to misclassification [10]. Notably, our standard deviation of 0.35% across folds is substantially lower than the cross-validation variability commonly described in medical imaging studies [28].
From a methodological perspective, this study addresses several limitations highlighted in systematic reviews of surgical phase recognition [29]. Stratified undersampling ensures balanced representation of all phases during training, reducing the risk of overfitting dominant phases while neglecting rare but clinically relevant steps [27]. The use of stratified 5-fold cross-validation provided reliable performance estimates with confidence intervals, mitigating the optimistic bias associated with single train-test splits [28]. Despite relying on a frame-based architecture, the computational burden remains lower than transformer-based approaches, while achieving competitive performance [16,18]. Finally, interpretability analysis using Grad-CAM and attention maps demonstrated that predictions were driven by clinically meaningful anatomical landmarks and instrument positions rather than spurious correlations [30], which is an essential aspect for building clinical trust in future validated systems.

4.2. Clinical Applications and Realistic Deployment

While automated surgical phase recognition has been proposed even for real-time intraoperative guidance, the most realistic applicable use is in surgical training and simulation environments [31]. Post-operative video review with automated phase segmentation enables systematic skill assessment, efficient video indexing, objective feedback generation, and competency-based progression tracking [32].
Surgical training applications offer several practical advantages, including tolerance for occasional misclassifications due to human oversight and relaxed computational timing requirements that allow batch processing instead of real-time inference. These applications typically face a reduced regulatory burden as they are classified as educational software rather than clinical decision support devices. They also enable the use of interpretability tools like Grad-CAM and Attention Maps, which serve as effective pedagogical aids by highlighting anatomical landmarks relevant to each surgical phase. Virtual reality (VR) and extended reality (XR) technologies enhance surgical training by providing immersive, interactive environments that improve skill acquisition, procedural accuracy, and decision-making without risking patient safety. VR-based training has demonstrated faster learning curves and greater user satisfaction compared to traditional desktop methods, while XR facilitates real-time access to patient data and supports knowledge transfer into clinical practice. Overall, these technologies improve surgical education by combining technical skill development with cognitive understanding, though challenges such as cost, resource availability, and integration into curricula remain [10,33].
Current models trained on benchmark datasets like Cholec80 demonstrate performance degradation on complex real-world cases involving acute inflammation, dense adhesions, or anatomical variations, dropping from 90–97% on routine cases to 81–89% on complex cases. This variability, combined with the phenomenon of “phase flickering” (rapid oscillations between predictions) and regulatory requirements for Software as a Medical Device, present significant barriers to real-time intraoperative deployment. Several post-processing strategies could mitigate phase flickering without requiring architectural changes or retraining, including majority-vote smoothing over a sliding temporal window, confidence thresholding, and Viterbi decoding with phase duration priors—the latter constraining predictions to anatomically plausible transition sequences.
However, these same limitations could be acceptable and even valuable in training contexts, where automated analysis accelerates educational review while expert surgeons maintain oversight and provide contextual interpretation [34].

4.3. Limitations and Future Directions

Various inherent limitations should be considered when interpreting the findings of this study. Our study solely used the Cholec80 dataset coming from a single institution, which may limit generalizability to different surgical centers, equipment configurations, and patient populations [35]. In addition, the Cholec80 dataset represents routine LC cases. Real-world surgical video collections may contain longer videos, additional phases, rare phases, and complex cases involving adverse events. Models trained on benchmark datasets may underperform on such challenging scenarios. Relatedly, atypical pathological and anatomical gallbladder variants are unlikely to be well represented in curated benchmark datasets such as Cholec80, even though they can alter operative appearance and workflow in clinical practice. Although individually uncommon—as with gallbladder ganglioneuromatosis [36]—such variants are collectively encountered in a substantial share of real-world procedures, reported in roughly 7–32% of laparoscopic cholecystectomies [37]. Multi-center validation would strengthen confidence in broader clinical applicability. Furthermore, sociodemographic fairness analysis was not possible given that the Cholec80 dataset does not include patient-level demographic data.
A further methodological limitation concerns the cross-validation strategy. Folds were constructed at the frame level rather than the video level, meaning frames from the same procedure may appear in both training and validation sets. This introduces a risk of performance overestimation due to temporal and visual correlation between consecutive frames. The impact is partially mitigated by the sampling rate, which reduces inter-frame redundancy compared to full-rate, and by the cross-video undersampling strategy, which disperses frames from individual videos across the full dataset. Nevertheless, video-level cross-validation would provide a stricter and more conservative estimate of generalization, and future work should adopt this design—particularly when evaluating datasets from unseen institutions or patient populations.
Additionally, frame-level predictions do not incorporate temporal context, which human observers naturally use for phase recognition. Temporal modeling approaches may achieve higher accuracy or be more suitable by leveraging sequential information [38]. While random undersampling was justified by the temporal redundancy of surgical video frames and the cross-video diversity of the selected samples, future studies could formally compare undersampling against weighted loss functions and augmentation-based strategies using held-out video-level evaluations to quantify any performance difference.
For surgical relevance and interpretability, the explainability analysis via Grad-CAM and Attention Maps provides objective insight into the model’s learned feature representations. However, the clinical interpretation of these activations relies on visual correspondence with anatomical structures rather than quantitative validation against expert-annotated regions of interest, which remain a direction for future work.
Finally, this approach requires expert frame-level annotations, which are resource-intensive to obtain. Semi-supervised or self-supervised learning approaches that leverage vast unlabeled surgical video archives represent a promising direction [39,40].

5. Conclusions

This study presents a methodologically rigorous approach to automated surgical phase recognition in LC, achieving 91.80% ± 0.35% balanced accuracy through ResNet-50 with stratified cross-validation and systematic class balancing. The low performance variability across folds and balanced per-phase F1-scores (0.89–0.95) demonstrate generalization and equitable recognition across all surgical phases. Interpretability analysis using Grad-CAM and Attention Map reveals that predictions are based on clinically relevant anatomical structures and surgical instruments. The performance and computational efficiency make this model a prospective candidate on the backbone for future applications that support evolving AI-powered surgical education.

Author Contributions

S.P.R.: Conceptualization, Code Developing, Writing, Data curation, Reviewing and Editing; C.T.: Writing, Data curation, Reviewing and Editing; A.T.: Code Developing, Data curation, Writing; G.L.: Writing; D.N.V.: Writing, Data curation, Reviewing and Editing; D.C.Z.: Data curation, Reviewing and Editing; N.M.: Data curation, Reviewing and Editing; G.C.S.: Data curation, Reviewing and Editing; E.K.: Supervision, Reviewing and Editing; A.G.V.: Supervision, Conceptualization, Reviewing and Editing. All authors have read and agreed to the published version of the manuscript.

Funding

No funding supported the writing and submission of this study.

Institutional Review Board Statement

This study utilized previously published de-identified surgical video data. No new research on human subjects was conducted. The Cholec80 dataset was collected with appropriate institutional review board approval and patient consent as described in the original publication. Ethical review and approval were waived for this study.

Data Availability Statement

The Cholec80 dataset used in this study is publicly available from CAMMA (Computer-Assisted Medical Procedures and Augmented Reality) at the University of Strasbourg (http://camma.u-strasbg.fr/datasets) accessed on 17 March 2025. Model implementation code and methodology are available in a public repository on GitHub accessed on 26 May 2026.

Conflicts of Interest

All authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
AIArtificial Intelligence
CNNConvolutional Neural Network
DLDeep Learning
Grad-CAMGradient-weighted Class Activation Mapping
LCLaparoscopic Cholecystectomy
VRVirtual Reality
XRExtended Reality

References

  1. Shinozuka, K.; Turuda, S.; Fujinaga, A.; Nakanuma, H.; Kawamura, M.; Matsunobu, Y.; Tanaka, Y.; Kamiyama, T.; Ebe, K.; Endo, Y.; et al. Artificial intelligence software available for medical devices: Surgical phase recognition in laparoscopic cholecystectomy. Surg. Endosc. 2022, 36, 7444–7452. [Google Scholar] [CrossRef] [Scilit]
  2. Yang, H.; Hong, S.-S.; Yoon, J.; Park, B.; Yoon, Y.; Han, D.H.; Choi, G.; Choi, M.-K.; Kim, S.H. Deep learning-based surgical phase recognition in laparoscopic cholecystectomy. Ann. Hepatobiliary. Pancreat. Surg. 2024, 28, 466–473. [Google Scholar] [CrossRef] [Scilit]
  3. Cheng, K.; You, J.; Wu, S.; Chen, Z.; Zhou, Z.; Guan, J.; Peng, B.; Wang, X. Artificial intelligence-based automated laparoscopic cholecystectomy surgical phase recognition and analysis. Surg. Endosc. 2021, 36, 3160–3168. [Google Scholar] [CrossRef] [Scilit]
  4. Jalal, N.; Alshirbaji, T.; Docherty, P.; Arabian, H.; Laufer, B.; Krueger-Ziolek, S.; Neumuth, T.; Moeller, K. Laparoscopic Video Analysis Using Temporal, Attention, and Multi-Feature Fusion Based-Approaches. Sensors 2023, 23, 1958. [Google Scholar] [CrossRef] [Scilit]
  5. Guédon, A.; Meij, S.; Osman, K.; Kloosterman, H.; Van Stralen, K.; Grimbergen, M.; Eijsbouts, Q.; Van Den Dobbelsteen, J.; Twinanda, A. Deep learning for surgical phase recognition using endoscopic videos. Surg. Endosc. 2020, 35, 6150–6157. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  6. Hegde, S.; Namazi, B.; Iyengar, N.; Cao, S.; Desir, A.; Marques, C.; Mahnken, H.; Dumas, R.; Sankaranarayanan, G. Automated segmentation of phases, steps, and tasks in laparoscopic cholecystectomy using deep learning. Surg. Endosc. 2023, 38, 158–170. [Google Scholar] [CrossRef] [Scilit]
  7. Garrow, C.; Kowalewski, K.; Li, L.; Wagner, M.; Schmidt, M.; Engelhardt, S.; Hashimoto, D.; Kenngott, H.; Bodenstedt, S.; Speidel, S.; et al. Machine Learning for Surgical Phase Recognition: A Systematic Review. Ann. Surg. 2021, 273, 684–693. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  8. Twinanda, A.; Shehata, S.; Mutter, D.; Marescaux, J.; Mathelin, M.; Padoy, N. EndoNet: A Deep Architecture for Recognition Tasks on Laparoscopic Videos. IEEE Trans. Med. Imaging 2016, 36, 86–97. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  9. Lavanchy, J.; Ramesh, S.; Dall’Alba, D.; Gonzalez, C.; Fiorini, P.; Müller-Stich, B.; Nett, P.; Marescaux, J.; Mutter, D.; Padoy, N. Challenges in multi-centric generalization: Phase and step recognition in Roux-en-Y gastric bypass surgery. Int. J. Comput. Assist. Radiol. Surg. 2023, 19, 2249–2257. [Google Scholar] [CrossRef] [Scilit]
  10. Kirtaç, K.; Aydin, N.; Lavanchy, J.; Beldi, G.; Smit, M.; Woods, M.; Aspart, F. Surgical Phase Recognition: From Public Datasets to Real-World Data. Appl. Sci. 2022, 12, 8746. [Google Scholar] [CrossRef] [Scilit]
  11. Wagner, M.; Müller-Stich, B.; Kisilenko, A.; Tran, D.; Heger, P.; Mündermann, L.; Lubotsky, D.; Müller, B.; Davitashvili, T.; Capek, M.; et al. Comparative Validation of Machine Learning Algorithms for Surgical Workflow and Skill Analysis with the HeiChole Benchmark. Med. Image Anal. 2021, 86, 102770. [Google Scholar] [CrossRef] [Scilit]
  12. Golany, T.; Aides, A.; Freedman, D.; Rabani, N.; Liu, Y.; Rivlin, E.; Corrado, G.S.; Matias, Y.; Khoury, W.; Kashtan, H.; et al. Artificial intelligence for phase recognition in complex laparoscopic cholecystectomy. Surg. Endosc. 2022, 36, 9215–9223. [Google Scholar] [CrossRef] [Scilit]
  13. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 26 June–1 July 2016; IEEE: Piscataway, NJ, USA, 2016. [Google Scholar]
  14. Liu, Y.; Boels, M.; García-Peraza-Herrera, L.; Vercauteren, T.K.M.; Dasgupta, P.; Granados, A.; Ourselin, S. LoViT: Long Video Transformer for surgical phase recognition. Med. Image Anal. 2023, 99, 103366. [Google Scholar] [CrossRef] [Scilit]
  15. Gao, X.; Jin, Y.; Long, Y.; Dou, Q.; Heng, P.-A. Trans-SVNet: Accurate Phase Recognition from Surgical Videos via Hybrid Embedding Aggregation Transformer. In Proceedings of the International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI 2021), Strasbourg, France, 27 September–1 October 2021; Springer: Cham, Switzerland, 2021. [Google Scholar]
  16. Demir, K.C.; Schieber, H.; Weise, T.; Roth, D.; May, M.; Maier, A.; Yang, S.H. Deep Learning in Surgical Workflow Analysis: A Review of Phase and Step Recognition. IEEE J. Biomed. Health Inform. 2023, 27, 5405–5417. [Google Scholar] [CrossRef] [Scilit]
  17. Dawood, H.; Nawaz, M.; Nazir, T.; Javed, A.; Saudagar, A.K.J.; AlSagri, H.S. ARNet: Integrating Spatial and Temporal Deep Learning for Robust Action Recognition in Videos. Comput. Model. Eng. Sci. 2025, 144, 429–459. [Google Scholar] [CrossRef] [Scilit]
  18. Czempiel, T.; Paschali, M.; Keicher, M.; Simson, W.; Feußner, H.; Kim, S.; Navab, N. TeCNO: Surgical Phase Recognition with Multi-Stage Temporal Convolutional Networks. arXiv 2020, arXiv:2003.10751. [Google Scholar]
  19. Zhang, Y.; Hong, D.; McClement, D.; Oladosu, O.; Pridham, G.; Slaney, G. Grad-CAM helps interpret the deep learning models trained to classify multiple sclerosis types using clinical brain magnetic resonance imaging. J. Neurosci. Methods 2021, 353, 109098. [Google Scholar] [CrossRef] [Scilit]
  20. An, J.; Joe, I. Attention Map-Guided Visual Explanations for Deep Neural Networks. Appl. Sci. 2022, 12, 3846. [Google Scholar] [CrossRef] [Scilit]
  21. Viering, T.; Loog, M. The Shape of Learning Curves: A Review. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 45, 7799–7819. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  22. Mohana Priya, P.; UlagaPriya, K. Video prediction based on temporal aggregation and recurrent propagation for surveillance videos. MethodsX 2025, 14, 103402. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  23. Rakesh, V.K.; Mazumdar, S.; Samanta, T.; Pandey, H.K.; Das, A. Analysis of Hyperparameter Optimization Effects on Lightweight Deep Models for Real-Time Image Classification. Sci. Rep. 2025. [Google Scholar] [CrossRef] [Scilit]
  24. Gorriz, J.M.; Clemente, R.M.; Segovia, F.; Ramirez, J.; Ortiz, A.; Suckling, J. Is K-fold cross validation the best model selection method for Machine Learning? Inf. Fusion 2026. [Google Scholar] [CrossRef] [Scilit]
  25. Alomar, K.; Aysel, H.I.; Cai, X. CNNs, RNNs and Transformers in human action recognition: A survey and a hybrid model. Artif. Intell. Rev. 2025, 58, 387. [Google Scholar] [CrossRef] [Scilit]
  26. Sujon, K.M.; Hassan, R.; Choi, K.; Samad, M.A. Accuracy, precision, recall, f1-score, or MCC? empirical evidence from advanced statistics, ML, and XAI for evaluating business predictive models. J. Big Data 2025, 12, 268. [Google Scholar] [CrossRef] [Scilit]
  27. Demircioglu, A. Applying oversampling before cross-validation will lead to high bias in radiomics. Sci. Rep. 2024, 14, 11563. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  28. Khalil, S.; Shah, H.A.; Bednarik, R. Improving microsurgical suture training with automated phase recognition and skill assessment via deep learning. Comput. Biol. Med. 2025, 192, 110238. [Google Scholar] [CrossRef] [Scilit]
  29. van der Velden, B.H.M.; Kuijf, H.J.; Gilhuijs, K.G.A.; Viergever, M.A. Explainable artificial intelligence (XAI) in deep learning-based medical image analysis. Med. Image Anal. 2022, 79, 102470. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  30. Boal, M.W.E.; Anastasiou, D.; Tesfai, F.; Ghamrawi, W.; Mazomenos, E.; Curtis, N.; Collins, J.W.; Sridhar, A.; Kelly, J.; Stoyanov, D.; et al. Evaluation of objective tools and artificial intelligence in robotic surgery technical skills assessment: A systematic review. Br. J. Surg. 2024, 111, znad331. [Google Scholar] [CrossRef] [Scilit]
  31. Varas, J.; Coronel, B.V.; Villagrán, I.; Escalona, G.; Hernandez, R.; Schuit, G.; Durán, V.; Lagos-Villaseca, A.; Jarry, C.; Neyem, A.; et al. Innovations in surgical training: Exploring the role of artificial intelligence and large language models (LLM). Rev. Colégio Bras. Cir. 2023, 50, e20233605. [Google Scholar] [CrossRef] [Scilit]
  32. Shahrezaei, A.; Sohani, M.; Taherkhani, S.; Zarghami, S.Y. The impact of surgical simulation and training technologies on general surgery education. BMC Med. Educ. 2024, 24, 1297. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  33. Jarry, C.; Vela, J.; Durán, V.; Van Leeuwen, M.; Varas, J. Surgical training scalability through AI-based innovations. Glob. Surg. Educ.-J. Assoc. Surg. Educ. 2025, 4, 37. [Google Scholar] [CrossRef] [Scilit]
  34. Grammatikopoulou, M.; Sanchez-Matilla, R.; Bragman, F.; Owen, D.; Culshaw, L.; Kerr, K.; Stoyanov, D.; Luengo, I. A spatio-temporal network for video semantic segmentation in surgical videos. Int. J. Comput. Assist. Radiol. Surg. 2023, 19, 375–382. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  35. Kassem, H.; Alapatt, D.; Mascagni, P.; Karargyris, A.; Padoy, N. Federated Cycling (FedCy): Semi-Supervised Federated Learning of Surgical Phases. IEEE Trans. Med. Imaging 2022, 42, 1920–1931. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  36. Satala, C.-B.; Gurau, A.-M.; Patrichi, G.; Mihalache, D. Non-Syndromic Ganglioneuromatosis of the Gallbladder, an Extremely Rare Condition: Case Report and Literature Review. Reports 2025, 8, 259. [Google Scholar] [CrossRef] [Scilit]
  37. Haidar, M.; Sharaf, N.; Saleh, S.; Upadhyay, P. Rare anatomical variants encountered during laparoscopic cholecystectomy in low resource conditions and the convenient concept of the safe zone of dissection: A prospective observational study at a single center. J. Minim. Invasive Surg. 2024, 27, 156–164. [Google Scholar] [CrossRef] [Scilit]
  38. Ramesh, S.; Srivastav, V.; Alapatt, D.; Yu, T.; Murali, A.; Sestini, L.; Nwoye, C.; Hamoud, I.; Fleurentin, A.; Exarchakis, G.; et al. Dissecting Self-Supervised Learning Methods for Surgical Computer Vision. Med. Image Anal. 2022, 88, 102844. [Google Scholar] [CrossRef] [Scilit] [PubMed]
  39. Raptis, S.P.; Theocharopoulos, A.; Theocharopoulos, C.; Papadakos, S.P.; Levantis, G.; Kontis, E.; Vrahatis, A.G. Artificial intelligence analysis of minimally invasive surgery data. J. Robot. Surg. 2026, 20, 186. [Google Scholar] [CrossRef] [Scilit]
  40. Raptis, S.P.; Theocharopoulos, C.; Theocharopoulos, A.; Vrahatis, A.G.; Kontis, E. Deep learning model for automatic recognition of surgical phases in laparoscopic cholecystectomy videos. Eur. J. Surg. Oncol. 2025, 51, 111072. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.