Introduction

Colorectal cancer (CRC) is the third most prevalent cancer worldwide with high rate of cancer mortality, while approximately one third of all CRCs occur in rectum1. Total mesorectal excision (TME) is the primary treatment for localized rectal cancer patients, and has high rate of cancer control2,3. It is a widely applied surgical technique to perform laparoscopic low anterior resection (LAR) using double-stapling technique (DST) anastomosis4,5.

In mid–low rectal cancer patients, anastomotic leakage (AL) is the most common postoperative complication after LAR6. In addition to increasing the incidence of reoperation and mortality, AL may even negatively affect long-term survival7,8,9. Despite advances in surgical techniques and anastomotic equipment over the past few decades10,11,12, there has been no significant decrease in the incidence of AL after LAR13.

DST simplifies colorectal reconstruction in LAR, especially in laparoscopic surgery, but the incidence of postoperative AL was not reduced by the application of this technique14,15. Several studies have proved that ≥ 3 linear stapler firings in laparoscopic LAR is an independent risk factor for AL16,17,18. Thus, the Chinese expert consensus statement proposes ≤ 2 linear stapler firings in LAR surgery19. To avoid multiple linear stapler firings, a predictive model should be created to predict ≥ 3 linear stapler firings in anastomosis, and alternative techniques could be considered.

Several studies have shown that pelvic anatomical features (such as the anteroposterior diameter and the transverse diameter of the pelvic outlet, the anteroposterior diameter of the pelvic inlet) are related to surgical difficulty and the number of the linear stapler firings20,21,22. Those studies mainly measured pelvic parameters, but did not include the influence of rectal and mesenteric conditions. How to effectively integrate above parameters to predict ≥ 3 linear stapler firing needs further research.

With the advancement of imaging technology, pelvic magnetic resonance imaging (MRI) is a preferred tool for local staging of mid-low rectal cancer before surgery23,24. MRI can obtain relevant parameters of tumor, meso-rectum and pelvis comprehensively and accurately. Mask region-based convolutional neural network (Mask R-CNN)25 and three-dimensional convolutional network (C3D)26 image recognition are current techniques for advanced-recognition artificial intelligence (AI), and have been applied in various medical fields27,28,29. With advanced deep-learning technology, pelvic MRIs’ complex data can be identified, extracted, analyzed, and integrated efficiently, and we can create a predictive model to screen out high-risk patients with ≥ 3 linear stapler firings based on the database.

In this study, we aimed to establish the risk factors for ≥ 3 linear stapler firings in laparoscopic LAR using DST anastomosis, and to create and validate a predictive model for ≥ 3 linear stapler firings with deep-learning technology based on MRI.

Methods

Patients

A total of 328 mid–low rectal cancer patients who underwent laparoscopic LAR at Ruijin Hospital Affiliated to Shanghai Jiaotong University School of Medicine, China, between January 2016 and June 2021 were retrospectively analyzed as the deep-learning set. Clinical data were obtained from Ruijin hospital database and medical records. All methods were performed in accordance with the relevant guidelines and regulations, and the study was approved by the Medical Ethics Committee of Ruijin Hospital (No. 2019-82). The need for informed consent was waived by Ethics Committee of Ruijin Hospital. With a split ratio of 4:1, 260 patients were divided into the training set and 68 patients were divided into the testing set on the basis of an unbiased random sampling method. The prospective validation set comprised 128 patients from an independent clinical trial in our institution (Transanal versus laparoscopic total mesorectal excision for rectal cancer, ClinicalTrials.gov Identifier: NCT03359616).

The inclusion criteria were: (1) histopathologically confirmed rectal cancer; (2) pelvic MRI examination within 14 days before surgery; (3) tumor distance from the anal verge ≤ 10 cm; and (4) laparoscopic LAR with DST anastomosis. The exclusion criteria were: (1) LAR without anastomosis (e.g., Hartmann’s operation); (2) anastomotic techniques rather than DST (e.g., manual rectal anastomosis through the anus); (3) number of linear stapler firings was not recorded on surgical reports; and (4) robotic surgery.

