A Mixture of Exemplars Approach for Efficient Out-of-Distribution Detection with Foundation Models
Authors: Evelyn Mannix
Howard Bondell
Venue: Accepted by TMLR ()

Abstract: One of the early weaknesses identified in deep neural networks trained for image classification tasks was their inability to provide low confidence predictions on out-of-distribution (OOD) data that was significantly different from the in-distribution (ID) data used to train them. Representation learning, where neural networks are trained in specific ways that improve their ability to detect OOD examples, has emerged as a promising solution. However, these approaches require long training times and can add additional overhead to detect OOD examples. Recent developments in Vision Transformer (ViT) foundation models—large networks trained on large and diverse datasets with self-supervised approaches—also show strong performance in OOD detection, and could address these challenges. This paper presents Mixture of Exemplars (MoLAR), an efficient approach to tackling OOD detection challenges that is designed to maximise the benefit of training a classifier with a high quality, frozen, pretrained foundation model backbone. MoLAR provides strong OOD detection performance when only comparing the similarity of OOD examples to the exemplars, a small set of images chosen to be representative of the dataset, leading to \mhl{significantly reduced overhead} for OOD detection inference over other methods that provide best performance when the full ID dataset is used. Extensive experiments demonstrate the improved OOD detection performance of MoLAR in comparison to comparable approaches in both supervised and semi-supervised settings, and code is available at github.com/emannix/molar-mixture-of-exemplars.

Published in Transactions on Machine Learning Research (8/2025)
A Mixture of Exemplars Approach for Efficient Out-of- Distribution Detection with Foundation Models
Evelyn J. Mannix
evelyn. wwwp://wwwannnnnnnmmmmmmb... edw...
School of Mathematics and Statistics University of Melbourne
Howard Bondell
howard. www.ell@@mmmmmlll...mmmm edu.
School of Mathemalics and Statistics University of Melbourne
Reviewed on OpenReview: opperevvee. net/ por//f id ad=apKnnSJtE)
Abstract
One of the carly weaknesses identified in deep neural networks trained for image classifi- cation tasks was their inability to provide low confidence predictions on out-of-distributton (OOD) data that was significantly different from the in-distribution (ID) data used to train them. Representation learning, where neural networks are trained in specific ways that im- prove their ability to detect OOD examples, has emerged these approaches require long training times and can add additional overhead to detect OOD examples. Recent developments in Vision Transformer (ViT) foundation models- large networks trained on large and diverse dalasets with self-supervise issd approaches also show strong performance OOD detection, and could address these challenges. This paper presents Mixture of Exemplars (MoLAR), an efficient approach tackling OOD detection challenges that is designed to maximise the benefit of training classifier with high quality, frozen, pretrained foundation model backbone. MoLAR provides strong OOD detection per- formance when only comparing the similarity of OOD examples to the exemplars, small set of images chosen to be representative of the dataset, leading to significantly reduced overhead for OOD detection inference over other methods that provide best performance when the full ID dataset is used. Extensive experiments demonstrate the improved OOD de- tection performance of MoLAR in comparison to comparable approaches in both supervised and semi-supervised settings, and code is available at githtb..cooo cww.ub.com/aaee /omannix mwlaammmituurreee mixture- of-exemplars)
promising solution. However,
Introduction
From managing weeds (Olsen et al. 2019), to food safety (Sandberg et al. 2023 to diagnosing cancer [Khellaf et al. 2023), deep learning is used extensively in computer vision applications where identifying out-of-distribution (OOD) data, such as plants or food contaminants not present in the training dataset, can be of great importance. While the original methods of training neural networks from scratch resulted in poor correlations between confidence and OOD data (Nguyen et al. 2015), modern foundation models (Qqubb et al.) 2024 models trained on large and diverse datasets using self-supervised learning methods that offer quick training and strong performance even when the backbone is frozen can achieve sound OOD detection results by comparing the distances between in-distribution (ID) and OOD image embeddings.
These sasaaceebbssed OOD detection metrics have been well developed in the literature (Sun et al. 2022), and they can be improved by using techniques that improve the embeddings of the network for OOD detection. For example, CIDER (Ming et al., 2203)) improves OOD detection performance by learning an embedding that tightly clusters classes while also maximising the distance between them, using Mises-Fisher

---

