{'fraction_non_alphanumeric': 0.031566009274261134, 'fraction_numerical': 0.013967260740823509, 'mean_word_length': 4.6645569620253164, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Siamese Encoder-based Spatial-Temporal Mixer for Growth Trend Prediction of Lung Nodules on CT Scans

In the management of lung nodules, we are desirable to predict nodule evolution in terms of its diameter variation on Computed Tomography (CT) scans and then provide a follow-up recommendation according to the predicted result of the growing trend of the nodule. In order to improve the performance of growth trend prediction for lung nodules, it is vital to compare the changes of the same nodule in consecutive CT scans. Motivated by this, we screened out 4,666 subjects with more than two consecutive CT scans from the National Lung Screening Trial (NLST) dataset to organize a temporal dataset called NLSTt. In specific, we first detect and pair regions of interest (ROIs) covering the same nodule based on registered CT scans. After that, we predict the texture category and diameter size of the nodules through models. Last, we annotate the evolution class of each nodule according to its changes in diameter. Based on the built NLSTt dataset, we propose a siamese encoder to simultaneously exploit the discriminative features of 3D ROIs detected from consecutive CT scans. Then we novelly design a spatial-temporal mixer (STM) to leverage the interval changes of the same nodule in sequential 3D ROIs and capture spatial dependencies of nodule regions and the current 3D ROI. According to the clinical diagnosis routine, we employ hierarchical loss to pay more attention to growing nodules. The extensive experiments on our organized dataset demonstrate the advantage of our proposed method. We also conduct experiments on an in-house dataset to evaluate the clinical utility of our method by comparing it against skilled clinicians.


Introduction
According to current management guidelines of lung nodules [12,23], it is highly desirable to perform relatively close follow-up for lung nodules detected as suspicious malignant, then give clinical guidance according to their changes during the follow-up [4]. It is recommended to extend the follow-up time for some slowgrowing nodules and perform surgery on time for some nodules that are small but speculated to grow fast. However, the imprecise follow-up recommendations may yield high clinical and financial costs of missed diagnosis, late diagnosis, or unnecessary biopsy procedures resulting from false positives [1]. Therefore, it is imperative to predict the growth trend of lung nodules to assist doctors in making more accurate follow-up decisions, thereby further reducing false positives in lung cancer diagnosis. Although deep learning approaches have been the paradigm of choice for fast and robust computer-aided diagnosis of medical images [1,27], there are few related studies on the use of data-driven approaches for assessing the growth trend of lung nodules, since it is hard to acquire large-scale sequential data and without ground-truth dynamic indicators.
Current clinical criteria for assessing lung nodule changes rely on visual comparison and diameter measurements from the axial slices of the consecutive computed tomography (CT) images [10]. The variation of nodule diameter between two consecutive CT scans reflects the most worrying interval change on CT follow-up screening. Applying the variation of nodule diameter to evaluate the growth trend has been a routine method [8,19,26,20]. Zhe et al. manually calculate nineteen quantitative features (including nodule diameter) of the initial CT scans to identify the growth risk of pure ground-glass nodules (GGN) [17]. Xavier et al. match the same nodule given the list of nodule candidates by computing the difference in diameter between them [14]. In this paper, inspired by existing medical research [17,24], we organize a new temporal dataset of CT scans to predict the evolution of lung nodules in terms of diameter variation.
To achieve this, we screened out 4,666 subjects with more than two consecutive CT scans from the NLST dataset to organize a temporal CT dataset called NLSTt. We first detect regions of interest (ROIs) covering nodules after CT registration. Then, we pair the sequential 3D ROIs with the same nodule, followed by segmentation and classification, nodule types and diameter sizes are automatically annotated. Last, we assign one of three evolution classes (dilatation, shrinkage, stability) for each nodule in terms of its changes in diameter size. Based on automatically labeling evolution classes of each nodule in the NLSTt dataset, we further perform manually double-blind annotation and experienced review to acquire reliable labels for training a deep learning network to address the growth trend prediction. Given the inputs of 3D ROI pairs, we first introduce a siamese encoder [3,14] to extract local features (lesion region) of two ROIs and global features of the current ROI. In order to jointly exploit the interval differences of lesions as well as the spatial dependencies between lesions and whole ROIs, we design a novel spatial-temporal mixer (STM) to leverage spatial and temporal information. In addition, we employ hierarchical loss (H-loss) [25] to pay more attention to the nodule growth (dilatation class) related to possible cancerogenesis in clinical practice.
Our contributions are summarized as follows: (1) To drive the prediction of lung nodule evolution, we organize a new temporal CT dataset called NL-STt by combing automatic annotation and manual review. (2) We propose a spatial-temporal mixer (STM) to leverage both temporal and spatial information involved in the global and lesion features generated from 3D ROI pairs. (3) We conduct extensive experiments on the NLSTt dataset to evaluate the performance of our proposed method and confirm the effectiveness of our model on an in-house dataset from the perspective of clinical practice.

NLSTt Dataset Acquisition
Lots of subjects enrolled in the NLST dataset [21] cover scans from multiple time points (typically T0, T1, and T2 scans taken one year apart) as well as biopsy confirmations for suspicious lesions [22]. In this work, to advance the research of the growth trend prediction of lung nodules, we organize a temporal CT dataset named NLSTt by screening out 4,666 subjects from NLST, each of which has at least two CT scans up to 2 years apart from the NLST dataset. Fig 1 illustrates the pipeline of our data organization approach, which aims to ascertain the evolution class and texture type of nodules in consecutive CT scans for the selected subjects. We first perform 3D image registration for the second (T1) and third (T2) CT scans in terms of the first scan (T0). After that, we identify 3D ROIs containing lung nodules by a detector, and then pair ROIs to match the same nodule in multiple 3D ROIs at different time points. Next, we employ a segmenter to automatically crop out the lesion of nodules in ROIs to calculate their diameters. At the same time, we apply a classifier to identify the texture types of nodules (i.e., GGN, solid, part-solid (PS)). In specific, two popular CT datasets LUNA16 [16] and LNDb [13] are used to train our models, in which the detector for ROI identification is a 3D variant of the CenterNet [28], the segmenter for lesion segmentation is a multi-scale 3D UNet [9,15], and the classifier is the variant of the segmenter attaching a fully-connected layer.
In the above pipeline of organizing the NLSTt dataset, we first make registrations for the consecutive CT scans of each patient, then detect nodules. For the detected two nodules at T0 and T1, the pair criterion is that the Euclidean distance between the center points of the two nodules is less than 1.5 millimeters. If the nodule location changes significantly between T0 and T1 (> 1.5 millimeters), we assert that they are not the same nodule. Finally, we ask experienced clinicians to review to ensure the accuracy of paring nodules correctly. After automatically inferring the diameters and texture types, we rely on experienced clinicians to calibrate the labels by manually annotation. By combining automatic inference and manual review, we acquire the reliable label of nodules regarding the texture type and evolution class, the latter of which is determined by the diameter change of a nodule at consecutive time points. Finally, we complete the construction of the NLSTt dataset. Next, we discuss the details regarding how to construct the labels of evolution classes for nodules.
The evolution class of a nodule is based on the changes in diameter size. The diameter is the longest side of the smallest circumscribed rectangle on the maximal surface of the nodule mask generated by the segmenter. We formulate three evolution classes of lung nodules according to the diameter change of the same nodule at different time points as stability, dilatation, and shrinkage, as shown in Fig 2. If the diameter variation of lung nodules at two consecutive CT scans is less than 1.5 millimeters, we refer to such trend as stability. If the diameter of lung nodules of twice CT scans varies more than 1.5 millimeters, we define the increment as dilatation and the reduction as shrinkage. In the following part, we present our proposed method for growth trend prediction.  loss (H-loss). For a given subject, the 3D ROI pairs (T0 and T1) containing lesions are taken from CT scans at different time points, and then fed into a siamese encoder for embedding. Besides, an extra learnable global embedding is introduced to extract the global information of 3D ROIs [2]. Both encoders in the siamese encoder share the same weights, and we adopt the vision transformer (ViT) [2,6] and convolutional neural network (CNN) [7] as the backbone of the siamese encoder. We obtain three embedding vectors from sequential 3D ROIs by the siamese encoder: F G1 contains global information of T1, F L1 contains local information of the lesion patch in T1, and F L0 contains local information of the lesion patch in T0. We supplement a learnable embedding F L0 if T0 is missing, which occurs when a subject has only two CT scans.

Spatial-Temporal Mixer
It is worth mentioning that the global information of ROIs is changeless on T0, T1, and T2. Hence, we only learn global information from T1 without considering the global information of T0. On the contrary, the local information of the same nodule in T0, T1, and T2 are different and highly discriminative for growth trend prediction. Therefore, we learn local information from both T0 and T1 to capture the evolving local information.
Given the embeddings obtained from the siamese encoder, we propose a spatial-temporal mixer (STM) module to leverage spatial and temporal information. We firstly introduce a layer normalization, a multi-layer perception (MLP), and a residual addition operation on the three embeddings F L1 , F G1 , and F L0 . After that, in order to fuse spatial and temporal information, we apply a linear projection to obtain a query vector Q L1 from F L1 , and two key vectors K G1 and K L0 from F G1 and F L0 , respectively. The spatial information is captured by F G1 · Sim(Q L1 , K G1 ), where Sim(Q L1 , K G1 ) is the cosine similarity between the query-key pair of local and global embeddings of T1. Similarly, the temporal information is captured by F L0 · Sim(Q L1 , K L0 ), where Sim(Q L1 , K L0 ) is the cosine similarity between the query-key pair of local embeddings of T1 and T0, which are collected at different time points. Next, we fuse the spatial and temporal information with an addition operation and a linear projection (LP). Finally, STM outputs an embedding based on the spatial-temporal information and the current local embeddings F L1 . In summary, the output of STM is computed as: (1)

Two-layer H-loss
After feature fusion by STM, we are ready to train a model for predicting the growth trend. We employ H-loss, which extends the weighted cross-entropy (WCE) loss function to enhance the contribution of the dilatation class by hierarchical setting. It is more cautious and attentive to the nodule growth related to possible cancerogenesis in clinical practice. Hence, it is vital to achieving high predictive accuracy for the dilatation class. To this end, we build a two-layer H-loss (H1, H2) including two separate fully-connected (FC) layer modules to analog clinical diagnosis routine. Based on three evolution classes of nodules, H1 first classifies dilatation or not for paying more attention to the dilatation class. And H2 inherits H1 to predict shrinkage or stability. The leakage node in H2 here only involves dilatation. The two-layer H-loss unifies the predictive probabilities and the ground-truth label y to train our model, as follows: where P H1 and P H2 are the probability output of H1 and H2 layers, respectively. When α = 0, H-loss is a three-class WCE equivalent to H2. For H2, we set different weights for different classes in WCE to combat class imbalance. The weights of dilatation, shrinkage and stability in H2 are 1.0, 1.0, and 0.1, respectively. During model inference, we predict the evolution class of T2 by H1 or H2 layer.

Experimental Settings
Datasets. Table 1 shows the statistical information of the datasets. Our organized dataset NLSTt with 4,666 subjects is split into a training set (3, 263 subjects), a validation set (701 subjects), and a test set (702 subjects). In addition, we collect CT scans of 199 subjects and adopt the same preprocessing Table 1. Statistics of benchmark splits of the NLSTt dataset and in-house dataset*.

Types Train Set Validation Set Test Set
In-house Set  approach used for NLSTt to organize an in-house dataset, which is used to evaluate the practicality of our model by comparing it against the clinicians. Optimizer. We apply the AdamW optimizer [11] to train our model, in which CNN encoders adopt ResNet34-3D [7] and are trained from scratch, and ViT encoders are trained on the pre-trained model which uses the MAE method [6]. The batch size is set as B = 16 for all the conducted methods. We warm up [5] the learning rate from 10e − 6 to lr × B/64 in the first 5 epochs, where lr = 5e − 4, and then schedule the learning rate by the cosine annealing strategy [11]. The parameters of networks are optimized in 60 epochs with a weight decay of 0.05 and a momentum of 0.9.

Results and Discussions
Gain analysis for our STM. Table 2 reports the Area Under the Curve (AUC) of H1 (AUC@H1) and H2 (AUC@H2) layers for four feature fusion methods (Concat, MFC, LSTM, our STM) based on CNN and ViT encoders. MFC [14] combines feature maps of 3D ROI pairs and employs CNN as the encoder. Hence, we only compare MFC and our STM based on the CNN encoder. On the test set, ViT-based STM achieves the best performances. For the in-house set, CNN-based STM obtains the best AUC@H1, and ViT-based STM gets the best AUC@H2. By further observing the high profits of ViT-based three mixers, we argue that the ViT-based siamese encoder exhibits better robustness than the CNN-based one. Furthermore, with either CNN-or ViT-based encoders, our STM brings more gains than LSTM and Concat on the test set and in-house set. Our STM also consistently outperforms MFC on two datasets in terms of two metrics. The Concat method for feature fusion only linearly combines the three embedding vectors without capturing their inter-dependencies. Hence, the predictive capability is lower than LSTM, which captures the temporal changes of two lesion features (F L0 , F L1 ) extracted from T0 and T1. Besides the interval differences of lesion features at different time points. Our STM also exploits spatial dependencies of the global features F G1 and lesion features F L1 of T1, thus achieves the best performance.
Discussion of clinical practice. Based on the confirmation of the advantage of our STM, we further observe its performance on three nodule types and clinical applications. Since there are only six part-solid samples in the in-house set, we build an extra in-house set, which uses all the 37 part-solid samples from the test set to assemble a total of 43 part-solid samples for evaluation. As Table 3 shows, ViT-based STM obtains better Accuracy and Kappa [18] than CNN-based STM on three nodule types of the test set. By comparing with two skilled clinicians, ViT-based STM outperforms clinicians A and B on GGN while slightly weaker on solid. For part-solid, ViT-based STM achieves better Kappa but lower Accuracy than clinicians. This demonstrates that our model can carry out clinical practice in terms of GGN, solid, and part-solid. We show several cases predicted by our model and clinicians in Appendix A1.
Utility of two-layer H-loss. Table 4 shows the ablation studies of the hyper-parameter α in Eq. (2). AUC@H2-D is the AUC of the dilatation class on the H2 layer. According to AUC@H2 on the test and in-house sets, two-layer Hloss exhibits a significant advantage over the H2 layer (α = 0) alone. Among the three evolution classes, considering clinical meaning, we preferentially ensure the predictive accuracy of the growth trend. Hence, we pay more attention on the dilatation class with the help of the two-class H1 layer. The significant difference of AUC@H2-D between α = 0 and α = 1 demonstrates the benefits of our strategy.

Conclusions
In this work, we explore how to predict the growth trend of lung nodules in terms of diameter variation. We first organize a temporal CT dataset including three evolution classes by automatic inference and manual review. Then we propose a novel spatial-temporal mixer to jointly exploit spatial dependencies and temporal changes of lesion features extracted from consecutive 3D ROIs by a siamese encoder. We also employ a two-layer H-loss to pay more attention to the dilatation class according to the clinical diagnosis routine. The experiments on two real-world datasets demonstrate the effectiveness of our proposed method.