Surgical procedure

Laparoscopic LAR was performed by the gastrointestinal surgery team with experience in completing more than 100 rectal cancer operations every year. The laparoscopic LAR surgical procedure was carried out in strict accordance with the national guidelines for laparoscopic radical resection of CRC (2018 edition). During dissection of the distal rectum, the surgeon manually fired endoscopic linear staplers (Endo-GIA™ Ultra Universal Stapler Reload with Tri-stapler™ Technology; Covidien LLC), which was loaded with 60- or 45-mm staple cartridges which have three types of heights: 3.0, 3.5 and 4.0 mm.

Data collection and model building

We collected clinical data that potentially correlated with the number of linear staplers used in surgery, including baseline characteristics, including age, gender and body mass index (BMI); biochemical data, including hemoglobin, albumin, and carcinoma embryonic antigen (CEA); and tumor characteristics, including tumor distance from the anal verge, tumor stage, tumor size and circumferential resection margin (CRM). A predictive model of ≥ 3 linear stapler firings was constructed by binary logistic regression. The variables of the clinical model included: gender, BMI, serum CEA level (> or ≤ 5 ng/mL), tumor distance from the anal verge, tumor size and CRM.

MRI and target area labeling

During MRI, patients were in the supine position and scanned using a Philips INGENIA™ scanner with 3.0 T field strength. The pelvic phased-array surface coil covered from the aortic bifurcation to the anal verge. The scanning parameters were: layer thickness 5 mm; field of view 250 × 340 × 166 mm; echo time 80 ms; repetition time 3565 ms; and image matrix 312 × 357.

With the Picture Archiving and Communication System, fat-suppressed fast spin-echo (FSE) T2-weighted sequences in the axial plane of the pelvis were used for image segmentation. Then, pelvic MRI specialists who have > 10 years of experience built an image database by an online annotation tool called Labelme (labelme.csail.mit.edu/)30, and labeled three kinds of target area on each of the T2-weighted images (tumor body, mesorectum, and pelvis represented by green, yellow, and drab, respectively, Fig. 1A,B). Then, all data were transformed into a COCO dataset for segmentation experiments31.

Figure 1
figure 1

Examples of target regions. (A,B) manually labeled; (C,D) segmented by Mask region-based convolutional neural network (Mask R-CNN) based model (the regions of tumor body, mesorectum, and pelvis were represented by green, yellow, and drab, respectively).

Segmentation model based on Mask R-CNN

As an effective two-stage detection and segmentation algorithm, Mask R-CNN was adopted to identify and segment the three kinds of target areas in the image (Fig. 1C,D). In the first stage, the ResNet-101-FPN network served as the backbone to extract multiscale and discriminative feature maps. The Region Proposal Network scanned the feature map in a sliding-window and selected the rough detection rectangle that contained the object. After the regions of interest alignment process, the candidate regions entered the next stage. This consisted of three functional branches: classification, detection and segmentation, based on fully connected layers and convolutional layers. We trained the Mask R-CNN network on the training set for 200 epochs, and evaluated the performance of the testing set with standard COCO metrics. We evaluated the trained Mask R-CNN model, obtained average precision (AP) by calculating the precision–recall curve under different intersection-over-union thresholds, and then calculated the three types of targets. The respective AP values of the regions were weighted to obtain the class-wide mean average precision (mAP). mAP > 50 indicated that the model performed well32.

Deep-learning model based on C3D

We used C3D networks to address 24 images of a case simultaneously and learn 3D spatial features. The C3D network consisted of eight 3D-convolution layers, a softmax layer, two fully connected layers and five pooling layers. It took the entire image of the case as input and output the probability of ≥ 3 linear stapler firings, and the sample with probability > 50% (empirical value) was judged as positive. The C3D network was trained until convergence (~ 1000 epochs) and evaluated the performance of the deep-learning model. In the training set, two C3D-based models were trained, including an image model using only MR images and an integrated model based on both MR images and the six clinical variables in clinical model. In the testing set, the clinical model, image model and integrated model were examined, and receiver operating characteristic (ROC) curves were plotted. Area under the curve (AUC), sensitivity, specificity, accuracy, positive predictive value (PPV), and Youden index were calculated.

