Skip to content
The implementation of "Self-Supervised Generalisation with Meta Auxiliary Learning".
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore update readme description Jan 29, 2019 update readme description Jan 29, 2019 update code and readme Jan 29, 2019 Update Jul 10, 2019 Update Jul 10, 2019 Update Jul 10, 2019

Meta Auxiliary Learning

This repository contains the source code to support the paper: Self-Supervised Generalisation with Meta Auxiliary Learning, introduced by Shikun Liu, Andrew J. Davison and Edward Johns.


MAXL was written in python 3.7 and pytorch 1.0. We recommend running the code through the same version while we believe the code should also work (or can be easily revised) within other versions.

Models & Datasets

This repository includes three models, and representing baselines Single, Human and our proposed algorithm MAXL with backbone architecture VGG-16. These three models are trained with 4-level CIFAR-100 dataset which should easily reproduce part of the results in Figure 3.

In, we define an extended version of CIFAR-100 with 4-level hierarchy built on the original CIFAR100 class in torchvision.datasets (see the full table for semantic classes in Appendix A). To fetch one batch of input data with kth hierarchical labels as defined below, we have train_data which represents the input images and train_label which represents the 4-level hierarchical labels: train_label[:, k], k = 0, 1, 2, 3 fetches 3, 10, 20 and 100-classes respectively.

train_data, train_label[:, k] =

Training MAXL

The source code provided gives an example of training primary task of 20 classes train_label[:, 2] and auxiliary task of 100 classes train_label[:, 3] with hierarchical structure \psi[i]=5. To run the code, please create a folder dataset to download CIFAR-100 dataset in this directory or you may redefine the dataset root path as your wish. It is straightforward to revise the code evaluating other hierarchies and play with other datasets found in torchvision.datasets.

Note that: make sure len(psi) be the number of primary classes, and sum(psi) be the number of total auxiliary classes, e.g. psi = [2,3,4] representing total 3 primary classes and total 9 auxiliary classes by splitting each corresponding primary class into 2, 3, and 4 different auxiliary classes.

Training MAXL from scratch typically requires 30 hours in GTX 1080, and training the baselines methods Single and Human requires 2-4 hours from scratch.


If you found this code/work to be useful in your own research, please considering citing the following:

  title={Self-Supervised Generalisation with Meta Auxiliary Learning},
  author={Liu, Shikun and Davison, Andrew J and Johns, Edward},
  journal={arXiv preprint arXiv:1901.08933},


If you have any questions, please contact

You can’t perform that action at this time.