How bioroboticslab/iba-paper-code works
This is a research implementation for producing image-attribution heatmaps, especially Per-Sample and Readout Information Bottlenecks, alongside gradient, occlusion, Grad-CAM, and LRP methods. The main workflow configures a model and attribution method, computes a heatmap, then evaluates or visualizes it; evaluation scripts cover bounding boxes, degradation, and sensitivity-n. The graph preserves these documented capabilities. Several links rely on the SOURCE INDEX or README rather than sampled implementation excerpts, so unsampled internal behavior is not inferred beyond those references.
Main entry points: script_utils.py Model and method setup · factory.py Method factory · readout_bottleneck.py Readout bottleneck · backprop.py Backprop methods
Components 23
Attribution methods
- Method factory
attribution_bottleneck/attribution/factory.py - Backprop methods
attribution_bottleneck/attribution/backprop.py - Averaged gradients
attribution_bottleneck/attribution/averaging_gradient.py - Guided backprop
attribution_bottleneck/attribution/guided_backprop.py - Grad-CAM
attribution_bottleneck/attribution/grad_cam.py - Occlusion maps
attribution_bottleneck/attribution/occlusion.py - LRP attribution
attribution_bottleneck/attribution/lrp/lrp.py - Per-sample reader
attribution_bottleneck/attribution/per_sample_bottleneck.py - Readout reader
attribution_bottleneck/attribution/readout_bottleneck.py
Bottleneck internals
- Layer estimators
attribution_bottleneck/bottleneck/estimator.py - Per-sample bottleneck
attribution_bottleneck/bottleneck/per_sample_bottleneck.py - Readout bottleneck
attribution_bottleneck/bottleneck/readout_bottleneck.py - Spatial Gaussian kernel
attribution_bottleneck/bottleneck/gaussian_kernel.py
Evaluation workflows
- Model and method setup
attribution_bottleneck/evaluate/script_utils.py - ImageNet data provider
attribution_bottleneck/utils/data.py - Degradation evaluation
attribution_bottleneck/evaluate/degradation.py - Image perturbation
attribution_bottleneck/evaluate/perturber.py - Bounding-box task
scripts/eval_bounding_boxes.py - Degradation task
scripts/eval_degradation.py - Sensitivity-n task
scripts/eval_sensitivity_n.py
Shared image utilities
- Image baselines
attribution_bottleneck/utils/baselines.py - Heatmap transforms
attribution_bottleneck/utils/transforms.py
Other components
- Research user
Connections 30
- Research user → Bounding-box task: runs task
README.md - Research user → Degradation task: runs task
README.md - Research user → Sensitivity-n task: runs task
README.md - Bounding-box task → Model and method setup: configures setup
scripts/eval_bounding_boxes.py - Degradation task → Model and method setup: configures setup
scripts/eval_degradation.py - Sensitivity-n task → Model and method setup: configures setup
scripts/eval_sensitivity_n.py - Model and method setup → Method factory: selects methods
attribution_bottleneck/evaluate/script_utils.py - Model and method setup → Per-sample reader: constructs reader
attribution_bottleneck/evaluate/script_utils.py - Model and method setup → Readout reader: constructs reader
attribution_bottleneck/evaluate/script_utils.py - Model and method setup → Readout bottleneck: loads model
attribution_bottleneck/evaluate/script_utils.py - Model and method setup → ImageNet data provider: creates provider
attribution_bottleneck/evaluate/script_utils.py - Method factory → Backprop methods: selects method
attribution_bottleneck/attribution/factory.py - Method factory → Averaged gradients: selects method
attribution_bottleneck/attribution/factory.py - Method factory → Guided backprop: selects method
attribution_bottleneck/attribution/factory.py - Method factory → Grad-CAM: selects method
attribution_bottleneck/attribution/factory.py - Method factory → Occlusion maps: selects method
attribution_bottleneck/attribution/factory.py - Method factory → LRP attribution: selects method
attribution_bottleneck/attribution/factory.py - Averaged gradients → Backprop methods: uses gradients
attribution_bottleneck/attribution/averaging_gradient.py - Guided backprop → Backprop methods: extends method
attribution_bottleneck/attribution/guided_backprop.py - Per-sample reader → Layer estimators: reads statistics
attribution_bottleneck/attribution/per_sample_bottleneck.py - Per-sample reader → Per-sample bottleneck: optimizes bottleneck
attribution_bottleneck/attribution/per_sample_bottleneck.py - Readout reader → Readout bottleneck: uses bottleneck
attribution_bottleneck/attribution/readout_bottleneck.py - Per-sample bottleneck → Spatial Gaussian kernel: uses kernel
attribution_bottleneck/bottleneck/per_sample_bottleneck.py - Readout bottleneck → Spatial Gaussian kernel: uses kernel
attribution_bottleneck/bottleneck/readout_bottleneck.py - Readout bottleneck → Per-sample bottleneck: reuses module
attribution_bottleneck/bottleneck/readout_bottleneck.py - Degradation evaluation → Image perturbation: orders perturbations
attribution_bottleneck/evaluate/degradation.py - Degradation evaluation → Image baselines: builds baseline
attribution_bottleneck/evaluate/degradation.py - Image baselines → Image perturbation: uses grid views
attribution_bottleneck/utils/baselines.py - Backprop methods → Heatmap transforms: postprocesses maps
attribution_bottleneck/attribution/backprop.py - Occlusion maps → Image baselines: applies baseline
attribution_bottleneck/attribution/occlusion.py