## 2 Materials and Methods
### Mask Branch Network  
The concept of branch architecture [22; 23] is to train multiple tasks that take advantage of the interaction between different tasks. The mask branch aims to integrate spatial information into the main network, which helps the main network extract meaningful features from the area around the mass.  
The mask branch is designed to start at the \(1\times 1\times 1\) convolutional layer of the second transition layer of the main branch and to generate a _branch output_, which is a voxel-level probability map that estimates the presence of target lesions. We may assume that this branch output simulates a segmentation mask.  
We denote \(\mathbf{F}\in\mathbb{R}^{C\times H\times W\times D}\) as a midlayer CNN feature extracted from the second transition layer, where \(C,H,W\) and \(D\) are the number of channels, height, width and depth of the feature map, respectively.  
The _branch output_\(\mathbf{B}\) can be formulated as:  
\[\mathbf{B}=softmax(f(\sigma(\mathbf{F}),w)), \tag{2}\]  
where \(f(\cdot,\cdot)\) denotes a 3D convolution function, \(\sigma\) represents the activation function, \(\mathbf{B}\in\mathbb{R}^{H\times W\times D\times 2}\) means the generated _branch output_ map, and \(w\in\mathbb{R}^{2\times C\times 1\times 1\times 1}\) indicates convolutional parameters. As a result, branch output is a voxel-level binary probability map of the target lesion and background.  
Comparison between branch output and the mask yields the mask loss, a pixelwise cross-entropy loss, by which the model learns pixelwise class probabilities. With the mask that contains spatial information of the target lesion, the mask loss is calculated pixelwise between the branch output and the mask. The definition of mask loss is based on the equation below:  
\[L_{mask}=\frac{1}{NM}\sum_{j}^{N}\sum_{i}^{M}[(1-z_{i,j})\log(1-q_{i,j})+z_{i,j}\log q_{i,j}], \tag{3}\]  
where \(j\) is the index of a sample of the input batch, \(i\) is the index of a voxel in the \(H\times W\times D\) space, \(M=HWD\) is the total number of voxels in the branch output, \(z_{i,j}\in\{0,1\}\) is a pixel value of the mask \(\mathbf{T}\in\mathbb{R}^{H\times W\times D}\), which is proposed in Section 2.4, and \(q_{i,j}\) is the probability from the mask branch.  
The total loss of the whole model, subject to optimization, is a combination of main loss and mask loss. To combine these losses efficiently, the uncertainty loss weight method [24] commonly used for multitask loss is adapted for combining our losses and expressed as follows:  
\[L_{total}=\frac{1}{\sigma_{1}^{2}}L_{main}+\frac{1}{\sigma_{2}^{2}}L_{mask}+ \log\sigma_{1}+\log\sigma_{2}, \tag{4}\]where \(\sigma_{1}\) and \(\sigma_{2}\) are trainable variables that learn the relative weights of \(L_{main}\) and \(L_{mask}\) adaptively and regulate the balance of the losses. When training model, \(L_{total}\) let scale value of \(\sigma_{1}\) and \(\sigma_{2}\) regulate the contribution of \(L_{main}\) and \(L_{mask}\), preventing \(\sigma_{1}\) and \(\sigma_{2}\) being too large.  
Note that the mask branch network is used only for the training process to focus on the region of interest and not for the testing process. Thus, the proposed method does not increase computational complexity in the inference phase.