Accepted at XAIE4: 4th Workshop on Explainable and Ethical AI — ICPR 2026 Workshop on Explainability, endorsed by IAPR.
This repository contains the implementation of Self-Configurable IBA.
SC-IBA is a self-configurable version of IBA that selects the bottleneck layer per sample instead of using one fixed layer for every input. For each image, it evaluates candidate layers and chooses the layer that best fits the current sample before running the information bottleneck optimization. This makes the attribution more adaptive to the input and the model's internal activations.
In practice, the method keeps the core IBA objective but replaces manual layer selection with an automatic strategy. The selected layer is then used to generate the attribution map and compare it against fixed-layer IBA and other baselines.
The codebase also includes a tuned baseline that uses random search over candidate layers and beta settings to identify a strong fixed configuration for comparison, and the proposed method is compared against fixed-layer IBA and other benchmark attribution methods such as EigenCAM, GradCAM, Guided Backpropagation, Guided GradCAM, and Saliency.
Three datasets are used for evaluation: the J. Cheng (Brain Tumor) dataset, MSSEG16 (Multiple Sclerosis) dataset, and ImageNet.
Three models have also been adapted in this project. SEA-ResNet50 is used for the Cheng Brain Tumor dataset, MedicalInceptionv3 is used for the MSSEG2016 dataset, and DenseNet121 is used for ImageNet with pretrained weights. The pretrained weights for SEA-ResNet50 and MedicalInceptionv3 can be downloaded from here. These weights were used in attribution-based experiments.
Step 1: Download the Cheng brain tumour dataset.
Step 2: Split the data into train, val and test set. Use the provided split indices in the directory data/cheng/split_indices/ for reproducibility of the split.
Step 1: Download the dataset and extract it into train and test data inside data/msseg/original_data
Step 2: Run utils/prepare_msseg_data.py (To reproduce the results, use the existing data/msseg/final_dataset_split.json rather than the one generated by the code)
Step 3: Using the JSON file, create bounding box annotation XML files by running utils/create_bbox_annotation_msseg.py
Step 1: Download the dataset which includes the train, val set and bounding boxes.
Step 2: Run the following script to reorganise the validation directory into per-class sub-directories:
bash <(curl -s https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh)
Our repository is constructed based on Python 3.12.7.
Install the libraries as follows:
pip install -r requirements.txt
After training, update the model_weight_checkpoint path in your dataset config file. Replace --env_name with your conda environment name.
Cheng:
bash run_model_training.sh --dataset "cheng" --custom_code_dir "$(pwd)" --env_name "sciba_env" --run_model_training "true"
MS Lesion:
bash run_model_training.sh --dataset "ms_lesion" --custom_code_dir "$(pwd)" --env_name "sciba_env" --run_model_training "true"
Cheng:
bash run_all_experiments_once.sh --dataset "cheng" --custom_code_dir "$(pwd)" --env_name "sciba_env" --run_model_training "false"
MS Lesion:
bash run_all_experiments_once.sh --dataset "ms_lesion" --custom_code_dir "$(pwd)" --env_name "sciba_env" --run_model_training "false"
ImageNet:
bash run_all_experiments_once.sh --dataset "imagenet" --custom_code_dir "$(pwd)" --env_name "sciba_env" --run_model_training "false"
Cheng:
bash run_visualization.sh --dataset "cheng" --custom_code_dir "$(pwd)" --env_name sciba_env
MS Lesion:
bash run_visualization.sh --dataset "msseg16" --custom_code_dir "$(pwd)" --env_name sciba_env
ImageNet:
bash run_visualization.sh --dataset "imagenet" --custom_code_dir "$(pwd)" --env_name sciba_env
Once per-dataset results exist, build the combined paper figures. These run independently of --dataset:
Trade-off analysis (faithfulness vs. localization):
bash run_visualization.sh --run_plot_datasets "true" --custom_code_dir "$(pwd)" --env_name sciba_env
Qualitative comparison block:
bash run_visualization.sh --run_qualitative_block "true" --custom_code_dir "$(pwd)" --env_name sciba_env
Note: Both aggregate scripts read result paths that point to specific experiment runs, so update them to match your own outputs before running:
plot_datasets.pyreads the per-method summary CSVs (all_experiments_summary.csvandmean_and_std_summary.csv) produced in Step 2. The list of run directories is defined at the top of itsmain()— update it to your run timestamps.--code-dirsets the repository root used to build those paths.make_qualitative_block.pyreads the per-dataset grid images (*_grid_vis.png) fromvisualization/qualitative_figure/. Use--imagenet-img,--msseg-img,--cheng-img, and--outputto point to your own files.
Attribution maps are compared across all three datasets (ImageNet, MSSEG16, Cheng) for SC-IBA and competing methods. The top row (a–e) shows IBA variants — Middle Layer, ResNet-50 Ratio, InceptionV3 Ratio, Tuned Baseline, and SC-IBA (Ours) — while the bottom row (f–j) shows gradient-based baselines: EigenCAM, GradCAM, Guided Backpropagation, Guided GradCAM, and Saliency. SC-IBA produces tighter, more focused attribution maps that better align with the ground-truth regions of interest, avoiding the diffuse or background-heavy activations seen in several baselines.
Faithfulness vs. Localization Trade-off: Comparison of SC-IBA against baselines across three datasets. The x-axis shows faithfulness (Degradation 8x8 integral) and the y-axis shows localization (Ratio Top in BBox). Bubble sizes represent Dice scores for the medical datasets (b, c), while ImageNet (a) uses uniform markers.
This work was funded by Taighde Éireann – Research Ireland under Grant number 18/CRT/6183 (Ganepola, Adegboro) and partially supported by the Insight Research Ireland Centre for Data Analytics.
This implementation builds on the original Information Bottleneck Attribution (IBA) codebase (BioroboticsLab/IBA, MIT License).
Vayangi Ganepola *, Oluwabukola Grace Adegboro *, Julia Dietlmeier, Mayug Maniparambil, Simon P. Wilson, Aonghus Lawlor, Claudia Mazo and Noel E. O'Connor. "Self-Configurable Information Bottleneck Attribution", in ICPR 2026 XAIE4: 4th Workshop on Explainable and Ethical AI
* These authors contributed equally.


