Introduction

Esophageal cancer (EC) is one of the most common malignancies worldwide and ranks as the sixth leading cause of cancer-related mortality1. Radiotherapy plays a crucial role in its treatment, especially within multidisciplinary medical teams where it complements surgical interventions and chemotherapy. The integration of radiotherapy aims to shrink tumors before surgery, reduce the risk of recurrence post-surgery, or provide palliative relief in advanced cases. Coordination among radiation oncologists, surgeons, medical oncologists, and other specialists ensures comprehensive care tailored to individual patient needs, optimizing treatment outcomes and quality of life2.

The development of advanced techniques, such as intensity-modulated radiation therapy (IMRT) and volumetric modulated arc therapy (VMAT) has substantially transformed modern radiotherapy practice. However, the complexity introduced by inverse planning and sophisticated design poses challenges for planners, who must iteratively adjust parameters such as beam orientation and optimization goals over extended periods3. The creation of optimal plans remains laborious and time-consuming, a challenge that is more pronounced among less experienced medical physicists or dosimetrists.

Treatment planning for EC poses unique challenges owing to its central location within the thoracic cavity and its proximity to critical structures, including the heart and lungs, thereby necessitating strategies to minimize cardiopulmonary toxicity during radiotherapy4. Unlike other cancers, standardized “template” plans or fixed constraint objectives cannot be uniformly applied due to the variability in tumor size and location among patients5. This variability results in distinct dose distributions that require personalized treatment plans tailored to each individual’s specific anatomy and tumor characteristics. The development of optimal treatment plans for EC necessitates careful consideration of these factors to achieve effective tumor targeting while minimizing radiation exposure to surrounding healthy tissues.

Recent advancements include automated planning techniques such as knowledge-based planning (KBP), multicriteria optimization (MCO), and protocol-based automatic iterative optimization (PB-AIO). These offer benefits like efficiency, consistency, and improved plan quality, thereby enhancing patient care and outcomes6. However, KBP relies on data quality, PB-AIO demands calculation setup expertise, and MCO’s computational demands increase with scenario complexity6,7,8,9. Consequently, no single automated planning system perfectly fits clinical needs.

This study aims to develop a personalized automated treatment planning system for EC, aiming to enhance efficiency, consistency, accessibility, and improved plan quality. The feasibility and effectiveness of this auto-planning system will be assessed. The plans generated from this system, commercial KBP system, and clinical approved and delivered plan will be compared across all EC types.

Materials and methods

Patient cohort

Clinical data were retrospectively collected from the Department of Radiation Oncology, China Medical University Hospital, between August 2010 and October 2020. A total of 301 patients with newly diagnosed EC were included in this retrospective analysis for model training and internal validation. Furthermore, an independent external validation cohort comprising 20 patients treated at China Medical University Hsinchu Hospital between February 2021 and June 2023 was included to assess model generalizability. Patients underwent treatment with either neoadjuvant or definitive intent, and all received a radiotherapy prescription of 45 Gy delivered in 25 fractions2. All patients were positioned supine and immobilized with a thermoplastic mask. For lesions that extended to the neck, the arms were placed alongside the body; for all other cases, the arms were positioned overhead. A computed tomography (CT, HiSpeed NX/i, GE Healthcare, Milwaukee, Wisconsin, USA) scan was then acquired. Contours for clinical target volume (CTV) and planning target volume (PTV), along with organs at risk (OARs) such as lungs, heart, spinal cord, liver, right kidney, and left kidney, were delineated on the simulation CT images. The planning process adhered to institutional guidelines and standard protocols, ensuring consistency in dose constraints6,10. CT simulation images, delineated structure sets, and planning dose distributions were collected for detailed analysis. This study was approved by the Institutional Review Board of China Medical University Hospital (CMUH112-REC1-206). All procedures were conducted in accordance with relevant guidelines and regulations. The requirement for informed consent was waived by the IRB owing to the use of de-identified data.

