## 3 Results  
### How Can Labels from a Model Trained in an Unsupervised Manner Be Converted to Meaningful Labels?  
For unsupervised image segmentation, [PERSON] et al. (Figure 3) published a training approach in 2018 based on similarity [15] and another in 2020 based on differentiable feature clustering [28]. Here, we use the first approach and the framework described for it, which we refer to as the Kanezaki framework. It starts with a high number of classes and minimises the label classes in every training epoch, until a predefined number of classes is reached. The label classes are merged based on the similarity in the segmented image region. Finally, there are a given number of label classes segmented per image. However, these labels do not correspond to meaningful labels. Which label class (e.g., 1) belongs to which histological structure (e.g., alveolar epithelium) is unclear. We mapped such a model to defined classes by a two-step process.  
First, the [PERSON] training approach was reproduced using the histological images available. The excised HE-stained cores were used in random order for training. As we have described, the approach of [PERSON] et al. starts with a predefined number of labels--in our case, 100. Next, at each epoch, the number of labels was reduced or the labels were merged. The training process ended when the previously specified expected number of labels was reached or undercut. Because, in our setting, the classes 'background', 'tumour stroma','squamous cell carcinoma', and 'adenocarcinoma' were expected, the number of expected labels was set to 10.  
For the CNN model, a simple model composed of a linear combination of convolution and batch normalisation blocks was used, as described by [PERSON] et al. [15]. This simple  
Figure 3: **Schematic of the remapping approach.** [PERSON] et al. described an approach for unsupervised segmentation [15]. This leads to meaningless morphological labelling. For example, the epithelial and stromal structures are segmented. In this manner, homogeneous labels (in terms of texture, for example) are created. Depending on the resolution, this can lead to tumour formation and splitting of the tumour stroma into different partial labels. The main hypothesis of the underlying work is that labels such as ‘adenocarcinoma’ are composed of a distinct set of morphological labels produced by unsupervised training. The approach described herein is divided into two main parts. (**A**) First, a CNN model (e.g., consisting of several convolutional and batch normalization blocks) is trained in an unsupervised manner, as described by [PERSON] et al. This training was performed on the image batches to ensure that all classes were represented. (**B**) An additional block was added to the model to map the classes of the model to patho-histological labels. The mapping was trained in a supervised manner. There were four components for the label frequency vectors per TMA core.  
CNN model is henceforth referred to as concise_CNN (visualised in Figure A1A). Other more complex segmentation models, such as UNets or FCNs, have also been trained in this framework. However, only concise models with a few layers (called concise_UNET and concise_FCN; visualised in Figure A1B,C) converged. Standard UNet-variants such as those published in [PERSON] et al. (henceforth called Standard_UNET) cannot be trained [20].  
Second, to map the labels to meaningful labels, a fully connected layer is added to the model previously trained in an unsupervised setting. This layer is supposed to map the learned labels to given, defined labels, such as'stroma'. The extended model is then retrained again in a supervised setting on a small, labelled dataset. This two-step approach is performed for three image sizes (\(256\times 256\), \(512\times 512\), and \(1024\times 1024\) pixels), to test whether the image or object size affects the segmentation performance.