R. Hesse, S. Schaub-Meyer, J. Hesse, B. Schiele, and S. Roth. What is Missing? Explaining Neurons Activated by Absent Concepts. ICML, 2026.
conda env create -f environment.yml
conda activate what-is-missing
cd reichardt_detector
and run
python reichardt_detector.py
The results will be stored in /visualization.
cd toy_example
and run
python toy_example.py
The results will be stored in /visualization.
cd imagenet
run, e.g.,
python image_quantitative.py --data_dir /fastdata/rhesse/datasets/imagenet --model resnet50 --model_layer model.layer4[2].conv3 --batch_size 256 --patch_size 48 --patch_stride 16 --nr_patches 8 --seed 0
cd isic and set the DOWNLOAD_DIR and API_TOKEN in isic_download.py
run python isic_download.py
Disclaimer: the ISIC API changed over the course of the project, and I did not manage to recover exactly the same images. While the overall conclusions should remain the same, it is possible that the downloaded images do not exactly match the images used in the paper.
run python train.py
You can set:
The debiasing mode - MODE = ['default', 'presence_debias', 'presence_absence_debias']
The model - MODEL = ['xresnet50', 'vit_b_16']
and other parameters (remember to adjust the STORE_DIR for the different models)