Skip to main content

EU AI Act Compliance

Classification

A KYB/AML system is not automatically high-risk under the EU AI Act. Recital 58 of Regulation (EU) 2024/1689 explicitly excludes AML and fraud detection from the Annex III use cases, so TrustRelay does not assert an Annex III high-risk classification for its core KYB/AML function. The EU AI Act acts as a conditional driver only where a specific deployment brings the tool into Annex III scope (for example, using the platform for creditworthiness scoring of a natural person, Annex III Point 5(b)).

Instead, TrustRelay implements the Art. 11-15 style controls — technical documentation, automatic logging, transparency, human oversight, accuracy monitoring, and quality management — as defensible good practice. These controls are independently grounded in GDPR Art. 22 (automated decisions producing legal or similarly significant effects on a person), the AMLR requirement for a documented, demonstrable risk-based methodology with 5-year retention, and AMLA supervision. TrustRelay makes or informs decisions that affect individuals' access to financial services and business relationships, and this obligation framework maps directly onto the architectural requirements for a production-grade KYB/KYC compliance platform — regardless of whether any given deployment is formally in scope of Annex III.

Article-by-Article Mapping

Article 11 — Technical Documentation

RequirementImplementationEvidence
General description of the AI systemArchitecture docs at trust-relay.pages.devProduct overview, data flow, tech stack pages
Design specifications and development methodologyS4U Methodology with design-before-code principleADR records (81 ADRs documented, latest ADR-0082)
Information about training dataNot applicable — TrustRelay uses deterministic algorithms + LLM API calls, no custom-trained modelsEVOI engine uses mathematical decision theory, not ML training
Development and testing proceduresPoC methodology with 90% workflow coverage targetpytest + testcontainers, no mocking without approval
Intended purpose and foreseeable misuseKYB/KYC compliance for financial services onboardingDocumented in PRD and business context
Post-market monitoring planCase intelligence pattern detection, officer decision calibrationEpisodic memory, cross-case pattern analysis

Article 12 — Automatic Logging

Article 12 requires high-risk AI systems to automatically record events during operation to enable post-hoc traceability and auditability.

RequirementImplementationEvidence
Automatic recording of eventsevoi_decisions table logs every AI decision31 rows per case: belief state, EVOI score, decision rationale
Traceability of AI operationsaudit_events table with full event historyCase lifecycle from creation to decision
Identification of input dataEvery finding has source field citing data originINSEE, NorthData, OpenSanctions, GLEIF, VIES
Network investigation audit trailEach entity scan logged with EVOI decision, depth, connection weightCompound risk scores are deterministic and reproducible
Immutabilityaudit_events is append-only and DB-enforced — a BEFORE UPDATE OR DELETE trigger, REVOKE UPDATE, DELETE on the app role, and an FK RESTRICT (migration 066, ADR-0064)Structural, not by convention: even a superuser must deliberately drop the trigger to mutate history
Retention periodMinimum 5-year retention aligned with 6AMLD/AMLRDeletion only on explicit officer action; case data retained per AML rules

The evoi_decisions log is the primary compliance artifact for Article 12. Every inference, every investigation decision, every skipped agent is recorded with the inputs that produced it. An auditor can reconstruct the exact state of the belief model at any point in a case's lifecycle.

Article 13 — Transparency

Article 13 requires that high-risk AI systems be designed so that deployers and affected persons can interpret their output and understand the basis for recommendations.

RequirementImplementationEvidence
Users can interpret outputConfidence scoring with 4-dimension breakdownEvidence completeness, source diversity, consistency, calibration
Logic behind alerts documentedEvery finding includes description + cited sources"Credible adverse media: Le Monde (2026-03-20), Reuters (2018-04-25)"
Risk scores explainableCompound risk scoring uses deterministic formulaJurisdiction +30, dissolved +20, shared directors +10 each
Recommendation reasoningESCALATE verdict includes specific risk drivers"ESCALATE: corruption allegations; 5 secrecy entities; SPF missing"
Model identificationEvery LLM call records model version and prompt templatePydanticAI all_messages() captured; PromptRegistry tracks version
Limitations disclosedInvestigation scope, missing sources, and data freshness surfacedSPF check failures, VIES API unavailability reported in findings

The confidence score decomposition — evidence completeness, source diversity, consistency, historical calibration — is specifically designed to satisfy Article 13(2)(b): the system must be interpretable to persons with reasonable technical knowledge. A compliance officer does not need to understand EVOI mathematics to understand "3/7 sources returned data; findings are internally consistent."