Dose predictors and predictive model

First, the study objective is to identify predictors of lung and heart doses for individual cases. Theoretically, regardless of the arrangement of a radiotherapy plan, the doses to the heart and lungs largely depend on factors such as the shape and size of the PTV, as well as its location and proximity to these critical organs5. For instance, if an EC tumor is situated between both lungs and is particularly wide, it is reasonable to expect higher lung doses in such cases. On the other hand, if an EC tumor is particularly large but located in the lower part of the esophagus with no overlapping to the heart in a coplanar arrangement, it would be expected that the heart dose will be low.

Based on prior studies4,11 and clinical experience, the authors categorized potential predictors into four groups: width, length, volume, and ratio. Notably, the predictors for lung and heart are considered separately. The lung predictors were listed in Table 1. Additionally, all predictors are clearly listed in the Supplementary Table S1.

Table 1 The list of lung predictors.

Secondly, this paper studied the relationship between the predictors to the dosimteric parameters of lung and heart. The authors chose V5, V10, V20, and mean dose (Dmean) of lung as the lung endpoints and V30 and Dmean of heart as heart endpoints due to their established clinical importance. A univariate linear regression identified the strongest predictor, followed by model construction and fitting for the lung and heart.

Autoplan procedure

The detailed autoplan process is as follows:

  1. 1.

    Automatically create auxiliary structures including Ring, BODY-PTV (as shown in Supplementary Fig. S1A), and ConTD, Con80 (as shown in Supplementary Fig. S1B). Define SpinalCordExtend as SpinalCord extended by a 5 mm margin. Subtract all OARs, such as the Heart, Lung, Liver, and Kidney_L, from the PTV expanded by a 1 cm margin, resulting in structures denoted as OAR_1 (e.g., Lung_1). Proceed to create a new IMRT plan under a new course for the selected patient.

  2. 2.

    Set the geometric center of the PTV as the treatment isocenter.

  3. 3.

    Choose five fixed gantry angles (0, 50, 150, 210, 320) as suggested by previous paper12. Iterate the collimator angle between 330 and 30 degrees (within ± 30 degrees range). For each iteration, adjust the jaws to fit the PTV and calculate the field area (defined by X and Y jaws). Select the pair of gantry and collimator angles that yield the smallest field area.

  4. 4.

    First optimization: Set the predicted values (V5, V10, V20 and Dmean of lung and V30 and Dmean of the heart) as the planning goal and multiply by a percentage amount. Incorporating with or without jaw tracking (JT) technique and GPU acceleration. Detailed planning constraints listed in Supplementary Table S2.

  5. 5.

    Second optimization: Create an 80% dose structure excluding the PTV with a 2 cm margin (Dose 80), adding it to the optimization objectives. Perform dose calculation with Analytical Anisotropic Algorithm (AAA, Eclipse Version 15.6).

  6. 6.

    Conclude the process.

