This repository contains the code of the experiments performed in the following paper
Graph-LDA: Graph Structure Priors to Improve the Accuracy in Few-Shot Classification
by Myriam Bontonou, Nicolas Farrugia and Vincent Gripon
It is very common to face classification problems where the number of available labeled samples is small compared to their dimension. These conditions are likely to cause underdetermined settings, with high risk of overfitting. To improve the generalization ability of trained classifiers, common solutions include using priors about the data distribution. Among many options, data structure priors, often represented through graphs, are increasingly popular in the field. In this paper, we introduce a generic model where observed class signals are supposed to be deteriorated with two sources of noise, one independent of the underlying graph structure and isotropic, and the other colored by a known graph operator. Under this model, we derive an optimal methodology to classify such signals. Interestingly, this methodology includes a single parameter, making it particularly suitable for cases where available data is scarce. Using various real datasets, we showcase the ability of the proposed model to be implemented in real world scenarios, resulting in increased generalization accuracy compared to popular alternatives.
- Python >= 3.6
- Pytorch >= 1.3
Our experiments are performed on a a neuroimaging dataset and a few-shot image classification dataset.
The neuroimaging dataset is based on the IBC dataset (releases 1 and 2) [2], which is accessible on NeuroVault [3] (collection 6618). The dataset can be downloaded by executing Adapt_IBC_dataset.ipynb. The splits and the graph structure [4] must be downloaded from https://drive.google.com/drive/folders/19a5se0l6MC-F1FTF5ittxFutkKHiWKgL?usp=sharing. For more information about the neuroimaging dataset, have a look at this git.
The few-shot image classification dataset contains representations of the mini-Imagenet [1] images obtained at the output of the backbone pretrained in Charting the Right Manifold: Manifold Mixup for Few-shot Learning. The representations of the images can be downloaded from https://drive.google.com/drive/folders/1Ol-W0IvYkEuadkiDTgYp-0GUU2V2yENA?usp=sharing.
First experiments on simulated datasets are described in Simulated_datasets.ipynb.
The experiment on the neuroimaging dataset are accessible in Neuroimaging_dataset.ipynb and the one on the few-shot image classification dataset in Image_dataset.ipynb.
[1] Vinyals, O. et al. (2016) Matching networks for one shot learning.
Please contact us if there are any problems.
Myriam Bontonou (myriam.bontonou@imt-atlantique.fr)