Update AMLworld-Compact dataset documentation and case-index tables
Browse filesFiles changed (4)
- NOTICE.md+2-3
- README.md+228-345
- extras/HI-Small/case_index.csvAdded
- extras/LI-Small/case_index.csvAdded
46 unmodified lines47484950515253545546 unmodified lines`amlc_NNNNN` on 2026-08-10. The digits are unchanged and are the rowposition. Recorded model outputs still quote the earlier form, because theyare recorded output and were not rewritten.6. **Corrections after the first build.** Listed in `docs/known_issues.md` inthe code repository, including a Horvitz-Thompson weight defect on LI-Smallthat was corrected, and a typology encoding defect in two consumers.## What is not CDLA46 unmodified lines474849505152535446 unmodified lines`amlc_NNNNN` on 2026-08-10. The digits are unchanged and are the rowposition. Recorded model outputs still quote the earlier form, because theyare recorded output and were not rewritten.6. **Corrections after the first build.** LI-Small HT weights were corrected,and typology decoding was aligned with the released integer-to-label mapping.## What is not CDLA
25 unmodified lines2627282930313263 unmodified lines969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854863 unmodified lines49049149249349449525 unmodified lines- extended|other-amlworldsize_categories:- 1K<n<10Kpretty_name: AMLCompactconfigs:- config_name: HI-Smalldefault: true63 unmodified linesnum_examples: 2268---# AMLCompact[Paper](https://openreview.net/forum?id=VouFZFf8Ph) ·[Code](https://github.com/nat-nischw/AMLCompact) ·[Results](https://github.com/nat-nischw/AMLCompact/tree/main/results) ·[Licence](./NOTICE.md) ·[Report a bad case](https://huggingface.co/datasets/natnitaract/amlcompact-eval/discussions)An anti-money-laundering benchmark small enough to run a language model on. Two AMLworld splitscompressed 271x and 611x, with Horvitz-Thompson weights that put the full-split metrics back,and each edge serialised as a typed two-hop subgraph that fits a context window.The evaluation dataset for *AMLCompact: Bias-Free Downsampling Makes AMLworld Tractable forLLM Evaluation*, an ARR submission committed to EMNLP 2026 (Resources and Evaluation).Code, prompts, the full pipeline and every result table live in the companion repository,[`nat-nischw/AMLCompact`](https://github.com/nat-nischw/AMLCompact). Scoring a model againstthis dataset needs only that package and the arrays below; reproducing the paper end to endneeds the repository as well.**Frozen at v1.0**, the revision the paper cites. Errata are recorded rather than patched.| Config | Rows | Illicit | Typology-labelled | Full test split | Reduction | sum(ht_weight) ||---|---:|---:|---:|---:|---:|---:|| HI-Small | 3,753 | 1,251 | 791 | 1,015,669 | 271x | 1,015,669 || LI-Small | 2,268 | 756 | 174 | 1,384,810 | 611x | 1,384,810 |The weight column sums to the full split size by construction. That is the property the datasetexists for, and it is asserted at build time and again on every load.## BaselinesSo you can tell whether your number is any good. All HT-weighted, so all describing the fullsplit rather than these few thousand rows.| | HI-Small | LI-Small ||---|---:|---:|| Supervised ensemble, detection F1 | 70.9 | 29.6 || Seven open-weight LLMs | 40.7 to 50.7 | 40.6 to 50.7 || Their typology macro-F1 | 5.6 to 18.4 | 2.5 to 13.0 || Best ML and LLM hybrid | 87.4 | 84.9 |The LLM band is the finding, not a weak result to beat: under the 1:2 design ratio apredict-all-illicit guess scores about 50, so every model in that band is at the floor. Recallreaches 100% and precision sits near a third. Per-model tables, the prompting variants and thehybrid's construction are in the[repository](https://github.com/nat-nischw/AMLCompact#baselines).## Quickstart```pythonfrom datasets import load_datasetds = load_dataset("natnitaract/amlcompact-eval", "HI-Small", split="test")```One row is one case. `typed_graph_text` is the prompt as the evaluated models received it, andthe task is two questions: is this edge illicit, and which of eight laundering typologies is it.## Self-testTo check your copy is intact, run it against the shipped ensemble probabilities. They areprobabilities, so a threshold is needed; the paper's operating points are 0.80 on HI-Small and0.48 on LI-Small:```pythonimport numpy as npfrom huggingface_hub import snapshot_downloadroot = snapshot_download("natnitaract/amlcompact-eval", repo_type="dataset",allow_patterns=["extras/HI-Small/*"])d = f"{root}/extras/HI-Small"probs = np.load(f"{d}/ensemble_probs_coreset.npy")labels = np.load(f"{d}/labels.npy")w = np.load(f"{d}/ht_weights.npy")assert w.sum() == 1_015_669 # the property the dataset exists forpreds = (probs >= 0.80).astype(int) # LI-Small uses 0.48tp = w[(labels == 1) & (preds == 1)].sum()fp = w[(labels == 0) & (preds == 1)].sum()fn = w[(labels == 1) & (preds == 0)].sum()P, R = tp / (tp + fp), tp / (tp + fn)print(100 * P, 100 * R, 200 * P * R / (P + R)) # 93.4555 57.0743 70.8685```You should get P/R/F1 = 93.4555 / 57.0743 / 70.8685 on HI-Small and73.2984 / 18.5185 / 29.5671 on LI-Small. Those are the full-split values: the supervisedensemble flags no down-sampled edge, so the weighted computation on 3,753 rows and theunweighted one on 1,015,669 are the same arithmetic on the same edges.## Estimation propertiesThe paper's §3.3 under the same name, restated so this page stands alone. What the weightingguarantees depends on which metric you ask for, and the distinction is the whole reason thedataset is usable.The Horvitz-Thompson estimator is unbiased for a population total, so the weightedtrue-positive, false-positive and false-negative **counts** are each unbiased for theirfull-split values, for any predictor. Precision and F1 are ratios of two such counts. They areconsistent and asymptotically unbiased; in finite samples they are neither, and the relativebias is bounded by the coefficient of variation of the denominator (Särndal et al., 1992, §5.6).Recall escapes this. Every illicit edge is retained at weight one, so its denominator is theobserved population count rather than an estimate, and R is exact for any predictor.The zeros reported for the supervised ensemble are stronger still, and are not an instance ofthe ratio guarantee: it flags no down-sampled benign edge at its operating threshold, so everyedge entering P, R and F1 carries weight one, the subset and full-split computations coincide,and |ΔF1| stays below 1e-15, which is double precision rather than a tolerance.That exactness belongs to the scored predictor and not to the coreset alone. A predictor thatdoes flag down-sampled edges pays about 470x per false positive on HI-Small and falls back tothe ratio regime with real sampling variance. That is the case worth knowing about before youread a weighted number off an over-flagging model, and it is why the LLM rows under Baselinescollapse onto the trivial floor once prevalence is restored.```pythonimport numpy as nplabels = np.array(ds["label"])weights = np.array(ds["ht_weight"])preds = your_model_predictions # shape (len(ds),)tp = weights[(labels == 1) & (preds == 1)].sum()fp = weights[(labels == 0) & (preds == 1)].sum()fn = weights[(labels == 1) & (preds == 0)].sum()P = tp / (tp + fp)R = tp / (tp + fn)F1 = 2 * P * R / (P + R)```The reference implementation is `amlc.triage.doubt_triage.ht_weighted_prf` in the repository;the block above mirrors it, kept here so the card stands alone.**Do not report an unweighted mean.** Unweighted numbers describe this coreset and not thepopulation it stands for. Under the 1:2 design ratio a predict-all-illicit guess scores about50% F1 unweighted and 0.25% weighted, which is the whole distance between the two frames.## Files and licences`load_dataset` pulls only `data/`, which is 31.7 MiB. A `git clone` pulls everything,which is 1.11 GiB, almost all of it supervised model weights. Six file families were missingfrom the previous version of this list.| Path | What it is | Size | Licence ||---|---|---:|---|| `data/<config>/test-*.parquet` | the evaluation set, one row per case, eleven columns | 31.7 MiB | CDLA || `extras/<config>/*.npy` | indices, HT weights, labels, typologies, ensemble probabilities | 0.2 MiB | CDLA || `extras/<config>/features_gfp.npz` | 79 GFP columns per case, plus the column names | 1.0 MiB | CDLA || `extras/<config>/case_index.parquet` | seven-column join table; its weight column is `weight` | 0.1 MiB | CDLA || `ml_baselines/weights/` | all three members, 5 seeds each, plus GCPAL's pretrained encoder | 604.0 MiB | MIT || `ml_baselines/test_probs/` | full-split probabilities and typology heads, per member and seed | 494.5 MiB | MIT || `build_report.json` | what the builder asserted at publish time | 461 B | MIT || | **total** | **1.11 GiB** | |Under `ml_baselines/weights/`, each member also ships `seed_*_typology.{txt,json}` for thetypology head and `seed_*_meta.json`, which records that member's own tuned threshold. Thatper-member threshold is not the ensemble operating point: HI-Small LightGBM seed 42 carries0.7339, against the ensemble's 0.80. Confusing the two is an easy way to fail to reproduce anumber.## Schema| Field | Type | Description ||---|---|---|| `case_id` | string | `amlc_00000` .. Stable identifier, also the row position. || `center_edge_id` | string | The AMLworld edge this case is centred on. || `subset_index` | int64 | Row index into the full temporal test split. || `label` | int8 | 1 = illicit, 0 = benign. || `illicit` | bool | `label == 1`. || `typology` | string? | One of fan-out, fan-in, cycle, scatter-gather, gather-scatter, stack, bipartite, random. Null for benign edges and for illicit edges with no upstream typology label. || `typology_id` | int8 | Integer encoding, -1 for benign. Order as listed above. || `ht_weight` | float64 | Horvitz-Thompson importance weight. Apply when aggregating P, R and F1. || `n_transactions` | int64 | Transactions in the two-hop subgraph. || `n_tokens_approx` | int64 | Approximate prompt length. || `typed_graph_text` | string | The typed-graph prompt for this case, as the evaluated models saw it. |## Column dictionary: `case_index.parquet`A join table for reading labels and weights without pulling the 31.7 MiB prompt column. Itsweight column is named `weight` and the evaluation parquet's is `ht_weight`. That is a realinconsistency and not a subtlety: joining the two without renaming leaves you with two weightcolumns or none, and the failure is silent.| Column | Type | Note ||---|---|---|| `case_id` | string | the join key, `amlc_NNNNN` || `center_edge_id` | string | the AMLworld edge this case is centred on || `label` | int64 | 1 illicit, 0 benign. int8 in the evaluation parquet || `typology` | string | null for benign and for illicit edges with no upstream label || `n_transactions` | int64 | transactions in the two-hop subgraph || `subset_index` | int64 | row index into the full temporal test split || `weight` | float64 | the Horvitz-Thompson weight. Called `ht_weight` in the other file |## Reading the dataset viewerEach config is a single parquet file written in row groups of about 99 rows, 38 of them onHI-Small and 23 on LI-Small, so the viewer renders its first page without decompressing thewhole column. `typed_graph_text` averages 72,604 bytes on HI-Small and 73,936 on LI-Small, andreaches 416,675, so the viewer truncates that cell; the value on disk is complete.The `typology` column looks empty on the first page and that is correct, not a loadingfailure. Typology labels exist only for illicit edges that carry one upstream: 791 of 1,251illicit rows on HI-Small and 174 of 756 on LI-Small, so 2,962 and 2,094 rows respectively aregenuinely null. Rows are in `case_id` order, which is the join key against the releasedpredictions and the rubric annotations, so the file is deliberately not sorted to put labelledrows first.To browse labels and weights without pulling the prompt column, use `extras/<config>/`: thesame values as `.npy`, plus `case_index.parquet` as a join table, 1.5 MB in total. The `.npy`copies are int64 where the parquet uses int8 for `label` and `typology_id`, so compare valuesand not dtypes. `case_index.parquet` names its weight column **`weight`**, not `ht_weight`;joining it to the parquet without renaming gives you two weight columns or none.## Case identifiersCases are `amlc_00000` .. `amlc_03752` (HI-Small) and `amlc_00000` .. `amlc_02267` (LI-Small);the digits are the row position. The identifier is the join key across the parquet,`case_index.parquet`, the released predictions, the rubric annotations, and the text inside`typed_graph_text`. The runs predate this form and were retagged for the release, which`docs/known_issues.md` in the code repository records.## Supervised baselinesAll three ensemble members ship their weights under `ml_baselines/weights/` and their full-splitprobabilities under `ml_baselines/test_probs/`. The repository has the loading code and thetraining pipeline; two caveats belong here because they are properties of the data.`GCPAL+GFP` is not a separately trained model: it is the `GCPAL_knn` checkpoints re-inferred onthe temporal test split. Reproducing its probabilities needs the line-graph construction overthe full transaction graph, so use the shipped probabilities unless you are rebuilding fromAMLworld.`feat_dim` in those checkpoints is 84 while `features_gfp.npz` carries 79 columns, and that isnot a mismatch to fix. GCPAL's node features are the 79 GFP dimensions plus 5 it aggregatesitself from the line graph: the mean of each of the three edge features, the log degree, andthe smallest temporal delta on any incoming edge.---# Dataset Card for AMLCompact## Dataset Description- **Repository:** https://github.com/nat-nischw/AMLCompact- **Paper:** https://openreview.net/forum?id=VouFZFf8Ph- **Point of Contact:** `<NAME AND ADDRESS>`- **Curated by:** the paper's authors, from IBM's AMLworld- **Language:** English, in that the serialised prompts are English; the underlying records aretransaction fields rather than natural languageEach row is one transaction edge from AMLworld's temporal test split, with its two-hopneighbourhood flattened into a prompt, its ground-truth label and typology, and the importanceweight that maps a metric computed here onto the full split.## Uses### Direct UseScoring a detector on a transaction-graph AML benchmark whose weightedmetrics stand in for a million-edge split; measuring where a prompt change acts, using thefour-step rubric rather than a single F1 number; and building selective ML-and-LLM routersagainst a fixed evaluation design. It is a research benchmark and a measurement instrument.### Out-of-Scope Use**Not for deployment, and the paper's own numbers are the argument.** Restoring the nativeprevalence by Horvitz-Thompson weighting puts every one of the fourteen evaluated LLM cells onthe trivial predict-all baseline: F1 between 0.23 and 0.25 on HI-Small against a floor of 0.25,and between 0.09 and 0.11 on LI-Small against 0.11. The hybrid that does lift F1 routes on thecoreset stratum, which is a property of how the evaluation set was drawn and not of the edge, soa bank cannot compute it; the implementable version, a grid-searched gate on the supervised scorealone, recovers 2.3 of Doubt Triage's 55.3 pp on LI-Small and falls below the ensemble onHI-Small. Nothing here is evidence that an LLM should decide whether a transaction issuspicious.**Also out of scope.** Estimating what precision a detector would reach in production at thenative rate, which needs a deployment study and not a coreset. Any use that treats a flaggededge as an accusation about a person or an institution. Training on the evaluation split, whichis what the released supervised probabilities are for.**Personal and sensitive information.** AMLworld is agent-generated: accounts, amounts andcounterparties are synthetic and correspond to no real person or institution, which is why IBMpublishes it openly. That provenance is the basis for the claim. What we verify mechanically isintegrity rather than content: `scripts/00_download_amlworld.py` checks pinned SHA256 digestsbefore anything is derived. We did not run a content sweep over the 6,021 serialised prompts,because they are built from that synthetic source by a deterministic serialiser.## Dataset StructureOne `test` split per config. There is no train or validation split here: the coreset is builtfrom the test split only, and AMLworld's train and validation splits are left intact for anyonefitting a model.The sampler is the only filter applied. Every illicit edge is retained, benign edges are drawnby supervised difficulty at a 1:2 design ratio, and each retained edge carries the inverse ofits stratum's inclusion probability as `ht_weight`. The distinct weight values are the design:| Config | weight 1.0 | down-sampled weights ||---|---:|---|| HI-Small | 1,614 rows | 469.338 on 1,426 rows, 483.561 on 713 || LI-Small | 1,025 rows | 1100.359 on 415, 1103.017 on 414, 1136.442 on 414 |Every illicit row carries weight exactly 1.0 in both splits, which is why recall is exact forany predictor and only precision and F1 are estimates.## Curation RationaleAMLworld's test split is around a million edges and serialises to roughly 1B tokens per pass,which puts in-context evaluation out of reach. Prior work fell back on small curated subsetsthat no longer matched the 0.05 to 0.12 percent illicit rate, so supervised models and languagemodels could not be compared on one set. This is the same split compressed enough to prompt,with the weights that make the comparison valid.## Source DataAMLworld (Altman et al., NeurIPS 2023 Datasets and Benchmarks), IBM's syntheticanti-money-laundering transaction dataset. The original CSVs are not redistributed; fetch themfrom Kaggle under your own account. Serialisation is deterministic given the retained edge setexcept for the neighbour cap, which samples under a process-global random state, so the shippedtext is the text that was evaluated rather than something a rebuild reproduces byte-for-byte.## Personal and Sensitive InformationCovered under Out-of-Scope Use above: the records are agent-generated and correspond to no realperson or institution, and what we verify mechanically is integrity rather than content.## Bias, Risks and Limitations- **Reasoning traces, where released, exist for seed 42 only.**- **Typology labels cover illicit edges only**, 791 of 1,251 on HI-Small and 174 of 756 onLI-Small; the rest have no upstream typology.- **GCPAL was fine-tuned on a random 60/20/20 split**, so 609,857 of 1,015,669 HI-Small and830,310 of 1,384,810 LI-Small temporal test edges were in its fine-tuning set. It is one ofthree ensemble members, so the ensemble figures are optimistic to that extent.- **This is a coreset, not a sample of convenience.** Every illicit edge is retaineddeterministically and benign edges carry inverse-inclusion-probability weights. Unweightedmetrics on this set are a diagnostic against a 1:2 predict-all floor, not a populationestimate.## Changelog and errata**v1.0**, the release the paper cites. Frozen: the numbers in the paper are computed againstthis revision, so it does not move.Corrections made between the first build and this release are listed in[`docs/known_issues.md`](https://github.com/nat-nischw/AMLCompact/blob/main/docs/known_issues.md)in the code repository, which names which published numbers moved and by how much. Two are worthknowing about here because they touch the shipped arrays: a Horvitz-Thompson weight defect onLI-Small that double-counted most of the benign population, and a typology encoding defect intwo downstream consumers. Both are fixed in what ships.The superseded coreset draw behind the ARR-submission numbers is still runnable, with`AMLC_LEGACY_DRAW=1`, so a reader comparing the submitted paper against this artefact can seewhere the difference comes from rather than guessing.If you find a case you think is mislabelled, open a discussion quoting its `amlc_NNNNN`identifier. Errata are recorded rather than quietly patched, because a benchmark that changesunder the people comparing against it is not a benchmark.## Licensing InformationUnderlying transactions: [AMLworld](https://www.kaggle.com/datasets/ealtman2019/ibm-transactions-for-anti-money-laundering-aml)(IBM, synthetic), published under the **Community Data License Agreement, Sharing, Version 1.0**,confirmed from that listing on 2026-08-10.CDLA-Sharing is copyleft. Anyone who publishes data derived from AMLworld has to publish itunder the same terms, which is why this dataset carries `cdla-sharing-1.0` rather than apermissive licence. It reaches `data/` and `extras/`: the coreset indices, the HT weights, thelabels and typologies, the GFP tensors and the serialised prompts.It does not reach `ml_baselines/`. Model parameters and model outputs are Results under §3.5 ofthe agreement, they are ours, and they are **MIT**, the same as the code. That is why the YAMLabove declares both licences rather than one.The agreement text is in [`LICENSE-CDLA-SHARING-1.0.txt`](./LICENSE-CDLA-SHARING-1.0.txt), and[`NOTICE.md`](./NOTICE.md) lists what was changed from AMLworld to produce what ships here,which §3.1(b) asks for.The original AMLworld transaction CSVs are not redistributed. Fetch them from the listing aboveunder your own Kaggle account.## Citation```bibtex@misc{nitarach2026amlcompact,title = {AMLCompact: Bias-Free Downsampling Makes AMLworld Tractable for LLM Evaluation},author = {Nitarach, Natapong and Ngampornsukswadi, Phume andTaveekitworachai, Pittawat and Nonesung, Surapon andSirichotedumrong, Warit and Halverson, Duncan and3 unmodified lines}```Cite AMLworld as well; nothing here exists without it, and its licence asks that the attributionbe preserved. The entry and its venue states are in[`docs/citation.md`](https://github.com/nat-nischw/AMLCompact/blob/main/docs/citation.md).25 unmodified lines2627282930313263 unmodified lines969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703 unmodified lines37437537637737825 unmodified lines- extended|other-amlworldsize_categories:- 1K<n<10Kpretty_name: AMLworld-Compactconfigs:- config_name: HI-Smalldefault: true63 unmodified linesnum_examples: 2268---# AMLworld-Compact[Paper](https://openreview.net/forum?id=VouFZFf8Ph) ·[Code](https://github.com/nat-nischw/AMLCompact) ·[Results](https://github.com/nat-nischw/AMLCompact/tree/main/results) ·[Licences](./NOTICE.md)AMLworld-Compact is an importance-weighted evaluation resource foranti-money-laundering detection and transaction-graph error analysis. Each casecontains a target transaction's two-hop graph neighbourhood, a detection label,an optional illicit typology label, and an importance weight.The resource accompanies *AMLworld-Compact: Importance-Weighted Downsampling forLLM Evaluation and Error Diagnosis*. Its Hugging Face identifier is`natnitaract/AMLworldCompactEval`; the companion code repository is `AMLCompact` andthe Python import is `amlc`.| Configuration | Evaluation cases | Illicit cases | Cases with typology labels | Full temporal test split | Reduction ||---|---:|---:|---:|---:|---:|| HI-Small | 3,753 | 1,251 | 791 | 1,015,669 | 271× || LI-Small | 2,268 | 756 | 174 | 1,384,810 | 611× |Each configuration has one `test` split. All illicit edges are retained, andbenign edges are sampled using supervised difficulty strata. The compact sethas a 1:2 illicit-to-benign ratio; HT weights recover the full split's0.1232%/0.0546% illicit prevalence when estimating population counts. The weightssum to 1,015,669 on HI-Small and 1,384,810 on LI-Small.## Load the datasetThe repository is currently private. Set `HF_TOKEN` in your environment usinga Hugging Face token with read access for programmatic loading.```bashpython -m pip install datasets numpy``````pythonfrom datasets import load_datasetds = load_dataset("natnitaract/AMLworldCompactEval", "HI-Small", split="test")print(ds[0]["case_id"])print(ds[0]["typed_graph_text"])```Use `"LI-Small"` for the other configuration. `load_dataset` reads the evaluationParquet files; it does not fetch the supervised checkpoints. To load a localcopy from the dataset repository root:```pythonds = load_dataset("parquet",data_files={"test": "data/HI-Small/test-00000-of-00001.parquet"},split="test",)````typed_graph_text` is the graph input. Task instructions and few-shot examplesare supplied by the companion repository's[prompt templates](https://github.com/nat-nischw/AMLCompact/tree/main/prompts).Keep the target's ground-truth labels and typology columns for scoring.The dataset viewer may truncate long cells; the stored text is complete.## EvaluationScoring existing predictions needs labels and weights, without model trainingor the full AMLworld graph. Install the companion package with Python 3.11 ornewer:```bashgit clone https://github.com/nat-nischw/AMLCompact.gitcd AMLCompactpython -m pip install -e ".[hub]"```This example loads the released ensemble probabilities and scores them in bothmetric frames:```pythonimport numpy as npfrom amlc import hubfrom amlc.baselines.metrics import ht_weighted_prfd = hub.load_coreset("HI-Small")preds = (d["ensemble_probs"] >= d["ml_threshold"]).astype(np.int8)for frame, weights in [("HT-weighted", d["weights"]),("Compact-set", np.ones(d["n"])),]:precision, recall, f1 = ht_weighted_prf(preds, d["labels"], weights)print(frame, np.round(100 * np.array([precision, recall, f1]), 4))```Both lines return P/R/F1 of **93.4555 / 57.0743 / 70.8685** on HI-Small.Using LI-Small returns **73.2984 / 18.5185 / 29.5671**. The loader supplies theensemble threshold: 0.80 on HI-Small and 0.48 on LI-Small.Replace `preds` with your binary predictions to score another detector. Thearray must have one 0/1 prediction per case in the released row order. Joinexternal predictions by `(configuration, case_id)` before constructing thisarray; case identifiers repeat across configurations. Select any model-specificthreshold using separate validation data. The scorer returns fractions; theexample multiplies by 100 to print percentages.For an existing local dataset copy, set `AMLC_CORESET_DIR` to its `extras`directory before starting Python:```bashexport AMLC_CORESET_DIR=/path/to/amlcompact-dataset/extras```This uses the local arrays for scoring. Instructions for LLM inference andscoring the runner's saved predictions are in the companion[Evaluation guide](https://github.com/nat-nischw/AMLCompact#evaluation).## BaselinesThe paper evaluates these models. GFP denotes the Graph Feature Preprocessor.| Type | Baseline ||---|---|| Supervised | LightGBM with GFP (`LightGBM+GFP`) || Supervised | XGBoost with GFP (`XGBoost+GFP`) || Supervised | Graph Contrastive Pre-training for Anti-money Laundering with GFP (`GCPAL+GFP`) || LLM | OpenAI GPT-OSS-20B || LLM | OpenAI GPT-OSS-120B || LLM | NVIDIA Nemotron-3-Nano-30B-A3B (`Nemotron-3-Nano-30B` in result files) || LLM | NVIDIA Nemotron-3-Super-120B-A12B (`Nemotron-3-Super-120B` in result files) || LLM | Qwen3.5-27B || LLM | Qwen3.5-35B-A3B || LLM | Qwen3.5-397B-A17B |LLMs run in thinking mode under zero-shot (`ICL-ZS`) and few-shot (`ICL-FS`)prompting, with five inference seeds per condition. The following ranges spanthe 14 model–prompting means for each dataset. All values are **percentages**.| Detection F1 | Metric frame | HI-Small | LI-Small ||---|---|---:|---:|| Supervised ensemble | HT-weighted | 70.9 | 29.6 || Seven LLMs | HT-weighted | 0.230–0.253 | 0.088–0.110 || Predict-all-illicit | HT-weighted | 0.246 | 0.109 || Seven LLMs | Unweighted compact set | 40.7–50.6 | 40.7–50.6 || Predict-all-illicit | Unweighted compact set | 50.0 | 50.0 |The near-50% compact-set scores reflect the changed class ratio. Afterweighting, LLM detection F1 remains close to the predict-all baseline. Theseframes must be labelled separately when reporting a result. Per-run values arein[`llm_ht_weighted.csv`](https://github.com/nat-nischw/AMLCompact/blob/main/results/analysis/llm_ht_weighted.csv),and ranges are in[`llm_ht_weighted_summary.csv`](https://github.com/nat-nischw/AMLCompact/blob/main/results/analysis/llm_ht_weighted_summary.csv).The repository also includes Doubt Triage, which routes between ML and LLMpredictions using the coreset's label-derived strata. It is a diagnosticcomparison; the strata are unavailable for classifying new transactions.## Metrics and labels**HT-weighted detection.** For fixed edge predictions and positive inclusionprobabilities, inverse-probability weighting gives unbiased estimates offull-split confusion counts. Precision and F1 are ratios of these counts andcan have finite-sample bias and sampling variance. Since every illicit edge isretained at weight one, recall matches the full split for those samepredictions. Changing a model's graph context can change its predictions.The ensemble's precision and F1 also match the full split here because it flagsno sampled benign edge at the reported thresholds: every edge contributing toits TP, FP, or FN is retained at weight one. This exactness is specific to thosepredictions; it is not a guarantee for an arbitrary detector.**Compact-set detection.** Unweighted metrics describe the released case set.Under its 1:2 class ratio, predict-all-illicit has 33.3% precision, 100% recall,and 50.0% F1. These are useful diagnostics alongside the primary HT-weightedmetrics.**Typology.** The eight labels are `fan-out`, `fan-in`, `cycle`,`scatter-gather`, `gather-scatter`, `stack`, `bipartite`, and `random`.Only 791/1,251 illicit HI-Small cases and 174/756 illicit LI-Small cases havean upstream typology annotation. Missing typology does not mean benign: use`label` for detection, and exclude missing ground-truth typologies from alabelled typology evaluation. State whether typology F1 covers all labelledillicit cases or only correctly detected illicit cases; these evaluatedifferent case sets.## Files| Path | Contents ||---|---|| `data/<configuration>/test-*.parquet` | Evaluation rows, including graph text; about 31.7 MiB across both configurations || `extras/<configuration>/labels.npy` | Binary detection labels || `extras/<configuration>/typologies.npy` | Integer typology labels; −1 means no typology annotation || `extras/<configuration>/ht_weights.npy` | Inverse-inclusion-probability weights || `extras/<configuration>/ht_subset_indices.npy` | Row indices into the full temporal test split || `extras/<configuration>/ensemble_probs_coreset.npy` | Ensemble illicit probabilities in coreset row order || `extras/<configuration>/features_gfp.npz` | Feature matrix `X` with 79 columns, `feature_names`, and `subset_indices` || `extras/<configuration>/case_index.parquet` | Labels and join keys without the graph-text column || `ml_baselines/weights/<configuration>/<model>/` | Supervised checkpoints and per-seed metadata || `ml_baselines/test_probs/<configuration>/<model>/` | Full-test-split supervised probabilities and typology outputs |The three supervised members' checkpoints and probabilities cover five seeds.Use their recorded thresholds when evaluating an individual member; theensemble's 0.80/0.48 operating points apply to the ensemble. GCPAL uses 79 GFPfeatures plus five features derived from its line graph, so its checkpointinput has 84 dimensions. Its shipped probabilities can be scored withoutrebuilding that graph.## Schema and case identifiers| Field | Type | Meaning ||---|---|---|| `case_id` | string | `amlc_NNNNN`; the digits are the row position within a configuration || `center_edge_id` | string | Target AMLworld transaction edge || `subset_index` | int64 | Position in the full temporal test split || `label` | int8 | 1 = illicit; 0 = benign || `illicit` | bool | Equivalent to `label == 1` || `typology` | string or null | Illicit typology when annotated; null for benign and untyped illicit cases || `typology_id` | int8 | IDs 0–7 in the label order above; −1 for missing annotation || `ht_weight` | float64 | HT importance weight || `n_transactions` | int64 | Transactions represented in the local subgraph || `n_tokens_approx` | int64 | Approximate graph-text token count || `typed_graph_text` | string | Serialised two-hop transaction subgraph |HI-Small identifiers range from `amlc_00000` to `amlc_03752`; LI-Small rangesfrom `amlc_00000` to `amlc_02267`. Use both configuration and case ID whenjoining combined datasets. The compact `case_index.parquet` table has`case_id`, `center_edge_id`, `label`, `typology`, `n_transactions`,`subset_index`, and `weight`. Its `weight` field corresponds to `ht_weight`in the evaluation table. NumPy label arrays use int64; their values match theParquet int8 labels.## UsesThis synthetic benchmark supports research on transaction classification,graph-to-text prompting, and error analysis. Use the released test split forevaluation and separate data for training and tuning. Results describe thereleased AMLworld splits and do not establish performance on real bankingtransactions.## Evaluation scope- The source is IBM's synthetic AMLworld dataset. Only its HI-Small and LI-Smalltemporal test splits are represented here; this dataset contains no trainingor validation split.- GCPAL was fine-tuned using a random 60/20/20 split. Its training set overlaps609,857 HI-Small and 830,310 LI-Small temporal test edges, about 60% of eachfull test split. Ensemble results include this member and inherit thatoverlap.- The released 1,000-trace reasoning audit uses HI-Small, few-shot prompting,and seed 42. Its findings concern the observed traces and audit rubric;they do not establish a model's internal reasoning process.- Graph text uses two-hop neighbourhoods capped at 50 neighbours per hop.Preserve the released text when comparing with the reported LLM results.## LicencesThe source is[IBM AMLworld](https://www.kaggle.com/datasets/ealtman2019/ibm-transactions-for-anti-money-laundering-aml).`data/` and `extras/` are released under **CDLA-Sharing-1.0**. The supervisedmodel parameters and outputs under `ml_baselines/` are released under **MIT**.See [NOTICE.md](./NOTICE.md) for attribution and asset scope, and[LICENSE-CDLA-SHARING-1.0.txt](./LICENSE-CDLA-SHARING-1.0.txt) for the data licence.The original AMLworld transaction CSVs are not included.## Citation```bibtex@misc{nitarach2026amlcompact,title = {AMLworld-Compact: Importance-Weighted Downsampling for LLM Evaluation and Error Diagnosis},author = {Nitarach, Natapong and Ngampornsukswadi, Phume andTaveekitworachai, Pittawat and Nonesung, Surapon andSirichotedumrong, Warit and Halverson, Duncan and3 unmodified lines}```Please also cite AMLworld. Its citation is included in the companion[README citation section](https://github.com/nat-nischw/AMLworld-Compact#citation).
NOTICE.md+2-3
README.md+228-345
extras/HI-Small/case_index.csvAdded
extras/LI-Small/case_index.csvAdded