File size: 4,954 Bytes
47ea0b6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# 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.