Published in Transactions on Machine Learning Research (8/2025)
C10-C100
C10-TIN
IN200-DTO
C10.DTD
IN200-0ID
C10-MNIST
2200-NNat
C10-SVH
IN DO-NINC
C10-P365
200-558
C100-C10
C100-P365
DINDv2
CIDER
C100-TIN
C100-SVHN
MoLAR
CLO0-OTDCIO0-NNIIT
Figure 1: Effectiveness of OOD detection with exemplars. Comparison of Mixture of Exemplars (MoLAR) against comparable approaches, trained using a frozen DINOv2 ViT-S/14 foundation model back- bone (Oquab et al. 2024). MoLAR outperforms PALM and CIDER across most in-distribution ootiibuutioooouo-oo-- distribution pairs, and improves on the DINOv2 backbone, particularly for datasets not within the DINOv2 training dataset (LVD-142M).
(vMF) mixture modelling approach. PALM (Lu et al. 2024) extends on this method to enable each class to be modelled by multiple mixture components, further improving OOD detection performance.
While effective, these methods find it challenging to learn the vMF cluster centres and require long training times. In CIDER (Ming et al., 2023), ; the cluster centres are not directly optimised using backpropogation. but are instead learned using an Exponential Moving Average (EMA) approach. PALM (Lu et al., 2024] also learns the cluster centers using this method, and assigns the mixture components to images within batch using the iterative Sinkhorn-Knopp algorithm, adding further complexity. PALM and CIDER also do not use the learned cluster centers for OOD detection, and instead employ a KNN (Sun et al. 2022) or Mahalanobis (Lee et al., 2018) OOD metric based on sample of the ID training data. This is missed opportunity in making OOD detection more efficient. If distance to the vMF clusters could be used to identify OOD examples effectively, there would be no additional cost associated with using the model to both classify images and also screen for OOD data.
It is also unclear whether these approaches are able to synergise with foundation model backbones. PALM [L et al. 2024) and CIDER (Ming et al. 2023) were both designed to train convolutional neural network (CNN) backbone with projection head a ML. network with few layers-an and their performance has not been previously tested with a frozen pretrained Vision Transformer (VIT) (Dosovitskiy et al. 2021). Nevertheless, there are other similar deep learning approaches that could also be adapted to OOD detection, that can train vMF cluster centres within a mixture model framework simply and efficiently. In the PAWS (Assran et al. 2021 semi-supervised learning approach, cluster centres are defined by the embeddings of a small set of labelled data and models are trained using a consistency based loss.
To solve these challenges, this paper presents Mixture of Exemplars (MoLAR), an OOD detection approach inspired by PAWS (Assran et al. 2021) that uses compplars-pariculle images within the training dataset that define the centres of the vMF mixture model components to obtain state-of-the-art results in OOD detection. MoLAR is able to obtain strong performance (Fig. [ using only distances from exemplars to determine a point is OOD, making testing for OOD data free and efficient in comparison to other methods. Further, MoLAR provides unified way of tackling OOD detection challenges in both supervised and semi-supervised settings, while still achieving competitive performance. In this paper, we:
2

---

Published in Transactions on Machine Learning Research (8/2025)
Describe MoLAR, an approach to OOD detection that can handle both supervised and semi- supervised settings and is designed to be trained with a frozen foundation model backbone. Unlike previous comparable approaches such as PALM and CIEER, MoLAR is designed to identify OOD examples in a way that is no more computationally expensive than making a class prediction.
Demonstrate MoLAR obtains state-of-the-art OOD detection performance in both supervised and semi-supervised settings employing the OpenOOD (Yang et al. 2022 benchmarks. Further, we find MoLAR obtains similar performance when only exemplars are used for OOD detection, which provides for significantly reduced overhead for OOD inference. Other methods such as PALM and CIDER have reduced performance in this case.
Show that MoLAR-SS, the first semi-supervised method that obtains similar OOD detection per- formance in comparison to supervised approaches, obtains competitive accuracy with state-of-the-at semi-superoised learning models. Further, the design of MoLAR-SS contributes to strong semi- supervised accuracy across a broader range of datasets.
2 Related work
tut-of-distribution detection. The problem of out- -iiio---tistiiittinnn (OOD) dctection in deep learning was introduced when it was observed that neural networks Lend to provide overconfident results when making predictions on images with previously unseen classes that are unrecognizable (Nguyen et al 2015). OOD detection methods are designed to detect when inference is going to be made on such data, so an appropriate
alternative action can be laken TTo et al. 2023
Representational approaches such as PALM (L et al. 2024 and CIDER (Ming et al. 2023 are designed to learn neural networks that produce an embedding of an image that more accurately identifies OOD images under particular OOD detection metrics. Key metrics include KNN (Sun et al., 2022), which uses the distance of point to its 8tth nearest neighbour in sample of the training dataset; and the Mahalanobis distance (Lee) et al., 2018), a measure of distance between a point in high dimensional space and a distribution derived from the training data, that uses class means and pre-calculated covariance matrix. Other works improve OOD detection in a variety of ways, from using particular types of image augmentations (Hendrycks et al. 2022), employing ensembles [Lakshminarayanan et al. 2017 to adding corrections to the logits to better capture OOD examples
(Wei et al., 2022).
This paper focuses on improving supervised representational OOD detection methods, like PALM and CIDER, where annotated ID labelled data is available for training. In this context benchmarking OOD detection approaches can be challenging, as there are a large number of different ID and OOD dalaset pairs that can be used. This paper follows the OpenOOD benchmarks (Yang et al. 2022). to ensure better comparability with other works in this space. While many other works in representational OOD detection focus on using self-supervised approaches TTack et al., 2020 Li et al. 2024a; Seifi et al. 2024 Isaac-Medinal et al. 2024); vMF clustering approaches like PALM and CIDER provide an intuition for why these repre- sentational approaches work through tightly clustering in-distribution data. It explored in this work if these techniques can be used in conjunction with foundation models, which are trained using self-supervised approaches and have strong OOD detection performance, for further improvements.
Foundation models. In computer vision, foundation models can be used as functional maps from the image domain to representation space that captures the semantic content of the image with minimal loss of information. The degree to which semantic content is retained can be tested by undertaking downstream tasks within the representation space, such as image classification, segmentation and object detection (Rani ct al. 2023 Current state-of-the-art foundation models include methods that combine several self-supervisod approaches on large datasets, such as DINOv2 (Oquab el al.) 2024). and other approaches that use language- image pretraining approaches such as CLIP Radford et al. 2021 Cherti et al. 2023).
Semi-supervised learning. In semi-supervised learning (SSL), a model is trained to perform particular task, such as image classification, using small set of labelled data and a much larger set of unlabelled data. By taking into account the distribution of the unlabelled data within the learning process, SSL methods can
3

---

Published in Transactions on Machine Learning Research (8/2025)
Angmented views of image 2, 2
Frozen backbone
Image embeddings 2
Class pro- diction p.pt
Projection head
Supervised loss H ((.p) H (g.p")
ge
Frozen backbone
Exemplar embeddings
Semi- supervised loss II plip ).p)
Exemplars
Projection head
Ze E Do
de
2e
Figure 2: Training framework for MoLAR. Using vMF mixture modelling approach within the image embeddings, MoLAR makes classifications on the basis of set of exemplars with known labels. In the supervised case, a cross-entropy loss is employed. In the semi-supervised case, predictions are averaged and sharpened to provide a strong supervision signal.
Augmented views of image 2. x
Frozen backbone f
Backbone embedddings f(rt.(xtt)
Image embeddings 2,
vMF- SNE loss (Pl(())())
Projection head
80
SKMPS exemplar
selection
Figure 3: Initialisation framework for MoLAR. The SKMPS strategy is used to select representative exemplars from the dataset. The vMF-SNE approach is used to initialise the embeddings of the projection head to reflect the local structure of the high quality foundation model embeddings.
train more accurate models compared to approaches that only utilise the labelled data within this context
(Van Engelen & Hoos 2020). The earliest SSL approaches used pseudolabelling (Lee et al. 2013). and
number of modern approaches have extended on this idea such as FixMatch (Sohn et al.]
2020), , which
employs image augmentation to efficiently propogate labels. Further methods have improved on FixMatch by better accounting for the geometry of the image embeddings (Li et al. 2024b Wang et al. 2022c Cai
jtt al. 2022 Yang al. 2023). Of all these approaches, PAWS (Assran et al.) 2021 has striking similarities CIDER and PALM. All three methods use a vMF mixture modelling approach, though where PAWS uses the embeddings of the labelled data. to generate cluster centers, CIDER and PALM introduce them learnable weights. Notably, where CIDER and PALM are designed to learn compact representation of the training data, PAWS uses consistency based loss where labels are swapped between different views of an image to provide a semi-supervised learning signal.
3 Methodology
Motivation. Using exemplars- -insess selected from the training data whose embeddings define vMF clus- ter centres offers a number of advantages over directly introducing cluster centre embeddings additional learnable weights, is done in PALM and CIDER. These advantages include (i) exemplars have strong initialisation, being defined by data itself, (ii) exemplars can be augmented in the same fashion as the train- ing data, which prevents mismatch under augmentation, (iii) exemplar embeddings can still be fine-tuned as their embeddings under the image of a neural network are used, allowing their positioning relative to other images to change and (iv) the position of exemplar embeddings automatically changed with each gradient update the network, allowing them to be efficiently learnt through backpropagation. This latter point removes the need for cluster centre embeddings to be learned using the EMA approach employed by PALM and CIDER.
4

---

Published in Transactions on Machine Learning Research (8/2025)
Notation. This paper considers OOD detection setting, with ID dataset D which is used to train the model, with the aim of being able to detect unseen OOD data D In this work, the ID data has a subset of points called exemplars De C D, which can be selected randomly or using particular strategy. We further consider a frozen pretrained transformer f and a trainable projection head 9o. where the parameters are optimised using stochastic gradient descent. on batches of images with labels (2,y) E D. For an image batch we use Fi, Vi refer to specific examples.
Supervised MoLAR. We define MoLAR as mixture model with von Mises- Mises-Fisher components
p())D.) = Del Σ k(); S.EDD
(1)
k(2 8.) x exp (3j 2//T)
(2)
where 2, - (o(s( Inputs are normalized onto the unit sphere 2, = ||l and T is a temperature hyperparameter that sets the diffuseness of the distribution. For particular class y, we have
1
p(2 D.)
Σ k(2;2;)
(3)
D
IEEDY
where D are the exemplars of class y. Using Bayes' rule provides a way to classify new examples with plul2, Da) p(2ly, De)p(v)
(4)
p(2)
= a( 2r/T)
(5)
where o-)) is the softmax function, we assume uniform prior p(y), and use 2, to refer to the matrix of the normalized exemplar embeddings. Here & is the matrix of the one-hot encoded exemplar class labels. This provides for a straightforward maximum log-likelihood estimation approach for training the model
Lsupervised De;
Σ Z.NEDD
logp(U) De)
(6)
which is equivalent to a cross entropy loss.
Related methods: PALM and CIDER. MoLAR uses the same model definition as CIDER (Sun et al. 2022) and PALM (Lu et al. 2024h, but rather than the vMF cluster centres being introduced as learnable weights, they are defined by the embeddings of the exemplars in De- Further, MoLAR does not include the second loss term in PALM and CIDER that encourages separation of the cluster centres for different classes. This term was found not to be necessary obtain strong OOD) performance with MoLAR Eq. (6) already encourages classes to be well separated, and it was also found to hurt classification accuracy (Table S16
Semi-Supervised MoLAR. In the semi-supervised setting, there are only labels for the exemplars D.. We introduce semi-supervised MoLAR (MoLAR-SS) to deal with this case. Through adapting the PAWS (Assran et al. 2021 semi-supervised learning approach, is found that averaging and sharpening predictions over multiple augmented views x, xt similar to MixMatch (Berthelot et al. 2019). provides strong performance
D
Lxemi-supervvsed
Σ
H
Pi + P
Pi
(7)
2|D]
2
i=1
(pl
+ p 2
+ H
.PP
-H(T),
where p; = p(yl D.) as given by Eq. 5 and (p, = = E, Ps
log qi is cross-entropy loss. The function
p(-) is a sharpening function with temperature hyperparameter T
p //TT
p(p):
(8)
E 1/T
5

---

Published in Transactions on Machine Learning Research (8/2025)
and in the final expression, p= images, which encourages the predictions to be balanced across the classes.
Σ! P;
P 2
is the average of the sharpened predictions on the unlabelled
Related methods: PAWS. MoLAR-SS is similar to PAWS (Assran el al. 2021; Mo et al. 2023 with several key differences. These include (i) replacing the original consistency based loss with an averaged and sharpened loss; (ii) removing the additional classification head, reporting accuracy only using Eq. (5 ; and (iii) considering exemplar selection strategies and initialising the projection head with the foundation model embeddings, as outlined in the next two sections. These contributions provide improved semi-supervisey accuracy and OOD detection performance in the context of training with a frozen foundation model backbone.
Exemplar selection strategics. In this step, the selection of exemplars D, from the whole dataset D is considered. The goal is to select the set of exemplars that are most representative of the data as evidenced by better downstream accuracy and OOD detection performance. In the default case, exemplars are generally chosen randomly, stratifying by class so that an equal number images from each class are selected. However, this requires all the data be labelled in the first instance, which is at odds with a semi-supervised learning context.
This work introduces a simple k-means exemplar selection (SKMPS) strategy. This approach provides for diverse sampling of exemplars from a given training dataset in three steps: (i) calculate the normalised foundation model embeddings of the images, then (ii) cluster them into &o clusters, where k is the desired number of exomplars (i.c. number of labelled images in a semi-supervised sctting). And (iii) sclect the image closest to the centroid of each cluster as an exemplar.
We choose k-means clustering (Lloyd 1982) for the clustering algorithm in the second step as is scalable and allows for the selection of fixed number of clusters. The k-means algorithm minimises the sum of squared euclidean distances to the cluster centroids [Loyyd] 1982). By normalizing the image embeddings given by the foundation model in the first step, the squared euclidean distance becomes proportional to cosine distance, which is used for determining image similarity with foundation models (Oquab et al. 2024] Radford et al.) 2021). In this sense, the SKMPS procedure can be interpreted as identifying clusters of visually similar images, and selecting the most representative image from each cluster as an exemplar.
Related methods: USL The SKMPS exemplar selection strategy similar to Unsupervised Selective Labelling (USL) (Wang et al. 2022b), which is proposed to improve semi-supervised learning performance by selecting a better set of labelled images in the first instance. The key difference between the two approaches is that SKMPS does not require estimating the density of the image embeddings from the dataset, which USL uses to select images from the denser regions of each cluster. This makes SKMPS simpler to apply and more computationally efficient, while simultaneously sampling a greater diversity of images in comparison to USL (Fig.
Projection head initialisation. Tf a pretrained backbone model I is used, which provides high quality representation of the dataset, a good starting point for the projection head ga should reflect the local structure of the data under the image of f. This is not a given if the weights of the projection head are randomly initialized, and without placing restrictions on its architecture and the dimensionality of the latent space of f and go, the projection head cannot be initialised as an identity mapping. For example, the projection head architecture employed in PAWS, and also this work, is three layer Multi-Layer Perceptron (MLP) network with ReLU activations and nitch--ommllisttion. This introduces lineliiya into the network which will alter the input embeddings even if the weights of each layer are initialised using the identity.
Instead, a Stochastic Neighbour Embedding (SNE) (Hinton & Roweis 2002) approach is proposed. This involves building two probability distributions P,Q using a kernel that describes the similarity of data points in the origin space (under the image of f) and the target space (under the image of go o f). The idea is for images 2,, in D, Pij E P will have high probability they are similar and low probability they are dissimilar. The target distribution Q in the target space can then be fit. to the distribution in the origin
6

---

Published in Transactions on Machine Learning Research (8/2025)
space P by minimizing the KL divergence
DKL (PI()) = Σ
Pij log
Pij Z5
(9)
where Pij and ęū describe the similarity between points in the origin and target space. Inspired by the definition of MoLAR as vMF mixture model, vMF kernel is used to calculate P.Q as described in Appendix A providing an effective method of initialising the weights of the projection head to reflect the foundation model embeddings.
4 Experiments
4.1 Experimental setup
OOD benchmarks.
The experiments closely follow the OpenOOD (Yang el al. 2022 benchmarks, which
use specific set of near-OOD datasets and far-OOD datasets for each ID dataset. For CIFAR-10, the
near-OOD datasets are CLEAR-100 (Krizhevsky et al.) 2009) and Tiny ImageNet (Le & Yang,
2015). The
far-OOD images are Places365 (Zhou et al.) (017a), DTD (Cimpoi et al.) 2014), MNIST (Deng
2012 and
SVHN Netzer et al. 2011 These the same for CTFAR-100, which instead uses CIFAR-10
near- and NINCO
OOD dataset. For ImageNee-2200, the near-OOD datasets are SSB-hard (Bitterwolf et al.
2023
Vaze et al., 2022], and the far-OOD images come from iNaturalist (Van Horn et al. 2018), OpenImage-O
Wang et al.
2022a and DTD (Cimpoi et al. 2014).
OOD detection metric. A KNN OOD metric (Sun et al. 2022 is used throughout the paper, which measures OOD distance for an example image based on the closest training examples in the normalized embedding space. The KNN OOD metric for an example image x is given by cosine distance
G(r;a,k)=11 - 1 1|1 N (z; Da)
(10)
where NNR.gof is the normalised embeddings of the tthh nearest neighbour to x in Da within the feature space of the network (g o f). The parameter a the proportion of the training dataset that is used for finding the nearest training examples (D, D). Best performance for the KNN metric is generally reported using a 1.0 (the whole training dataset is used) and & (only the distance to the closest in-distribution training point is used) (Sun et al. 2022). These the KNN hyperparameters that are used throughout this paper, unless stated otherwisc. Computing the KNN metric is much more efficient with a smaller at the cost of performance, and we explore using the exemplar points D. selected with SKMPS instead of D., to reduce OOD detection overhead with minimal performance loss.
The performance of OOD dotection is mcasured using the Area Under the Receiver Operating Characteristic curve (AUROC), employing this KNN OOD distance metric to classify between ID and OOD examples, done in previous works (Yang et al. 2022
Semi-supervised benchmarks. Several semi-supervised learning benchmarks are also considered test the performance of MoLAR-SS. We focus on the well-studied CIFAR-10 (10 classes), CIFAR-100 (100 classes) [Krizhevsky al. 2009) and Food-101 (101 classes) (Bossard et al.
2014h benchmarks, but also include some contextual results on EuroSAT (10 classos) (Helber et al. 2019 Flowers-102 (102 classes) Nilssbcck & Zisserman 2008). Oxford Pets (37 classes) (Parkhi el al. 2012) and DeepWeeds (2 classes) (Olsen el al. 2019). While DeepWeeds has originally 9 classes, we treat it as a binary classification problem to identify weeds versus not weeds, due to the size of the negative class. For EuroSAT and DeepWeeds, where preset validation splits were not available, we sampled 500 images per class, and 30% of the images for the 9 original classes respectively.
Exemplar selection. When sampling exemplars using SKMPS, USL or using a random class-stratified sample, (CIFAR-10), (CIFAR-100), (EuroSAT), 27 (DeepWeeds binary), 2 (Flowers-102), (Food- 101), (Oxford Pets) and 3 (TmageNet-200) images per class are selected. The size of these sets of exemplars
7

---

Published in Transactions on Machine Learning Research (8/2025)
are selected to be in line with previous semi-supervised learning results, and also sufficient to sample every class as explored for key datasets in Fig. 59 in the supporting information. Due to the noise in the results when reporting accuracy in semi-supervised learning settings, we report the mean of five runs and the standard deviation for all datasets except ImageNet-200.
Hyperparameter selection. For CIDER, PATM and PAWS, it found that the model specific hy- perparameters used with ResNet backbones also worked well when using DINOv2 backbone. For MoLAR the same hyperparameters as PAWS were used. Other hyperparameters, such as batch size, learning rates, schedulers, optimisers and image augmentations, were kept the same between all models and are detailed in full in the github repository. An ablation study was further undertaken on the hyperparameters introducod as part the vMF-SNE initialisation step in Appendix [.2 in the supporting information. The hyperpa- rameter configurations for CIDER and PALM followed the differences these methods used across datasets, whereas the hyperameters for MoLAR were unchanged across datasets.
4.2 Results
Table 1: OOD detection. Comparison of representational approaches using a DINOv2 VIT-S/14 frozen backbone on OpenOOD benchmarks (Yang al.] 2022) with KNN metric (Sun et al. 2022). We use to refer to the performance of the backbone embeddings (without a projection head).
Backbone
Methods
Datasets
CIFAR-10
CIFAR-100
IN-200
Near-OOD
Fa-OOD
Nea-OOD
Fa-OOD
Near-OOD
Fa-OOD
ResNets
CIDER Ming
2023 Lu al
2024
90.7
91.7
72.1
80.5
80.58
90.66
(finttmed)
PALM
La ct al.
93.0
98.1
76.9
93.0
DINOv2 VIT-S/14
95.8
98.1
89.9
92.2
86.3
93.1
(frozen)
CIDER
92.4
97.6
76.5
91.2
86.7
96.2
PALM
91.33
98.6
86.
95.7
89.1
96.7
MoLAR
95.4
99.1
94.9
97.4
90.7
96.7
MoLAR competitive with previous OOD detection methods. Table Table[ shows that MoLAR pro-
vides strong performance in comparison to previous methods, particularly for near-OOD datasets. Overall, CIDER and PALM have improved performance with frozen DINOv2 backbone, but they can struggle to match the performance of the backbone itself near-OOD detection for some datasets. Conversely, Mo- LAR is able to significantly improve on the near-OOD performance of the backbone in every case with the exception of near-OOD CIFAR-10 CIEAR-10-providing providing particularly strong performance on CIFAR-100.
Table 2: OOD detection with exemplars. Comparison of representational approaches using DINOv2 VIT-S/14 frozen backbone OpenOOD benchmarks (Yang et al.) 2022) with KNN metric (Sun et al. 2022), employing a consistent set of exemplars obtained with SKMPS. We select 40 exemplars for CIFAR-10, 400 for CIFAR-100 and 600 for IN-200. We use - to refer to the performance the backbone embeddings (without a projection head), and bold the best fully supervised and the best semi-supervised methods separately to reflect that semi-supervised OOD detection is more challenging problem. Cases are left. unbolded if they do not improve upon the backbone embeddings.
Backbone
Methods
Datasets
CIFAR-10
CIPAR
IN-200
Near OOD
Far OOD
Near-OOD
Near 0OD
OoDDOOD
Near-OOD
Near OOD
Far-OO OOD
DINOv2 VIT-S/14
Self-supervised
93.9
91.7
88.3
89.2
87.1
96.4
(frozen)
Supervised
CIDER
90.7
96.8
78.6
91.1
86.1
95.5
PALM
91.7
97.1
85.2
91.5
88.2
96.0
MoLAR
94.4
98.0
95.5
97.1
91.4
96.7
Semii- supervised
PAWS
82.6
90.5
90.6
94.5
88.9
95.1
MoLAR-SS
93.1
98.0
95.2
96.3
92.5
96.3
8

---

Published in Transactions on Machine Learning Research (8/2025)
Table 3: Timings and OOD detection performance comparisons. Combined results for MoLAR and PALM from Table and Table metric, and the SKMPS subset.
with timing comparisons between using all training data for the KNN
Method
McLAR
PALM
Dataset
KNN Set
Images
OOD Overhead (ins)
Near OOD
Far Ra-OOOD
Near OOD
Far Mor-OOO)
CIFAR-10
All
50,000
0.15
95.4
99.1
94.3
98.6
SKMPS
40
0.0002
94.4
98.0
91.7
97.1
CIFAR-100
AlI
50,000
0.15
94.9
97.4
86.4
96.7
SKMPS
400
0.001
95.5
97.1
85.2
94.5
Image Net-200
All
258,951
0.75
90.7
96.7
89.1
96.77
SKMPS
600
0.002
91.4
96.7
88.2
96.0
MoLAR. retains strong performance when only using exemplars to detect OOD examples. Table 2 shows the performance of different OOD detection approaches when the set of exemplars selected by SKMPS is used as the ID data. MoLAR relains strong OOD detection performance, and for near- OOD CIFAR-100 and ImageNet-2200 performance is similar to using the full training dataset as ID. The performance of CIDER and PALM fall in every case except for ncar-OOD CIFAR-100. We also observe strong performance for MoLAR-SS, which performs similarly to MoLAR, providing stronger performance than the fully supervised CIDER and PALM methods. Compared using the full training dataset as ID, using exemplars leads significantly faster OOD inference across all datasets and allows OOD detection with minimal overhead (Table 3 For MoLAR and MoLAR-SS, the distance to these exemplars is already computed in the process of making class prediction, making OOD inference free in this case while still providing strong performance.
Table 4: Semi-supervised learning. Performance of MoLAR versus PAWS and other methods. Compa- rable model sizes in each column are underlined, and the best performing model of these is bolded. Entries noted with * use a larger labelled dataset (1% of the data) than in our benchmarks.
Methods
Backbone
Datasets
C10
C100
Food
Preehatch Wang al.
2022c
WRN 28 2/8
1.5/22MM
95.1
62.0
+SemiRewaad [L
20216
VIT-S-P4-32
21M
84.4
Bim Cai ct al.
ViT-Base
86M
82.1*
PAWS
DINOv2 VIT-S/14 (f)
21M
92.9=2.1
70.9=115
75.1422.0
MoL.ARSSS
DINOv2 VFT-S/14 (f)
21M
95.9++0.0
77.3=0.4
81.7+0.7
DINO VIT-B/14 (T)
8GM
98.120.1
85.5=0.3
87.2=0.8
DINOv2 VIT-L/14 (E)
300M
99.220.0
89.8=0.2
90.11:0.8
MoLAR-SS is competitive with previous semi-supervised learning methods. Table 4 shows that across range of benchmarking datasets MoLAR-SS outperforms PAWS using the same frozen backbone model, and is competitive with other methods the litcrature that train models of similar sizes and using the same number (or greater) of labelled images. MoLAR-SS outperforms FreeMatch (Wang et al.] 2022c) on CIFAR-10 by 0.8% on average with the smallest DINOv2 model available, and also outperforms Semi-ViT [Li et al.] 2024b by 5.1% using a much smaller labelled set. SemiReward (Li et al. 2024b) obtains better results with similar model size for CIFAR-100, but in contrast to MoLAR this approach trains all model weights whereas MoLAR-SS uses a frozen backbone. MoLAR-SS outperforms SemiReward (+1.1%) with the ViT-B model, which takes about two hours of GPU time using two Nvidia V100 GPUs, compared to the 67 hours of compute time for SemiReward on a single more powerful Nvidia A100 GPU [L al. 2024b).
SKMPS obtains competitive performance in comparison to USL on downstream semi- supervised classification tasks. Table 5 shows that using exemplar selection strategies improves the performance of both PAWS and MoLAR-SS, and that the best performing approach across both methods and all three datascts considered is the SKMPS strategy. While the results between USL (Wang et al. 2022bb and SKMPS similar for C1FAR-100, significantly better results obtained on the CIFAR-10
9

---

Published in Transactions on Machine Learning Research (8/2025)
Table 5: Exemplar selection strategies. Comparison of different exemplar selection strategies with MoLAR-SS and PAWS.
Method
Exemplar sel. strat.
Datasets
C10
C100
Food
PAWS
Random Strat.
92.942.1
10.9:115
75.1
USL
93. 93.6+004
74.4++0.6
79.1#1.1
SKMPS
94.4:10.5
74.8
80.5::066
MoLAR-SS
Random Strat.
95.8++0.1
75.740.9
75.9+1.88
USL
95.8:10.1
77.51004
80.0=1.0
SKMPS
95.9:10.0
77.3:0.4
81.7200.7
(a) PAWS
(b) Random Init.
(c) vMF-SNE
(d) MoLAR-SS
Figure 4: Visualising the impact of vMF-SNE initialisation. 1-SNE visualisation of the projection head embeddings at various stages of the training process for Deep Weeds. Blue is the weed present class, and orange is the negative class. The arrows represent the order of training steps.
dataset using PAWS, and on the Food-101 dataset using both PAWS and MoLAR-SS. SKMPS also provides more consistent results than USL for the Food-101 dataset, with a smaller variance in performance.
Table 6: Semi-supervised learning additional datasets. Comparison of PAWS and MoLAR-SS wider range of benchmarks for semi-supervised learning. SKMPS is used for IN-200, while the other datascts employ random class stratified exemplar selection strategy.
Method
Datasets
EuroSAT
DeepWeeds
Flowers
Pets
IN 200
PAWS
91.4=0.3
72.64445
98.54.077
90.241.
89.1
MoLAR-SS
94.2=0.1
87.8+1.5
98.940.6
91.6:0.2
91.9
vMF-SNE initialisation can be important for the success of semi-supervised learning with a projection head. Table the performance of PAWS and MoL.AR-SS is explored across a broader range of datasets. some cases, similar performance between the two approaches is found, while for others there is drastic difference. This is particularly notable for the DeepWeeds Weeds dataset, where the vMF-SNE initialisation is important for obtaining good results. This be seen in Fig. 4 which shows that in Deep the randomly initialised projection head clusters the data poorly in the first instance. As result, training with PAWS results in mediocre performance and a mixing of the two classes (Fig. Ia), while training using the YMF-SNE initialised head (Fig. 4ch results in better separation (Fig. 4dh and better performance.
SKMPS and vMF-SNE intialisation contribute OOD detection performance. Table 7 shows that vMF-SNE initialisation and SKMPS contribute to improving OOD performance with both MoLAR and MoLAR-SS.
MoLAR learns compact representations. Fig. shows that MoLAR-SS learns a much more compact representation around the labelled exemplars in comparison to PAWS, which is further supported by the rosults Table 2 and Table 7 This can be attributed MoLAR-SS using an averaging and sharpening approach across views, rather than consistency based loss, that encourages representations compact while also providing superior semi-supervised learning performance. It is found that the consistency
be more
10

---

Published in Transactions on Machine Learning Research (8/2025)
Table 7: Out of distribution detection ablation. OpenOOD results for MoLAR with and without vMF- SNE initialisation and SKMPS exemplar selection. By default results are reported with these components.
Methods
Datasets
CIFAR-10
CIFAR-100
Near MODD
Far OOD
Nrar OOD
Far Ba=OOOD
MoLAR
89.3
93.8
92.1
96.1
+vMF-SNG
89.6
95.0
94.3
96.7
+SKMPS
94.4
98.0
95.5
97.1
MoLAR-S -S-
91.4
95.6
93.0
96.4
+vMF-SNE
93.2
96.6
93.6
95.6
+SKMPS
93.1
98.0
95.2
96.3
(a) PAWS
(b) MoLAR-SS
Figure 5: Visualizing improvements in OOD detection. t-SNE visualisation of the projection head embeddings and density plots of minimum cosine distance to exemplar (o) for in-distribution CIFAR-10 (blue) and OOD CIFAR-100 (orange).
based loss can in fact result in performance degradation over training run (Fig. S8 This is result of different views on the class boundaries having highly confident, but different, sharpened class probabilities. For PAWS this would cause different views of the same image to be given differont labols during training, resulting instabilities the class boundary. However, MoLAR-SS uses the same potential label for each view of an image providing a more consistent supervision signal.
Proportion complete
CIFAR -100
Food-100
1.00
0.75
Strategy
0.50
SKMPS
0.25
USL
0.00
100
200
300
400
500
101
202
303
404
505
Number of images selected for labelling
Figure 6: Exemplar selection diversity. Proportion of exemplar selection runs that sample all classes on different budgets k.
SKMPS selects more diversity in comparison to USL. Fig. 0 shows that SKMPS samples more classes than USL on small budgets. For example, for selecting 202 exemplars on the Food-101 dataset, USL never samples all of the classes in 20 runs whereas SKMPS samples all the classes in 25% of cases. This shows that SKMPS better at sampling a diverse set of imagery, providing better results on downstream classfication and OOD detection performance. Further results are shown Appendix B in the supporting information.
11

---

Published in Transactions on Machine Learning Research (8/2025)
5 Discussion
Relationship to prototypical approaches. MoLAR, CIDER (Ming et al. 2023). PALM (Lu et al, 2024) and PAWS (Assran et al. 2021 can be considered protolypical deep learning approaches, which learn metric semi-metric space for classifying items based on their proximity to class prototypes. In this context, the exemplars used in MoLAR are equivalent to prototypes. Protolypical approaches have been used in various contexts such as improving OOD generalisation (Bai et al. 2024), robust classification (Yagg
ct al.
2018), few-shot learning (Snell et al. 2017) and in multi-modal applications (Radford et al., 2021
They
have also been applied to OOD detection in other works, to smooth logits for OOD detection (Sun
et al.
2024) or to Irain classifiers employing a set of protolypes derived from concept similarities improve OOD detection performance (Gong al., 2025). This latter work is similar to the vMF clustering approach employed in CIDER, PALM and MoLAR, but rather than learning prototype represcntations during training, they are learnt prior using ual similarity in WordNet and fixed while training the neural network. Where CIDER and PALM learn prototypes parametrically, MoLAR refines this process by selecting images from the training dataset as exemplars using strategy such as SKMPS, and directly learning the embeddings of these exemplars through propaapopa,,,onn, as detailed in Section
Limitations. MoLAR designed to provide optimal performance with foundation model backbone. While these models generalise well to many contexts, they can still offer poor performance images that are very different from their training dataset (Zhang et al. 2024). As the performance of MoLAR for OOD detection improves on the performance of the chosen backbone, it is likely to also perform poorly in these settings. Furthermore, as MoLAR uses a frozen foundation model it is expected that for problems where a lincar head fails to obtain good performance, MoLAR will also fail to perform (Chen et al. 2021).
Exemplar selection strategies such as SKMPS can be challenging to apply to training datasets with large class imbalances, or when there are large number of classes. They can fail to adequately sample classes with small number of training examples, and larger exemplar sets may need to be sampled in order to select atleast one exemplar from each class when more classes are present. (see Fig. S9 in the supporting information). In some cases it may be better to apply SKMPS to sample fixed mumber of exemplars from each class dircctly, if full class information is available for the given datasct.
6 Conclusion
This paper proposes MoLAR, unified approach to training supervised and semi-supervised image classifiers that provides state-of-the-art OOD detection results. MoLAR is designed to be used with frozen pretrained foundation models, employing parametric vMF-SNE initialisation and simple k-means exemplar selection (SKMPS) to obtain the maximal benefit from the high-quality embeddings that these models make available. This enables significantly shorter training times in comparison to other OOD detection methods that finctune a CNN backbone, and MoLAR can obtain strong OOD detection performance by comparing OOD examples only to a small set of exemplars. This allows for efficient OOD detection, that is more expensive than making class prediction. Further, MoLAR-SS obtains competitive semi-supervised learning results in comparison to other approaches designed only to maximize performance.
Acknowledgements
We acknowledge the Traditional Custodians of the unceded land which the research detailed in this paper undertaken, the Wurundjeri Woi Wurrung and Bumurong peoples of the Kulin nation, and pay our respects to their Elders past and present. This rescarch was undertaken using the LIEF HPC-GPGPU Facility hosted at the University of Melbourne. This Facility was established with the assistance of LIEF Grant LE170100200. This research was also undertaken with the assistance of resources and services from the National Computational Infrastructure (NCT), which is supported by the Australian Government. Evelyn J. Mannix was supported by a Australian Government Research Training Program Scholarship to complete this work.
12

---

Published in Transactions on Machine Learning Research (8/2025)
References
Mahmoud Assran, Mathilde Caron, Ishan Misra, Piotr Bojanowski, Armand Joulin, Nicolas Ballas, and Michael Rabbat. Semi-supervised learning of visual features by non-paramettically predicting view as- signments with support samples. In Proceedings of the IEEE/CVF International Conference on Compuler Vision, pp. 8443 8452, 2021.
Haoyue Bai, Yifei Ming, Julian Katz-Samuels, and Yixuan Li. Provable oottoff-disribuution generalization in hypersphere. In The Twelfth International Conference on Learning Representations, 2024. URL https:
//openreriew.net/fooee wtt.:r/ooooorrrr////aa333222
David Borthelot, Nicholas Carlini, Ian Goodfellow, Nicolas Papernot, Avital Oliver, and Colin A Raffel. Mixmatch: A holistic approach to semi-supervised learning. Advances in newral information processing systems, 32, 2019.
Julian Bitterwolf, Maximilian Müller, and Matthias Hein. In or out? fixing imagenet out-of-distribution detection evaluation, 2023.
Lukas Bossard, Matthieu Guillammin, and Lue Van Gool. Food-101-mining discriminative components with random forests. In Computer Aesion-ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Port VI 13, pp. 446 461. Springer, 2014.
Zhaowei Cai, Avinash Ravichandran, Paolo Favaro, Manchen Wang, Davide Modolo, Rahul Bhotika, Zhuowen Tu, and Stefano Soatto. Semi-supervised Vision Transformers at scale. Advances in Neural Information Processing Systems, 35:25697-257100 2022.
Ting Chen, Calvin Luo, and Lala Li. Intriguing propertics of contrastive losses. Advances in Neural Infor- malion Processing Systems, 34:11834 -1118844-1185,,, 2021.
Mehdi Cherti, Romain Beaumont, Ross Wightman, Mitchell Wortsman, Gabriel Ilharco, Cade Gordon, Christoph Schuhmann, Ludwig Schmidt, and Jenia Jitsev. Reproducible scaling laws for contrastive imngu learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2818-2829, 2023.
Mircea. Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamod, and Andrea Vedaldi. Describing textures in the wild. Proceedings of the IEEE conference on computer vision and pallern recognition, pp. 8606-3613, 2014.
Li Deng. The MNIST database of handwritten digit images for machine learning research [best of the web). IEEE signal processing mogazine, 29(6):141-188 142, 2012.
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai Thomas Un- terthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference Leurning Represenlations, 2021.
William Falcon and The PyTorch Lightning team. PyTorch Lightning, 2019. URL https://github.coo com/ Lightning-AI/// AIriigggtAAIiigiiiinnngg
Mingrong Gong, Chaoqi Chen, Qingqiang Sun, Yue Wang, and Hui Huang. -ft--f-disttibution detection with prototypical outlier proxy. In Proceedings of the AAAT Conference on Artificial Intelligence, volume 39, pp. 16835-16843, 2025.
Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damían Borth. EuroSat: A novel dataset and deep learning benchmark for land use and land cover classification. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 12(7):2217-2226, 2019.
Dan Hendrycks, Andy Zou, Mantas Mazcika, Lconard Tang, Bo Li, Dawn Song, and Jacob Steinhardt. PixMix: Dreamlike pictures comprehensively improve safety measures. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 16783- 16792, 2022.
13

---

Published in Transactions on Machine Learning Research (8/2025)
Geoffrey E Hinton and Sam Rowcis. Stochastic neighbor embedding. Advances in neural information processing systems, 15, 2002.
Brian KS Isaac-Medina, Yona Falinie A Gaus, Neelanjan Bhowmik, and Toby P Breckon. Towards open- world object-based anomaly detection via self-supervised outlier synthesis. In European Conference on Computer Vision, pp. 196-214. Springer, 2024.
A Khellaf, L Lando, and QH Trinh. Classical computer vision and modern deep-learning of pancreatic stroma histology features to diagnosc cancer. Annals of Oncology, 34:S1537, 2023.
Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009. URL https://www.cr wtt.::cct..ooooo.etoooooo wttp://www...////t/////aaaaaaaaa 2000eatttrree-0--RRR. Technical report.
Balaji Lakshminarayanann, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncer- tainty estimation using deep ensembles. Advances in neural information processing systems, 30, 2017.
Ya Le and Xuan Yang. Tiny ImageNet visual recognition challenge. CS 231N, 7(7):3 2015. URL https: //cs231n. swwnfort..ddeeeoo htt.aa/ww.....eepapppp/o////a/ap
Dong-Hyun Lee et al. Pseudo-Label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on challenges in representation learning, 1CML, volume 3, pp. 896. Atlanta, 2013.
Kimin Lee, Kibok Lee, Honglak Lee, and Jinwoo Shin. simple unified framework for detocting out-of- distribution samples and adversarial atlacks. In Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
Jingyao Li, Pengguang Chen, Shaozuo Yu, Shu Liu, and Jiaya Jia. MOODv2: Masked image modeling for dittof-distribution detection. IEFF Transactions on Pattern Analysis and Machine Intelligence, 2024a.
Siyuan Li, Weiyang Jin, Zedong Wang, Fang Wu, Zicheng Liu, Cheng Tan, and Stan Z. Li. SemiReward: A general reward model for semi-supervised learning. In The Twelfth. International Conference on Learning Representations, 2024b.
Stuart Lloyd. Least squares quantization in PCM. IEEE transactions on information theory, 28(2):129 137, 1982.
Haodong Lu, Dong Gong, Shuo Wang, Jason Xue, Lina Yao, and Kristen Moore. Learning with mixture of prototypes for out-of-distribution detection. In The Twelfth International Conference on Learning Representations, 2024.
Yifei Ming, Yiyou Sun, Ousmane Dia, and Yixuan Li. How to exploit hyperspherical emboddings for out- of-distribution detection? In The Fleventh International Conference on Learning Representations, 2023.
Sangwoo Mo, Jong- Chyi Su, Chih-Yar Ma, Mido Assran, Ishan Misra, Licheng Yu, and Scan Bell. RoPAWS: Robust semi-supervised representation learning from uncurated data, In The Eleventh International Con- ference on Learning Representations, 2023.
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Ng. Reading digits in natural images with unsupervised feature learning. 2011.
Anh Nguyen, Jason Yosinski, and Jeff Clune. Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 427-436, 2015.
Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In 2008 Sirth Indian conference on compuler vision, graphics 8 image processing, pp. 722 729. IEEE, 2008
Alex Olsen, Dmitry A Konovalov, Bronson Philippa, Peter Ridd, Jake Wood, Jamic Johns, Wesley Banks, Benjamin Girgenti, Owen Kenny, James Whinney, et al. DeepWeeds: A multiclass weed species image dataset for deep learning. Scientific reports, 9(1):2058, 2019.
14

---

Published in Transactions on Machine Learning Research (8/2025)
Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy V. Vo, Mare Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel HAZIZA, Francisco Massa, Alaaeldin El-Nouby, Mido Assran, Nicolas Ballas, Woj- ciech Galuba, Russell Howes, Yao Huang, Shang- Wen Li, Ishan Misra, Michael Rabbat, Vasu Sharma, Gabriel Synnacve, Hu Xu, Herve Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bo- janowski. DINOv2: Learning robust visual features without supervision. Transactions on Machine Learn- ing Research, 2024. ISSN 2835-8856.
Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, and CV Jawahar. Cats and dogs. In 2012 IEEE conference on computer vision and pattern recognition, pp. 3498-3505 IEEE, 2012.
Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d' Alché Buc, E. Fox, and R. Garnett (eds.), Advances in Newral Information Processing Systems 32, pp. 8024 8035.
Curran Associates, Inc., 2019.
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748 8763. PMLR, 2021.
Veenu Rani, Syed Tufael Nabi, Munish Kumar, Ajay Mittal, and Krishan Kumar. Self-supervised learning: A succinct review. Archives of Computational Methods in Engineering, 30(4):2761-27) 2775, 2023.
Sebastian Raschka, Joshua Patterson, and Corey Nolet. Machine learning in Python: Main develop- ments and technology trends in data science, machine learning, and artificial intelligence. orXiv preprint arXiv:2002.0440 2020.
Marianne Sandberg, Sergio Ghidini, Lis Alban, Andrea Capobianco Dondona, Bojan Blagojevic, Martijn Bouwknegt, Len Lipman, Jeppe Seidelin Dam, Tvan Nastasijevic, and Dragan Antic. Applications of computer vision systems for meat safety assurance in abattoirs: A systematic review. Food Control, pp. 109768, 2023.
Soroush Seifi, Daniel Olmeda Reino, Nikolay Chumerin, and Rahaf Aljundi. Ood aware supervised contrastive learning. In Proceedings of the IEFF/CVF Winter Conference on Applications of Computer Vision, pp- 1956 1966, 2024.
Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. Advances in neural information processing systems, 30, 2017.
Kihyuk Sohn, David Berthelot, Nicholas Carlini, Zizhao Zhang, Han Zhang, Colin A Raffel, Ekin Dogus Cubuk, Alexey Kurakin, and Chun-Liang Li. Fixmatch: Simplifying semi-supervised learning with con- sistency and confidence. Advances in neural information processing systems, 03:596-608, 2020.
Yiyou Sun, Yifei Ming, Xiaojin Zhu, and Yixuan Li. Out-of-distribution detection with deep nearest neigh- bors. In International Conference on Machine Learning, pp. 20827-20840. PMLR, 2022.
Zhuohao Sun, Yiqiao Qiu, Zhijun Tan, Weishi Zheng, and Ruixuan Wang. Classifier-hcad informed feature masking and prototype-based logit smoothing for out-of-distriibttion detection. IEEE Transactions on Circuits and Systems for Video Technology, 34(7):5630 5640, 2024.
Jihoon Tack, Sangwoo Mo, Jongheon Jeong, and Jinwoo Shin. CST: Novelty detection via contrastive learning on distributionally shifted instances. Advances in neural information processing systems, 33:11839 11852, 2020.
Leitian Tao, Xuefeng Du, Jerry Zhu, and Yixuan Li. Non-parametric outlier synthesis. In The Eleventh International Conference on Learning Representations, 2023.
15

---

Published in Transactions on Machine Learning Research (8/2025)
Laurens Van Der Maaten. Learning parametric embedding by preserving local structure. In Artificial intelligence and statistics, pp. 384-391. PMLR, 2009.
Laurens Van der Maaten and Geoffrey Hinton. Visualizing data using t-SNE. Journal of machine learning research, 9(11), 2008.
Jesper E Van Engelen and Holger H Hoos. A survey on semi-supervised learning. Machine learning, 109(2): 473-440, 2020.
Grant Van Horn, Oisin Mac Aodha, Yang Song, Yin Cui, Chen Sun, Alex Shepard, Hartwig Adam, Pietro Perona, and Serge Belongic. The iNaturalist species classification and detection dataset. In Proceedings of the TEEE conference on compuler vision and pollern recognilion, pp. 8769 8778, 2018.
Sagar Vaze, Kai Han, Andrea Vedaldi, and Andrew Zisserman. Open-set recognition: A good closed-set classifier is all you need. In International Conference on Learning Representations, 2022. URL https: (lopereeview.ne///.... het.:/oorrumm.dddhh.55.......1..
Haoqi Wang, Zhizhong Li, Litong Feng, and Wayne Zhang. VIM: matching. In Proceedings of the IEFE/CVF Conference Computer Vision and Pottern Recognation (CVPR), pp. 4921 4930, June 2022a.
with virtual-logit
Mian Wang and Dong Wang. VMF-SNE: Embedding for spherical data. In 2016 IEEE International Conference Acoustics, Speech and Signal Processing (ICASSP), pp.
IEFF, 2016.
Xudong Wang, Long Lian, and Stella X Yu. Unsupervised selective labeling for more effective semi-supervised learning. In European Conference on Computer Vision, pp. 427-445. Springer, 2022b.
Yidong Wang, Hao Chen, Qiang Heng, Wenxin Hou, Yue Fan, Zhen Wu, Jindong Wang, Marios Savvides, Takahiro Shinozaki, Bhiksha Raj, et al. FreeMatch: Self-adaptive thresholding for semi-supervised learn- ing. In The Eleventh International Conference on Learning Representations, 2022c.
Hongxin Wei, Renchunzi Xie, Hao Cheng, Lei Feng, Bo An, and Yixuan Li. Mitigating neural network overconfidence with logit normalization. In International Conference on Machine Learning, pp. 23631- 23644. PMLR, 2022.
Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non- instance discrimination. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3733 3742, 2018.
Omry Yadan. Hydra- framework for elegantly configuring complex applications. Github, 2019. URL /ttps://github. com/faacebolreeeeerc///yyy
Hong-Ming Yang, Xu-Ya Yao Zhang, Fei Yin, and Cheng-Lin Liu. Robust classification with convolutional prototype learning. In Proceedings of the IEEE conference computer vision and pattern recognition, pp. 3474-3482, 2018.
Jingkang Yang, Pengyun Wang, Dejian Zou, Zitang Zhou, Kunyuan Ding, Wenxuan Peng, Haoqi Wang, Guangyao Chen, Bo Li, Yiyou Sun, et al. OpenOOD: Benchmarking generalized distribbutiii de- tection. Advances in Newral Information Processing Systems, 11.35598-32611 2022.
Lihe Yang, Zhen Zhao, Loi Qi, Yu Qiao, Yinghuan Shi, and Hongshuang Zhao. Shrinking class space for enhanced certainty in semi-superviied learning. In Proceedings of the IEEE/CC International Conference on Computer Vision, pp. 16187-16196, 2023.
Yunhua Zhang, Hazel Doughty, and Coes GM Snock. Low-resouree vision challenges for foundation models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pottern Recognition, pp. 21956- 21 21966, 2024.
16

---

Published in Transactions on Machine Learning Research (8/2025)
Bolci Zhou, Agata Lapedriza, Aditya Khosla, Aude Oliva, and Antonio Torralba. Places: A 10 million image database for scene recognition. IEEE transactions pallern analysis and machine intelligence, 40(6): 1452 1464, 2017a.
Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela. Barriuso, and Antonio Torralba. Scene pars- ing through ADE20K dataset. In Proceedings of the IEEE conference computer vision and pattern recognition, pp. 633 641, 2017b.
17

---

Published in Transactions on Machine Learning Research (8/2025)
Supplementary Material
A Parametric vMF-SNE Initialisation
This section describes the parametric Stochastic Neighbour Embedding (SNE) approach (Hinton & Roweis 2002) used to initialize the projection head of the network in MoLAR. This method involves building two probability distributions that describe the similarity of data points in two different spaces, the origin space P and the target space Q. The idea is for similar points i, in P to have high probability Pt compared to dissimilar points, and to fit. the distribution in the target space Q to the distribution the origin space P by minimizing the KL divergence
KL(QIIP) Σ
Pij log Pij
(11)
where Pij and qt describe the similarity between points in the origin and target space.
These P.Q distributions are built using probability distribution as kernel. As MoLAR is defined as a von Mises-Fisher (vMF) mixture model, this is natural choice. Using the vMF kernel compule the probabilities P in the latent space defined by our backbone model f provides
Krc Rig
Psts = Exys Rime (ha h4)
(12)
ky, (hyz h4) xc exp (hr (hy-hip hnris)
(13)
where h, (xz and we define Pijs = O, noting that the vMF normalization constant within k,, cancels out in this expression. We set K2 for each point to make the entropy H; equal to the perplexity parameter Y H, = Σ. Pkje log Paj: = log?. This ensures each point has a similar number of neighbours in the distribution P, and for each point и; is determined using the bisection method as is standard in SNE approaches. To obtain symmetric distribution, use Pij PuittPul where N is the number of data points.
To compute the probability distribution Q in the latent space of the projection head, vMF distribution with fixed concentration t, as in the main text, is used as the kernel,
2(2
Øz1e Exer
(14)
lept k(Sa; 2:)
where & is a MoLAR mixture component (Eq. 2 and we define qıl 0. We also symmetrise this conditional distribution as above to obtain Oij-
To minimize the KL divergence in Eq. 11 gradients are taken with respect to the parameters of the projection head ge. This allows the >MF-SNE initialisation to follow similar approach as to training the neural networks in MoLAR, utilising mini-batching, stochastic gradient descent and image augmentations [Assran et al. 2021).
This parametric vMF-SNE initialisation method is similar to t-SNE (Van der Maaten & Hinton 2008 parametric t-SNE (Van Der Maaten 2009) and non-parametric vMF-SNE (Wang & Wang] 2016), but we apply it in very different context as an initialisation approach for neural networks using frozen foundation model embeddings. There are three key hyper-parameters in this process - the batch size, which defines the number of images to sample in each mini-batch, the perplexity parameter 7, and the concentration of the vMF distributions in Z₂ which determined by т. An ablation study considering the impact of these parameters presented Appendix C.2
18

---

Published in Transactions on Machine Learning Research (8/2025)
Algorithm vMF-SNE initialisation
Input: Training dataset D, NE number of epochs, f backbone model, Aug(.) augmentation strategy, 7
perplexity parameter, temperature parameter
Randomly initialise MLP head and set starting value of R; = 1 for all images i
0;
while / < NE do
Randomly split D into mini-batches;
for (xb: Vr) E [D,,.., Di,..., do
Augment X Aug(x:);
Calculate
f(X), normalize obtain H;
Calculate Z = go (H), normalize to obtain 2:
Calculate kx, (hy: h.)) exp [H,: He,Ki) for all images i,j:
Calculate k(2zi 2;) = exp Z (1//T) for images i,ji
kn (hyshhe)
Calculate Pjjé Σ cas Kap (hath))))
k(8z18i) Calculate Qj Eee, ((Ee11,)
Find optimal values for Hy by minimising Recalculate Pats with new values 14;;
|E* Pkife log Pk|e - log using bisection method;
Calculate Piş 2N PrictPu and dky
2:1 +
2N
Calculate KL divergence = Eig Pij log Minimise loss C by updating 0; end for 1; end while
98
Algorithm SKMPS exemplar selection
Input: Array of input images X, f backbone model, labelling budget
Calculate embeddings of all images in the latent space H f(X), and normalize obtain H; Cluster H into & clusters using k-means to find the cluster centroids C;
Initialise empty list 0: O;
while i < k do ArgMin(cosine distance A, C;));;
L = [L,j]:
= i+
end while Return: List L of the indices of the images to be labelled
19

---

Published in Transactions on Machine Learning Research (8/2025)
Algorithm MoLAR training algorithm.
Input:
Training dataset D, exemplar dataset De, N number of epochs, / backbone model, Aug(-)
augmentation strategy, exemplars per class be to use during training, label smoothing parameter a, T temperature parameter
Initialise MLP head go using vMF-SNE intialisation.
1= 0:
while / << NE do Randomly split D into B mini-batches; for Yx) E (Dı,..., Dy...., D do
Solect bg exemplars per class from De, to obtain (Xe, Ye); Augment X Aug(xo);
Augment X. Aug(xe);
Calculate Z (x)s(X)), normalize obtain 2;
Calculate Z = go(s(X)))) )) normalize to obtain Ze:
Calculate Φ OneHot(y, (1 a) +
Calculate P Softmax Z 2. Φ;:
if labels Ya are known then
Calculate loss L
D2 Σ Dal Hy Pi.);
else
Split. to obtain the outputs for different views of the same image P p Calculate pscudolabels y' = p( P +p+
2 );
Calculate average prediction p = Σ." DI
P
+P*
P
Calculate loss L = D. Σ Dall (Hly Pt. + H PT.)) H(p):
end if
Minimise loss C by updating 0; end for
1=1+1; end while
20

---

Published in Transactions on Machine Learning Research (8/2025)
B Additional results
C100
0.76
0.95
0.74
0.93
0.72
Validation accuracy
0.91
0.89
Loss type
Random init.
VMF-5NE
Random lnit.
VMF-SNE
Consistency
DeepWeeds
MixMatch
0.78
0.85
0.80
0.75
0.74
0.70
Random Init.
VMF-SNF
Random init.
VMF-SNF
Figure S7: Semi-supervised learning ablation study. Comparison the vMF-SNE initialisation and the averaging and sharpening (MixMatch) loss components of MoLAR-SS versus the original PAWS (Con- sistency) approach.
Semi-supervised learning ablation studies. Fig. S7 shows that across the CIFAR-10, CIFAR-100, Food-101 and DeepWeeds datasets, using MoLAR-SS with vMF-SNE initialisation leads to the best overall results. For CIFAR-10 and CIFAR-100, the averaging and sharpening (MixMatch) loss significantly improves overall accuracy and the gain from vMF-SNE initialisation is less obvious. However, for DeepWeeds skipping vMF-SNE initialisation leads to poor results. In the case of the Food-101 dataset, the combination of both YMF-SNE initialisation and the MixMatch loss leads to the best average accuracy across all training runs.
Validation accuracy
DeepWeeds
Head init.
0.96
0.9
Random init.
0.94
0.8
0.92
0.90
Loss type
0.86
0.6
Consistency
10
20
30
40
20
30
50
MixMetch
Training epoch
Figure S8: Training progress curves. Training curves comparing the vMF-SNE and random initialisation of the projection head and consistency versus the MoLAR-SS (Mixmatch) loss.
Consistency based loss can degrade the performance of PAWS during a training run. In Fig. S8
the training curves for two of the datasets from Fig. [S7 are shown. These training curves demonstrate that the consistency loss as used in PAWS can result in performance degrading for CIFAR-10 after around epochs. When using the averaging and sharpening (MixMatch) loss as done in MoLAR-SS, the validation accuracy remains stable once the models have converged. This is likely caused when different views the class boundarics have highly confident, but different, sharpened class probabilities. For PAWS this would result in different views of the same image being given different labels during training, resulting in instability at the class boundary. However, in KoLAR-SS. this would result in one class or the ot being chosen, or a more uncertain result, providing a more consistent supervision signal.
It also noted that the performance improvement from vMF-SNE initialisation not due head-start in training. While it does provide better starting point for learning, in both cases models trained until
21

---

Published in Transactions on Machine Learning Research (8/2025)
they completely converge, and vMF-SNE initialised projection heads converge to higher performing maxima, particularly for the Deep Weeds dataset where training using randomly initialised projection head leads to poor performance.
Number of classes
CIFAR-10
CIFAR-100
Food-101
100
7.5
75
75
Strategy
5.0
50
SKMPS
2.5
25
25
USL
0.0
10
50
100
200
300
400
500
101
202
303
404
505
Number of images selected for labelling
(a) Number of classes, Average number of classes sampled over 20 runs. Error bars show maximum and minimum number of classes sampled.
Proportion complete
CIFAR-10
CIFAR-100
Food-101
1.00
0.75
Strategy
0.50
SKMPS
0.25
USL
0.00
20
200
202
404
505
Number of images selected for labelling
(b) Proportion of classes. Proportion of sets sampling all classes over 20 runs.
Figure S9: Exemplar selection diversity. Class diversity captured by different exemplar selection strate- gies.
(a) CIFAR-10
(b) CIFAR-100
(c) Food-101
Figure S10: Visualizing improvements in exemplar selection. 1-SNE visualisation of the DINOv2 VIT-S/14 backbone embeddings overlayod with the exemplars selected by the USL (+) and SKMPS (o) strategies.
SKMPS selects more diverse set of images in comparison to USL. In Fig. 99 compare the diversity of classes sampled for the USL and SKMPS strategies with progressively larger budgets for the CIFAR-10, CIFAR-100 and Food-101 datascts. In all three cases, the SKMPS strategy samples a greater diversity of images, as measured by the number of classes sampled from each dataset for a given budget. Fig. STO shows several examples of SKMPS sampling a more diverse set of exemplars in comparison to USL, when these are visualised using a t-SNE transformation.
When some classes are not sampled, this reduces the maximum attainable performance for model classes that not represented by atleast labelled image cannot be learned in most semi-supervised
22

---

Published in Transactions on Machine Learning Research (8/2025)
learning frameworks. The USL approach considers density to be an indicator of exemplar informativeness, and preferentiall ially chooses exemplars from denser regions of the embedding space of the foundation model (Wang et al. 2022b). In contrast, SKMPS only considers the density of the points through the k-means clustering process, which results in a more diverse sample while also being more computationally efficient.
Table S8: Semi-supervised OOD detection with exemplars: Near OOD, Comparison of semi- supervised representatioaal approaches using a DINOv2 ViT-S frozen backbone on OpenOOD benchmark datasots (Yang et al., 2022) with a KNN metric (Sun et al. 2022), employing a consistent set of exemplars obtained with SKMPS. We select 40 exemplans for CIFAR-10 10 and 400 for CIFAR-100. The f means larger values are better and the & means smaller values are better.
IDD
Method
Near OOD Datasets
Average
CIFAR-10
CIFAR-100 100
Tiny ImageNet
AUROCT
FPR]
AUROC1
FPR.
AUROCT
FPR.
AUROC1
FPR.
CIFAR-100
PAWS
90.11
51.13
90.99
46.54
90.55
48.84
MoLAR-SS
95.79
26.05
94.60
32.30
95.19
29.18
backdone
85.51
60.16
91.13
30.6
88.32
45.38
CIFAR 10
PAWS
82.10
73.90
83.19
69.49
82.64
71.70
MoLAR-SS
91.61
13.36
91.12
42.78
91.37
43.07
+vMF-SNE
92.84
40.43
93.50
34.92
93.17
37.68
+SKMPS
93.34
35.94
92.83
33.30
93.09
34.62
baokbooe
90.66
40.13
97.16
11.12
93.91
25.62
Table S9: Semi-supervised OOD detection with exemplars: Far OOD. Comparison of semi- supervised representational approaches using a DINOv2 ViT-S/14 frozen backbone on OpenOOD benchmark datasets Yang et al., 2022) with a KNN metric (Sun al. 2022), employing a consistent set of exemplars obtained with SKMPS. We select 40 exemplars for CIFAR- 10 and 400 for CIFAR-100. The 1 means larger values better and the + mcans smaller values better.
IDD
Method
Far OOD Datasets
Average
DTTD
MNIST
SVHN
Places365
AUROC1
FPR|
AUROCT
FPR.
AUROC
FPR
AUROCI
FPR]
AUROCT
FPR]
CIFAR-100
PAWS
93.59
35.71
97.30
13.95
91.33
32.66
92.78
39.65
94.50
30.49
MoLAR-SS
96.55
22.29
98.96
2.27
94.35
33.39
95.22
28.58
96.27
21.63
backbone
98.92
4.8
87.98
86.15
72.76
85.57
97.03
12.18
89.17
47.18
CIFAR-10
PAWS
91.36
48.71
96.44
15.37
84.99
81.74
89.27
54.24
90.52
50.01
MoLAR-SS
95.41
27.84
98.67
5.35
93.81
39.49
91.48
27.1
95.6
25.02
+yME-SNE
96.05
24.95
98.68
1.91
95.50
28.77
96.06
22.20
96.57
19.46
+SKMPS
97.45
15.62
99.78
0.00
98.04
10.78
96.70
17.13
97.99
10.88
backbone
99.96
0.16
99.4
1.91
80.57
71.18
98.8
4.17
94.68
19.36
Further OOD detection results. In Table 58 and Table 50 we present the full set of results for each datasct in the OpenOOD benchmark, for the semi-supervised learning approaches that were considered. In general we find that the backbone embedding performs better the datasets that are included in the DINOv2 training set, such ImageNet, DTD and Places365 (which is included in the ADE20K dataset (Zhou et al. 2017b)). However, the backbone performs very poorly on OOD detection for datascts it hasn't 't seen before such as CIFAR-10, CIPAR-100, MNIST and SVHN, while the MoLAR-SS projection head can still perform well. Overall, the backbone performs slightly better on the near OOD CIFAR-10 benchmark (+0.82), while the MoLAR-SS embeddings perform better on the far OOD CIFAR-10 (+3.31) and both CIFAR-100 (+6.87/+7.10) benchmarks. Similar trends are observed for the supervised cases in Table S10
Table S11
Table S12 Table S13 and Table S14
Projection hcads initialised using the vMF-SNE approach perform better than random ini- tialisation, even if they are initialised using a different dataset. In (Table we fit MoLAR-SS models the DeepWeeds dataset randomly initialising the projection head, and then use projection heads
23

---

Published in Transactions on Machine Learning Research (8/2025)
Table S10: Supervised OOD detection: Near OOD. Comparison of representational approaches using
DINOv2 ViT-S/14 frozen backbone on OpenOOD benchmark datasets (Yang et al. 2022) with KNN
metric (Sun et al. 2022). The 1 means larger values are better and the I means smaller values are better.
IDD
Method
Near OOD Datasets
Average
CIFAR-10
CIFAR- 100
Tiny ImageNet
AUROCT
FPR]
AUROCT
FPRJ
AUROCT
FPR]
AUROCT
FPR.
CIFAR-100
CIDER
76.7
79.32
76.35
76.72
76.52
78.02
PALM
87.32
35.58
85.44
55.49
86.38
55.54
MoLAR
95.08
30.15
94.7
28.95
94.89
29.55
buckdone
87.97
56.05
91.82
29.63
89.9
42.84
CIFAR-10
CIDER
93.88
33.38
90.96
32.46
92.42
32.92
PALM
95.13
24.46
93.47
25.02
94.3
24.74
MoLAR
95.17
23.29
95.72
16.98
95.14
20.14
backbone
94.088
29.27
97.58
10.3
95.83
19.78
Table S11: Supervised OOD detection: Far OOD. Comparison of representational approaches using DINOv2 VIT-S/14 frozen backbone OpenOOD benchmark datasets (Yang et al. 2022) with KNN metric (Sun et al. 2022). The t means larger values are better and the | means smaller values are better.
IDD
Method
Far OOD Datasets
Average
DTD
MNIST
SVHN
Places365
AUROCT
FPR
AUROCT
FPR.
AUROC
FPR
AUROCT
FPR
AUROCT
FPR,
CIFAR-100
CIDER
89.05
56.77
99.92
0.0
97.4
15.23
78.28
77.36
91.16
37.31
PALM
94.74
29.
99.8
0.0
97.19
16:12
90.88
43.46
95.65
22.38
MoLAR
97.59
14.34
99.3
2.1
96.81
17.2
95.83
23.04
97.38
14.17
bacMMone
97.89
8.48
92.25
52.51
82.32
82.49
96.19
15.95
92.16
39.86
CIFAR-10
CIDER
97.25
14.4
99.58
0.04
99.3
1.07
94.07
22.99
97.55
9.62
PALM
98.34
7.57
99.98
0.0
99.73
0.45
96.5
14.04
98.64
5.52
MoLAR
98.71
5.39
99.99
0.0
99.47
98.34
6.77
99.13
3.33
backbone
99.96
0.18
99.88
0.01
93.65
39.63
98.88
4.45
98.09
11.07
Table S12: Supervised OOD detection with exemplars: Near OOD. Comparison of representattonal approaches using a DINOv2 VIT-S/14 frozen backbone on OpenOOD benchmark datasets (Yang et al. 2022)
with a KNN metric (Sun et al. 2022). employing consistent set of exemplars obtained with SKMPS. We select 40 exemplars for CIFAR-10 and 400 for CIFAR-100 The 1 means larger values are better and the 4 means smaller values are better.
IDD
Method
Near OOD Datasets
Average
CIFAR-10
CIFAR-100
Tiny ImageNet
AUROCT
FPR
AUROCT
FPR
AUROCT
FPR
AUROCT
FPR.
CIFAR-100
CIDER
79.8
67.93
77.32
71.92
78.56
69.92
PALM
86.58
57.54
83.73
59.41
85.16
58.48
MoLAR
95.58
29.37
95.34
29.4
95.46
29.39
bacilone
85.51
60.16
91.13
30.6
88.32
45.38
CIFAR-10
CIDER
92.51
44.27
88.87
46.74
90.69
45.5
PALM MoLAR
92.79
42.25
90.53
44.32
91.66
43.38
89.82
47.86
58.78
48.0
89.3
47.93
+ +vMF SNE
89.26
51.06
89.93
45.45
89.59
48.26
+ SKMPS
93.83
33.79
91.87
26.06
94.35
29.93
bacidooee
90.66
40.13
97.16
11.12
93.91
25.62
initialised on various other datascts using the vMF-SNE approach. We found that initialising the projection head with RMF-SNE is better than random initialisation every case, but best performance was obtained when initialisation undertaken DeepWeeds. Potentially, the vMF-SNE approach could be used as
24

---

Published in Transactions on Machine Learning Research (8/2025)
Table S13: Supervised OOD detection with exemplars: Far OOD, Comparison of representational approaches using a DINOv2 ViT-S/14 frozen backbone on OpenOOD benchmark datasets (Yang et al., 2022) with a KNN metric (Sun al, )022), employing consistent of exemplars obtained with SKMPS. We
select 40 exemplars for CIFAR-10 and 400 for CIFAR-100. The mcans larger values are better and the 4 means smaller values are better.
IDD
Method
Far OOD Datasets
Average
DTD
MNIST
SVIIN
Places365
AUROCT
FPR]
AUROCT
FPR.
AUROC
FPR,
AUROCT
FPR
AUROC1
FPR/
CIFAR-100
CIDER
87.13
60.92
99.85
0.01
95.91
22.88
$1.65
61.37
91.14
37.1
PALM
93.08
39.43
99.71
0.09
95.82
23.47
89.41
48.27
94.51
27.82
MoLAR
97.14
18.94
99.37
0.62
95.72
26.36
96.22
23.64
97.11
17.39
backooe
98.92
4.8
87.98
86.15
72.76
85.57
97.03
12.18
89.17
17.18
CIFAR-10
CIDER
95.77
27.23
99.98
0.0
99.25
1.23
92.15
36.04
96.79
16.13
PALM
95.84
28.37
99.78
0.0
99.29
2.56
93.55
34.03
97.11
16:24
MoLAR
91.21
34.29
96.53
15.45
92.32
44.9
91.97
39.08
93.83
33.13
+yMF-SNE
93.94
35.55
0.88
93.17
39.44
93.58
32.69
94.96
27.14
4SKMPS
96.98
17.3
99.79
0.0
98.04
9.52
97.01
15.18
97.96
10.5
backlone
0.16
99.4
1.91
80.57
71.18
98.8
4.17
94.68
19.36
Table S14: OOD detection with and without exemplars: ImageNet-200. Comparison of represen- tational approaches using a DINOv2 ViT-S/14 frozen backbone on ImageNet-200 OpenOOD benchmark datasets (Yang el al. 2022) with a KNN metric (Sun al. 2022). We compare using the full training dataset from OOD detection, versus consistent set of 600 exemplars obtained with SKMPS. The f means larger values are better and the | means smaller values are better.
KNN Sample
Method
Near OOD Datasets
Far OOD Datasets
SSB-hard
NINCO
iNaturalist
Openlmage-O
DTD
AUROC
FPR.
AUROCT
FPR
AUROC
FPR
AUROCT
FPR
AUROC1
FPR.
Full dataset
CIDER
83.22
56.74
90.13
44.72
97.15
17.52
95.79
24.36
95.61
17.15
PALM
86.04
52.15
92.08
39.17
97.88
10.66
42.42
20.65
95.81
16.23
MoLAR
89.68
42.77
91.68
38.32
97.59
13.94
96.54
20.09
96.04
15.22
buckbone
83.72
58.61
85.79
48.66
95.09
30.09
92.53
39.59
91.71
31.53
600 Exemplars
CIDER
82.49
59.66
89.7
46.35
96.98
17.3
94.95
28.67
94.52
23.11
PALM
85.00
55.63
91:17
41.62
97.16
13.96
95.62
25.97
94.90
20.61
MoLAAR
90.09
44.01
92.61
37.37
97.74
11.69
96.38
20.19
95.88
18.3
backbone
81.67
52.27
89.49
41.48
97.98
10.66
95.98
22.2
95.10
16.97
PAWS
87.46
51.62
90.29
48.77
96.09
23.24
94.39
32.18
94.71
23.36
MoLAR-SS
91.33
42.74
93.59
36.57
97.25
16.2
95.67
25.47
95.86
21.42
Table S15: Transfer learning with vMF-SNE. Transferability of vMF-SNE initialisation between datasets.
Method
Components
Dataset
Head init.
DeepWeeds
MoLAR-SS
Random init.
76.0:19.3
vMF-SN init, on C100 YMF-SNE init. on C10
79.9++8.1
81.517.11
YMF-SNE init. Food
84.2416.0
YMF-SNE init. DeepWeeds
87.8=1.5
method to initialise projection head for foundational model on large dataset, and this could then be used to obtain better performance than random initialisation on smaller datasets.
Naively incoporating elements of the PALM loss into PAWS and MOLAR-SS harms SSL per- formance. It is shown in Table S16 that. incorporating the loss term from PALM that encourages exemplars
25

---

Published in Transactions on Machine Learning Research (8/2025)
Table S16: Adding terms to increase class separation. Adding terms from the PALM (uu et al. 2024 loss that improve OOD detection performance PAWS (Assran
2021 and MoLAR-SS.
Method
Components
Dataset
PALM
La et sl. 2024 protoocunttra
C10
PAWS PAWS
92.110.1
N
92.9=0.2
MoLAR-SS
Y
94.210.1
MoLAR-SS
N
95.9+001
within class to be compact, and far from exemplars of other classes, given by
1
K
Σ KK(K + 1b) exp sk 2k /T) Ze'=1 E [K'" + k. d # c) exp (25" - /T)
pproto-contra
log
(15)
CK
results in poorer performance in comparison to not adding this loss term. Here (F(.) is an indicator function that avoids contiasting between the same exemplar, and & refers to the kth exemplar of class e, where K exemplars belong to each of the C' classes.
26

---

Published in Transactions on Machine Learning Research (8/2025)
C Additional results for vMF-SNE initialisation
C.1
Performance
In a classification context, the performance of the backbonc model can be measured non-parametrically using a weighted k-Nearest. Neighbor (kNN) Classifier (Wu et. al. 2018). This provides for a quantitative approach to measure the performance of the projection head initialised using vMF-SNE, as reproducing the local structure of the backbone model should provide similar kNN accuracy. We find that for five of the seven datasets considered, we can meet or beat the kNN accuracy of the backbone model through vMF-SNE initialisation (Table $17
C.2 Hyperparameter ablation study
We undertook an ablation study to determine the sensitivity of vMF-SNE initialisation performance the hypperparameeers within the algorithm. It was found that the method was highly insensitive most parameters for the CIFAR-10 R-10 dataset, with only significantly lower perplexity y or order of magnitude higher concentration parameter resulting in changes to the kNN validation accuracy outside single standard deviation (Table S18). The optimal paramcter set appeared to be different between CIFAR-100 and the Food-101 datasets, with beller performance for CIFAR-100 with a larger perplexity and smaller concentration and batch size, but better performance for Food-101 with a smaller perplexity and larger
Table S17: vMF-SNE intialisation performance. KNN accuracy of the model backbone versus the vMF-SNE initialised projection head.
Embedding
Dataset
C10
C100
EuoSAT
DeepWeeds
Flowers
Food
Pets
DINOv2 VTT-//14 backbone vMF-SNE proj. head
96.2
82.3
90.0
88.7
99.3
80.9
91.5
96.3:10.1
79.020.1
91.910.1
91.310.1
98. 98.240.5
81.010.1
03.0:10.1
Table S18: vMF-SNE initialisation ablation study. The results for the parameters used in the other results in this paper are reported as the mean KNN accuracy and standard deviation of five runs, while the other cases report a single run.
Perplexity (1)
C10
C100
Food
5
96.1
74.0
81.7
30
96.3++0.1
79.040.1
81.0+0.1
50
96.3
79.5
80.9
100
96.3
80.1
80.7
vMF concentration (7)
C10
C100
Food
0.01
96.4
79.4
78.8
0.10
96.34-0.1
79.0:0.11
81.0+0.1
1.00
91.7
51.9
68.5
Ze dimension
C10
C100
Food
128
96.3
79.1
81.0
256
96.3
79.0
81.0
384
96.4
79.1
81.0
512
96.3:10.1
79.0:10.1
81.0:0.1
1024
96.3
79.0
81.0
Batch size
C10
C100
Food
128
96.2
79.5
80.4
256
96.3
79.1
80.7
512
96.3+10.1
79.0:10.1
81.01.11
1024
96.3
79.2
81.3
Kernel
C10
C100
Food
vMF
96.34-0.11
Gaussion
91.4++0.6
27

---

Published in Transactions on Machine Learning Research (8/2025)
batch size. We also explored using Gaussian kernel with CIFAR-10, and found that this resulted in much poorer performance.
28

---

Published in Transactions on Machine Learning Research (8/2025)
D Further implementation details
D.1 MoLAR, PAWS, CIDER and PALM
implementation available at this GitHub repository lo our own codebase using PyTorch-Lightninn (Falcon & The PyTorch Lightning leam 2019) and Hydra (Ydaan 2019), to enable fair comparisons between PAWS and MoLAR-SS, We further adapted the official CIDER and PALM GitHub implementations to our codcbase, and used them the basis for the CIDER and PALM results presented here with DINOv2 backbone to compare to MoLAR.
We adapted the PAWS and RoPAWS Py Paszke et al. 2019
All of the MoLAR, MoLAR-SS and PAWS models that are fitted in this paper were trained for 50 epochs, and the vMF-SNE initialisation runs were trained for 20 epochs. This meant that even for the Food-101 dataset with 75,000 images, training MoLAR or MoLAR-SS model took less than two hours with two Nvidia V100 32GB graphics cards for the ViT-S/14 and ViT-B/14 backbone, and around six hours for the VIT-L/14 backbone. For fair comparisons to the CIDER and PALM approaches, we trained these for epochs account for the additional vMF-SNE initialisation steps in MoLAR.
D.2 vMF-SNE initialisation
We re-used the same augmentations, optimizer, scheduler and other details as for MoLAR and MoLAR-SS. The key difference is that the vMF-SNE initialisation approach only requires the unlabelled dataloader, compared to MoLAR-SS which requires both a exemplar and unlabelled dataloader. This meant vMF-SNE initialisation slightly faster than training. We note than when using image augmentations for this approach, treat each augmented view independently.
D.3 k-means clustering and USL
We used the GPU-optimised k-means method available within cuML. (Raschka et al., 2020 We save the normalised global class token from the DINOv2 model applied to each image of the dataset using the validation transformations, and run the k-means clustering method over this matrix. This method is extremely fast and can easily process millions of rows. We use the best clustering result from ten runs, and choose the number of clusters according to the number of images we wish to label. To select the exemplar to label from each cluster, we choose the image with the largest cosine similarity to the cluster centroid.
To reproduce the USL (Wang et al. 2022b) approach, we used the code published by the authors on GitHub, There quite few hyperparameters that are used within the USL method, selected the set that used for ImageNet with CLIP (Radford et al. 2021 another foundation model based on the ViT architecture, for all of our experiments.
29


Reviews:
[{"review_id": "Nins8H3B2W", "reviewer": "Reviewer_JmLB", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "**Strengths**\n\n[S1] The paper is clearly written and well formatted.\n\n[S2] Strong literature review. Love the interleaved on-the-fly related works format.\n\n[S3] Well detailed experimentation\n\n[S4] Results are convincing and ablation experiments were done\n\n**Weaknesses**\n\n[W1] The paper suffers a bit from assuming the reader is familiar with concepts from the related literature. I’ve made a couple suggestions in the requested changes to address this.\n\n[W2] Some of the experimentation was done without error measurements.\n\n[W3] Few gaps in the description of approach of SKMPS and the Projection head initialization.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "The paper presents an initialization and training procedure to train image classifiers from frozen foundation models that induces the capability of the model to classify whether an unseen sample is In-Distribution (ID) or Out-of-Distribution (OOD). Whereas previous approaches require the entire training set for OOD detection, the proposed methodology allows for using only a select subset of “exemplars” reducing inference cost. They also adapt their approach to be able to work in semi-supervised learning settings. Additionally, they propose an exemplar selection and projection head initialization methodology that outperforms prior common approaches. Results outperform previous state-of-the-art and ablation experiments were done on the main components.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "**Related to W1**\n\n[RC1] A bit of context / explanation of why vMF components differ from related approaches is missing.\n\n[RC2] The KNN metric used for evaluation in the table is not well defined, it would be necessary to have a self-contained explanation in this manuscript since it is the basis for lots of the experimentation. Specifically, which embedding space is used for each of the architecture? It measures a distance, but the table seems to report percentages? Is there thresholding applied to classify ID or OOD?\n\n[RC3] Could you provide an Algorithm-form presentation of how Molar would do OOD-detection? (Like Algorithm 1 or 2)\n\n**Related to W2**\n\n[RC4] Improvements when using fewer examples (full dataset vs SKMPS picked) is surprising to me, could this be noise? Were Tables 1 & 2 run with multiple seeds? If not I would ask for that.\n\n**Related to W3**\n\n[RC5] In the “Examplar selection strategies” second paragraph, it is ambiguous whether SKMPS is running the (i), (ii), and (iii) steps for each label or the entire dataset. It becomes clearer in the results section, but it would be good to add the clarification there.\n\n[RC6] “the projection head cannot be initialized as an identity mapping”, could you provide a sentence or a reference that clarifies why that is the case.\n\n**Minor**\n\n[RC7] Comparing Table 1 and Table 2 is a bit tedious, I think the presentation would greatly benefit from adding the differences with Table 1 somewhere in there. Could be in very small font.\n\n[RC8] (Yang et al., 2023) reference is not included in the related works.\n\n[RC9] Fix typo in Appendix B \"SKMPS selects a more diverse set of images in comparsion to USL.\"", "broader_impact_concerns": "None that comes to mind.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "1Kj1Snzju5", "reviewer": "Reviewer_7C17", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "Strength:\n1. The paper provides a clear description of the methodology, with adequately designed experiments and reasonably thorough analysis.\n\nWeakness:\n1. The proposed method is composed of very simple training objective. The idea of measuring the similarity of samples and prototypes (examplars) and training a classifier using the similarity as logit has been widely explored by existing literature [A,B]. It is not clear how does the proposed method differ fundamentally from these works.\n\n[A] Sun, Zhuohao, et al. \"Classifier-head informed feature masking and prototype-based logit smoothing for out-of-distribution detection.\" IEEE Transactions on Circuits and Systems for Video Technology 34.7 (2024): 5630-5640.\n[B] Gong, Mingrong, et al. \"Out-of-distribution detection with prototypical outlier proxy.\" Proceedings of the AAAI Conference on Artificial Intelligence. Vol. 39. No. 16. 2025.\n\n\n2. The description of OOD scoring is missing. Although the training objective is explained in Eq(6) and Eq(7), it is unclear how the OOD score is eventually calculated for testing samples.\n\n3.\tWhile Table S17 presents the ablation study of different hyperparameters, the main text appears to contain no discussion regarding the rationale for hyperparameter selection. It is unclear whether the same hyperparameter configurations were fixed across all datasets and models.\n4.\tBoth abstract and introduction have mentioned \"30 times faster inference\", but in experiments lack a table to clarify how much inference time is required for different methods.\n5.\tThe results in Table 2 suggest that semi-supervised learning does not improve the efficacy of OOD detection. The results in Table 3 further imply that FreeMatch could be a very competitive method which achieves comparable performance with a very small backbone network.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "No", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "To address OOD detection challenges, this work introduces a computationally efficient approach that optimally leverages frozen pretrained foundation models as classifier backbones. MoLAR consistently outperforms comparable approaches in OOD detection across extensive experimental evaluations.", "claims_and_evidence_yn": "No", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "I suggest the authors to address the following issues.\n\n1. Explain why and how this method is significantly different from existing prototype based methods.\n\n2. Explain the OOD scoring method\n\n3. Add additional explanation and analysis for the results.", "broader_impact_concerns": "There is no outstanding ethical concerns.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}, {"review_id": "zhmWsissnl", "reviewer": "Reviewer_4wHB", "summary": "", "questions": "", "limitations": "", "rating": null, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "The submission provides good detail and introduction to the issues with OOD detection, and motivates the need for an algorithm such as MoLAR. There are many experiments included, providing insight into many facets of the performance of MoLAR and SKMPS (the exemplar selection strategy). The use of OpenOOD makes the results of this work easy to compare with past and future results, and also improves the reproducibility of this work. \n\nWhere the paper is weakest is in its clarity and organisation. On clarity, the paper throughout uses a KNN OOD metric cited from Sun et al. 2022, but it is not detailed in the main text how exactly this metric is computed, which makes the main text less self-contained. On page 8, statements are made about GPU time - it is not clear how many V100s are used for MoLAR, nor A100s for SemiReward in the main text. \n\nOn organisation, while I would praise the introduction, related work, methodology, and experiments section, I feel that the discussion and conclusion section could be improved. The discussion section, in my view, reads as an additional results section, and doesn't contextualise the results of the experiment section within the existing literature. Furthermore, the conclusion lacks a discussion of the limitations of this work.", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "paper_topic_and_main_contributions": "", "excitement": null, "reproducibility": null, "ethical_concerns": "", "main_review": "", "summary_of_the_paper": "", "summary_of_the_review": "", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "summary_of_contributions": "This work presents a new method for the detection of out-of-distribution (OOD) images. Typical OOD detection methods, used in computer vision, are based upon the distance between in-distribution (ID) and OOD image embeddings. Recent methods, improve such approaches by utilising von Mises-Fisher (vMF) mixture models, which cluster embeddings from the same target variable and maximise distance between embeddings of different classes. \n\nThis work introduces MoLAR, which also utilises vMF models, but uses images representative of the training data (so called, exemplars) to define the cluster centres in the vMF model. This reduces training times and the computational complexity of the optimisation algorithm, and allows for vMF clusters - the exemplars - to be used to define the distance metric that determines whether an image is ID or OOD. The latter means that class prediction and OOD detection require the same computational resource. \n\nThis work demonstrates the performance of MoLAR using the OpenOOD benchmark evaluations, and is reported to outperform two recent methods, PALM and CIDER, in a supervised setting, and PAWS in a semi-supervised setting. An ablation study is provided which motivates the choice of two key components of MoLAR i) a stochastic neighbour embedding initialisation for the projection head used to determine OOD samples and ii) the chosen selection strategy for the exemplars representative of the dataset, and shows that both lead to model performance. \n\nOverall, this work provides interesting insight into a new approach for OOD detection, which can be combined with high performing foundation models, and requires no extra resource than class prediction for OOD detection.", "claims_and_evidence_yn": "Yes", "claims_explanation": "", "audience_yn": "Yes", "audience_explanation": "", "requested_changes": "Overall, this is interesting work and will likely be a useful reference for others in OOD detection. Revisions addressing clarity and presentation would improve this submission.\n\nCritical proposed adjustments:\n- Please add a discussion of the limitations of MoLAR to the conclusion \n\nSuggested adjustments \n- Remove Fig 4. - it seems that the message of this figure is that initialisation leads to improved OOD detection via a better clustered embedding space. I think this figure doesn’t provide strong evidence for this claim - however that claim is supported by Table 6. \n- Consider moving Figure 5 and 6 into the results section. \n- On page 10 “However, in MoLAR-SS this would result in one class or the other being chosen, or a more uncertain result, providing a more consistent supervision signal” - this is not clear, please can you clarify this statement. \n- In the abstract, “In some cases, only using the exemplars actually improves performance with MoLAR” - please consider removing or revising this statement as from the abstract alone it is not clear what this means.", "broader_impact_concerns": "I believe in this case a broader impact statement is not necessary.", "additional_comments": "", "extra_scores": {}, "extra_text": {}}]

Author rebuttal:

Decision: Accept (poster)