## 2 Materials and Methods
### Convolutional Neural Network Model-Based Classification
Typically, labels are attributed to a whole bag rather than an individual tile; in contrast to the section above. In the MIL approach used here for WSI, the individual instances are converted into a feature vector, and then the bag containing the instances is fed in tabular form to another neural network. In our project, we generated the features with two pre-trained networks (namely a Pytorch-implemented ResNet152 model [21, 28]--as above--and the HistoEncoder model [36]). In contrast to the ResNet model that has been pre-trained on real-world objects in the ImageNet data set [29, 30], the HistoEncoder model has been pre-trained on large amounts of prostate tissue whole slide images [36]. Thus, the latter produces features for histological objects, albeit from another tissue type. Due to the small amount of total data (less than 200 bags), we decided against co-training the feature generation. Image tiles from the tumor border as well as the central regions are included for each case. According to the file name and known location, based on the segmentation described above (tumor central regions or border regions), the tiles are saved in folders. Subsequently, the feature vectors are calculated. Therefore, the large image tiles are further decomposed into smaller or sub-tiles, for which the feature vector is calculated. For data augmentation reasons, per \(4200\times 4200\) pixel image tile, ten sub-tiles of \(512\times 512\) pixels are randomly cropped. These small, randomly cropped sub-tiles then represent the instances. The folder represents, in this context, the bag. The number of sub-tiles or instances per bag ranges from 30 to 400. Multi-Instance Learning MIL Model Training  
The model used was based on the code from [PERSON] [37]. The model takes the feature vectors produced by the models mentioned above stacked in a table as input. Each row contains the feature vector of one instance. The model consists of three parts: First, a non-linear neural network for data preparation. It is applied row-wise to reduce the dimensionality. Second, an aggregation function. It is applied column-wise to map the tabular data to one vector. Here, a mean function is applied, since it does not depend on a fixed row number of the input table. Third, a non-linear neural network, in particular a fully connected network, is used to map the vector produced by the aggregation function to a class label. This is a typical classification task [37, 38]. The MIL model is trained with cross-entropy loss and Adam optimizer. The target output has also been the nodal status (N\(-\) or N\(+\)) per case. Standard data augmentation techniques applied to the input images to avoid over-fitting cannot be used in this setting. Typical standard methods such as rotation or color variation typically lead to similar feature vectors in a pre-trained model (as described in the Section Data Set Preparation for the MIL approach above). The model has been trained to recognize the image content despite these modifications. Therefore, we used the query bag approach described by [PERSON] et al. [39] to avoid over-fitting of the MIL model. In this approach, each training a defined number of instances per bag is randomly chosen. By randomly choosing only a small fraction of the instances per bag at each iteration, over-fitting can be delayed. Nonetheless, this benefit comes at the cost of encountering noisy data. Instances relevant to the task are not usually selected randomly from a bag, which can introduce further noise. Furthermore, as additional data augmentation, we add statistical noise to the table representing the bag. Namely, we add salt-and-pepper noise (SP) to each row in the table.