Glassbox traces the circuit behind a decision, measures how faithful that explanation is, and drafts Annex IV documentation from it. One function call, on open-weight models.
Attribution patching, ACDC, causal scrubbing, DAS and Hessian bounds behind one Python API. pip install and run on an open-weight model.
Read the quickstart I own complianceAll nine sections laid out from one analysis: measured fields filled, everything only you can supply clearly marked. Your engineers run it, you review and complete it.
See what you hand overMost explainability tools describe a model from the outside. Glassbox reads the inside. It ranks every attention head by the effect it has on the output, then keeps only the heads the decision depends on.
Attribution patching scores each attention head by its causal effect on the prediction. Three forward passes, no correlation guesswork.
Sufficiency and comprehensiveness isolate the smallest circuit that still reproduces the behaviour, scored against full ablation. The explanation is measured, not asserted.
The nine Annex IV sections are laid out from the analysis. Fields the measurement supports are filled; fields only the provider can supply, including the §8 declaration of conformity, are marked for you to complete.
Wall-clock timings from gb.analyze() on Apple M1 Pro, weights pre-loaded; ACDC baseline per Conmy et al. 2023. Full methodology, hardware specs and raw data in BENCHMARKS.md — reproduce with scripts/benchmark.py. Every approximation is disclosed in the result dict.
The same call accepts any prompt and any set of answer tokens, and picks a counterfactual when you let it. Whether a faithful circuit exists is what it measures: raw GPT-2 has none for credit decisions, and Glassbox says so.
# faithfulness is measured, not assumed from glassbox import GlassboxV2, build_annex_iv_vault gb = GlassboxV2(model) result = gb.analyze( prompt="Credit score 620. Decision:", correct=[" approved", " approve", " yes"], incorrect=[" denied", " deny", " no"], certify="hessian", ) result["faithfulness"]["f1"] # 0.00 — gpt2 has no faithful credit circuit result["evidence_tier"]["tier"] # self-graded vault = build_annex_iv_vault(result)
Load a supported open-weight transformer. No fine-tuning and no labels.
It finds the circuit, verifies the counterfactual actually moved the decision, and scores how faithful the explanation is — then grades its own evidence tier.
A draft Annex IV record for your own review, completion and sign-off.
Providers of high-risk AI systems must keep Annex IV technical documentation (Article 11 of Regulation (EU) 2024/1689). Application dates and penalties were amended by Regulation (EU) 2026/1744; check the current legal text. Glassbox drafts the parts of that documentation a measurement can support.
Every run produces a structured Annex IV draft as JSON. Measured evidence (the circuit, faithfulness metrics and their evidence tier) is filled in; data governance, risk measures and the declaration are left for you, and marked so nothing is silently skipped.
Circuit discovery and faithfulness metrics are MIT-licensed. The compliance engine and the investigation layer are under the Business Source License 1.1: free inside your own organisation, licensed when offered to others.
For researchers and engineers exploring circuits.
BSL 1.1 components, used inside your own organisation.
For products or services built on the BSL components.
This summary is not the license text; LICENSE, LICENSE-COMMERCIAL and NOTICE in the repository govern. No hosted service is offered at present.
Black-box explainers describe a model from the outside and can't tell you whether the explanation is true. Circuit tools can, but they're slow. Glassbox keeps the rigour and drops the cost.
| Approach | Faithfulness measured? | Needs open weights? | Speed (GPT-2) |
|---|---|---|---|
| Glassbox attribution patching | Yes (suff / comp / F1) | Yes | 1.8s |
| ACDC (Conmy 2023) | Yes | Yes | ~65s · ~37× slower |
| SHAP / LIME (black-box) | No guarantee | No (works on APIs) | varies |
| Confidence scores | No (r = 0.009) | No | instant |
Each row is a different trade-off, not a verdict. Black-box methods are the right tool when you only have API access — Glassbox ships a black-box auditor for exactly that case. Where the weights are available, it gives you ACDC-grade circuits at a fraction of the runtime, and unlike a confidence score, an explanation whose faithfulness is actually measured.
Nine architecture families validated end-to-end (82M → 12B), with grouped-query attention and RMSNorm handled correctly — GPT-2, Pythia/GPT-NeoX, GPT-Neo, OPT, Llama-3, Mistral, Gemma-2, Qwen2/2.5, Yi (Llama-architecture) and Phi-3 — ten model series across nine distinct architectures. Beyond ~13B, gradient-based attribution needs multi-GPU memory; that path is implemented but not yet validated live.
| Class | Parameter range | Strategy | Status |
|---|---|---|---|
| small / medium | 82M to 12B | standard | validated — 9 families |
| large | 13B to 70B | checkpoint | needs multi-GPU · pending validation |
| xlarge / xxlarge | 70B to 200B+ | checkpoint + offload | implemented · unverified (cluster) |
Reproducible in VALIDATION_LOG.md; comprehensiveness is specificity-checked against a random same-size circuit at every scale. Circuit-level analysis requires open weights — closed API models (Claude, GPT, Gemini) can only receive black-box documentation support, because faithfulness can't be measured without access to the weights.
Glassbox picks a counterfactual that fits the prompt in front of it, so you can point it at decision-style prompts. Whether the model has a faithful circuit for that decision is then measured, not assumed.
Loan affordability and limit decisions
examplePriority and severity classification
exampleCV screening and candidate ranking
examplename-swap, antonym, semantic negation, random-token fallback
autoA confident answer is not the same as a correct one.
The open-source core is on PyPI today. Leave your email to hear about releases and design-partner pilots. No hosted service, price or launch date is promised.
The waitlist form collects your email address (and anything you choose to add) so we can send you Glassbox release updates and, if you ask, information about pilots — that's the only purpose. Data controller: Ajay Pravin Mahale (contact: mahale.ajay01@gmail.com). Processing happens on Vercel (hosting), Resend (email delivery) and, if enabled, Upstash (storage), acting as processors. We don't sell or share your address, don't use it for third-party marketing, and delete it on request or once it's no longer needed. You can ask for access, correction, or deletion at any time by emailing the address above (GDPR Arts. 15–17). This site sets no cookies and loads no third-party fonts or trackers. Full privacy policy.