Abstract
Artificial Intelligence (AI) is transforming clinical dental practice, with most applications focusing on static images like radiographs. However, the integration of AI in analyzing video data, particularly in surgical settings rich in dynamic information, remains underexplored in oral medicine. This study introduces AI-miSMG, an intelligent surgical workflow recognition model designed for minimally invasive submandibular gland (SMG) resection. Building upon our previous work, we established a standardized annotation protocol to efficiently label endoscopic SMG resection procedures, which are divided into Creation, Position, Separation, Inspection, and Idle phases. The AI-miSMG model was trained on a dataset of 73 high-quality endoscopic SMG resection videos, comprising 386,122 labeled frames. To evaluate its performance, we used a multicenter dataset consisting of surgical videos from four different centers, totaling 85,913 images. The model achieved an overall accuracy of 0.87 on the external validation dataset. Additionally, it was explored for workflow-based analysis of surgical fluency across surgeons with different experience levels. Furthermore, our model reduced annotation time by approximately 47%, decreasing from 94.00 min to 49.90 min. Overall, we developed a deep learning-based workflow recognition model for minimally invasive SMG resection and demonstrated its feasibility for surgical phase recognition, workflow analysis, and model-assisted annotation.
Subject terms: Computational biology and bioinformatics, Engineering, Health care, Mathematics and computing, Medical research
Introduction
Submandibular gland (SMG) resection, a critical procedure in head and neck surgery, is typically performed to address conditions such as tumors and chronic sialadenitis1. Minimally invasive technique has revolutionized traditional SMG resection, leading to more concealed scarring and fewer complications2,3. However, this achievement brings new challenges for surgeons, who now must navigate critical neurovascular structures within a confined surgical corridor and operate with restricted endoscopic fields of view while manipulating specialized instruments. Given that surgical technical competency in complex procedures significantly impacts postoperative outcomes and complication rates4–6, an optimized evaluation of surgical skills and the provision of operative support could enhance technique and, consequently, improve patient outcomes, particularly for trainees7. Traditional assessment methods are time-consuming, labor-intensive, and heavily dependent on individual judgments, which inevitably introduce subjectivity8,9.
Over the past few decades, AI has been revolutionizing healthcare by offering innovative solutions across various domains10,11. AI models learn features from diverse data sources, including text, images, and videos, to make predictions on unseen data. In the case of SMG, AI has been successfully applied in detecting sialoliths and auto-contouring to assist with radiotherapy planning12,13. Despite these strides, the application of AI in surgical settings remains in its infancy14–16. Annually, over 330 million surgical procedures are performed worldwide, and this number continues to grow. Surgery inherently involves complex decision-making and dynamic intraoperative changes, making it a data-rich environment. We are now inhabiting an era where data-driven approaches are increasingly essential for enhancing surgical outcomes. AI tools, powered by robust data-processing capabilities, hold significant promise to optimize multiple phases of surgical care17,18.
With the continued advancement of computer vision and computer-assisted surgery, AI-driven surgical workflow recognition has attracted growing interest19. By identifying critical anatomical structures and distinct surgical procedures in real time, these methods facilitate informed decision-making, enable objective skill assessments at various stages, and support improvements in clinical training and quality control20,21. Moreover, AI-driven workflow recognition holds significant promise for enhancing surgical efficiency, standardizing procedures, and ultimately contributing to the development of autonomous surgery22,23.
At present, advancements in AI-driven workflow recognition have primarily focused on abdominal surgeries19,24, where endoscopic techniques are well-established. In contrast, the field of oral and maxillofacial surgery has progressed at a slower pace, largely due to the delayed adoption of endoscopic methods and limited availability of high-quality surgical video datasets. In recent years, our team has conducted a substantial number of endoscopic and robot-assisted oral and maxillofacial surgeries, generating a robust dataset3,25–29. Furthermore, we have compiled a comprehensive summary of the surgical procedures for several endoscopic oral and maxillofacial surgeries30,31. This unique resource provides a valuable opportunity to bridge existing gaps in the field and advance the application of AI in oral and maxillofacial surgery.
In this study, we developed and validated a deep learning-based model for surgical workflow recognition in minimally invasive SMG resection, building upon a standardized annotation framework derived from our previous work. The model comprises a Residual Network 50 (ResNet50) for feature extraction and a long short-term memory (LSTM) network for spatiotemporal reasoning32,33. The model was evaluated across external datasets encompassing variations in surgeons, institutions, and surgical platforms to assess its robustness and generalizability. Furthermore, we explored the feasibility of using workflow-derived metrics from the model to support objective surgical skill assessment (Fig. 1). This work presents an AI-driven method for surgical workflow recognition in head and neck surgery, with potential implications for future data-driven surgical practice.
Fig. 1. Overview of the study design.

SMG submandibular gland, IFNM intraoperative facial nerve monitoring, fps frames per second, LSTM long short-term memory, M master, P proficient, N novice.
Results
Developmental and external validation datasets for SMG resection surgical workflow recognition
In this study, a total of 73 full-length endoscopic SMG surgery videos were retrospectively collected from the West China Hospital of Stomatology, Sichuan University (Chengdu, China), between July 2022 and August 2024, constituting the developmental dataset. All videos were recorded using a KARL STORZ endoscopy video processor (Landkreis Tuttlingen, Germany) with a resolution of 1920 × 720 at 22 or 27 frames per second (fps). The validation dataset comprised 18 videos, including 1 from Nanjing Stomatology Hospital (Nanjing, China), 1 from The First Affiliated Hospital of Harbin Medical University (Harbin, China), 4 from Nanchong Central Hospital (Nanchong, China), and 12 from West China Hospital of Stomatology. Patient baseline and operative characteristics in the developmental and validation datasets are presented in Fig. 2a and Supplementary Table 1.
Fig. 2. Establishment of developmental and external validation datasets for minimally invasive SMG resection surgical phase recognition.

