AffectLog's Trustworthy AI (ALT-AI) - Design Document – Prometheus-X Components & Services

AffectLog's Trustworthy AI (ALT-AI) - Design Document

AffectLog's Trustworthy AI (ALT-AI) provides a set of tools for explaining, visualizing, and understanding complex machine learning models. It aims to facilitate model transparency, interpretability, and aid compliance with emerging regulatory standards (e.g., GDPR, EU AI Act). ALT-AI helps data scientists, analysts, and stakeholders interpret model predictions, identify feature importance, assess fairness, and evaluate whether models align with ethical and legal requirements.

Technical Usage Scenarios & Features

ALT-AI supports both global (overall model behavior) and local (individual predictions) explanations. It helps users:

The toolbox is designed to be flexible and scalable, while prioritizing privacy, security, and compliance.

Features/Main Functionalities

Technical Usage Scenarios

Requirements

Timeline: Feasibility discussions (e.g., integration with Decentralized AI Training BB) are tentatively planned for Q1 2025. After these discussions, a more precise project timeline and roadmap will be established. A high-level work plan has been shared with the relevant Building Block (BB) and Work Package leader for consideration.

Integrations

Direct Integrations with Other BBs

Integrations via Connector

Relevant Standards

Input / Output Data

Supported Model Types

Supported Data Formats

Architecture

ALT-AI comprises several components:

(See classDiagram-v1.1.png for a class diagram, sequenceDiagram-v1.1.png for dynamic behavior.)

Configuration and Deployment Settings

Third Party Components & Licenses

Implementation Details

Built with flexibility, compliance, and scalability in mind. Integration feasibility with the Decentralized AI Training BB will be assessed in Q1 2025, after which a detailed roadmap will be provided.

Partners & Roles

Usage In The Dataspace

Leveraging AffectLog for Organizational Skill Gap Analysis

ALT-AI can interpret models for skill gap analysis, clarifying key features driving skill shortages and verifying fairness. If combined with decentralized training, privacy is enhanced.

OpenAPI Specification

The implemented system exposes a full OpenAPI 3.1 specification at /openapi.json (served by the FastAPI backend) and committed at docs/openapi.yaml. Endpoints cover dataset ingestion, audit execution, model explanations, compliance exports, and PDC connector operations. The specification is validated in CI via scripts/validate_openapi.sh.


Test Specification

The acceptance test criteria defined here are fulfilled by the automated test suite in tests/. Run with:

make test        # unit + integration (fast)
make test-slow   # 1 M-row performance benchmark
make security    # bandit static analysis + pip-audit
Requirement Test Module What Is Verified
R1 — ML framework adapters tests/unit/test_model_adapters.py Each adapter (sklearn, ONNX, PyTorch, TF, HTTP, dummy) accepts a numpy input and returns a prediction dict
R2 — Explanation APIs tests/unit/test_explanations.py Feature importance, permutation importance, and multi-model comparison return correctly structured dicts
R2 — OpenAPI contract tests/integration/test_api_openapi_contract.py Live FastAPI server matches committed docs/openapi.yaml spec
R3 — PII detection tests/unit/test_pii_detection.py Regex patterns flag direct identifiers; known Maskott fields (EntityId, ActivitySessionId) detected
R3 — Pseudonymisation tests/unit/test_pseudonymizer.py HMAC-SHA256 output is deterministic for same key, non-reversible, and different across keys
R4 — Scalability tests/performance/test_synthetic_million_rows.py 1 M-row CSV processed end-to-end (ingest → profile → metrics) within time bound
Fairness metrics tests/unit/test_metrics_fairness.py, test_metrics_concentration.py, test_metrics_coverage.py Gini ∈ [0,1]; balance ratio ∈ [0,1]; Coverage@K monotonically non-decreasing with K
xAPI transform tests/unit/test_csv_to_xapi_transform.py, test_maskott_csv_schema.py Maskott CSV rows produce valid xAPI statements with required fields
Recipe pipeline tests/unit/test_recipes.py, tests/integration/test_cli_audit_pipeline.py YAML recipe loads, runs, and produces reproducible config_hash
JSON-LD export tests/unit/test_jsonld_export.py Output is valid JSON-LD with @context, @type: AISystem, and EU AI Act Annex IV fields
PDC connector tests/integration/test_pdc_mock.py Mock PDC server accepts ODRL-policy-gated requests and returns dataset catalog

For a full capability-to-test mapping, D3.7 requirements traceability, and the formal TRL 5 evidence statement, see docs/trl-assessment.md.


D3.7 Alignment

This design document is the conceptual baseline (TRL 1–2) for the EDGE-Skills WP3 D3.7 deliverable. The progression from concept to validated implementation follows this chain:

  1. This document (docs/design-document.md) — requirements, architecture, standards alignment.
  2. D3.7 deliverable (docs/deliverables/D3.7-final-BB-Trustworthy AI.docx) — scoped building-block description within the Trustworthy AI BB (alongside CARiSMA and LOLA), submitted to the EDGE-Skills consortium.
  3. Implementation (src/affectlog/) — all R1–R4 requirements implemented; v0.1.0 released 2024-12-20.
  4. TRL assessment (docs/trl-assessment.md) — formal TRL 5 evidence, D3.7 capability checklist, and verification procedure against production datasets.