Explaining Model Overfitting in CNNs via GMM Clustering
Hui Dou, Xinyu Mu, Mengjun Yi, Feng Han, Jian Zhao, Furao Shen
TL;DR
This work tackles CNN interpretability and overfitting by introducing a Gaussian Mixture Model (GMM) based clustering of per-filter feature maps to identify anomaly filters linked to overfitting. It clusters PCA-reduced activations $D^l \in \mathbb{R}^{Batch\times C\times 2}$ for each filter, uses the Calinski-Harabasz Index $CH = \frac{SSB /(K - 1)}{SSW /(N - K)}$ to assess clustering quality, and dynamically selects the number of classes $K$ per filter to discover learned patterns. Three experiments across AlexNet, LeNet-5, and a simple CNN on CIFAR-10/100 and Fashion-MNIST validate three hypotheses: anomaly filters increase with overfitting, outlier samples drive overfitting via larger gradients, and pruning anomaly filters enhances generalization. The results offer a practical, architecture-agnostic diagnostic tool for CNN overfitting and suggest a pruning-based route to improve generalization, with potential extensions to larger architectures and semantically-informed clustering metrics. Key equations include the GMM data likelihood $p(\boldsymbol{x})=\sum_{k=1}^K \pi_k \mathcal{N}(\boldsymbol{x}|\mu_k, \Sigma_k)$ and CH as above.
Abstract
Convolutional Neural Networks (CNNs) have demonstrated remarkable prowess in the field of computer vision. However, their opaque decision-making processes pose significant challenges for practical applications. In this study, we provide quantitative metrics for assessing CNN filters by clustering the feature maps corresponding to individual filters in the model via Gaussian Mixture Model (GMM). By analyzing the clustering results, we screen out some anomaly filters associated with outlier samples. We further analyze the relationship between the anomaly filters and model overfitting, proposing three hypotheses. This method is universally applicable across diverse CNN architectures without modifications, as evidenced by its successful application to models like AlexNet and LeNet-5. We present three meticulously designed experiments demonstrating our hypotheses from the perspectives of model behavior, dataset characteristics, and filter impacts. Through this work, we offer a novel perspective for evaluating the CNN performance and gain new insights into the operational behavior of model overfitting.
