{'fraction_non_alphanumeric': 0.038175675675675674, 'fraction_numerical': 0.017635135135135135, 'mean_word_length': 4.818003144654088, 'pattern_counts': {'":': 0, '<': 1, '<?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}}
Relational Learning between Multiple Pulmonary Nodules via Deep Set Attention Transformers

Diagnosis and treatment of multiple pulmonary nodules are clinically important but challenging. Prior studies on nodule characterization use solitary-nodule approaches on multiple nodular patients, which ignores the relations between nodules. In this study, we propose a multiple instance learning (MIL) approach and empirically prove the benefit to learn the relations between multiple nodules. By treating the multiple nodules from a same patient as a whole, critical relational information between solitary-nodule voxels is extracted. To our knowledge, it is the first study to learn the relations between multiple pulmonary nodules. Inspired by recent advances in natural language processing (NLP) domain, we introduce a self-attention transformer equipped with 3D CNN, named {NoduleSAT}, to replace typical pooling-based aggregation in multiple instance learning. Extensive experiments on lung nodule false positive reduction on LUNA16 database, and malignancy classification on LIDC-IDRI database, validate the effectiveness of the proposed method.


INTRODUCTION
Lung cancer is the leading cause of cancer-related mortalities. Early diagnosis of lung cancer is one of the effective ways to reduce the related death. With prevailing application of lowdose computed tomography (LDCT), increasing number of early-stage pulmonary nodules have become a challenge in clinical practice. In particular, a set of subjects with multiple pulmonary nodules raises research attention [1]. Except for certain "easy-to-diagnose" diseases, e.g., evident pulmonary metastases and pulmonary tuberculosis, incidental multiple pulmonary nodules are considered as a dilemma in clinical context. Diagnosis of multiple pulmonary nodules is more complicated than solitary ones; apart from analyzing the bi- * Corresponding author: Bingbing Ni. ological behaviors (e.g., benign, indolent, invasive), radiologists are required to analyze diverse circumstances.
Recent data-driven approach, e.g., radiomics and deep learning, has been dominating Computer-Aided Diagnosis (CADx) research. Few prior study on lung nodule detection and characterization works on learning the relations between multiple nodules; in other words, prior studies use solitarynodule approaches on multiple nodular patients. In clinical practice, radiologists use information at nodule level and patient level to diagnose nodules from the same subject; from an algorithmic perspective, solitary-nodule approaches classify nodules without considering relation / context information. We argue that relation does matter, thereby a multiple instance learning (MIL) approach is proposed to address this issue. To our knowledge, it is the first study to learn the relations between multiple pulmonary nodules. Inspired by the recent advances in NLP domain [2], we introduce Set Attention Transformers (SATs) based on self-attention to learn the relations between nodules, instead of typical pooling-based aggregation in multiple instance learning. To model lung nodules from CT scans, a 3D DenseNet [3][4][5][6] is used as backbone to learn representations of voxels at solitary-nodule level. We then use the SATs to learn the relations between multiple nodules from the same patient. The whole network, named NoduleSAT, could be trained end-to-end. In lung nodule false positive reduction and malignancy classification tasks, the proposed multiple-nodule approach consistently outperforms the solitary-nodule baselines.
The key contributions of this paper are threefold: 1) We empirically prove the benefit to learn the relations between nodules; 2) We develop Set Attention Transformers (SATs) to perform the relational learning; 3) An end-to-end trainable NoduleSAT is shown effective in modeling multiple nodules. We empirically prove the benefit of relation learning between multiple pulmonary nodules, which could also inspire clinical and biological research on this important topic.

Set Attention Transformers (SATs)
Inspired by the self-attention transformers [2], we develop a Set Attention Transformer (SATs), a general module designed for processing the is permutation-invariant and size-varying set. In this study, the set is the multiple nodules from a same patient, and the SAT is designed to learn the relations between the multiple pulmonary nodules. For an input set X ∈ R N ×c (N denotes the size of the set, and c denotes the channels of representation), a scaled dot-product attention is formulated by sharing the K, Q and V features [2], where σ is a non-linearity activation function. However, the Multi-Head Attention (MHA) [2] is too much ponderous in our application, we introduce a more parameter-efficient Group Shuffle Attention (GSA) [7] for SATs. Suppose g to be the number of groups (g = 8 in this study), c g = c/g, s.t. c mod g = 0, we divide X by channels into g groups: {X (i) ∈ R N ×cg }, and apply group linear transform by the weight W g ∈ R cg×cg , before the scaled dot-product attention (Eq. 1). In-group scaled dot-production attention is applied in each group. However, grouping the inputs in all layers results in the no communication between the elements in the sets. For this reason, a parameter-free operator, channel shuffle ψ [7], is introduced to encourage channel fusion. The overall formalization of GSA is as follows, where Batch Normalization BN [8] is introduced to ease the optimization. The parameter size of GSA is up to 4g× smaller than MHA, which makes the SATs very light-weight and easy to learn. An SAT is simply an L-layer stack of GSA operator.

