K-means Clustering Based Feature Consistency Alignment for Label-free Model Evaluation

Shuyu Miao, Lin Zheng, Jingjing Liu, Hong JinWorkshops @ CVPR 2023 · DOI

Abstract

Label-free model evaluation (AutoEval) is a critical task for monitoring machine learning models in production environments where ground-truth labels are unavailable. This paper presents a novel framework centered on K-means Clustering Based Feature Consistency Alignment (KCFCA) to estimate model accuracy under distribution shifts. By aligning class-wise feature distributions and employing a dynamic ensemble of regression models, our approach achieved 2nd place in the CVPR 2023 DataCV Challenge, demonstrating a 36% improvement over baseline methods.

Introduction

In real-world machine learning deployments, data distributions often shift over time (Out-of-Distribution or OOD), leading to performance degradation. Traditional evaluation requires manual labeling, which is prohibitively expensive and slow. AutoEval addresses this by autonomously predicting a model's accuracy on unlabeled datasets. However, existing methods relying on simple confidence scores or global statistics like FID often fail to capture granular, class-level semantic shifts. We propose a solution that leverages the internal structure of feature spaces to provide a more reliable accuracy signal.

Methodology

K-means Clustering Based Feature Consistency Alignment (KCFCA)

The core novelty of our approach is KCFCA. Assuming a classification task with $N$ classes, we use K-means to cluster the features of both the labeled training set and the unlabeled test set into $N$ clusters. We then calculate the Frechet distance between corresponding cluster centers. This method captures how individual "concepts" shift between datasets, providing a finer signal for accuracy degradation than global dataset statistics.

The KCFCA pipeline: extracting features from seen and unseen datasets, performing K-means clustering, and aligning features to predict accuracy.

Dynamic Regression Model (DRM) and Outlier Pruning

We observed that no single regression algorithm performs optimally across all types of data shifts. To address this, we developed the Dynamic Regression Model (DRM), a meta-regressor that fuses outputs from multiple base models (Linear Regression, KNN, SVR, and Random Forest). To ensure the ensemble's stability, we implemented Outlier Model Factor Discovery (OMFD), which detects and eliminates "bad" evaluation models by identifying those that deviate significantly from the consensus centroid of reliable models.

Experimental Results

Datasets and Setup

Our framework was evaluated using the benchmarks from the 1st DataCV Challenge (CVPR 2023). The training data consisted of 1,000 transformed CIFAR-10 datasets, while validation included CIFAR-10.1, CIFAR-10.1-C (corrupted), and CIFAR-10-F (real-world Flickr images). The final evaluation was performed on 100 unlabeled test datasets.

Performance

Our approach secured 2nd place in the DataCV Challenge with a Root Mean Square Error (RMSE) of 6.8526. This represents a 36% improvement over the best baseline method (FID-based evaluation), which recorded an RMSE of 10.7378. Validation tests across different architectures, such as ResNet-56 and RepVGG-A0, confirmed that KCFCA yields more stable results than traditional entropy or confidence-based methods.

Final leaderboard of the CVPR 2023 DataCV Challenge, showing the authors' team (Yanglegeyang) in second place with an RMSE of 6.8526.

Conclusion and Future Work

The success of KCFCA highlights the importance of granular class-wise alignment in label-free evaluation. By focusing on the internal structure of the feature space rather than global statistics, we can more accurately predict model failure under distribution shifts. Future work will focus on adapting this method for open-set scenarios where the number of classes in the test set may differ from the training set, and exploring more sophisticated distance metrics between clusters.

Summary updated

BibTeX
@inproceedings{miao2023k,
  author = {Shuyu Miao and Lin Zheng and Jingjing Liu and Hong Jin},
  title = {{K-means Clustering Based Feature Consistency Alignment for Label-free Model Evaluation}},
  booktitle = {Workshops @ CVPR},
  year = {2023},
  doi = {10.1109/cvprw59228.2023.00332},
}
Figure