Why Accurate Nodule Delineation Matters. Lung cancer is the leading cause of cancer-related mortality worldwide, and a patient's prognosis depends heavily on how early the disease is detected. Small opacities in lung tissue called pulmonary nodules are critical early indicators of potential malignancy, making their accurate identification in CT scans a cornerstone of modern thoracic oncology.
Clinical Uses of Segmentation. Precisely delineating nodule boundaries in CT images serves multiple clinical purposes: it guides decisions about whether to biopsy or monitor a suspicious lesion, defines surgical margins, and sets radiation treatment targets. Getting these boundaries wrong can directly harm patients through missed cancers or unnecessary procedures.
Limitations of Manual Approaches. Manual segmentation by radiologists is labor-intensive, time-consuming, and subject to significant variation between and within readers. This variability makes manual work a bottleneck in high-throughput screening programs, creating urgent demand for automated, reliable segmentation algorithms.
Shortcomings of Existing Deep Learning Methods. Most deep learning approaches frame segmentation as a voxel-by-voxel classification problem using U-Net-style architectures. While often successful, these methods struggle to capture global shape context, producing fragmented masks and topologically inconsistent shapes - especially for nodules with low contrast, irregular borders, or complex morphologies.
Core Concept. CoreFormer introduces a fundamentally different approach to lung nodule segmentation by modeling each nodule through its structural core - essentially the nodule's internal skeleton or centerline - and then evolving the nodule boundary outward along anatomy-aware paths rather than making independent decisions at each voxel.
Structural Core Anchoring. Instead of predicting boundaries from a single center point (a zero-dimensional anchor), CoreFormer identifies a richer one-dimensional structural skeleton. This is crucial for complex or irregularly shaped nodules: a dumbbell-shaped nodule's skeleton would naturally span both lobes, providing a stable geometric anchor that a single center point could not supply.
Geodesic Shape Decoding. From the structural core, CoreFormer evolves boundaries along geodesic paths - routes that navigate the anatomical landscape of tissue rather than traveling in straight lines. This means the model respects tissue interfaces and anatomical structures when drawing boundaries, producing smoother and more biologically plausible contours.
Architecture Components. The complete CoreFormer framework combines three elements: a hierarchical Swin Transformer backbone for feature extraction, a dual-branch decoder with separate modules for core prediction and shape generation, and a Feature Manifold Regularization scheme that improves how the model organizes what it has learned about nodular versus non-nodular tissue.
Four Public Benchmark Datasets. CoreFormer was evaluated on four diverse datasets to test both standard performance and generalization: LIDC-IDRI (1,018 scans with nodule annotations from four radiologists), LNDb (294 scans from a Portuguese lung cancer screening program), NSCLC-Radiomics (422 scans from diagnosed lung cancer patients with large irregular tumors), and MosMedData (1,110 scans with COVID-19 lesion annotations).
Cross-Domain Diversity as a Challenge. The four datasets represent very different imaging scenarios - small screening nodules, large irregular tumors, and diffuse infectious lesions. This creates a substantial domain gap that stress-tests whether a model has learned general principles of segmentation rather than just memorizing patterns from training data.
Standardized Preprocessing Pipeline. All CT volumes were preprocessed consistently: Hounsfield Unit values were clipped to the range -1000 to 400 to isolate relevant tissue, normalized to floating-point values, and divided into 64x64x64 voxel patches centered on regions of interest. Data augmentation included random rotations, scaling, intensity jittering, and elastic deformations to improve robustness.
Training Configuration. All models were implemented in PyTorch using the MONAI medical imaging library. CoreFormer was trained using the Adam optimizer with a learning rate of 0.0001 for up to 300 epochs, with early stopping based on validation Dice score to prevent overfitting. All competing baseline methods were trained under identical conditions for fair comparison.
Swin Transformer Backbone. The foundation of CoreFormer is a hierarchical Swin Transformer that processes 3D CT volumes as patches. The transformer's shifted-window attention mechanism efficiently captures both fine local details and long-range global relationships, producing multi-scale feature maps (low, mid, and high resolution) that feed into the decoder stages.
Structural Core Predictor. The first decoder branch takes the highest-level semantic features and predicts a dense probability map indicating where the nodule's structural centerline lies. At inference, this map is binarized and morphologically thinned to produce the final structural skeleton that anchors the shape generation process.
Context-Aware Shape Decoder. The second branch uses the predicted skeleton as a geometric anchor. It processes multi-scale features through a lightweight CNN to produce a voxel-wise traversal cost map, then applies the Fast Marching Method to compute geodesic distances from the skeleton to every voxel. Attention mechanisms aggregate features along these geodesic paths, and a final neural network layer converts this into a continuous signed distance field, which is thresholded to produce the final segmentation mask.
Feature Manifold Regularization. Applied only during training, this module explicitly structures the model's internal feature space so that nodular and non-nodular tissue become well-separated in high-dimensional space. It uses K-Means clustering to discover fine-grained sub-groups within each class, builds graphs of within-class and between-class relationships, then applies loss functions that pull similar features together and push different ones apart.
Top Performance on LIDC-IDRI. On the large-scale LIDC-IDRI dataset, CoreFormer achieved a Dice score of 88.7%, surpassing the next-best method (STUNet) by 1.6 percentage points. More importantly, boundary-specific metrics showed even larger improvements: CoreFormer achieved the lowest Hausdorff Distance of 2.54 mm and an Average Symmetric Surface Distance of 0.93 mm, directly validating that geodesic decoding produces smoother, more anatomically accurate contours.
Consistent Gains on LNDb. CoreFormer maintained its lead on the LNDb dataset (Dice 86.4%, Boundary F1 Score 86.1%), which features different acquisition protocols and higher image noise. The consistent performance across both standard benchmarks confirms that CoreFormer's advantages are not dataset-specific but reflect genuine architectural improvements.
Statistical Significance. Paired t-tests confirmed that CoreFormer's improvements are statistically significant across all baselines (p-values below 0.05, most below 0.01). Notably, CoreFormer also showed the lowest prediction variance (standard deviation 2.6 vs. 3.2-4.3 for competitors), meaning it produces consistently accurate results across diverse nodule appearances rather than excelling only on easy cases.
Boundary and Topology Integrity. CoreFormer scored highest on the Euler Similarity Index (0.94 vs. 0.81-0.88 for competitors), a metric of topological correctness that captures whether the model correctly preserves features like holes, connected components, and shape structure. This is critical for complex nodules where conventional methods often fill internal voids or fragment the mask incorrectly.
Zero-Shot Transfer to Unseen Domains. In a critical test of real-world utility, models were trained exclusively on LIDC-IDRI screening nodule data and then evaluated directly on two completely different datasets - large lung tumor images and COVID-19 lung lesions - without any additional fine-tuning. CoreFormer outperformed all baselines in this challenging zero-shot transfer scenario.
Performance on Large Tumors. On NSCLC-Radiomics, which contains large, non-spherical lung tumors very different from the small nodules in training data, CoreFormer achieved a Dice score of 83.2% and Boundary F1 of 80.3%. This demonstrates that the structural core and geodesic path priors learned for nodules also successfully capture the morphology of more complex tumor shapes.
Performance on Infectious Lesions. On MosMedData COVID-19 lesions, which are highly irregular, diffuse, and multi-focal - morphologically very different from cancer nodules - CoreFormer still led all methods with 78.8% Dice and 77.0% Boundary F1. The model's core-conditioned geodesic modeling appears to act as a powerful shape regularizer even for amorphous lesions.
Superiority of the Dual-Branch Decoder. A direct comparison showed that replacing CoreFormer's geodesic dual-branch decoder with a conventional voxel-wise decoder caused Dice to drop by 3.7 points and Boundary F1 to drop by 5.7 points on LIDC-IDRI alone. Across all four datasets, the dual decoder consistently provided 2-4 Dice points and 4-6 Boundary F1 points of improvement, confirming the decoder as the primary source of CoreFormer's advantage.
Isolating Component Contributions. Ablation studies systematically removed or replaced individual CoreFormer components to quantify each one's contribution. The full model served as the benchmark (Dice 88.7%, Boundary F1 87.6%), and each variant was evaluated against this ceiling.
Impact of Removing the Structural Core Predictor. Without the structural skeleton anchor, the model falls back to using a simple geometric center point. This caused Dice to drop to 86.9% and Hausdorff Distance to increase from 2.54 mm to 3.12 mm. Qualitative images show masks that are offset and asymmetric, confirming the skeleton anchor's role in stabilizing shape generation for complex nodule morphologies.
Impact of Removing the Context-Aware Shape Decoder. Ablating the CAS-Decoder dropped Dice to 86.1% and Boundary F1 to 83.7%, with fragmented and irregular masks. This confirms the decoder's essential role in producing smooth, continuous boundaries along geodesic paths - a capability absent from conventional decoder architectures.
Role of Feature Manifold Regularization. Removing Feature Manifold Regularization during training (though it is not active at inference) caused the worst performance drop among the module-removal variants, with Dice falling to 85.4%. This shows that explicitly structuring the feature space during training creates lasting benefits for prediction quality, even after the regularization module is no longer applied.
The Annotation Scarcity Problem. Expert annotation of medical images is expensive, slow, and requires specialized radiological training. A practical AI system must perform well even when only a fraction of available scans have expert labels. CoreFormer's architectural priors were specifically designed to improve performance in these data-limited scenarios.
Outstanding Performance with Only 5% Labels. When trained with just 5% of LIDC-IDRI's labeled data, CoreFormer achieved a Dice score of 68.5%. This outperformed the standard U-Net baseline by 10.4 Dice points, and exceeded even advanced semi-supervised methods like ST++ by 5.5 points - a remarkable gap demonstrating how much the structural priors compensate for limited labeled examples.
Maintained Advantage at All Supervision Levels. CoreFormer consistently led all competing methods at 10%, 25%, and 100% label fractions. At full supervision, CoreFormer reached 88.8% Dice compared to 85.0% for the U-Net baseline. This confirms that the architectural advantages are fundamental, not just a workaround for data scarcity.
Why Structural Priors Help with Limited Labels. Conventional consistency-based semi-supervised methods can propagate errors through noisy pseudo-labels at the voxel level. CoreFormer's structural core and geodesic shape decoding act as a shape regularizer that constrains predictions to be anatomically plausible, suppressing noise and preserving semantic boundaries even when learning signals are weak or limited.
Clinical Utility of High-Fidelity Segmentation. The improvements CoreFormer achieves in boundary accuracy and topological correctness translate directly to clinical applications. Precise nodule delineation is essential for defining surgical margins in resection procedures and for accurately targeting radiation therapy - errors in these boundaries can mean leaving cancer cells behind or irradiating healthy tissue.
Computational Considerations. CoreFormer has an inference time of approximately 720 ms per 64x64x64 patch on dual NVIDIA RTX 3090 GPUs, compared to about 410 ms for a 3D U-Net baseline. While more computationally intensive, the research team argues this modest increase is a justified trade-off for significantly improved segmentation accuracy and reliability within practical clinical workflow timeframes.
Interpretability Through Attention Visualization. The model's attention heatmaps show that it focuses accurately on nodule locations, highlighting not just nodule cores but also boundaries and diagnostic features like spiculation. This interpretability is important for clinical trust - physicians can verify that the model attends to clinically relevant features rather than unrelated imaging artifacts.
Future Research Directions. The researchers plan to extend CoreFormer to multi-class segmentation of broader thoracic structures and to dynamic lesion tracking for monitoring lung cancer progression over time. Integration with shape-aware uncertainty modeling is also planned to further improve reliability for real-world clinical deployment.