How abraham08-wq/xai-amlbench works
XAI-AMLBench combines a reproducible AML benchmark with a compliance-officer console. Its principal workflow generates synthetic transaction graphs, engineers account features, trains and evaluates graph detectors, serves account scores and explanations, then turns explanation evidence into validated SAR narratives. The repository also includes live-graph ingestion and calibration components, plus a web console and gateway. Relationships below follow explicit README descriptions and indexed imports; unsampled subsystem wiring is omitted where it cannot be verified.
Main entry points: gnn_aml_core/main.py Scoring and explain API · train.py GNN training · xai_explainer/main.py Narrative API · features.py Feature engineering
Components 18
Graph data
- Synthetic graph generator
aml_synth/graph_generator.py - Graph exporters
aml_synth/exporters.py - Feature engineering
gnn_aml_core/features.py - Live graph
gnn_aml_core/livegraph.py - Kafka ingestion
gnn_aml_core/kafka_ingest.py
Detection models
- GNN training
gnn_aml_core/train.py - GATv2 and RGCN
gnn_aml_core/models.py - Baseline detectors
gnn_aml_core/baselines.py - Model evaluation
gnn_aml_core/evaluation.py - Score calibration
gnn_aml_core/calibration.py - Scoring and explain API
gnn_aml_core/main.py
Explanation and audit
- Explanation extractor
xai_explainer/extractor.py - Narrative API
xai_explainer/main.py - SAR fact and narrative builder
xai_explainer/sar_generator.py - Audit log
xai_explainer/audit_log.py
Analyst application
- Analyst console
frontend/src/app/page.tsx - Application gateway
backend/main.py
Other components
- Compliance analyst
Connections 20
- Compliance analyst → Analyst console: uses console
README.md - Analyst console → Application gateway: requests services
README.md - Synthetic graph generator → Graph exporters: exports graphs
aml_synth/graph_generator.py - Synthetic graph generator → Feature engineering: supplies graph data
README.md - Feature engineering → GNN training: builds training inputs
gnn_aml_core/train.py - GNN training → GATv2 and RGCN: trains detectors
gnn_aml_core/train.py - GNN training → Baseline detectors: compares against
gnn_aml_core/train.py - GNN training → Model evaluation: evaluates results
gnn_aml_core/train.py - GNN training → Score calibration: calibrates scores
gnn_aml_core/train.py - Feature engineering → Live graph: builds graph features
gnn_aml_core/livegraph.py - Kafka ingestion → Live graph: ingests transactions
- Scoring and explain API → GATv2 and RGCN: runs inference
gnn_aml_core/main.py - Scoring and explain API → Feature engineering: uses graph features
gnn_aml_core/main.py - Scoring and explain API → Score calibration: calibrates scores
gnn_aml_core/main.py - Narrative API → Scoring and explain API: requests explanations
xai_explainer/main.py - Narrative API → SAR fact and narrative builder: builds validated narrative
xai_explainer/main.py - Narrative API → Audit log: records audit evidence
- Application gateway → Scoring and explain API: routes scoring
README.md - Application gateway → Narrative API: routes narratives
README.md - Analyst console → Scoring and explain API: requests explanations
frontend/src/app/page.tsx