3D DenseNet Backbone
To end-to-end learn the representation of lesion voxels from CT scans, we apply a 3D DenseNet [3][4][5][6] as backbone, with a compression rate θ = 2 and a bottleneck B = 4. Leaky ReLU (α = 0.1) together with Batch Normalization [8] are used as activation functions. We instantiate various DenseNets for different experiments (Sec 3). Before inputting into the 3D DenseNet, the nodule voxels from CT scans are pre-processed with the following proce- We demonstrate the multiple pulmonary nodule malignancy classification task on the figure. Volumes of multiple pulmonary nodules from the same subject (patient) are input for a shared 3D DenseNet, to produce nodule-level representations via global average pooling (GAP). A Set Attention Transformer (SAT) is used for learning the relations between the multiple nodules, and it outputs a refined representation for each nodule. For loss back-propagation, we only accumulate the classification loss for the nodules with "malignant" and "benign" labels, and ignore the nodules with ambiguous labels.

End-to-end NoduleSAT
Combining the SATs and 3D DenseNets, the proposed network for learning the relations between multiple pulmonary nodules is named NoduleSAT (1). We treat the multiple pulmonary nodules from a same subject (patient) as a set, and use a shared-weight 3D DenseNet [3][4][5][6] to extract nodule-level representation for each nodule. These representations are fed into an L-layer SAT with hidden size H to learn the relations. Note that the whole NoduleSAT network could be trained end-to-end by standard back-propagation. Experiments on nodule false positive reduction (Sec. 3.1) and nodule malignancy classification (Sec. 3.2) are conducted to validate the usefulness of the proposed method. For both tasks, the Nod-uleSAT is trained to classify whether the multiple candidates / nodules from a same patient are nodules / malignant or not. Specifically for the nodule malignancy classification task, to take advantage of the nodules with ambiguous / undefined labels, we design a masked BCE loss to train the NoduleSATs. For solitary-nodule approaches, these data samples are nontrivial to use. In our NoduleSAT framework, these nodules are ignored in the loss back-propagation, but presented as input to provide important context information to other nodules. The masked loss strategy extend the effective sample size, and is shown to be effective in our experiments (Sec 3.2). It is notable that the proposed NoduleSAT network is fundamentally different from a prior study using multiple instance learning on lung nodules [9], where a max-pooling aggregate multiple-nodule information and output a single patient-level representation. Thereby, no relational information between the multiple nodules could be captured. As a comparison, relational information could be learned via layer-by-layer self-attention in the proposed NoduleSAT.

Dataset
False positive reduction (FPR) in lung nodule detection has always been a demanding task in computer-aided detection research. Due to the objectively existing correlation and largely varied size of nodules from a subject, our SAT is more than suitable to address this problem.
We use two datasets for this experiment. One is LUNA16, a widely used dataset for lung nodule detection and false positive reduction. The LUNA16 dataset consists of CT scans of 888 subjects with 1186 nodules. The evaluation result is provided as 10-fold cross validation using the official split. The LUNA16 FPR dataset uses the candidate list provided by the competition host, totally 754, 975 candidates. We filter out the candidates with a predicted score (by our 3D DenseNets baseline) lower than 0.1, resulting in 32, 405 candidates for further refinement by our SATs. The second dataset is Tianchi Lung Nodule Detection dataset 1 , a dataset of similar data protocol as LUNA16, while it consists of 800 subjects with 1, 224 nodules in total. We use the official split, with 600 subjects (975 nodules) for training and 200 subjects (269 nodules) for validation. The performance are reported on the validation set (named Tianchi VAL). We use our nodule detection model (based on a 3D UNet) trained on training set, to extract the candidates on the CT scans, resulting in 5, 531 candidates on the training set, 1, 515 on the validation set.  [4,4,4,4] times before each down-sampling, with a growth rate of 16. We use an Adam optimizer for training the CNN with a batch size of 32, with an initial learning rate 1 × 10 −3 . We exponentially decay the learning rate with a ratio of 3 × 10 −2 after every epoch. The candidates from the same subject, represented by the features after the global average pooling of CNN, are fed together into an SAT. Since there are too many candidates on certain subjects, we fix the pre-trained 3D DenseNet to train the SAT. The SAT in the false positive reduction experiments uses H = 256 and L = 3. We use an Adam optimizer with a batch size of 64. The initial learning rate is 5 × 10 −3 . We multiply the learning rate by 0.2 at epoch = 100, 130 and 170. 200 epochs are enough for a good convergence. The training loss is a cross entropy loss averaged by the number of candidates.

