How jsenk347/ai-bench works
ai-bench is a research benchmarking pipeline that generates explanations for NLP, classical ML, vision, and generative language models, then evaluates explanation consistency and fidelity. The principal workflow is CLI input → RunRequest → model resolution/loading and group detection → group-specific protocols → report rendering. The graph also retains the documented sweep experiments and the shared explanation, metric, and report layers. Some source is unsampled; links to those areas are limited to relationships shown in the README or SOURCE INDEX.
Main entry points: run.py Benchmark runner · protocols.py Group protocols · main.py CLI entry · explanation_generators IG, SHAP, Ablation CAM
Components 25
User interface
- CLI entry
main.py - Input selection
xai_pipeline/cli/input_paths.py - Briefing and rendering
xai_pipeline/cli/render.py
Benchmark orchestration
- Run request
xai_pipeline/pipeline/requests.py - Model registry
xai_pipeline/pipeline/registry.py - Model detection
xai_pipeline/pipeline/detection.py - Model and data loading
xai_pipeline/pipeline/loaders.py - Benchmark runner
xai_pipeline/pipeline/run.py - Group protocols
xai_pipeline/pipeline/protocols.py
Explanation and evaluation
- IG, SHAP, Ablation CAM
xai_pipeline/explanation_generators - Explanation objects
xai_pipeline/explanation_objects - Consistency metrics
xai_pipeline/metrics/consistency.py - Fidelity masking
xai_pipeline/metrics/fidelity_core.py - Metric validity
xai_pipeline/metrics/validity.py - Dataset preflight
xai_pipeline/metrics/preflight.py - Confidence sampling
xai_pipeline/metrics/sampling.py
Reports
- Report schema
xai_pipeline/report/schema.py - Plain-language glossary
xai_pipeline/report/glossary.py
Research sweeps
- Sweep utilities
experiments/model_sweep/common.py - Classical sweep
experiments/model_sweep/classical_sweep.py - NLP sweeps
experiments/model_sweep/nlp_sweep.py - Vision sweep
experiments/model_sweep/vision_sweep.py - Generative LLM sweep
experiments/model_sweep/genllm_sweep.py
Other components
- Researcher
- JIRA dataset source
Connections 31
- Researcher → CLI entry: starts
- CLI entry → Input selection: collects input
main.py - CLI entry → Briefing and rendering: renders output
main.py - Input selection → Run request: builds request
xai_pipeline/cli/input_paths.py - Input selection → Model registry: resolves model
xai_pipeline/cli/input_paths.py - CLI entry → Benchmark runner: starts benchmark
- Benchmark runner → Run request: accepts request
xai_pipeline/pipeline/run.py - Benchmark runner → Model registry: resolves spec
xai_pipeline/pipeline/run.py - Benchmark runner → Model detection: detects group
xai_pipeline/pipeline/run.py - Benchmark runner → Model and data loading: loads subject
xai_pipeline/pipeline/run.py - Benchmark runner → Group protocols: dispatches protocol
xai_pipeline/pipeline/run.py - Group protocols → IG, SHAP, Ablation CAM: uses explainers
xai_pipeline/pipeline/protocols.py - Group protocols → Consistency metrics: computes consistency
xai_pipeline/pipeline/protocols.py - Group protocols → Fidelity masking: computes fidelity
xai_pipeline/pipeline/protocols.py - Group protocols → Metric validity: checks capability
xai_pipeline/pipeline/protocols.py - Group protocols → Dataset preflight: checks dataset
xai_pipeline/pipeline/protocols.py - Group protocols → Confidence sampling: samples instances
- IG, SHAP, Ablation CAM → Explanation objects: produces explanations
xai_pipeline/explanation_generators/base.py - IG, SHAP, Ablation CAM → Fidelity masking: uses masking
xai_pipeline/explanation_generators/__init__.py - IG, SHAP, Ablation CAM → Consistency metrics: uses consistency
xai_pipeline/explanation_generators/__init__.py - Benchmark runner → Report schema: returns report
- Briefing and rendering → Report schema: renders report
xai_pipeline/cli/render.py - Briefing and rendering → Plain-language glossary: explains scores
xai_pipeline/cli/render.py - Model and data loading → JIRA dataset source: downloads data
xai_pipeline/pipeline/loaders.py - NLP sweeps → Sweep utilities: uses utilities
experiments/model_sweep/nlp_sweep.py - Vision sweep → Sweep utilities: uses utilities
experiments/model_sweep/vision_sweep.py - Generative LLM sweep → Sweep utilities: uses utilities
experiments/model_sweep/genllm_sweep.py - Generative LLM sweep → Benchmark runner: runs benchmark
experiments/model_sweep/genllm_sweep.py - NLP sweeps → Benchmark runner: runs benchmark
experiments/model_sweep/nlp_sweep.py - Vision sweep → Benchmark runner: runs benchmark
experiments/model_sweep/vision_sweep.py - Classical sweep → Sweep utilities: uses utilities