Repository navigation
Add beneficial-ownership-aml v1 template (control, family links, AML scoring, triage) - #105
Open
maxdemarzi wants to merge 1 commit into
Open
maxdemarzi wants to merge 1 commit into
maxdemarzi wants to merge 1 commit into
Conversation
Multi-reasoner AML template: recursive company control and accumulated ownership, close links, VADA-LINK family-link prediction (Louvain blocking, calibrated Graham classifier, optional link-prediction GNN), family control, AML pattern findings with noisy-OR scoring and explanations, a GNN account classifier fed with rule outputs, and MILP triage of cases under an analyst-hours budget. Implements Atzeni et al. (EDBT 2020; KR 2021 workshop), Bellomarini, Laurenza & Sallinger (2020) and Weber et al. (NeurIPS 2018 workshop). Ships golden fixtures from the papers' worked examples, a seeded synthetic data generator, evaluation scripts, a scale benchmark, tests and a runbook. Regenerates the v1 and root template indexes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
maxdemarzi
requested review from
jablonskidev and
somacdivad
as code owners
September 24, 2026 19:42
|
The templates docs preview for this pull request has been deployed to Vercel!
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
v1/beneficial-ownership-aml, an Advanced, Financial Services template that uses all four reasoner types to find who really controls the banks behind suspicious transaction reports (STRs), even when the subject owns nothing directly.It implements four papers: Atzeni et al. (EDBT 2020 and a KR 2021 workshop paper), Bellomarini, Laurenza & Sallinger (2020), and Weber et al. (NeurIPS 2018 workshop). It reproduces the worked examples from those papers, including the Italian FIU's "Acme Bank" case, as golden fixtures.
No existing template covers beneficial ownership or company control. The closest are
fraud-detection,money_laundering_motif_detection,entity_resolutionandtransaction_screening_local.What's in the folder
beneficial_ownership_local.py: primary runner on bundled synthetic data.beneficial_ownership.py: reference runner on Snowflake tables.ownership_rules_walkthrough.ipynbandrunbook.md.model/(one module per stage) andpipeline.py.expected.yaml.calibrate.pyandtune_weights.py, pluseval/,benchmarks/andtests/.make resultsreproduces every number in the README.This PR also regenerates the v1 and root template indexes. The repo's trailing-whitespace hook fixed line 3 of the root README in the same pass.
Validation
ruff check sample-template v0.13 v0.14 v1passes, as dopre-commitandgenerate_version_indexes.py --check.relationalai[gnn]==1.32.0:python -m pip install ., thenpython beneficial_ownership_local.py --no-gnn) was run from a fresh virtual environment. It finished in about 10 minutes (596 s) and reproduced the README's expected output exactly.MAX_CONTROL_DEPTH=20; with the default 12, the convergence guard stops it with a clear message rather than returning truncated control.Results on the sample (from the README)
The README reports the weak spots too. On this synthetic data the GNNs add little on top of the rules. The 0.85 family-link recall target from the design was missed; the result is reported, not tuned to the test set.
Notes for reviewers
The template works around several PyRel 1.32 behaviors. Each is documented in the README's Troubleshooting table and may be worth a look from the SDK side:
define(), are wrong on DuckDB. They're correct at query time and on Snowflake.model.data(df)on Snowflake drops any row with a null or""in any column, including excluded columns.Modelin the process; otherwise it raises[Ambiguous model].write_pandas) and long result fetches failed intermittently with S3 403s and SSL errors. The loader and the GNN stages retry.The ZIP link in the Quickstart follows the existing pattern (
docs.relational.ai/templates/zips/v1/<name>.zip) and depends on the docs pipeline.🤖 Generated with Claude Code