Skip to content

Glassbox v3.0.0 — Enterprise EU AI Act Compliance Platform

Choose a tag to compare

@designer-coderajay designer-coderajay released this 20 Mar 11:12
· 258 commits to main since this release

Glassbox v3.0.0 — Enterprise EU AI Act Compliance Platform

Enforcement deadline: August 2026. Every high-risk AI system in financial services, healthcare, HR, and legal must be able to explain its decisions. Glassbox is the audit infrastructure.


What's new in v3.0.0

🧪 BiasAnalyzer — EU AI Act Article 10(2)(f)

Three bias tests built for regulatory submission:

  • counterfactual_fairness_test() — swaps demographic attributes in prompt templates, measures probability gap across groups
  • demographic_parity_test() — flags positive outcome rate disparity across demographic groups
  • token_bias_probe() — detects stereotypical associations between demographic and role tokens
  • Works offline (pre-computed logprobs) or online (live model_fn)
  • BiasReport.to_markdown() generates Annex IV Section 5 ready for submission
from glassbox import BiasAnalyzer
ba = BiasAnalyzer()
result = ba.counterfactual_fairness_test(
    prompt_template="The {attribute} applied for the loan",
    groups={"gender": ["male applicant", "female applicant"]},
    target_tokens=["approved", "denied"],
    model_fn=my_model,
)

🔔 Webhooks

Full webhook system on the REST API:

  • POST /v1/webhooks — register callback URL with HMAC-SHA256 signing
  • Fires on job.completed and job.failed events
  • X-Glassbox-Event + X-Glassbox-Signature headers on every delivery

📊 Multi-Audit History Dashboard

  • F1 faithfulness trend chart (Chart.js) with Grade C threshold line
  • Grade distribution bar chart (A/B/C/D counts)
  • Audit table with Date/Model/Grade/F1/Status
  • "Load from API" button connects to GET /v1/audit/reports

🖼️ Circuit SVG Export

  • "Download SVG" button in the D3 circuit graph panel
  • Exports standalone glassbox-circuit.svg with inlined dark-mode styles
  • Paper-ready at any resolution

📋 Risk Register — Article 9

Persistent cross-audit risk tracking:

  • ingest_annex_report() auto-extracts Section 5 risks from any AnnexIVReport
  • Deduplication + occurrence counting across sessions
  • Status lifecycle: open → mitigated | accepted | escalated
  • trend_summary() returns compliance_health: green | amber | red
  • to_markdown() for embedding in PRs and reports
from glassbox import RiskRegister
rr = RiskRegister("risks.json")
rr.ingest_annex_report(annex, model_name="gpt2")
print(rr.trend_summary())  # {'compliance_health': 'amber', 'open': 2, ...}

🧪 Test Suites

  • 76 new tests: tests/test_audit_log.py (32) + tests/test_widget.py (44)
  • All offline with tmp_path fixtures

Install

pip install glassbox-mech-interp==3.0.0

Quick start

from glassbox import GlassboxV2, AuditLog, BiasAnalyzer, RiskRegister, AnnexIVReport

gb   = GlassboxV2(model)
log  = AuditLog("audit.jsonl")
rr   = RiskRegister("risks.json")

result = gb.analyze("The capital of France is", " Paris", " London")
log.append_from_result(result)

annex = AnnexIVReport(model_name="GPT-2", provider_name="Acme Corp",
                       provider_address="London, UK",
                       system_purpose="Financial decision support",
                       deployment_context=DeploymentContext.FINANCIAL_SERVICES)
annex.add_analysis(result)
rr.ingest_annex_report(annex)

Full changelog: CHANGELOG.md
PyPI: pip install glassbox-mech-interp
HuggingFace Space: designer-coderajay/Glassbox-AI-2.0-Mechanistic-Interpretability-tool

Full Changelog: v3.0.0...v3.0.0