a Patient background and clinical characteristics in the developmental and external validation datasets. b Definition and representative images of the five surgical phases: Creation, position, separation, inspection, and idle. c Annotation examples of SMG resection videos. d The phase distribution in developmental and external validation datasets. Abbreviations: I inflammatory diseases, B benign tumor, M malignant tumor, SMG submandibular gland.
We down-sampled each video to 1 fps and then labeled every frame following our annotation protocol (Fig. 2b and Supplementary Figs. 1 and 2). To ensure the reliability of our datasets, we implemented a multi-stage quality control protocol, including dual independent annotation, inter-annotator agreement validation, and expert arbitration. First, two well-trained annotators, each with extensive experience in over 50 SMG surgeries, independently annotated approximately 10% (8 cases, 42,035 frames) of the developmental dataset. Examples of the annotations made by the two annotators are shown in Supplementary Fig. 3. The inter-annotator agreement was measured using Cohen’s Kappa, yielding a value of 0.97, which indicates a high consistent understanding of the annotation protocol between the annotators and confirms the reproducibility of the protocol. In cases of disagreements or ambiguous annotations, three senior endoscopic surgeons were consulted for confirmation, not only based on visual judgment but also incorporating practical experience. Following this, the two annotators jointly labeled the remaining dataset. Once all annotations were completed, the results underwent quality control by the senior surgeons again. Three final annotation examples are shown in Fig. 2c. In total, 386,122 frames in the developmental training dataset and 85,913 frames in the external validation dataset were annotated. The distribution of these phases is presented in greater detail in Fig. 2d.
Performance of AI-miSMG model on developmental dataset
The architecture of the hybrid deep learning model is illustrated in Fig. 3a. To evaluate the performance of the AI-miSMG model for each phase, we computed ROC curves for each of the five phases using a one-vs-rest strategy (Fig. 3b). On the developmental dataset, the model achieved an average accuracy of 0.96, an average precision of 0.89, an average recall of 0.88, and an average F1 score of 0.89 (Fig. 3c). During recognition, the model faced two main challenges: first, significant variations within the same phase, and second, due to blood contamination, the surgical field often presents a visually uniform background throughout all phases (Fig. 3d). Despite these challenges, which could potentially lead to misclassifications, the confusion matrix demonstrates that the AI-miSMG model distinguishes these phases with high accuracy (Fig. 3e). To further analyze the model’s ability to discriminate between phases, we employed Grad-CAM to generate heatmaps that highlight the key image regions driving its predictions34. Specifically, Grad-CAM was computed on the last convolution of the final bottleneck in ResNet50. The intensity of the colors in the heatmap indicates the degree to which the model relies on specific areas when making its decisions. The results reveal that the model prioritizes regions capturing surgical instruments, surgical actions, and the gland (Fig. 3f), aligning with the anatomical and operational landmarks emphasized in our annotation protocol and clinical practice.
Fig. 3. Architecture of AI-miSMG model and overview of its performance on developmental dataset.

a Architecture of the hybrid deep learning model for minimally invasive SMG resection surgical phase recognition. b Receiver operating characteristic (ROC) curve for five phases. c Accuracy, precision, recall, and F1 score for each surgical phase. Data are presented as 95% confidence interval (calculated via bootstrap resampling, n = 1000). d Example frames from five phases with intra-class variation. e Confusion matrix of the surgical phase recognition model. f Visualization of the heatmaps of typical frames.
Performance of AI-miSMG model on external validation dataset
For the AI-miSMG model incorporates spatial and temporal features, enabling a better understanding of the surgical process and operational characteristics, allowing it to adapt to a wider range of scenarios. In this section, we evaluated the generalization capability of the model using a total of 18 surgical videos, comprising 15 endoscopic procedures (13 SMG resections and 2 parotidectomies) and 3 robotic-assisted SMG resections (Supplementary Table 2). On the external validation dataset, it achieved an overall accuracy of 0.87 (Table 1). For endoscopic-assisted procedures, the model achieved an accuracy of 0.86 for SMG resection and 0.75 for parotidectomy. At our center, 9 endoscopic videos from 3 different surgeons were used for evaluation, and Fig. 4a presents the ROC curves of the model predictions. Specifically, the model achieved an average accuracy of 0.96, average precision of 0.87, average recall of 0.85, and an average F1 score of 0.86 (Fig. 4b). In robotic surgery, which is derived from endoscopic procedures, the model also achieved good performance at our center (Fig. 4c, d). To further test the model’s robustness and generalization across different institutions, we collected endoscopic SMG surgery videos from 3 different surgeons at 3 external hospitals (Fig. 4e, f). Confusion matrices for these evaluations are presented in Supplementary Figs. 4–6.
Table 1.
Performance of the deep learning model on validation dataset
| Phases | Precision | Recall | F1 score |
|---|---|---|---|
| Creation | 0.88 | 0.93 | 0.91 |
| Position | 0.76 | 0.82 | 0.79 |
| Separation | 0.89 | 0.86 | 0.88 |
| Inspection | 0.76 | 0.54 | 0.64 |
| Idle | 0.88 | 0.87 | 0.87 |
| Overall accuracy | 0.87 |
Fig. 4. Performance of the deep learning model on the external validation dataset.