Prospective validation

We used clinical data and T2-weighted images of patients from the validation set to validate the predictive performance of the above three models. ROC curves were plotted, and sensitivity, specificity, accuracy, Youden index, PPV, and AUC were calculated. The flow chart of the design is shown in Fig. 2.

Figure 2
figure 2

Flow chart of the design. BMI: Body mass index; CEA: Carcinoembryonic antigen; CRM: Circumferential resection margin; MR: Magnetic resonance; Mask R-CNN: Mask region-based convolutional neural network.

Statistical analysis

Statistical analysis was performed using SPSS (version 25.0). Categorical variables were analyzed by Fisher’s exact test or Pearson’s chi-square. In our binary logistic regression models, only factors with a P value < 0.10 in the univariate analysis were entered into the multivariate analysis. All tests were two-sided, and differences were considered statistically significant at p < 0.05.

Results

Clinical characteristics of patients in deep-learning set

The 328 patients had a median age of 63 (24–87) years, including 227 men and 101 women. The proportion of patients who received ≥ 3 linear stapler firings was 17.7% (58/328). Clinical characteristics of patients with ≥ 3 firings of the linear stapler and those with ≤ 2 firings in the deep-learning set were compared (Table 1). There were no significant differences in age, gender, BMI, diabetes mellitus, neoadjuvant chemoradiotherapy ratio, operation time, hemoglobin, albumin, tumor distance from the anal verge, T stage and N stage between the two groups. Patients with ≥ 3 firings showed significantly higher incidence of AL than those with ≤ 2 firings (p = 0.021), and patients with ≥ 3 firings of the linear stapler showed significantly higher CEA level (p = 0.007), larger tumor size (p = 0.004) and higher rate of positive CRM (p = 0.014). In univariate and multivariate analyses, tumor size ≥ 5 cm (odds ratio (OR) = 2.54, 95% confidence interval (CI) = 1.15–5.60, p = 0.021) and serum CEA > 5 ng/mL [OR = 2.20, 95% CI = 1.20–4.04, p = 0.011] were independent risk factors associated with ≥ 3 linear stapler firings (Table 2).

Table 1 Clinical characteristics of patients in deep-learning set.
Table 2 Risk factors of ≥ 3 linear stapler firings in deep-learning set.

Predicting performance in testing set

The AUCs of the clinical, imaging and integrated models were obtained as 0.72, 0.81 and 0.88, respectively (Fig. 3A–C). The sensitivity, specificity, accuracy, PPV and Youden index of the clinical model were: 70.0%, 81.0%, 79.4%, 38.9%, and 0.51, respectively. The relevant indicators of the image model were: 50.0%, 98.3%, 91.2%, 83.3%, and 0.48, respectively. The relevant indicators of the integrated model were: 70.0%, 98.3%, 94.1%, 87.5%, and 0.68, respectively.

Figure 3
figure 3

Receiver operating characteristic curves of the predictive models. (A) clinical model in deep-learning set; (B) image model in deep-learning set; (C) integrated model in deep-learning set; (D) clinical model in validation set; (E) image model in validation set; (F) integrated model in validation set.

Prospective validation

In the validation set, the proportion of patients who received ≥ 3 linear stapler firings was 12.5% (16/128). All related clinical characteristics between the deep-learning and validation sets were comparable (Table 3). The AUCs of the clinical, imaging and integrated models were obtained as 0.65, 0.75 and 0.84, respectively (Fig. 3D–F).

Table 3 Comparison of clinical characteristics between deep-learning set and validation set.

