Frequently Asked Questions
This page addresses common questions and issues when using Delta-Audit.
General Questions
What is Δ-Attribution?
Δ-Attribution (Delta-Attribution) is a framework for understanding how model explanations change when models are updated. It provides metrics to quantify and analyze these changes, helping researchers and practitioners understand the impact of model updates on interpretability.
Why should I use Delta-Audit?
Delta-Audit helps you:
- Understand how model explanations change when you update your models
- Quantify the behavioral alignment between attribution changes and output changes
- Identify which algorithms maintain better explanation consistency
- Audit model updates for interpretability changes
What algorithms does Delta-Audit support?
Delta-Audit supports:
- Logistic Regression
- Support Vector Classification (SVM)
- Random Forest
- Gradient Boosting
- K-Nearest Neighbors
What datasets are included?
Delta-Audit includes:
- Breast Cancer (binary classification)
- Wine (multi-class classification)
- Digits (multi-class classification)
Installation and Setup
How do I install Delta-Audit?
# Clone the repository
git clone https://github.com/arshiahemmat/delta-audit.git
cd delta-audit
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install package
pip install -e .
pip install -r requirements.txt
What are the system requirements?
- Python 3.9 or higher
- 4GB+ RAM (for full benchmark)
- 1GB+ free disk space
- Multi-core processor recommended
I get “Command not found: delta-audit”
This usually means the package isn’t installed properly. Try:
Then verify installation:
python -c "import delta_audit; print('Installed successfully')"
Usage Questions
How long does the full benchmark take?
- Quickstart: 2-5 minutes
- Full benchmark: 10-30 minutes (depending on your machine)
- Figure generation: 1-2 minutes
How much memory does Delta-Audit use?
- Quickstart: ~500MB RAM
- Full benchmark: ~2GB RAM
- Figure generation: ~1GB RAM
Can I run only specific algorithms or datasets?
Yes! Create a custom configuration file:
datasets:
- wine # Only wine dataset
algo_pairs:
logreg: # Only logistic regression
- A: {C: 1.0, penalty: l2, solver: lbfgs}
B: {C: 0.1, penalty: l2, solver: lbfgs}
pair_name: pair1
Then run:
delta-audit run --config my_config.yaml
How do I interpret the metrics?
- BAC (Behavioral Alignment Coefficient): Higher values (closer to 1) indicate better alignment between attribution changes and output changes
- DCE (Differential Conservation Error): Lower values indicate better conservation of attribution sums
- Δ Magnitude L1: Higher values indicate larger changes in feature importance
- Rank Overlap @10: Higher values indicate more similar top features between models
Technical Questions
What attribution method does Delta-Audit use?
Delta-Audit uses occlusion-based attribution methods. It replaces each feature with a baseline value (typically the mean) and measures the change in model output.
How are baselines computed?
By default, Delta-Audit uses the mean of each feature across the training set as the baseline. This ensures that occlusion values are centered around the data distribution.
What’s the difference between BAC and DCE?
- BAC measures correlation between attribution change magnitude and output change magnitude
- DCE measures how much the sum of attribution changes differs from the actual output change
Why do I get DCE = 0?
DCE = 0 typically means that the sum of attribution changes exactly equals the output changes. This is rare and usually indicates:
- Perfect conservation (ideal case)
- Very small attribution changes
- Numerical precision issues
Why do I get Rank Overlap = 1?
Rank Overlap = 1 means the top-10 features are identical between models A and B. This can happen when:
- Models are very similar
- Attribution changes are minimal
- Only a few features have non-zero attributions
How do I handle different random seeds?
Delta-Audit uses a fixed random seed (42) for reproducibility. To use different seeds:
- Modify the
random_state
in your configuration file
- Or modify the code in
src/delta_audit/runners.py
Troubleshooting
“No module named ‘delta_audit’”
This means the package isn’t installed. Try:
“File not found” errors
Check that:
- Configuration files exist in the specified paths
- Results directories exist
- You have write permissions
Memory errors during full benchmark
Try:
- Reduce the number of algorithms in your configuration
- Use fewer datasets
- Increase your system’s available RAM
- Close other applications
Slow execution
To speed up execution:
- Use fewer algorithms or datasets
- Use a machine with more CPU cores
- Consider using GPU acceleration (if available)
Import errors for dependencies
Install missing dependencies:
pip install numpy pandas scikit-learn matplotlib scipy seaborn pyyaml
Common issues:
- Missing results files - run the benchmark first
- Insufficient disk space
- Permission issues - check write permissions
Extending Delta-Audit
How do I add a new algorithm?
- Add the algorithm configuration to your YAML config
- Implement the algorithm in
src/delta_audit/runners.py
- Test with quickstart first
How do I add a new dataset?
- Add dataset loading function to
src/delta_audit/runners.py
- Add the dataset to your configuration file
- Ensure proper preprocessing (scaling, etc.)
How do I add a new metric?
- Implement the metric in
src/delta_audit/metrics.py
- Add it to the
compute_all_metrics
function
- Update documentation
Can I use my own models?
Yes! You can use Delta-Audit with your own models by:
- Implementing the attribution computation for your model
- Using the metrics functions directly
- Following the same interface as the built-in algorithms
- Use fewer experiments: Customize your configuration
- Parallel processing: The code uses joblib for parallel processing
- Memory management: Close other applications
- Hardware: Use a machine with more CPU cores and RAM
Can I use GPU acceleration?
Currently, Delta-Audit is CPU-based. GPU acceleration would require:
- Implementing GPU versions of attribution methods
- Using libraries like PyTorch or TensorFlow
- Modifying the metrics computation for GPU
Use Python’s built-in profiling:
python -m cProfile -o profile.stats -m delta_audit.cli run --config configs/full_benchmark.yaml
Then analyze with:
import pstats
p = pstats.Stats('profile.stats')
p.sort_stats('cumulative').print_stats(10)
Research Questions
How do I cite Delta-Audit?
@article{hemmat2025delta,
title={Delta-Audit: Explaining What Changes When Models Change},
author={Hemmat, Arshia},
journal={arXiv preprint},
year={2025}
}
How do I reproduce the paper results?
Follow the exact steps in the Benchmarks documentation:
- Install Delta-Audit
- Run the full benchmark
- Generate figures
- Compare with published results
Can I contribute to Delta-Audit?
Yes! Contributions are welcome. Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Where can I get help?