Downloads · 30 days
0
adnanallemon/aml-campaigngraph-temporal-motif
aml-campaigngraph-temporal-motif is a machine learning model from adnanallemon. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
TemporalMotifGraphModel is the primary campaign-level model for AML-CampaignGraph v1.0.0. It is an interpretable tree-ensemble model over temporal transaction-graph features. It is not a graph neural network and does…
Downloads · 30 days
0
Access
Public
Updated Aug 21, 2026
Repo size
1.7 MB
Likes
0
Public
Click a slice to open those files.
.joblib1.7 MB · 97%
From the Hugging Face model README
TemporalMotifGraphModel is the primary campaign-level model for AML-CampaignGraph v1.0.0. It is an interpretable tree-ensemble model over temporal transaction-graph features. It is not a graph neural network and does not perform learned message passing. The model uses six temporal windows, node-level activity and relational features, campaign-level structural-temporal features, a campaign ranking head, calibrated scores, conservative abstention, and ranked evidence transactions.
The release checkpoint is published at Hugging Face Models: adnanallemon/aml-campaigngraph-temporal-motif. The source implementation is src/aml_campaigngraph/final_model.py, and the full-data checkpoint is created by scripts/build_final_model.py.
The model is intended for reproducible research, benchmark comparison, teaching, temporal feature engineering, campaign-level ranking, calibration analysis, selective prediction, and explanation-fidelity experiments on synthetic graphs. It can be used to compare controlled temporal graph representations with simpler baselines.
Do not use this model to accuse a person or institution, identify criminality, close an account, file a suspicious activity report, or make legal, credit, employment, insurance, or financial decisions. The output is a research signal generated from a synthetic simulator. It is not a probability of wrongdoing and is not validated for production AML monitoring.
| Component | Description |
|---|---|
| Input | The CSV bundle defined in DATA_CARD.md: nodes, directed timestamped transactions, campaigns, campaign membership, alerts, and metadata. |
| Node representation | Activity, amount, counterparties, reciprocity, reach, degree, and six-window temporal features. |
| Campaign representation | Graph size, transaction volume, duration, amount dispersion, channel diversity, degree concentration, reciprocity, burstiness, window activity, entropy, and small-amount share. |
| Output score | A campaign-level score in [0, 1] used for ranking. |
| Prediction | A predicted campaign pattern or NO_CAMPAIGN_FOUND. |
| Evidence | Ranked transaction identifiers and a compact evidence table. |
| Abstention | A boolean signal when the score is below threshold or the evidence set is too small. |
The threshold is configurable and defaults to 0.5 in the released checkpoint. Evidence is a model-derived research proxy. It is not a causal explanation and should not be treated as proof that any transaction is illicit.
The checkpoint is fit on all 180 graphs in AML-CampaignGraph v1.0.0: 4,320 nodes and 14,790 transactions. The training bundle contains six synthetic scenarios, 90 positive campaign graphs, and 90 hard-negative graphs. The published data uses seed 2025; the full experiment suite evaluates independent seeds 2025–2029.
Evaluation uses complete graph-level partitions. Transactions and nodes from a test graph are never used during training. The primary split is stratified, the temporal split holds out a future time window, and the ood split holds out a scenario-and-difficulty combination. Metrics include campaign Average Precision (AP), F1, recall, Brier score, expected calibration error (ECE), recall at review budgets, abstention/coverage, and evidence-fidelity probes.
The baselines below were evaluated on reference seed 2025; the TemporalMotifGraphModel values are means across five independent seeds. Standard deviations and per-run values are available in artifacts/final/experiment_metrics.csv.
| Split | Campaign AP | Campaign F1 | Campaign recall | Brier | ECE |
|---|---|---|---|---|---|
| Primary | 1.000 | 1.000 | 1.000 | 0.0058 | 0.050 |
| Temporal | 1.000 | 1.000 | 1.000 | 0.0067 | 0.051 |
| OOD | 1.000 | 0.694 | 1.000 | 0.1451 | 0.282 |
The controlled simulator makes campaign ranking comparatively easy for several methods. The OOD F1 and calibration values demonstrate that the model is not uniformly reliable under distribution shift. These results should be interpreted as benchmark behavior, not as evidence of real-world AML performance.
On the same seed-2025 graph-disjoint partitions, the final model improves the Alpha CampaignGraphModel campaign F1 from 0.944 to 1.000 on the temporal split and from 0.235 to 0.682 on OOD. OOD campaign recall increases from 0.133 to 1.000, while campaign AP remains saturated at 1.000 for both models. The complete ablation table is artifacts/final/ablation_metrics.csv.
The model can learn simulator-specific artifacts, including timing, amount buckets, channel patterns, and motif construction choices. Six synthetic patterns cannot represent the full diversity of legitimate and illicit financial behavior. OOD calibration remains materially weaker than in-distribution calibration, and evidence-fidelity metrics are proxies based on controlled edge perturbation rather than human-validated explanations. No result establishes transfer to real banking data.
A responsible future deployment would require lawful institution-specific data, privacy and security review, model-risk governance, validation against investigator-labelled cases, drift monitoring, bias analysis, human review, threshold governance, and a documented appeals process. None of those conditions are supplied by this checkpoint.
pip install -e ".[dev]"
python scripts/build_final_dataset.py
python scripts/run_final_experiments.py
python scripts/build_final_model.py
python scripts/generate_final_visuals.py
python -m pytest -q
The code and checkpoint metadata are released under the MIT license. Cite AML-CampaignGraph v1.0.0 using CITATION.cff and cite the accompanying research manuscript when using the model or benchmark.