Lung cancer is the leading cause of cancer death worldwide. With over 1.8 million deaths and 2.5 million new cases globally in 2022, early detection is the most impactful lever for improving survival, yet symptoms are often absent in early stages.
CT screening has been shown to reduce lung cancer mortality by 20%, but each CT scan contains hundreds of slices and radiologists can miss or disagree on small nodules, especially those just a few millimeters in diameter that closely resemble benign structures.
Computer-aided detection systems can serve as a second reader, reducing diagnostic workload, catching missed nodules, and flagging candidates for further workup, making automated lung nodule segmentation a clinically meaningful research target.
This paper proposes and evaluates three deep learning architectures for semantic segmentation of lung nodules, all enhanced with multi-scale feature extraction and attention mechanisms, and tests them on the publicly available LIDC-IDRI dataset.
Traditional methods relied on hand-crafted image processing rules. Region-growing, morphological operations, and energy-based level-set methods dominated early pulmonary nodule detection but required manual parameter tuning, case-specific initialization, and were sensitive to nodule type and attachment to vessels or pleural walls.
Machine learning approaches using Support Vector Machines and fuzzy clustering improved generalization but still depended on manually engineered features. They did not match the performance of end-to-end deep learning methods that learn directly from pixel data.
Recent deep learning methods, including multi-scale CNNs, UNet variants, and hybrid CNN-transformer architectures, have pushed DSC scores from around 68 percent with early networks to 96 percent with the most complex transformer-based models, though the latter carry prohibitive computational costs for real-time clinical use.
Standard softmax-based self-attention in transformers has quadratic time and memory complexity, making it impractical when processing hundreds of CT slices per scan in resource-constrained clinical environments. The need for efficient yet accurate segmentation motivates the linear attention approach developed here.
Pre-processing isolates the lung region before deep learning segmentation. Raw CT slices are first standardized by subtracting the mean and dividing by the standard deviation to ensure consistent input ranges and faster model convergence.
Noise reduction uses two sequential filters: a median filter that replaces each pixel with the neighborhood median to remove outliers while preserving edges, followed by an anisotropic diffusion filter that smooths homogeneous regions without blurring boundaries.
K-means clustering separates lung tissue from surrounding structures by grouping pixels by intensity proximity. Morphological operations of erosion and dilation then refine the binary lung mask, removing small artifacts and filling gaps to produce clean lung region boundaries.
The final lung mask is multiplied by the CT slice to produce the lung region of interest. Nodule segmentation masks are built from the expert radiologist annotations provided in the dataset, giving the models clean ground-truth targets for training and evaluation.
Standard UNet uses fixed-size convolutional kernels that cannot simultaneously capture fine edge details and broad anatomical context. Multi-scale UNet addresses this by running parallel convolution branches with 3x3 and 7x7 kernels in each encoder block, then fusing their outputs before downsampling.
The 3x3 kernels capture precise local features such as nodule edges and textures, while 7x7 kernels incorporate wider surrounding tissue context that helps distinguish nodules from vessels and pleural walls. Dilated convolutions were considered but avoided due to gridding artifacts that harm boundary precision.
Skip connections between matching encoder and decoder layers preserve spatial detail lost during downsampling. The decoder progressively upsamples and combines these features, reconstructing a full-resolution segmentation mask that benefits from both fine-grained and contextual information.
This design is significantly lighter than Inception blocks or residual multi-scale fusion networks while achieving comparable multi-scale feature integration, making it suitable for environments where GPU memory and inference speed are constrained.
Asymmetric Convolution Blocks (ACBs) replace standard square kernels with a three-branch design. Each ACB combines a standard 3x3 convolution with a 1x3 horizontal kernel and a 3x1 vertical kernel, fusing their outputs to create a cross-shaped receptive field that emphasizes the central skeleton of features over uninformative corner regions.
This design reduces redundant information and checkerboard artifacts that commonly appear in deconvolution layers during upsampling, producing smoother and more coherent segmentation masks at the decoder output.
Multi-scale skip connections augment the standard UNet skip paths by connecting encoder layers at multiple resolutions to each decoder layer. Higher-resolution encoder features are downsampled via max-pooling and passed through ACBs, while lower-resolution decoder features are upsampled via transposed convolutions, all concatenated before channel attention reweighting.
Channel Attention Blocks adaptively reweight feature channels using average and max pooling followed by two convolutional layers that compress channels to one-sixteenth and then restore them, learning which feature channels are most informative for nodule delineation at each scale.
Feature Pyramid Networks create multi-scale feature maps by combining a bottom-up encoding pathway with a top-down decoding pathway connected by lateral links. High-resolution low-level features from shallow layers are merged with semantically rich high-level features from deep layers, enabling detection of both small and large nodules.
The ResNet-34 backbone generates feature maps at four spatial resolutions: one-quarter, one-eighth, one-sixteenth, and one-thirty-second of the input size. Each is processed through lateral 1x1 convolutions and combined top-down with nearest-neighbor upsampling, followed by a 3x3 convolution to reduce aliasing artifacts.
An attention aggregation module concatenates all four pyramid feature maps and applies a single-head linear attention mechanism with 256 channels. Unlike standard softmax attention with quadratic complexity, linear attention approximates the softmax using first-order Taylor expansion and L2 normalization, reducing time and memory complexity to O(M) where M is the number of spatial positions.
The GELU activation function was chosen because its smooth Gaussian-based probabilistic weighting preserves small negative activations that are critical for delineating low-contrast nodule boundaries, avoids dying neuron problems seen with ReLU, and acts as a form of soft dropout that reduces overfitting on limited medical imaging data.
FPN with linear attention and GELU activation achieved the best performance of all three architectures. On the LIDC-IDRI dataset it reached a Dice Similarity Coefficient of 71.59% and Intersection over Union of 58.57%, outperforming the other two proposed models and most prior non-transformer methods.
Multi-Scale UNet with Leaky ReLU activation reached a DSC of 66.41% and IoU of 53.92%. Leaky ReLU outperformed other activations because its non-zero gradient for negative inputs improved boundary adherence and reduced vanishing gradient problems during training on nodules with heterogeneous shapes.
UNet with ACB and channel attention using ELU activation reached a DSC of 65.47% and IoU of 52.56%. ELU's zero-centered output and smooth non-linearity provided stable learning and improved feature integration, particularly for images with non-linear intensity patterns from different CT protocols.
Training and validation curves for the FPN model showed convergence with training IoU and DSC plateauing around 0.85 and 0.90 respectively, and validation metrics stabilizing at approximately 0.60 and 0.70, indicating reasonable generalization to unseen data without severe overfitting.
The proposed FPN with linear attention explicitly targets the trade-off between accuracy and computational efficiency. While transformer-based models such as the Gautam et al. design achieved DSC of 96.57%, they require substantially more GPU memory and inference time, limiting clinical deployment in resource-constrained settings.
The linear attention mechanism reduces complexity from quadratic to linear with respect to the number of pixels, dramatically cutting GPU memory usage and speeding up inference on the hundreds of 2D slices that constitute a single CT scan without sacrificing the ability to model long-range spatial dependencies.
Visual inspection of the predicted segmentation masks confirmed that the FPN model closely matched ground-truth radiologist annotations, successfully delineating nodule boundaries even in challenging cases involving low contrast between nodule and surrounding tissue or attachment to vascular structures.
Future improvements could include 8-bit inference quantization to further reduce memory requirements, extension to 3D volumetric segmentation for capturing cross-slice nodule context, and testing on additional CT datasets from different scanner manufacturers and imaging protocols to assess generalizability.
All three proposed models demonstrated viable performance for clinical support applications. Multi-scale feature integration was consistently beneficial across architectures, confirming that no single kernel size adequately captures the full range of nodule shapes and sizes encountered in routine CT screening.
Attention mechanisms, whether channel-wise in the ACB-UNet variant or linear attention in the FPN variant, reliably improved segmentation focus by suppressing irrelevant background features and emphasizing informative regions around nodule boundaries.
The FPN with linear attention model provides an accessible, deployable AI tool that could assist radiologists in low-resource settings where full transformer-based systems are impractical, potentially increasing early lung cancer detection rates in populations currently underserved by high-end imaging AI.
The work establishes a foundation for further research into efficient attention mechanisms, 3D nodule segmentation, and multi-dataset validation that could bring automated lung nodule analysis closer to routine clinical integration alongside CT screening programs.