a ROC curve of AI-miSMG model on cases from our hospital. b Phase-wise performance metrics of model on videos from our hospital. c ROC curve of the model on cases performed by the surgical robot. d Phase-wise performance metrics of the model on surgical robot videos. e ROC curve of the model on cases from other hospitals. f Phase-wise performance metrics of the model on videos from Nanchong, Nanjing, and Harbin. g Illustration of different endoscopic systems, surgical tools used in the external validation dataset.
However, the performance metrics in videos from other centers and robotic surgeries were lower compared to endoscopic videos from our center. This discrepancy may be attributed to differences in the endoscopy systems, which resulted in distinct surgical field appearances, as well as variations in surgical instruments that could introduce confusion for the deep learning model (Fig. 4g). Furthermore, we included parotidectomy videos in the external dataset. Although parotidectomy, like SMG resection, involves the resection of salivary glands, the significant differences in tissue structure between the parotid gland and the SMG further reduced the model performance. Additionally, this model showed lower performance in certain surgical phases, notably the Inspection phase. This underperformance may be attributed to factors such as variations in surgical techniques among different surgeons and the limited number of frames in the developmental dataset, which may have constrained the model’s ability to learn features pertinent to this phase.
AI-miSMG model for surgical skill assessment and annotation efficiency improvement
While previous studies have predominantly focused on model performance, fewer have addressed their clinical application. Endoscopic surgery is particularly challenging due to its confined operating space and the specialized instruments required. Ozeki et al. suggested that surgeons require >25 cases for proficiency and >50 cases for mastery in endoscopic procedures35. However, conventional skill assessments are both time-consuming and labor-intensive. Our AI-miSMG model was further explored for quantitative analysis of surgical efficiency by identifying non-productive Idle phases characterized by instrument repositioning or procedural hesitation. To validate this approach, we analyzed 9 endoscopic videos (3 per surgeon) from our institution stratified by expertise: surgeon A (learning phase, <25 cases), surgeon B (proficiency phase, 25–50 cases), and surgeon C (mastery phase, >50 cases).
Surgical phase distribution analysis based on model-predicted labels revealed progressive optimization of workflow efficiency with increasing expertise (Fig. 5a). The learning-phase surgeon exhibited the highest Idle phase proportion (44.76%), while the mastery-phase surgeon demonstrated minimal Idle intervals (18.44%). Quantification of workflow interruptions showed significant differences in Idle transition frequency: 15.76 per 100 s for surgeon A vs. 10.38 for surgeon B vs. 5.10 for surgeon C (P < 0.05, Kruskal–Wallis test; Supplementary Fig. 7a). To evaluate the reliability of the model-based assessment, we also conducted the same analysis using ground-truth annotations. The ground-truth results demonstrated a consistent trend with the model predictions, with novice surgeons showing the highest Idle transition frequencies and experienced surgeons showing the lowest (Fig. 5b).
Fig. 5. The deep learning model can identify surgeon skill levels and improve annotation efficiency.

