Skip to main content

lens-compliance

EU AI Act compliance assessment for AI model explanations.

Maps XAI library outputs (SHAP, LIME) through the IEEE 2894-2024 architectural taxonomy to generate structured evidence for EU AI Act Article 13/14/15 requirements.

  • Standard: IEEE 2894-2024 / EU AI Act Regulation 2024/1689
  • Deadline: EU AI Act transparency provisions effective August 2, 2026
  • Penalty: Up to €35M or 7% global turnover for non-compliance

Installation

pip install lens-compliance

Quick Start

from lens_compliance import assess

# With a SHAP explanation object
report = assess(
    explanation=shap_values,          # shap.Explanation, LIME, or dict
    model_name="CreditScore-v2",
    model_version="2.3.0",
    deployment_context="Consumer credit application scoring",
    high_risk_category="credit_scoring",
)

print(report.overall_status)         # COMPLIANT / PARTIAL / NON_COMPLIANT
report.save_markdown("report.md")
report.save_json("report.json")

REST API

pip install lens-compliance fastapi uvicorn
uvicorn lens_compliance.api:app --reload

POST /assess — full compliance assessment
GET /health — service status
GET /categories — EU AI Act Annex III high-risk categories
GET /articles — covered EU AI Act articles

EU AI Act Coverage

Article Requirement Quality Dimension
13(1) Transparency — System Interpretability Comprehensibility + Completeness
13(3)(b) Output Interpretation Guidance Comprehensibility + Compactness
14(4) Human Oversight — Override Enablement Faithfulness + Completeness
15(1) Robustness — Explanation Stability Stability across similar inputs
13(1) Annex III Individual Explanation (High-Risk) Local scope + Comprehensibility

IEEE 2894-2024 Taxonomy

Explanations are classified into four quadrants:

Local Global
Post-hoc SHAP, LIME Permutation importance
Ante-hoc Decision tree path Linear regression weights

High-Risk Categories (Annex III)

credit_scoring · hiring · insurance · medical_diagnosis · critical_infrastructure · education · law_enforcement · migration · administration_of_justice · biometric

License

Apache 2.0

Release files for lens-compliance 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lens-compliance 0.1.0
File Size Uploaded
lens_compliance-0.1.0.tar.gz 23.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lens-compliance 0.1.0
File Interpreter ABI Platform
lens_compliance-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.7 kB

Release files / lens_compliance-0.1.0.tar.gz

Download URL lens_compliance-0.1.0.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
10f8398b6329607e68210bba3441709b7ccfee2f515d2c1a47af5c5bd6951d37
BLAKE2b-256 checksum
How to use checksums
7624dd10bb85f10ccfe2a8275d0e722583d5c1762f3eae52ed5fd4641a849f37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / lens_compliance-0.1.0-py3-none-any.whl

Download URL lens_compliance-0.1.0-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec163ce030466d534f6e464a4dea50784b1b92c3b444a61472b4c0451e3252f8
BLAKE2b-256 checksum
How to use checksums
c0ef44d4e1f5aa7d01ecbe108f3a534538b61c5d8148275532b9f7e177270196
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page