Improving Classification Accuracy with Graph Filtering

Mounia Hamidouche, Carlos Lassance, Yuqing Hu, Lucas Drumetz, Bastien Pasdeloup, Vincent Gripon · DOI

Abstract

Deep learning models are often sensitive to noise, particularly in data-scarce scenarios like few-shot learning. This paper proposes a post-processing method using Graph Signal Processing (GSP) to denoise high-level features. By treating class samples as nodes in a similarity graph and applying a low-pass filter, the authors reduce intra-class variance and consistently improve classification accuracy across various benchmarks.

Introduction

While deep learning has revolutionized feature extraction, individual samples often retain "specificities"—unique noise or quirks that do not represent the broader class. In standard classification with large datasets, models eventually learn to marginalize this noise. However, in few-shot learning, where only a few examples of a novel class are available, a single outlier can significantly shift the perceived class distribution, leading to poor generalization. This work argues for denoising high-level features in the latent space, where data is more structured, rather than denoising raw pixels.

Methodology

The proposed workflow consists of three primary stages: feature extraction, graph filtering, and classification.

The proposed three-step workflow: Feature Extraction, Graph Filtering, and Classification.
  1. Feature Extraction: A pre-trained backbone (e.g., Wide ResNet or DenseNet-121) transforms input images into high-dimensional feature vectors.
  2. Graph Construction: For each class, a graph is constructed where nodes represent individual samples. Edges are established based on cosine similarity using a $k$-nearest neighbors ($k$-NN) approach, capturing the underlying structure of the class.
  3. Low-Pass Filtering: Using Graph Signal Processing (GSP), feature vectors are treated as signals on the graph. A low-pass filter is applied via the Graph Fourier Transform. Since high frequencies in GSP correspond to rapid changes between connected nodes (noise), dampening them "smooths" features toward the class average.
  4. Classification: The denoised features are passed to a standard classifier, such as a 1-Nearest Neighbor or a Linear Classifier.

Experimental Results

The method was evaluated on several computer vision benchmarks, including miniImageNet, CUB, CIFAR-FS, and CIFAR-10, using various architectures like WRN and PyramidNet.

Accuracy improvement as a function of the number of shots (m), comparing performance with and without the graph filter.

Key Findings

  • Variance Reduction: Mathematical analysis shows that the filtering operation reduces intra-class variance while preserving the mean, effectively "tightening" data clusters for better separability.
  • Few-Shot Performance: On the CUB dataset with a WRN backbone, accuracy improved from 93.99% to 94.14%. The benefit is consistent across benchmarks and becomes more pronounced as the number of available samples ($m$) increases, as shown in the experimental plots.
  • Standard Classification: On CIFAR-10, applying the filter to a 1-NN classifier allowed it to outperform the original DNN architectures in some instances (e.g., WRN accuracy increased from 95.82% to 95.92%).

Conclusion

Graph filtering provides a robust, transductive refinement step that helps models adapt to new class distributions by smoothing out feature noise. Future work will focus on automated hyperparameter selection and integrating the filtering step directly into neural network architectures for end-to-end training.

Summary updated

BibTeX
@inproceedings{hamidouche2021improving,
  author = {Mounia Hamidouche and Carlos Lassance and Yuqing Hu and Lucas Drumetz and Bastien Pasdeloup and Vincent Gripon},
  title = {{Improving Classification Accuracy with Graph Filtering}},
  booktitle = {ICIP},
  year = {2021},
  doi = {10.1109/icip42928.2021.9506042},
}
Figure