a Proportion of phase duration and frequency of Idle phase transition (brown-colored timestep) for different surgeons. b Ground-truth number of Idle transitions per 100 s across surgeons from our hospital with different skill levels. c Model-predicted number of Idle transitions per 100 s after applying the smoothing method across surgeons from our hospital with different skill levels. d Video annotation time with and without the assistance of the model.
We observed some discrepancy between the skill metrics derived from model predictions and those derived from ground-truth annotations. To investigate whether this difference was mainly caused by the frequent confusion between Inspection and Idle, we performed a sensitivity analysis. The results showed that removing the Inspection phase led to only minimal changes in the Idle transition metrics in both the model-predicted and ground-truth-based analyses, suggesting that the Inspection-Idle confusion did not substantially affect the overall skill assessment results (Supplementary Figs. 7 and 8). We further found that isolated single-frame Idle predictions frequently occurred within the Creation, Position, and Separation phases. After applying smoothing to these single-frame Idle predictions, the model-based skill metrics became more consistent with those derived from the ground-truth annotations (Fig. 5b, c). The Spearman’s correlation coefficient increased from 0.975 for the original model-predicted metrics to 0.992 after smoothing. This consistency suggests that model predictions may provide a useful exploratory proxy for workflow-based skill assessment. These findings indicate a potential association between surgical expertise and operational fluency in this small dataset. Furthermore, the model substantially improved annotation efficiency through automated phase recognition. Compared to manual labeling requiring 94.00 min per video, AI-assisted annotation reduced processing time by 46.91% to 49.90 min (P < 0.0001, paired t-test; Fig. 5d).
Discussion
The deep learning model in this study represents an application of a sequential model to minimally invasive head and neck surgery and achieved high accuracy in SMG resection workflow recognition. The model-derived workflow metrics showed differences across surgeons with different experience levels and significantly reduced annotation time by over 45%. These findings suggest the feasibility of workflow-based analysis and preliminary exploration of skill assessment for minimally invasive SMG resection and that it may help flatten the learning curve for novice surgeons.
Oral medicine is increasingly integrating AI to enhance clinical practice10. In endodontics, AI enhances diagnostic accuracy for pulp pathology and periapical lesion while enabling predictive modeling of treatment outcomes. In other specialties, AI demonstrates robust performance in classifying and segmenting jaw lesions. Li et al. developed AI models that achieved high performance in diagnosing and prognosing odontogenic keratocyst (OKC) based on pathology patch-level images36. Through evaluation using cone-beam computed tomography, Liu et al. demonstrated the particular value of AI-assisted diagnosis in differentiating between the visually similar lesions OKC and ameloblastoma achieving a 6.2–12.7% higher F1 score compared with traditional radiographic analysis37. Emerging evidence also supports that AI has demonstrated promise as a computer-aided diagnostic tool for oral squamous cell carcinoma and salivary gland tumors38,39. Furthermore, Yan et al. proposed an innovative approach for intraoperative diagnosis of tongue squamous cell carcinoma margin status by integrating Raman imaging technology with an AI generative model40. This method rapidly and non-invasively captures tissue Raman images and transforms them into hematoxylin-eosin-stained histopathological images, achieving an overall diagnostic accuracy of 86.7% for distinguishing tumor tissue from normal muscle tissue. Surgery involves dynamic decision-making where video analysis of procedures and operating room activities could optimize critical care phases. This is particularly relevant in minimally invasive surgery, which is now widely adopted and relies heavily on fiber-optic visualization41. Although AI implementation in oral medicine have advanced considerably, current applications predominantly rely on static imaging modalities, such as radiographs and histopathology, with a notable absence of research using video-based data. Our study addresses this critical gap by pioneering AI-driven dynamic video analysis in minimally invasive SMG resection, representing the first such application in the head and neck region.
AI-based surgical workflow recognition has drawn increasing attention in minimally invasive surgery with recent advances in computer vision and deep learning. Early approaches to surgical workflow analysis predominantly relied on single convolutional neural network, which did not capture the temporal dynamics inherent in surgical procedures23. In our study, we employed a framework that jointly models spatial features and temporal dependencies, achieving an accuracy exceeding 0.86 on the external validation dataset. We selected ResNet50 as the spatial backbone because its residual connections mitigate vanishing gradients and enable stable training of deeper networks. ResNet-based models also exhibit strong performance across medical imaging applications, including early detection of Alzheimer’s disease and prediction of lymph-node metastasis42,43. For temporal modeling, we adopted an LSTM head to capture short- to mid-range dependencies between consecutive frames. Notably, LSTM-based approaches have also demonstrated real-time feasibility in intraoperative respiratory motion prediction, further indicating their suitability for latency-constrained surgical applications44. Although Transformer architectures are popular for temporal feature extraction and can capture long-range dependencies through self-attention, they generally involve higher computational overhead45. In addition, surgical workflow progresses sequentially, with each phase following the previous one in an ordered manner. LSTM is particularly effective at modeling these short to middle range temporal dependencies between consecutive steps. Since each surgical phase is usually associated with clear and distinctive visual cues, local temporal continuity offers sufficient information for recognition, reducing the need for extensive global dependency modeling. Another important consideration is the potential for future deployment in real surgical settings. Compared with Transformer models, LSTM has a smaller number of parameters and faster inference speed, which makes it more feasible to meet the requirements of real-time surgical assistance46. For these reasons, we found the ResNet-LSTM framework to be more appropriate for our study.
Moreover, many of these studies in this domain rely on single-center data or publicly available datasets47,48, which may limit the generalizability of their findings. To examine our model’s ability to transfer knowledge learned from one center to another, we used surgical videos from four different centers. The robust performance across diverse clinical settings underscores the potential of our approach for broader applications in SMG surgical workflow recognition. In our study, we explored whether workflow-derived operative fluency metrics could be used for preliminary skill assessment. The results indicate that our model can effectively differentiate between surgeons with varying levels, a method not commonly explored in previous classification, which have focused on verifying the accuracy of surgical procedure classification. Our findings align with the emerging concept of intelligent surgical ecosystems, demonstrating how deep learning transcends conventional phase recognition in head and neck surgery.
In this study, we defined the Idle phase as intervals of non-productive action during surgery to evaluate surgical workflow fluency. An increased Idle phase frequency indicates disrupted workflow and reduced operative fluidity. However, this metric focuses exclusively on observable motions within the endoscopic field of view and cannot fully represent overall surgical proficiency. Specifically, non-procedural pauses caused by equipment issues such as scope fogging, instrument failure, or lighting loss are recorded as the Idle phase, which might compromise the validity of surgical skill assessments. Instead of relying solely on Idle duration, we mainly focused on phase transitions involving Idle (transitions from other phases to Idle and from Idle back to other phases). In this way, even if an equipment issue prolongs the Idle period, it contributes only two transition events, thereby reducing the influence of equipment-related pauses on the assessment. Comprehensive intraoperative decision-making necessitates multimodal data integration, encompassing medical images, electronic signals from surgical instruments, intraoperative patient physiological metrics, and team communication. Multimodal integration of operative data provides superior objectivity in assessing surgical performance compared to unimodal approaches. Multimodal data integration has emerged as a pivotal advancement in medicine. Xiang and colleagues established the MUSK framework, which synthesizes pathology images and clinical reports to refine diagnostic accuracy in cancer therapy49. By harmonizing multi-omic data with radiological and histopathological features, Liu et al. successfully identified three subtypes of IDH-wildtype gliomas50. This synthetic data infrastructure constitutes the critical foundation for next-generation AI systems in surgery14.
The Position phase showed relatively poor performance in minimally invasive SMG resection videos from other centers. Several plausible factors may contribute to this finding. First, Position may represent a relatively transitional phase, and its visual boundaries with adjacent phases may be less distinct than those of more procedure-specific phases. As shown in Supplementary Fig. 6, Position was most frequently confused with the preceding Creation phase, and some Separation frames were also misclassified as Position, suggesting that boundary ambiguity between adjacent phases may have contributed to the lower performance. As a result, some misclassifications may reflect boundary ambiguity rather than purely incorrect recognition. Second, the complexity of the surgical environment. Minimally invasive SMG resection presents a highly complex surgical field. The operative region contains anatomically adjacent tissues with visually similar coloration, such as platysma, sternocleidomastoid muscle, and the SMG capsule. This inherent visual similarity makes anatomical structure recognition challenging, even for experienced surgeons. Third, variability across centers may be influenced by differences in endoscopic systems, which can differ in brightness, resolution, and frame rate. Surgeons from different institutions exhibit unique habits and instrument-handling styles during some phases. These variations in imaging quality and surgical technique likely contributed to the reduced performance observed during external validation. Fourth, the dataset size for the Position and Inspection phases was relatively smaller compared to other phases, which likely limited the model’s ability to learn robust features. Expanding the dataset for these phases is expected to enhance model performance. Additionally, methodologies reported in related literature suggest potential avenues for improvement. For instance, in Furube et al.’s work on phase recognition for esophageal endoscopic submucosal dissection demonstrated that iodine staining might improve recognition accuracy for their model51. Exploring similar contrast-enhancing techniques adapted to SMG resection or other surgeries could be beneficial.
The Inspection also demonstrated suboptimal performance and was frequently misclassified as Idle in validation dataset. The Inspection phase typically involves multiple tasks, including verifying complete gland removal, checking for bleeding, irrigating the surgical cavity, and examining the facial nerve. This phase involves diverse surgical actions and instruments and therefore lacks distinctive visual cues. Unlike other phases that are characterized by specific instruments or landmarks, such as the electrocautery hook in the Creation phase or the SMG in the Separation phase, the Inspection phase is inherently more difficult for the model to recognize consistently. In addition, differences in endoscopic systems and surgical habits across centers further increase the heterogeneity of the inspection phase data. We also found that in many Inspection frames, the surgical instruments appear only at the image margins or are barely visible, which increases the likelihood that the model misclassifies them as Idle (Supplementary Fig. 9).
Because surgical skill assessment in this study was based on the frequency of Idle transitions, the confusion between Inspection and Idle raised a concern that misclassification might artificially increase or decrease the number of Idle transitions. To further evaluate whether this confusion affected the skill assessment results, we excluded the Inspection phase and recalculated Idle transitions using only the three main procedural phases. The results showed that the Idle transitions/100 s were similar with and without inclusion of the Inspection phase, in both the model predictions and the ground-truth labels. This suggests that the confusion between Inspection and Idle had only a limited influence on the skill assessment results. Further examination of the predicted and ground-truth labels showed that misclassification between Inspection and Idle tended to occur in contiguous segments rather than as isolated frame-by-frame fluctuations. Therefore, although Inspection and Idle were frequently confused, this confusion was often segmental in nature and did not substantially alter the number of Idle transitions. We then found that the three main procedural phases, accounting for the majority of frames in the videos, frequent single-frame fluctuations involving Idle were still observed. To reduce the influence of this single-frame Idle noise, we applied a smoothing method. The smoothed results were improved compared with the original model predictions and were more consistent with the ground-truth labels.
For the annotation-time evaluation, we observed that the model-assisted workflow provided meaningful time savings. Although a surgeon still reviews the entire video to ensure correctness, the workflow reduced repetitive frame-by-frame entry because the annotator primarily verifies predictions and corrects mislabeled frames. In practice, the annotator labeled each video frame sequentially in an Excel file, using the model’s predicted phase boundaries as reference points and applying manual corrections when needed. Since surgical workflow proceeds chronologically from one phase to the next, these predicted boundaries helped localize transitions and further reduced the annotation burden. It should also be noted that the 47% reduction was measured on 10 videos from our center; higher model accuracy in this dataset likely amplified the observed time savings. On data from other centers, lower accuracy requires more manual correction and correspondingly increases the time. This underscores that improving recognition accuracy is essential for maximizing the efficiency of model-assisted annotation.
It should be noted that the annotation protocol in this study, while derived from our previously published seven-step endoscopic SMG resection framework31, contains substantive modifications driven by two key considerations. First, the original seven-step procedure included preoperative preparation stages that are usually not recorded. Our annotation protocol specifically focuses on the endoscopy view, therefore excluding non-observable preparatory steps while introducing Idle phase to better analyze the smoothness of the surgery, which were not addressed in the original seven-step procedure. Second, the seven-step procedure highlights the handling of different SMG boundaries during the operation, providing guidance for surgeons on key anatomical features or critical aspects to focus on during surgery. However, considering that the SMG is approximately spherical in shape, it is nearly impossible to definitively determine boundaries during operation. Since these boundary operations primarily involve separating the SMG from surrounding tissues, our annotation protocol consolidates these steps under a unified “Separation” category, which maintains clinical validity and simplifies labeling.
There are several limitations in our study. First, the training dataset is restricted to videos of the trans-hairline approach for minimally invasive SMG resection. However, alternative surgical approaches, such as the retroauricular incision and the modified Blair incision, are also commonly employed. These different techniques alter the operative field in terms of angle, lighting, tissue presentation, and exposure. Given these variations, the model’s performance on other approaches maybe suboptimal. Second, the dataset used to develop our AI model was drawn solely from a single institution, which may limit the model’s generalizability. This constraint arises because this minimally invasive procedure is currently being adopted in clinical practice across China, and our center performs the highest volume of such cases nationally. We are now conducting a multicenter study with broader institutional participation and greater surgical diversity, while concurrently developing a standardized, privacy-preserving database. This database will serve as a reliable resource to support and inform future research.
Overall, we developed a deep learning-based workflow recognition model for minimally invasive SMG resection using a relatively large case series, and validated its performance with a multicenter video database. The AI-miSMG demonstrated good performance in surgical phase recognition, and our exploratory analyses suggest its potential utility for workflow-based assessment and annotation support. To our knowledge, this work establishes three contributions: (1) the establishment of a large-scale, well-annotated video dataset for minimally invasive SMG surgery, (2) the development of a standardized and reproducible annotation protocol, and (3) the demonstration of AI-based workflow recognition for objective surgical skill assessment in clinical settings. These findings may support future efforts toward data-driven application in surgical practice.
Methods
Dataset collection
We retrospectively collected minimally invasive SMG surgery videos from the West China Hospital of Stomatology, Sichuan University (Chengdu, China), between July 2022 and August 2024, constituting the developmental dataset. The validation dataset was collected from Nanjing Stomatology Hospital (Nanjing, China), The First Affiliated Hospital of Harbin Medical University (Harbin, China), Nanchong Central Hospital (Nanchong, China), and West China Hospital of Stomatology. The following patient data were obtained for each video: age, sex, diagnosis type (inflammatory diseases/benign tumor/malignant tumor), surgical side (left/right), additional incision (yes/no), operation time, intraoperative bleeding volume, postoperative drainage days, and total drainage volume.
Annotation protocol
In this study, we proposed a standardized protocol for annotating endoscopic SMG resection videos, building on our previous work in this area29. We have defined five surgical phases, focusing on the critical operational steps and the feasibility of annotation. These phases are: (1) Creation: to complete minimally invasive SMG resection via a hairline incision, it is essential to create sufficient space for operation. This step involves the establishment of an operation cavity to facilitate the surgery. (2) Position: unlike in open surgery, the surgical field in endoscopic procedures is different. Identifying the correct anatomical landmarks is crucial in this setting. The facial vein, which runs beneath the SMG, is commonly used to locate the gland. In this phase, the frame in which the facial vein is cut or the SMG becomes visible is annotated. (3) Separation: once the SMG is identified, the separation phase begins. During this phase, the facial artery and SMG duct are typically severed. The goal is to completely free the SMG from the surrounding tissue, and the phase continues until the gland is fully separated and removed from the surgical field. (4) Inspection: after the specimen is removed, the surgeon inspects the area to ensure proper hemostasis, checks the completeness of the SMG resection, and installs drainage. (5) Idle: this phase captures the time spent by the surgeon to exchange instruments, adjust the endoscope, clear the surgical field, or when there are pauses in surgical cavity. Each frame is annotated with only one of these five phases, with the start and end frames of each phase specified in Fig. 2b.
Pre-processing and annotation process
Due to variations in frame rates across videos, each video was pre-processed to standardize the frame rate and facilitate the annotation process. Briefly, the original surgical video was downsampled to 1 fps to generate a continuous sequence of images, which were saved in a standardized naming format. An Excel spreadsheet was then created to annotate surgical phases frame-by-frame, with each row corresponding to a specific image ID and its associated phase label. During annotation process, trained annotators focused on identifying the precise start and end frames of each surgical phase based on predefined criteria (Supplementary Fig. 2).
Deep learning model
We developed the AI-miSMG model, a hybrid deep learning framework that integrates a convolutional neural network (CNN) for spatial feature extraction and a one-layer unidirectional LSTM network for temporal feature modeling from endoscopic images. For CNN component, we employed a ResNet50 model pretrained on ImageNet. To accommodate distinct feature distributions across the two procedures, we modified the final fully connected layer of ResNet50. The LSTM module then incorporated contextual information from previous video frames to capture temporal dependencies52. Finally, a fully connected classification layer outputs probability estimates for each of the five endoscopic SMG surgical phases.
Each training sample consisted of 8 consecutive frames extracted from the endoscopic videos, with all input frames resized to 224 × 224 pixels. To improve generalization, standard data augmentation techniques were applied during training, including random rotation, scaling, and brightness jitter. The model was trained using the Adam optimizer with a batch size of 2 and a cross-entropy loss function for multi-class classification. The initial learning rate was set to 1e-4 and decreased by a factor of 0.1 every 10 epochs using a step decay schedule. Early stopping was applied based on validation performance, with training terminated if no improvement was observed for 10 consecutive epochs. The proposed model contained about 27 million trainable parameters.
To fully utilize the developmental dataset, we employed a five-fold cross-validation strategy. Specifically, our developmental dataset was divided into five subsets. The 73 surgical videos were divided into five folds (15, 15, 15, 14, and 14 videos, respectively) at the video level. Each surgical video was treated as an independent unit and assigned entirely to a single fold, ensuring that no frames or temporal segments from the same video appeared in both training and validation sets. In each fold, one subset was used for validation, while the remaining four subsets were used for training. Within each video, the frames were kept in their original chronological order and fed sequentially into the model, ensuring that temporal dependencies were preserved during training and evaluation. All code was implemented using Python 3.8. Model training and validation were performed on a computer equipped with an NVIDIA GeForce RTX 4080 Super GPU, an Intel Core i7 processor, and 64GB of RAM.
Evaluation metrics
To evaluate the performance of this model, we employed the following metrics: accuracy, precision, recall, and F1 score. The formulations for these evaluation metrics are provided below:
where TP is true positive, TN is true negative, FP is false positive, and FN is false negative.
Skill assessment
Each surgical video yielded one annotation result. For each annotated phase within a video, the frame count was calculated. To assess surgeon skill level, we specifically analyzed transitions involving the Idle Phase. An Idle Phase transition was defined as either a shift from any other surgical phase into the Idle Phase, or a shift out of the Idle Phase into any other phase. The theoretical rationale is that a higher frequency of Idle Phase transitions potentially indicates reduced surgical fluency. This is because frequent entries into or exits from an idle state may reflect hesitations, pauses, communication delays, or unanticipated difficulties during the procedure.
Annotation time
For the annotation time experiment, we randomly selected 10 endoscopic videos from our hospital. Annotation time was recorded prospectively in minutes for each video under both de novo and model-assisted workflows. Timing started when the annotator began labeling and stopped when the final frame was completed; short breaks were excluded by pausing the timer. In the de novo workflow, annotators labeled videos in a frame-by-frame manner by identifying the phase at the first frame of each segment and extending the label until a phase transition was observed. In the model-assisted workflow, raw predicted labels were provided in advance without temporal smoothing, and annotators corrected incorrect predictions primarily on a frame-by-frame basis. This reduced repetitive manual labeling and Excel operations. The same annotators labeled the same videos under both workflows for paired comparison. Blinding was therefore not feasible. To reduce potential bias, a washout interval of at least 2 weeks was introduced between the two sessions, and the order of workflows was alternated across videos.
Statistical analysis
All statistical analyses were performed using Python 3.8. For the quantitative results on the developmental and validation datasets, we applied bootstrapping to estimate the 95% confidence interval. To compare the analytical results across different groups, we used the Kruskal-Wallis test and paired t-test to assess statistical differences. A P-value less than 0.05 was considered statistically significant.
Ethics approval
Ethical approval for this study was obtained from the Ethics Committee of the West China Hospital of Stomatology, Sichuan University (No. WCHSIRB-D-2024-381).
Supplementary information
Acknowledgements
This study was funded by the West China Hospital of Stomatology (RD-03-202309, RD-03-202506), the Health Commission of Sichuan Province Medical Science and Technology Program (24CXTD07), the Natural Science Foundation of Sichuan Province (2025ZNSFSC0645), the Sichuan Provincial Youth Innovation Project for Medical Research (Q20250018), and the Postdoctoral Fellowship Program of CPSF (GZC20231787). The funder played no role in study design, data collection, analysis and interpretation of data, or the writing of this manuscript.
Author contributions
Z.K.Ma contributed to conception and design, analysis and interpretation, and drafted manuscript; Y.F.Hua contributed to conception and design, analysis and interpretation, and critically revised manuscript; L.Que contributed to acquisition and interpretation, critically revised manuscript; B.Yan contributed to acquisition and interpretation, critically revised manuscript; J.L.Huang contributed to conception and critically revised manuscript; H.W.Ming contributed to acquisition and critically revised manuscript; X.W.Hong contributed to acquisition and critically revised manuscript; S.L.Piao contributed to acquisition and critically revised manuscript; C.W.Tang contributed to conception and critically revised manuscript; G.Q.Zhu contributed to conception and design, acquisition and interpretation, and critically revised manuscript; C.J.Li contributed to conception and design, acquisition and interpretation, and critically revised manuscript; Z.Y.Guo contributed to conception and design, analysis and interpretation, and critically revised manuscript. All authors gave final approval and agreed to be accountable for all aspects of the work.
Data availability
The datasets generated and analyzed during the current study are not publicly available, but are available from the corresponding author on reasonable request. The underlying code for this study is not publicly available but may be made available to qualified researchers on reasonable request from the corresponding author.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
These authors contributed equally: Zhongkai Ma, Yufei Hua.
Contributor Information
Zhiyong Guo, Email: realzhiyongguo@qq.com.
Guiquan Zhu, Email: zhugq@scu.edu.cn.
Chunjie Li, Email: lichunjie07@qq.com.
Supplementary information
The online version contains supplementary material available at https://doi.org/10.1038/s41746-026-02976-w.
References
- 1.Ho, C. F. et al. Postauricular incision versus conventional transcervical incision in submandibular gland excision: a systematic review and meta-analysis. Asian. J. Surg.46, 18–23 (2023). [DOI] [PubMed] [Google Scholar]
- 2.Goh, H. K. C., Ng, Y. H. & Teo, D. T. W. Minimally invasive surgery for head and neck cancer. Lancet Oncol.11, 281–286 (2010). [DOI] [PubMed] [Google Scholar]
- 3.He, J. et al. Full endoscopic submandibular gland excision through the retroauricular hairline approach: a cohort study. J. Stomatol. Oral Maxillofac. Surg.126, 102186 (2025). [DOI] [PubMed] [Google Scholar]
- 4.Birkmeyer, J. D. et al. Surgical skill and complication rates after bariatric surgery. N. Engl. J. Med.369, 1434–1442 (2013). [DOI] [PubMed] [Google Scholar]
- 5.Stulberg, J. J. et al. Association between surgeon technical skills and patient outcomes. JAMA. Surg.155, 960–968 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Woods, M. S. et al. Association between surgical technical skills and clinical outcomes: a systematic literature review and meta-analysis. JSLS27, e2022.00076 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Goodman, E. D. et al. Analyzing surgical technique in diverse open surgical videos with multitask machine learning. JAMA. Surg.159, 185–192 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8.Igaki, T. et al. Automatic surgical skill assessment system based on concordance of standardized surgical field development using artificial intelligence. JAMA. Surg.158, e231131 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.Komatsu, M. et al. Automatic surgical phase recognition-based skill assessment in laparoscopic distal gastrectomy using multicenter videos. Gastric Cancer27, 187–196 (2024). [DOI] [PubMed] [Google Scholar]
- 10.Shan, T., Tay, F. R. & Gu, L. Application of artificial intelligence in dentistry. J. Dent. Res.100, 232–244 (2021). [DOI] [PubMed] [Google Scholar]
- 11.Rajpurkar, P., Chen, E., Banerjee, O. & Topol, E. J. AI in health and medicine. Nat. Med.28, 31–38 (2022). [DOI] [PubMed] [Google Scholar]
- 12.Hague, C. et al. An evaluation of MR based deep learning auto-contouring for planning head and neck radiotherapy. Radiother. Oncol.158, 112–117 (2021). [DOI] [PubMed] [Google Scholar]
- 13.Ishibashi, K. et al. Efficacy of a deep leaning model created with the transfer learning method in detecting sialoliths of the submandibular gland on panoramic radiography. Oral. Surg. Oral. Med. Oral. Pathol. Oral. Radiol.133, 238–244 (2022). [DOI] [PubMed] [Google Scholar]
- 14.Varghese, C., Harrison, E. M., O’Grady, G. & Topol, E. J. Artificial intelligence in surgery. Nat. Med.30, 1257–1268 (2024). [DOI] [PubMed] [Google Scholar]
- 15.Roy, M. et al. Clinical deployment of machine learning models in craniofacial surgery: considerations for adoption and implementation. Art. Int. Surg.4, 427–434 (2024). [Google Scholar]
- 16.Treger, D., Harris, G. & Thaller, S. R. Advantages and ethics of artificial intelligence in plastic and reconstructive surgery. Art Int. Surg.5, 126–132 (2025). [Google Scholar]
- 17.Shi, J. et al. Deep learning HRNet FCN for blood vessel identification in laparoscopic pancreatic surgery. NPJ Digit. Med.8, 235 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18.Chen, H. et al. Artificial intelligence assisted real-time recognition of intra-abdominal metastasis during laparoscopic gastric cancer surgery. NPJ. Digit. Med.8, 9 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19.Cao, J. et al. Intelligent surgical workflow recognition for endoscopic submucosal dissection with real-time animal study. Nat. Commun.14, 6676 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 20.Twinanda, A. P., Yengera, G., Mutter, D., Marescaux, J. & Padoy, N. RSDNet: learning to predict remaining surgery duration from laparoscopic videos without manual annotations. IEEE. Trans. Med. Imaging.38, 1069–1078 (2019). [DOI] [PubMed] [Google Scholar]
- 21.Liu, Y. et al. Multilevel effective surgical workflow recognition in robotic left lateral sectionectomy with deep learning: experimental research. Int. J. Surg.109, 2941–2952 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22.Saeidi, H. et al. Autonomous robotic laparoscopic surgery for intestinal anastomosis. Sci. Robot.7, eabj2908 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.Demir, K. C. et al. Deep learning in surgical workflow analysis: a review of phase and step recognition. IEEE. J. Biomed. Health Inform.27, 5405–5417 (2023). [DOI] [PubMed] [Google Scholar]
- 24.Yoshida, M. et al. Surgical step recognition in laparoscopic distal gastrectomy using artificial intelligence: a proof-of-concept study. Langenbecks. Arch. Surg.409, 213 (2024). [DOI] [PubMed] [Google Scholar]
- 25.Ma, Z. et al. Evaluation of a newly developed oral and maxillofacial surgical robotic platform (KD-SR-01) in head and neck surgery: a preclinical trial in porcine models. Int. J. Oral Sci.16, 51 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 26.Wang, G. et al. Endoscopic transoral approach to accessory parotid tumors-an updated approach and literature review. Gland. Surg.13, 1931–1941 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.Chen, S. et al. Clinical and patient-reported outcomes between full-endoscopic and conventional parotidectomy: a prospective cohort study. Clin. Oral Investig.29, 49 (2025). [DOI] [PubMed] [Google Scholar]
- 28.Yang, F. et al. Endoscopic neck dissection and intraoral approach for oral cancer and free flap reconstruction. Laryngoscope135, 130–133 (2025). [DOI] [PubMed] [Google Scholar]
- 29.He, J. L. et al. Full Endoscopic Procedures of Total Parotidectomy. Laryngoscope135, 1427–1430 (2025). [DOI] [PubMed] [Google Scholar]
- 30.Chen, S. et al. Single incision-plus approach for gasless endoscopic parotidectomy: a seven-step procedure. Transl. Cancer Res.11, 2462–2472 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 31.Yang, F. et al. Gasless endoscopic submandibular gland excision through hairline approach. J. Craniofac. Surg.34, 1563–1569 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 32.Hochreiter, S. & Schmidhuber, J. Long short-term memory. Neural Comput.9, 1735–1780 (1997). [DOI] [PubMed] [Google Scholar]
- 33.He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. In Proc.2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR)7 70–778 (IEEE, 2016).
- 34.Selvaraju, R. R. et al. Grad-CAM: visual explanations from deep networks via gradient-based localization. Int. J. Comput. Vis.128, 336–359 (2020). [Google Scholar]
- 35.Ozeki, Y. et al. Learning curve analysis for duodenal endoscopic submucosal dissection: a single-operator experience. J. Gastroenterol. Hepatol.37, 2131–2137 (2022). [DOI] [PubMed] [Google Scholar]
- 36.Cai, X., Zhang, H., Wang, Y., Zhang, J. & Li, T. Digital pathology-based artificial intelligence models for differential diagnosis and prognosis of sporadic odontogenic keratocysts. Int. J. Oral. Sci.16, 16 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 37.Liu, W. et al. Automatic classification and segmentation of multiclass jaw lesions in cone-beam CT using deep learning. Dentomaxillofacial Radiol.53, 439–446 (2024). [DOI] [PubMed] [Google Scholar]
- 38.Yang, S. Y. et al. Histopathology-based diagnosis of oral squamous cell carcinoma using deep learning. J. Dent. Res.101, 1321–1327 (2022). [DOI] [PubMed] [Google Scholar]
- 39.Li, M. et al. A recognition system for diagnosing salivary gland neoplasms based on vision transformer. Am. J. Pathol.195, 221–231 (2025). [DOI] [PubMed] [Google Scholar]
- 40.Yan, B. et al. GenAI synthesis of histopathological images from Raman imaging for intraoperative tongue squamous cell carcinoma assessment. Int. J. Oral Sci.17, 12 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 41.Mascagni, P. et al. Computer vision in surgery: from potential to clinical value. npj Digit. Med.5, 163 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 42.Mmadumbu, A. C. et al. Early detection of Alzheimer’s disease using deep learning methods. Alzheimers Dement.21, e70175 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 43.Lan, T. et al. MRI-based deep learning and radiomics for prediction of occult cervical lymph node metastasis and prognosis in early-stage oral and oropharyngeal squamous cell carcinoma: a diagnostic study. Int. J. Surg.110, 4648–4659 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 44.Han, Z. et al. A respiratory motion prediction method based on LSTM-AE with attention mechanism for spine surgery. Cyborg. Bionic. Syst.5, 0063 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 45.Jiang, B. et al. Deep learning applications in imaging of acute ischemic stroke: a systematic review and narrative summary. Radiology315, e240775 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 46.Xiang, L. et al. Integrating personalized shape prediction, biomechanical modeling, and wearables for bone stress prediction in runners. NPJ. Digit. Med.8, 276 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 47.Takeuchi, M. et al. Automatic surgical phase recognition in laparoscopic inguinal hernia repair with artificial intelligence. Hernia26, 1669–1678 (2022). [DOI] [PubMed] [Google Scholar]
- 48.Zhang, J. et al. Self-knowledge distillation for surgical phase recognition. Int. J. Comput. Assist. Radiol. Surg.19, 61–68 (2024). [DOI] [PubMed] [Google Scholar]
- 49.Xiang, J. et al. A vision-language foundation model for precision oncology. Nature638, 769–778 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 50.Liu, Z. et al. Multimodal fusion of radio-pathology and proteogenomics identify integrated glioma subtypes with prognostic and therapeutic opportunities. Nat. Commun.16, 3510 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 51.Furube, T. et al. Automated artificial intelligence-based phase-recognition system for esophageal endoscopic submucosal dissection (with video). Gastrointest. Endosc.99, 830–838 (2024). [DOI] [PubMed] [Google Scholar]
- 52.Jin, Y. et al. Multi-task recurrent convolutional network with correlation loss for surgical video analysis. Med. Image Anal.59, 101572 (2020). [DOI] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The datasets generated and analyzed during the current study are not publicly available, but are available from the corresponding author on reasonable request. The underlying code for this study is not publicly available but may be made available to qualified researchers on reasonable request from the corresponding author.
