This repository contains the code for our paper
This code was tested with TensorFlow version 1.15 on python 3.6. The code to fit the auxiliary model was tested with Julia version 1.1.
- Directory
dat
:- Contains a textual version of pre-extracted XML-CNN features, originally downloaded from https://github.com/siddsax/XML-CNN (the download link there is currently broken, which is why we provide a mirror of the data set). Due to their large size, the data sets are included via Git Large File Storage (git lfs).
- Directory
preprocess-extreme-predicton
:- Contains code to reproduce the exact binary representation of the data sets used in the paper, using the textual representation in the directory
dat
as input. - Contains a jupyter notebook
pca.ipynb
that was used to generate the low-dimensional feature vectors for the auxiliary model as described in the paper.
- Contains code to reproduce the exact binary representation of the data sets used in the paper, using the textual representation in the directory
- Directory
aux_model
:- Contains both Julia code to fit the auxiliary model and python code to use the fitted model during training of the main model, as described in the paper.
- File
train.py
:- The main file to train the proposed model. See paper for hyperparameters.
- Directory
main_model
:- Contains internal utilities used by
train.py
. You shouldn't usually need to run any of the python scripts in this directory manually.
- Contains internal utilities used by
The source code in this repository is released under the MIT License. If you use this software for a scientific publication, please consider citing the following paper: R. Bamler and S. Mandt, Extreme Classification via Adversarial Softmax Approximation, ICLR 2020.