Article 14 — Human Oversight

Article 14 is the most architecturally consequential EU AI Act requirement. It mandates that high-risk AI systems be designed to allow effective oversight by natural persons.

RequirementImplementationEvidence
Human-in-the-loop by designREVIEW_PENDING state requires officer decisionSystem never auto-approves — workflow waits for officer_decision signal
Override capabilityOfficers can accept/reject/follow-up/escalateDecision recorded with timestamp and reasoning
System recommends, human decidesRecommendation is advisory ("ESCALATE"), not bindingOfficer can approve despite escalation recommendation
Cannot suppress risk signalsArchitectural constraint — findings cascade UP onlyNetwork insights propagate to parent case as HIGH findings
Fallback mechanismsManual document review always availableOfficer can upload/review documents independently of AI
Awareness of automation tendencyConfidence scores and source citations prevent blind trustOfficers see exactly which sources are missing
Audit of oversight decisionsOfficer identity, timestamp, and reasoning recordedaudit_events table; decision immutable post-submission

This is not a paper commitment. The Temporal workflow is structurally incapable of transitioning from REVIEW_PENDING to APPROVED without a human signal. There is no code path that bypasses this gate. The system can recommend ESCALATE, APPROVE, or REJECT — but the state machine will not advance until an officer issues the officer_decision signal.

Article 15 — Accuracy, Robustness, Cybersecurity

RequirementImplementationEvidence
Accuracy monitoringConfidence scoring tracks prediction qualityHistorical calibration dimension (agreement rate with officer decisions)
Multi-source corroboration7+ independent data sources per investigationCross-referencing reduces single-source errors
Bias mitigationFuzzy name matching with diacritics normalization"Zoë" and "Zoe" matched correctly
Data freshnessOpenSanctions auto-refresh (sanctions daily, PEPs weekly)831K entities, last refreshed tracked
Resilience to data gapsGuard-and-swallow pattern — individual check failures don't block investigationPEPPOL failure does not prevent OSINT completion
Resilience to adversarial inputsSource diversity prevents manipulation via single-source poisoningA false record in one registry is contradicted by others
CybersecurityTenant isolation with PostgreSQL Row Level Security (set_config('app.current_tenant', ...) GUC + per-table policies)RLS enforced at the DB layer — the app connects as the non-superuser trustrelay_app role (ADR-0050/0051), so FORCE ROW LEVEL SECURITY policies apply; the full test suite runs under enforcement

Article 17 — Quality Management System

Article 17 requires providers of high-risk AI systems to implement a documented quality management system covering the entire lifecycle.

RequirementImplementationEvidence
Risk management processEVOI engine with asymmetric utility functioncost_false_negative (10,000) >> reward_correct_approve (100) — 100x penalty for false approvals
Data governanceSource attribution on every factsource field on all findings, SourceBadge in UI
Post-market monitoringCase intelligence learns from officer decisionsEpisodic memory, pattern detection across cases
Documentation managementADR records + Docusaurus site81 ADRs, 250+ documentation pages
Testing and validationMandatory quality gates before every commitruff F-codes + TypeScript strict before merge
Corrective action processADR process for any deviation from PRDNew ADR required before implementing significant change
Traceability of changesGit history + ADR recordsEvery architectural decision recorded with rationale

EVOI Decision Framework

The Expected Value of Investigation (EVOI) engine is the core AI decision-making component. It satisfies EU AI Act transparency requirements because every decision is mathematically grounded and auditable.

Mathematical Foundation

EVOI(agent) = E[V(b_after)] - V(b_now) - cost(agent)

Where:

  • b_now = current belief state (probability distribution over clean / risky / critical)
  • b_after = expected belief state after running the agent
  • V(b) = expected utility of making the optimal decision given belief state b
  • cost(agent) = normalized cost of running the agent (time + API calls)

An agent is run if and only if EVOI > 0. This means: "the expected improvement in decision quality exceeds the cost of obtaining the information."

Utility Function (Asymmetric by Design)

DecisionOutcomeUtility
ApproveEntity is clean+100
ApproveEntity is risky-1,000
ApproveEntity is critical-10,000
RejectEntity is clean-50
RejectEntity is risky+500
RejectEntity is critical+1,000

