| # DiffIG GIG Backup |
|
|
| Research project backup for DiffIG (Diffusion-based Integrated Gradients) and GIG (Guided Integrated Gradients) - advanced explainability methods for image classifiers. |
|
|
| ## Download & Extract |
|
|
| ```bash |
| # huggingface_hub 설치 (필요시) |
| pip install huggingface_hub |
| |
| # 다운로드 |
| huggingface-cli download leekwoon/diffig_gig_backup --repo-type dataset --local-dir ./diffig_data |
| |
| # 무결성 확인 (선택사항) |
| cd diffig_data |
| md5sum -c checksums.md5 |
| |
| # 파일 합치기 및 압축 해제 |
| cat data.tar.gz.part_* | tar -xzvf - |
| ``` |
|
|
| ## Directory Structure |
|
|
| ``` |
| diffig/ |
| ├── diffig/ # Core implementation modules |
| │ ├── explainer/ # Explainability algorithms |
| │ │ ├── ig.py # Integrated Gradients |
| │ │ ├── ig2.py # Improved IG |
| │ │ ├── gig.py # Guided IG |
| │ │ ├── agi.py # Adversarial GI |
| │ │ ├── diffig.py # DiffIG (our method) |
| │ │ ├── mig.py # Manifold IG |
| │ │ ├── big.py # Boundary IG |
| │ │ ├── eig.py # Enhanced IG |
| │ │ ├── sg.py # Smooth Gradients |
| │ │ ├── spi.py # SmoothGrad Path Integration |
| │ │ ├── fullgrad.py # FullGrad |
| │ │ └── gradcam.py # GradCAM |
| │ ├── dataset/ # Dataset utilities |
| │ │ ├── oxfordpet_dataset.py |
| │ │ ├── oxfordflower_dataset.py |
| │ │ └── miniimagenet_dataset.py |
| │ ├── classifier/ # Classifier utilities |
| │ ├── diffusion/ # Diffusion model components |
| │ ├── metric/ # Evaluation metrics |
| │ │ ├── diffid.py # DiffID metric |
| │ │ ├── complexity.py # Complexity metrics |
| │ │ └── path_stability.py |
| │ ├── mar_vae/ # MAR-VAE implementation |
| │ └── mig_vae/ # MIG-VAE implementation |
| ├── configs/ # Configuration files |
| │ ├── benchmark/ # Benchmark configs for each method |
| │ │ ├── ig.yaml |
| │ │ ├── gig.yaml |
| │ │ ├── agi.yaml |
| │ │ ├── diffig.yaml |
| │ │ ├── mig.yaml |
| │ │ └── ... |
| │ ├── classifier/ # Classifier training configs |
| │ └── diffig/ # DiffIG specific configs |
| ├── pipelines/ # Execution pipelines |
| │ ├── benchmark/ # Benchmark evaluation scripts |
| │ │ ├── diffid.py |
| │ │ ├── save_attributions.py |
| │ │ └── eval_attributions.py |
| │ ├── classifier/ # Classifier training pipelines |
| │ └── diffig/ # DiffIG training pipelines |
| ├── notebooks/ # Jupyter notebooks |
| │ ├── cvpr26/ # CVPR 2026 figures |
| │ └── analysis notebooks |
| ├── results/ # Experiment results |
| │ ├── benchmark/ # Benchmark results |
| │ ├── attributions/ # Saved attributions |
| │ ├── classifier_*/ # Trained classifiers |
| │ └── vae_*/ # Trained VAE models |
| ├── scripts/ # Shell scripts |
| │ ├── benchmark_cvpr26.sh |
| │ ├── analyze_baseline_results.py |
| │ └── analyze_diffig_results.py |
| ├── papers/ # Related papers |
| └── requirements.txt # Python dependencies |
| ``` |
|
|
| ## Key Components |
|
|
| ### Explainer Methods |
| - **IG**: Integrated Gradients |
| - **GIG**: Guided Integrated Gradients |
| - **AGI**: Adversarial Gradient Integration |
| - **DiffIG**: Diffusion-based IG (our method) |
| - **MIG**: Manifold Integrated Gradients |
| - **BIG**: Boundary Integrated Gradients |
| - **EIG**: Enhanced Integrated Gradients |
| - **SG**: SmoothGrad |
| - **SPI**: SmoothGrad Path Integration |
| - **FullGrad**: Full-Gradient Saliency |
| - **GradCAM**: Gradient-weighted Class Activation Mapping |
|
|
| ### Datasets Supported |
| - Oxford-IIIT Pet Dataset (37 categories) |
| - Oxford Flower Dataset (102 categories) |
| - Mini-ImageNet (100 classes) |
|
|
| ### Models Supported |
| - ResNet18 |
| - ResNet34 |
| - VGG16 |
| - Inception |
|
|
| ### Evaluation Metrics |
| - **DiffID**: Diffusion-based attribution quality metric |
| - **Insertion/Deletion**: Standard faithfulness metrics |
| - **Complexity**: Attribution complexity measures |
| - **Path Stability**: Path consistency metrics |
|
|
| ## Key Features |
|
|
| - Comprehensive benchmark of attribution methods |
| - Novel DiffIG method using diffusion models for improved paths |
| - Support for multiple datasets and architectures |
| - Extensive evaluation metrics including novel DiffID metric |
| - Reproducible experiments with configuration files |
|
|
| ## Citation |
|
|
| This is a research project for developing and benchmarking improved explainability methods for image classifiers, with focus on path-based attribution methods and diffusion models. |
|
|