Result
We use CPM score for evaluation, the most commonly used metric for lung nodule detection and false positive reduction. CPM score is the average recall rate at an average number of false positives at 0.125, 0.25, 0.5, 1.0, 2.0, 4.0 and 8.0 on the FROC curve, the higher is better.
Results are shown in Table 1, our SAT-based method improves the baseline by a large margin. On Tianchi VAL, our model improves more significantly. Note that a 10-run voting ensemble usually provides only 1% performance boost on this dataset. We declare that these improvements come from learning the relations between the candidates.

Dataset
We then use the NoduleSAT to provide a systemic view on malignancy of multiple pulmonary nodules. LIDC-IDRI [13], one of the largest public available lung cancer screening databases, is used for validating our method. As depicted in Fig 2 (a), patients in LIDC-IDRI dataset have 1 -23 nodules, of which 74.0% are multiple nodular patients. Therefore, the proposed NoduleSAT network is well suitable for this task. The data inclusion criteria are: 1) the nodule should be annotated by at least 3 radiologists, and 2) the CT thickness≤ 3mm. 2,175 qualified nodules are selected in total; we then compute the average malignancy score (s avg ) of each nodule, resulting in 527 malignant (s avg > 3), 656 benign (s avg < 3) and 992 undefined-label (or ambiguous, s avg = 3) nodules.

Experiment Setting
We first pre-train a 3D DenseNet with a 32 × 32 × 32 input. The dense blocks are repeated [3,8,4] times before each down-sampling, with a growth rate k = 32. The training samples are only the 1,183 benign or malignant nodules. The 3D DenseNet is trained with a standard cross entropy loss. We train the 3D DenseNet using an Adam optimizer with an initial learning rate of 0.001 for 200 epochs, and halve the learning rate every 30 epochs.
We then construct a NoduleSAT, using the pre-trained 3D DenseNet and a 3-layer SAT (H = 256). We train the Nod-uleSAT end-to-end with a batch of 16 patients. Note the batch size for 3D DenseNet is variable. We fix the Batch Normalization layer to stabilize the training. All qualified 2,175 nodules are used for training the NoduleSAT, with a masked loss to backward on benign and malignant nodules only. We train the whole NoduleSAT with an Adam optimizer, whose learning rate is initially 0.001, halved every 15 epochs for 150 epochs totally. Another NoduleSAT with 1,183 benign or malignant nodules are also trained for fair comparison.  We report the AUC (AUROC) with a 5-fold cross validation for evaluating our method, where each fold is split by the patients, while keeping roughly the same number of nodules in each fold. As depicted in Figure 2 (b), NoduleSAT and the masked loss are both effective to boost malignancy classification performance from the baseline 3D DenseNet. We figure out two important findings: 1) NoduleSAT with only the benign or malignant nodules outperforms 3D DenseNet with the same dataset, and we attribute the improvement to learning the relations. 2) NoduleSAT with the undefined-label nodules, using masked loss, boosts the performance further. We argue that this improvement comes from learning the context. Our method elegantly uses the undefined-label samples, which is non-trivial for solitary-nodule approaches.

CONCLUSION AND FURTHER WORK
In this study, we propose a Set Attention Transformer (SAT), to explicitly learn relational information between multiple pulmonary nodules from a same subject. Intergated with a 3D DenseNet, the proposed end-to-end trainable Nodule-SAT encourages the model to learn top-down inter-nodule relations from bottom-up nodule-level representations.
We are working on clinical problems on multiple pulmonary nodules. Hopefully, our data-driven methodology could benefit understanding etiologic and biologic processes and metastasis diagnosis of multiple pulmonary nodules.