The 100x asymmetry between cost_false_negative and reward_correct_approve is an explicit policy decision: the cost of approving a criminal entity is one hundred times greater than the cost of incorrectly rejecting a clean one. This is encoded in the EVOI utility function, not in ad-hoc rules.

This asymmetry is disclosed to officers via the confidence scoring UI and documented in the ADR for the EVOI engine.

Logged State Per Decision

Every row in evoi_decisions records:

FieldDescription
case_idParent case
iterationWorkflow iteration number
step_numberSequential step within iteration
decision_typeinvestigate, skip, or snapshot
candidate_agentAgent being evaluated for the next step
belief_p_cleanProbability mass on "clean"
belief_p_riskyProbability mass on "risky"
belief_p_criticalProbability mass on "critical"
evoi_valueComputed EVOI score (with v_now, e_v_after, step_cost)
connected_entity_idNetwork entity being evaluated
connection_weightStrength of link to primary entity
network_depthDepth in ownership/directorship graph
scan_tierInvestigation tier selected
decisionResulting decision (investigate / skip)
reasonHuman-readable decision explanation

For a typical Bolloré SE case, this table contains 31 rows covering the full investigation path: initial belief snapshots, 16 investigate decisions at depth 0, 6 skip decisions (budget exhausted), and 7 depth-1 discoveries.

Budget and Depth Constraints

The EVOI engine operates under two hard constraints:

  • Budget cap: Network investigation budget is capped at 3× the primary investigation cost. The system cannot spend unbounded resources on recursive entity discovery.
  • Depth cap: Recursive network scanning is bounded at max_network_depth=2. There are no infinite loops; the recursion terminates by construction.

Both constraints are logged. When an investigation is truncated by budget or depth, the truncation reason is recorded in audit_events.


Network Investigation Audit Trail

The network investigation module (entity graph scanning) presents a specific Article 12 compliance challenge: the investigation visits dozens of entities, each with its own risk signal, and the final case finding is a compound of all discovered signals. An auditor must be able to reproduce exactly why the system flagged a subsidiary three hops removed from the primary entity.

The audit trail design handles this as follows:

  1. Entity scan log: Every entity scanned — primary, subsidiary, director, UBO — is logged with the EVOI decision that authorized the scan.
  2. Finding provenance: Every finding records which entity it originated from, what scan tier produced it, and which external source returned the data.
  3. Signal propagation log: When a network finding is promoted to a parent case finding, the propagation is recorded with the connection weight and depth that justified promotion.
  4. Deterministic reproducibility: Because EVOI is a deterministic mathematical function given the belief state, any historical investigation can be replayed from the logged inputs.

Regulatory Alignment Summary

:::info The authoritative status is the live conformity record The table below states the design intent per obligation. The authoritative, per-obligation status is generated at runtime by the conformity record (ADR-0072, GET /api/conformity/ai-act.pdf), which grades each obligation satisfied / partial / gap from live model-tiers and the prompt registry, and names known gaps (SSO/SCIM, ISO, data residency) rather than asserting blanket "Full". Where the two differ, the generated record wins. See Live conformity record below. :::

EU AI Act ArticleDesign IntentImplementation Mechanism
Art. 6 + Annex III (Classification)Not Annex III for core KYB/AMLRecital 58 excludes AML/fraud detection; controls applied as good practice, conditionally in-scope only for e.g. creditworthiness scoring (Point 5(b))
Art. 11 (Technical Documentation)SatisfiedADRs, Docusaurus, methodology, PRD; generated conformity record
Art. 12 (Automatic Logging)Satisfiedevoi_decisions + DB-immutable audit_events (ADR-0064)
Art. 13 (Transparency)Satisfied (data-subject notice partial)Explainable scores, cited sources, model identification; full notice template pending legal review
Art. 14 (Human Oversight)SatisfiedHuman-in-the-loop by Temporal design; four-eyes on high-risk decisions (ADR-0070)
Art. 15 (Accuracy & Robustness)SatisfiedMulti-source, calibration, diacritics normalization; fail-closed "not assessed" (ADR-0067)
Art. 17 (Quality Management)SatisfiedEVOI asymmetric utility, ADR process, testing gates

Live conformity record (ADR-0072)