The auto-planning script (AP) was developed using the Python interface to Eclipse Scripting Application Programming Interface (PyESAPI) within the Eclipse treatment planning system (TPS) under a research license (Version 15.6, Varian Medical Systems Inc., Palo Alto, California, USA; https://www.varian.com/). The computations were performed on a workstation equipped with an Intel® Silver 4110 CPU (2.1 GHz, 16 cores), 32 GB RAM, and an NVIDIA Quadro P5000 GPU (16 GB VRAM), running the Windows 10 operating system.

RapidPlan procedure

RapidPlan (RP, Eclsipe Version 15.6; https://www.varian.com/) is a commercial software developed by Varian, functioning as a KBP tool utilized for forecasting DVH data to optimize treatments. In the process of developing KBP plans, an initial step involved training a new Principal Component Analysis (PCA) model using data derived from a randomly chosen subset of 80 treatment plans out of a pool of 301 manually collected patient plans. Following this, the established model was automatically implemented for each patient, enabling DVH predictions for all critical organs. In this study, the parameters for the manual Normal Tissue Objective were defined as: distance from the target border set to 1.0 cm, start dose set to 90%, end dose set to 75%, and fall-off set to 0.05. The entire process, encompassing plan setup, model selection, and dose calculations, is automated using PyESAPI. The schematic diagram of AP and RP is shown in Supplementary Fig. S2. The source code of the AP and RP scripts used in this study is provided in the Supplementary Material.

Plan evaluation

The AP and RP scripts were successfully deployed, generating two plans (with and without JT) for each method. The processing time for both AP and RP was 4.3 ± 0.4 min (mean ± SD), defined as the duration from the generation of auxiliary structures to the completion of the treatment plan calculation. Subsequently, this study compared the dosimetric results of CP (without JT) with those AP and RP, under both JT and non-JT conditions for each case. For plan evaluation, the following dosimetric parameters were recorded and analyzed. For PTV: Dmax within the PTV as hotspot, V100%, conformity index (CI), and homogeneity index (HI)13. For OARs: V5, V10, V20, and Dmean for lung; V30 and Dmean for heart and liver; V20 and Dmean for kidneys; and Dmax for the spinal cord. Monitor units (MU) were summed across all fields in the plan for further evaluation.

Clinical validation

In both the internal (n = 20) and external (n = 20) validations, the CP, AP, and RP were all generated with JT enabled. Except for the external CP, all plans were created using the same workstation and identical hardware and software environment as described in the AutoPlan procedure. Under these consistent conditions, the AP and RP required 4.3 ± 0.4 min (mean ± SD) to generate each plan, whereas the internal CP required about 45–60 min due to manual trial-and-error optimization and planner experience. For both internal and external validations, the dosimetric parameters of the CP, AP, and RP were evaluated and compared.

Statistical analysis

SAS (Version 9.4; https://www.sas.com/) and R (Version 4.4.3; https://www.r-project.org/) statistical software were used for the analysis. To identify statistically significant predictors, a univariate linear regression method was employed to construct dose prediction models. The predictor value and dose parameters were presented as mean doses and standard deviations (SD). To compare the differences among the three plans, the Shapiro-Wilk test was initially used to check if the data followed a normal distribution. Since the multivariate were mostly non-normal distributed, the Friedman test was employed to compare the mean differences among the three plans. Post-hoc analysis was performed using the Nemenyi test, with p-values adjusted using the single-step correction method. A p ≤ 0.05 was considered statistically significant.

Results

Cohort characteristics

The patient characteristics are summarized in Table 2. This table provides a clear and structured representation of the esophageal cancer patient characteristics, including stage, tumor size (T), lymph node status (N), metastasis (M), histology, and tumor location. Dosimetry results from the clinical plan (CP) showed significant variability. The average for lung V5 is 45.1% (range 8.0% to 82.0%), lung V10 is 30.1% (range 4.0% to 53.0%), lung V20 is 15.9% (range 2.0% to 33.0%), lung Dmean is 8.9 Gy (range 2.0 Gy to 14.8 Gy), heart V30 is 35.7% (range 0% to 85.0%), and heart Dmean is 21.9 Gy (range 0.1 Gy to 40.4 Gy).

Table 2 Clinical esophageal cancer patient characteristics.

Predictors and prediction model

Univariate linear regression analysis results for lung and heart dose are shown in Tables 3 and 4. For lung dose prediction, 14/17 lung predictors showed significant correlation with V5, V10, V20, and Dmean of lung. Similarly, 14/17 heart predictors showed significant correlation with V30 and Dmean of heart. Among predictors, LungCropPTVV/LungV and HeartCropPTVV/HeartV are the most effective predictors for lung and heart dose. Although all dosimetric endpoints are related, it is still surprising that these two predictors are the best predictor for all dosimetric endpoints. The LungCropPTVV/LungV achieved R2 of 0.771 for V5, 0.784 for V10, 0.772 for V20, and 0.872 for Dmean of lung. Similarly, the HeartCropPTVV/HeartV achieved R2 of 0.781 for V30 and 0.934 for Dmean of heart. All p-values were less than 0.001. The linear regression and scatter plot of predictors and organ dosimetric endpoints were illustrated in Fig. 1. The constructed predictive model and its parameters were demonstrated in Supplementary Table S3.

Table 3 Univariate linear regression analysis results for all predictors in lung dose.
Table 4 Univariate linear regression analysis results for all predictors in heart dose.
Fig. 1
figure 1

Fitted linear regression curves and scatter plot of the lung and heart. (A) Lung V5, (B) Lung V10, (C) Lung V20, (D) Lung Dmean, (E) Heart V30, (F) Heart Dmean. The 95% prediction limits indicate the range within which can be 95% confident that a new individual data point will fall, given a specific value of the independent variable. For instance, if a patient has a LungCropPTVV/LungV ratio equal to 0.847, the predicted value will fall between 52.4 and 24.9.

Plan comparison

Table 5 and Supplementary Table S4 shows the dosimetry comparison results among CP (without JT), AP and RP with or without JT. Across all patients, hotspot, Dmax, PTV coverage (V100%), CI, and HI were similar for all three planning methods. AP outperformed in reducing lung doses, whereas RP achieved lower heart doses. AP had significantly higher maximum spinal cord doses compared to CP and RP. Nevertheless, the dose is still far from unacceptable limit and the difference is minor. Liver and kidney doses were consistent across all three plan types. Additionally, AP required significant fewer MU compared to both CP and RP. The dose distribution for treatment plans of long and short EC is illustrated in Supplementary Fig. S3, showing improved conformity in high-dose areas, along with a reduction in low-dose spillage for the autoplan. In Table S4, both CP and AP were generated without JT, AP achieved average reductions of 3.9 ± 13.0%, 9.7 ± 16.0%, 18.6 ± 20.0%, and 6.0 ± 10.0% in lung V5, V10, V20 and Dmean, respectively, compared to CP. As summarized in Tables 6 and 7, consistent trends were observed in both the internal (n = 20) and external (n = 20) validation cohorts. For the lung, both AP and RP demonstrated lower lung dose compared with the CP, with statistically significant reductions (p < 0.01) with the lung V20 reduced by approximately 8–13% on average. This indicates improved low-dose sparing and better protection of normal lung tissue. No significant difference in spinal cord Dmax was observed in the external validation cohort. For the heart, AP achieved slightly lower mean dose compared with CP in both validation cohorts, though the differences were not statistically significant. Overall, consistent findings across internal and external validations confirm that the personalized AP system maintained robust and reproducible performance.

Table 5 Dosimetry comparison of clinical plan, autoplan, and RapidPlan.
Table 6 Dosimetric comparison of clinical plan, AutoPlan, and rapidplan in internal (n = 20) validation cohorts. All plans were generated with jaw tracking.
Table 7 Dosimetric comparison of clinical plan, AutoPlan, and rapidplan in external (n = 20) validation cohorts. All plans were generated with jaw tracking.

Discussion

Radiation-induced pneumonitis (RIP) is a known complication that can occur in patients undergoing thoracic radiation therapy, including treatments for lung cancer, EC, breast cancer, and mediastinal lymphomas14. Studies have highlighted specific metrics like Dmean, V5 and V20 of lung, are related to RIP among EC patients. Research by Hsu et al. found that keeping V5 below 47.14% significantly lowers the risk of grade 1 or more severe RIP in patients treated with arc-based radiotherapy. Additionally, factors such as mean lung dose and V10 also contribute to RP risk, while V20 has been identified as another crucial predictor during radiotherapy15.

Radiation-induced heart toxicity has been well-documented and widely recognized in breast cancer16, but it remains a less addressed issue in EC. Specific dosimetric parameters such as mean heart dose and volumes of the heart receiving specified doses (e.g., V30) are crucial predictors of cardiotoxicity in EC17. Additionally, pre-existing cardiovascular conditions, age, and concurrent chemotherapy or other treatments can influence susceptibility to cardiotoxicity.

Given the importance of pulmonary and cardiac toxicity in radiotherapy, predicting radiation doses prior to planning is essential. Extensive literature covers methods for estimating lung and heart doses using developed models and algorithms across various cancers4,11,14,15,17,18,19. In studies focusing on upper-middle EC, Shao et al. found that reducing PTV length at lung level and the PTV length at lung level to lung length ratio significantly lowered total lung and heart doses, applicable to both IMRT and VMAT4. Kirli Bolukbas and Karaca demonstrated the predictive power of the lung/PTV volume ratio for achieving lung dose constraints using TomoTherapy11. However, many studies are limited by small cohort sizes and a narrow range of predictors, hindering comprehensive comparisons.

Regarding heart dose prediction in EC planning, data often draws from breast cancer studies. Kang et al. identified strong correlations between heart-PTV tangential field intersections and mean heart doses in left-sided breast radiotherapy20, marking our study as a pioneering effort in this area.

In this research, the authors categorized geometric predictors into four types - length, width, volume, and ratio and found that volume ratio predictors were particularly robust. Notably, LungCropPTVV/LungV and HeartCropPTVV/HeartV emerged as the most predictive, leveraging considerations of volume, overlap, and non-overlap regions of target and critical organs. Accurate dose prediction not only enhances planning precision but also facilitates personalized treatment strategies, including automated planning processes.

Both IMRT and VMAT are viable options for planning in EC. A previous study demonstrated comparable outcomes between VMAT and IMRT for EC21. The study revealed no significant differences in overall survival rates, recurrence-free survival rates, pathologic complete response rates, or incidence of toxicity and postoperative complications. Additionally, Choi et al. conducted a dosimetric comparison among 3DCRT, IMRT, and VMAT, highlighting that IMRT achieved lower lung V5 and effectively preserved lung and heart tissue in thoracic EC22. Therefore, IMRT may be considered a preferable technique for treating EC. Consequently, employing IMRT in the management of EC patients is both feasible and safe.

In IMRT planning for EC, several critical factors must be considered. Firstly, the selection of gantry angles is pivotal. Given the proximity of the lungs to the esophagus, controlling low-dose radiation to the lungs is best achieved through anterior-posterior beam directions (APPA). However, adherence to spinal cord dose constraints necessitates choosing off-cord angles. Additionally, angles entering the mediastinum from the patient’s front may also be selected as primary beam directions. This approach, however, comes with the potential cost of increased heart dose. The optimization of lung dose and heart dose involves a trade-off and presents a dilemma in treatment planning. Prioritizing lung protection is crucial due to the short survival time of EC patients and the risk of RIP18. The gantry angles for automated EC planning were chosen based on the expertise of senior medical physicists and aligned closely with established literature in this study12,23.

Secondly, selecting an optimal collimator with a small field size offers several advantages, including improved dose conformity and accuracy. This facilitates precise tumor targeting while reducing radiation exposure to healthy tissues, thereby enhancing treatment outcomes and minimizing side effects through better sparing of critical structures and OARs24.

Lastly, the JT technique was employed during dose delivery to minimize leakage and transmission through the multi-leaf collimator (MLC) leaves. This approach maintains the jaws as close as possible to the MLC aperture, thereby improving treatment precision and safety25.

The manual creation of treatment plans for EC typically requires an average of 2 h, ranging from 1 to 4 h3,26. Experience plays a crucial role in manual IMRT planning, with less experienced planners often requiring a longer learning period27. This study also demonstrated the inherent variability in plan quality that arises with manual planning. While clinically approved plans generally meet dose constraints set by QUANTEC (Quantitative Analyses of Normal Tissue Effects in the Clinic), further optimization could potentially reduce OARs doses. However, achieving such optimizations often demands additional planning iterations and time from planners, which may be limited by resource constraints and increased costs.

AP presents a promising solution on the horizon. Yet, if AP procedures rely on fixed protocols and parameters, they may not adequately address all individual cases. The variability in tumor characteristics and patient anatomy underscores the importance of predicting personalized lung and heart doses during treatment planning.

The AP integrates these planning considerations and personalized dose predictions into its automated procedures. The authors applied AP across various types of EC cases, achieving an average procedure time of 4 min for dose prediction and planning. All processes are fully automated, requiring no user intervention. The algorithm demonstrated robust performance, consistently achieving significantly lower lung doses compared to CP in most cases. Moreover, it resulted in reduced MUs, indicating enhanced energy efficiency and treatment delivery effectiveness. Although the AP produced slightly higher maximum doses to the spinal cord compared to CP and RP, all values remained well below the clinically acceptable tolerance limits (typically < 45 Gy)10. The increase may be attributed to the automated optimization algorithm prioritizing target coverage and lung sparing, which can result in minor trade-offs in spinal cord Dmax. However, these differences were small and clinically insignificant. External validation on an independent cohort demonstrated that the proposed AP achieved comparable performance to internal validation, indicating good generalizability across institutions. The external dataset differed from the internal cohort in planning conditions, yet the geometric predictors remained robust. These results highlight the adaptability of the AP across varied clinical environments, underscoring its potential for widespread clinical implementation.

There have been numerous esophageal dose escalation trials, yet none have conclusively demonstrated clinical benefits, even in the modern era of radiotherapy. The SCOPE1 trial, for instance, did not show a significant survival advantage with dose escalation but notably underscored increased risks of toxicity28. Conversely, RTOG 0246 demonstrated the feasibility and potential for improved local control with dose-escalated IMRT, offering promising outcomes29. These trials collectively highlight the intricate balance between treatment efficacy and toxicity in radiation planning for EC patients. Despite advancements in technology and techniques, achieving therapeutic gains through dose escalation remains challenging, often necessitating careful consideration of individual patient factors and robust toxicity management strategies.

Advancements in AP technology offer a promising avenue forward. By enhancing sparing of OARs and optimizing dose distribution, these systems have the potential to support the safe escalation of radiation doses while minimizing adverse effects on critical structures. Previous studies have highlighted the feasibility of dose escalation in EC using techniques such as rapid arc and helical tomotherapy, suggesting a possible link between higher radiation doses, improved local control, and survival rates30. However, research also indicates that while higher IMRT doses may enhance 1-year progression-free survival rates in thoracic esophageal squamous cell carcinoma, they do not significantly impact overall survival rates or increase toxicity compared to standard doses31. Moreover, numerous studies have underscored the increased risk of lung and cardiac side effects associated with EC radiation therapy, which correlates with higher radiation doses administered32,33,34. This underscores the potential utility of our study’s dose prediction and auto-planning approach in refining patient selection for dose escalation trials and reducing heart and lung doses.

Several limitations were identified in this study. Firstly, our scope was limited to IMRT, with VMAT reserved for future investigation. Secondly, the fixed IMRT beam angles in our AP approach may have led to suboptimal plans. Moving forward, future research will explore IMRT beam angle optimization, integrate it into the AP system, and investigate its potential benefits.

Conclusion

This research has successfully developed and implemented a personalized AP for the treatment of EC. By integrating lung and heart predictors into IMRT planning, we achieved individualized treatment plans that significantly reduced lung V5, V10, V20, mean dose, and heart mean dose. While the reduction in heart V30 did not reach statistical significance, the paper findings underscore the efficacy of these predictors in optimizing EC treatment plans. These results highlight the potential of personalized AP technology to enhance treatment outcomes by minimizing radiation doses to critical organs. Further research and clinical validation are necessary to confirm the clinical benefits and feasibility of integrating this personalized AP approach into routine clinical practice for EC patients.