The sensitivity, specificity, accuracy, PPV and Youden index of the clinical model were: 62.5%, 66.1%, 65.6%, 21.0%, and 0.29, respectively. The relevant indicators of the image model were: 68.8%, 95.5%, 92.1%, 68.8%, and 0.64, respectively. The relevant indicators of the integrated model were: 68.8%, 97.3%, 93.8%, 78.5%, and 0.66, respectively.

Discussion

In this study, we built an MRI-based deep-learning model to predict ≥ 3 linear stapler firings in LAR using DST anastomosis. This model aimed to help determine the surgical strategy for mid–low rectal cancer patients by predicting the probability of ≥ 3 firings of the linear stapler before surgery. Thus, we can reduce the occurrence of AL by using other more suitable anastomosis techniques. Our findings suggest that clinical information alone may not be sufficient to predict cases with ≥ 3 firings of the linear stapler. Compared with the clinical or image model, the integrated model that combined clinical information with pelvic MR images achieved better AUC and higher PPV.

LAR using DST anastomosis is currently a widely applied surgical technique for mid–low rectal cancer, a series of high-quality randomized controlled trials has confirmed its feasibility and safety5,33. The technique greatly reduces the difficulty of reconstruction of the digestive tract. However, some studies have reported that multiple linear stapler firings is closely related to AL17,34, and AL is more likely to occur at the intersection of two staples35. In some cases, due to the limitation of the pelvic space or thickness of the rectum, the surgeons have to trigger more linear stapler firings during rectal dissection36.

In the high-risk populations with ≥ 3 linear stapler firings, other anastomosis techniques rather than DST anastomosis could be considered, such as transanal anastomosis after transanal transection of the rectum37 and manual purse-string suture after endoluminal transection of the rectum (e.g., Transanal total mesorectal excision)38. Although some studies have shown that the above techniques do not reduce the incidence of AL39, these techniques can minimize the anastomotic difficulty in patients with a narrow pelvis and avoid excessive use of linear stapler firings.

Akiyoshi et al. used clinical data and pelvic parameters to predict surgical difficulty and the incidence of AL in patients undergoing LAR using DST anastomosis. They found that tumor distance from the anal verge, BMI, pelvic outlet, and tumor invasive depth were independent predictors of operation time and occurrence of AL10. Foo et al. reported a predictive model for predicting ≥ 3 linear stapler firings. The model included the following parameters: tumor distance from the anal verge, gender, pelvic entrance, internodal distance and interspinous distance40. Compared with the above two studies, our predictive model has several advantages. (1) Using AI-based image segmentation, pelvic measurements can be identified comprehensively, rather than obtaining certain pelvic parameters separately. Thus, all anatomical features of the pelvis can be entirely integrated into the image model. (2) Clinically, the space between the pelvis, mesorectum and tumor mass affects the number of linear stapler firings. Our model takes into account not only pelvic parameters, but also the influence of meso-rectal factors and tumor conditions. (3) The predicting time of this AI-based warning model is only 100 ms. It greatly reduces the time and labor of manual measurement.

It should be noted that our study has some limitations. First, the cohort of 328 patients was too small for training the deep-learning model, further study with larger sample size is needed. Second, other technical factors that were difficult to quantify can also affect the number of linear stapler firings, such as the correct angle between the stapler and rectum and precompression before stapler firings35,36. Therefore, no 100% accuracy were achieved in our three models. Third, the number of linear stapler firings was just one of anastomotic factors related to AL, the circular end-to-end anastomosis, intersections of staple lines41, and the distance between the linear staple line36 were also risk factors for AL. Finally, our deep-learning traning is only performed on T2-weighted MR sequences. Other MR sequences or contrast-enhanced MRI could be investigated in future studies.

In conclusion, the pelvic MR-based deep-learning model can help identify the high-risk population with ≥ 3 linear stapler firings in laparoscopic LAR surgery. It might help determine the anastomotic technique for mid–low rectal cancer patients preoperatively. However, it is still necessary to verify its value through clinical application.