Rather than a static compliance claim, Trust Relay emits a machine-generated, data-driven conformity record at GET /api/conformity/ai-act.pdf (app/api/conformity.pyapp/services/ai_act_conformity_service.py). It builds the Art. 11–15 record from live system state — the configured model-tiers (ADR-0029) and the prompt registry (ADR-0026) — and grades each obligation satisfied / partial / gap with citations to the ADRs that substantiate it (ADR-0021 evidence bundles, ADR-0064 audit immutability, ADR-0070 four-eyes, ADR-0067 fail-closed). Crucially it names its own known gaps (SSO/SCIM, ISO 27001/42001/27701, data residency) instead of asserting blanket completeness — the honest-status posture the platform applies to compliance outputs applies to its own conformity claim too.


Additional Regulatory Coverage

The EU AI Act compliance architecture intersects with and reinforces several other regulatory frameworks:

GDPR

ArticleRequirementImplementation
Art. 22Right to human review of automated decisionsOfficer decision required — no automated final decisions
Art. 25Privacy by designTenant isolation via PostgreSQL Row Level Security (18 sensitive tables under FORCE RLS) — implemented. PII at-rest encryption: mechanism only, not an active controlEncryptedText (AES-256-GCM) exists but pii_encryption_enabled defaults to False, and only 3 columns use it (not name/DOB/national-id). See docs/controls-register.md
Art. 30Records of processing activitiesaudit_events captures processing steps; DomainEvent correlation/causation chains link related events
Art. 35Data Protection Impact AssessmentArchitecture supports DPIA; formal document pending (known gap)
Art. 15/16/17Data subject access, rectification, erasureapp/api/data_subject.py/api/data-subject/{access,rectify,erase}; erasure respects AML 5-year retention via DSRService. Known gap — erasure is incomplete: DSRService deletes from two Postgres tables, but its own declared DSR_SCOPE also covers MinIO ID-documents, goAML draft JSONB, and Neo4j Person nodes, which it does not touch. Tracked as M1-W6

AML Directives (6AMLD / AMLR)

RequirementImplementation
5-year minimum retentionAudit events and case data retained; deletion requires explicit officer action
SAR-ready audit trailgoAML XML export (Phase 1) generates structured transaction reports
Risk-based methodologyEVOI utility function is a documented, auditable risk-based approach
Documented due diligenceEach case produces a full investigation report with source citations

ISO 42001 — AI Management System

The EVOI framework aligns directly with ISO 42001's risk-based approach to AI governance:

  • Clause 6.1 (Risk assessment): EVOI utility function is a formal risk assessment model with documented parameters.
  • Clause 8.4 (AI system impact assessment): Confidence scoring provides the required uncertainty quantification.
  • Clause 9.1 (Monitoring and measurement): Historical calibration dimension tracks AI decision quality over time.
  • Clause 10.2 (Nonconformity and corrective action): ADR process provides the required corrective action mechanism.

ISO 27001 — Information Security Management

DomainImplementation
A.8 (Asset management)MinIO object storage with tenant-scoped prefixes
A.9 (Access control)Keycloak OIDC, JWKS token validation, role-gated endpoints, RLS at DB layer on sensitive tables
A.12 (Operations security)Audit logging, immutable event records
A.18 (Compliance)This documentation; ADR process; testing gates

Known Gaps

GapStatusMitigation
GDPR Art. 35 formal DPIA documentArchitecture supports it; document not yet draftedLow risk — DPIA can be produced from existing documentation
ISO 42001 formal certificationNot yet pursuedFramework alignment enables rapid certification path
ISO 27001 formal certificationNot yet pursuedPrerequisite for enterprise sales; planned post-PoC
SSO / SCIM enterprise identitySSO federation design only (ADR-0076); SCIM not implementedNamed as a gap in the conformity record; roadmap item
EU data-residency contractNot yet in placeNamed as a gap in the conformity record
Art. 13 transparency notice to data subjectsPortal discloses AI-assisted reviewFull notice template pending legal review

Resolved since 2026-06-11 (previously listed here):

  • audit_events immutability — now DB-enforced: migration 066 adds a BEFORE UPDATE OR DELETE trigger, REVOKE UPDATE, DELETE ON audit_events FROM trustrelay_app, and an FK RESTRICT (ADR-0064). See Compliance Controls §1.
  • Per-tenant audit isolationAuditService.log_event(..., tenant_id=...) now opens get_tenant_session(tenant_id); audit events are written under the case's actual tenant.

These gaps are known and tracked. None affect the architectural correctness of the compliance implementation; they represent documentation and process formalization work that follows the PoC phase. The live, data-driven conformity record (below) is the authoritative per-obligation status.