Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Latent GIG Backup
|
| 2 |
+
|
| 3 |
+
Research project backup for Manifold-Aware Gradient Integration methods - exploring various path-based explainability methods for image classifiers including latent space paths, spectral decomposition, and manifold-aware approaches.
|
| 4 |
+
|
| 5 |
+
## Download & Extract
|
| 6 |
+
|
| 7 |
+
```bash
|
| 8 |
+
# huggingface_hub 설치 (필요시)
|
| 9 |
+
pip install huggingface-hub==0.20.2
|
| 10 |
+
|
| 11 |
+
# 다운로드
|
| 12 |
+
huggingface-cli download leekwoon/260204_magig_backup --repo-type dataset --local-dir ./latent_gig_data
|
| 13 |
+
|
| 14 |
+
# 무결성 확인 (선택사항)
|
| 15 |
+
cd latent_gig_data
|
| 16 |
+
md5sum -c checksums.md5
|
| 17 |
+
|
| 18 |
+
# 파일 합치기 및 압축 해제
|
| 19 |
+
cat data.tar.gz.part_* | tar -xzvf -
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
## Directory Structure
|
| 23 |
+
|
| 24 |
+
```
|
| 25 |
+
latent_gig/
|
| 26 |
+
├── cleanig/ # Core implementation modules
|
| 27 |
+
│ ├── explainer/ # Explainability algorithms (40+ methods)
|
| 28 |
+
│ ├── dataset/ # Dataset utilities (ImageNet, OxfordPet, CIFAR10)
|
| 29 |
+
│ ├── classifier/ # Classifier utilities
|
| 30 |
+
│ ├── metric/ # Evaluation metrics (DiffID, ROAR)
|
| 31 |
+
│ ├── mar_vae/ # MAR-VAE implementation
|
| 32 |
+
│ └── vae_wrapper.py # VAE wrapper for different models
|
| 33 |
+
├── configs/ # Hydra configuration files (40+ configs)
|
| 34 |
+
├── guided-diffusion/ # Guided diffusion model
|
| 35 |
+
├── models/ # Pre-trained models
|
| 36 |
+
├── notebooks/ # Jupyter notebooks for analysis
|
| 37 |
+
├── results/ # Experiment results
|
| 38 |
+
│ ├── benchmark_diffid/ # DiffID benchmark results
|
| 39 |
+
│ ├── roar/ # ROAR evaluation results
|
| 40 |
+
│ └── classifier_*/ # Trained classifiers
|
| 41 |
+
├── scripts/ # Execution scripts
|
| 42 |
+
│ ├── icml26_*/ # ICML 2026 experiment scripts
|
| 43 |
+
│ ├── diffid.py # DiffID evaluation
|
| 44 |
+
│ ├── roar.py # ROAR evaluation
|
| 45 |
+
│ └── measure_computation_time.py
|
| 46 |
+
├── papers/ # Related papers
|
| 47 |
+
└── requirements.txt # Python dependencies
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
## Key Components
|
| 51 |
+
|
| 52 |
+
### Explainers (40+ methods)
|
| 53 |
+
**Baseline Methods:**
|
| 54 |
+
- **IG**: Integrated Gradients (standard linear path)
|
| 55 |
+
- **GIG**: Guided IG (gradient-guided adaptive paths)
|
| 56 |
+
- **AGI**: Adversarial Gradient Integration
|
| 57 |
+
- **BIG**: Blur Integrated Gradients
|
| 58 |
+
- **SAMP**: Adaptive sampling method
|
| 59 |
+
- **XRAI**: Region-based attribution
|
| 60 |
+
|
| 61 |
+
**Latent Space Methods:**
|
| 62 |
+
- **Latent GIG**: Latent space paths with VAE models
|
| 63 |
+
- **EIG**: Enhanced IG in latent space
|
| 64 |
+
- **MIG**: Manifold IG (geodesic paths on VAE manifold)
|
| 65 |
+
- **Spectral EIG**: Spectral decomposition in latent space
|
| 66 |
+
|
| 67 |
+
**Spectral Methods:**
|
| 68 |
+
- **Spectral IG**: SVD-based coarse-to-fine path construction
|
| 69 |
+
- **Multiscale Spectral IG**: Multi-resolution spectral paths
|
| 70 |
+
|
| 71 |
+
**Experimental Methods:**
|
| 72 |
+
- **MCTS GIG**: Monte Carlo Tree Search guided paths
|
| 73 |
+
- **Curvature GIG**: Curvature-aware path construction
|
| 74 |
+
- **Boundary IG**: Decision boundary aware paths
|
| 75 |
+
|
| 76 |
+
### VAE Models Supported
|
| 77 |
+
- **MAR**: Masked Auto-Regressive VAE
|
| 78 |
+
- **SD1/SD2**: Stable Diffusion VAE (v1, v2)
|
| 79 |
+
- **KD**: Kandinsky VAE
|
| 80 |
+
|
| 81 |
+
### Datasets
|
| 82 |
+
- ImageNet (ILSVRC2012)
|
| 83 |
+
- Oxford-IIIT Pet Dataset
|
| 84 |
+
- CIFAR-10
|
| 85 |
+
|
| 86 |
+
### Evaluation Metrics
|
| 87 |
+
- **DiffID**: Insertion/Deletion curves
|
| 88 |
+
- **ROAR**: RemOve And Retrain
|
| 89 |
+
- Computation time benchmarks
|
| 90 |
+
|
| 91 |
+
## Usage
|
| 92 |
+
|
| 93 |
+
```bash
|
| 94 |
+
# Install
|
| 95 |
+
pip install -e .
|
| 96 |
+
|
| 97 |
+
# Run evaluation
|
| 98 |
+
python scripts/diffid.py --config-name latent_gig dataset=imagenet
|
| 99 |
+
python scripts/roar.py --config-name spectral_ig dataset=oxfordpet
|
| 100 |
+
|
| 101 |
+
# Measure computation time
|
| 102 |
+
python scripts/measure_computation_time.py --config-name ig dataset=imagenet
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
## Citation
|
| 106 |
+
|
| 107 |
+
Research project for ICML 2026 submission on manifold-aware gradient integration methods for explainable AI.
|