|
Download README.md from typhoon-ai/AMLworldCompactEval: direct link, hf CLI and curl.
- Browser
- Download file 13.5 kB
-
https://huggingface.co/datasets/typhoon-ai/AMLworldCompactEval/resolve/main/README.md
- Command line
-
hf download hf://datasets/typhoon-ai/AMLworldCompactEval/README.md
-
curl -L -o README.md https://huggingface.co/datasets/typhoon-ai/AMLworldCompactEval/resolve/main/README.md
13.5 kB
| license: | |
| - cdla-sharing-1.0 | |
| - mit | |
| license_link: https://cdla.dev/sharing-1-0/ | |
| task_categories: | |
| - graph-ml | |
| - text-classification | |
| language: | |
| - en | |
| tags: | |
| - anti-money-laundering | |
| - aml | |
| - fraud-detection | |
| - finance | |
| - transaction-graphs | |
| - graph-ml | |
| - llm-benchmark | |
| - evaluation | |
| - graph-reasoning | |
| - chain-of-thought | |
| - coreset | |
| - horvitz-thompson | |
| - importance-weighting | |
| - synthetic | |
| annotations_creators: | |
| - machine-generated | |
| language_creators: | |
| - machine-generated | |
| source_datasets: | |
| - extended|other-amlworld | |
| size_categories: | |
| - 1K<n<10K | |
| pretty_name: AMLworld-Compact | |
| configs: | |
| - config_name: HI-Small | |
| default: true | |
| data_files: | |
| - split: test | |
| path: data/HI-Small/test-*.parquet | |
| - config_name: LI-Small | |
| data_files: | |
| - split: test | |
| path: data/LI-Small/test-*.parquet | |
| # AMLworld-Compact | |
| Paper: [arXiv:2610.13627](https://arxiv.org/abs/2610.13627) (under review) · [Code & evaluation](https://github.com/nat-nischw/AMLworld-Compact) · [Baseline results](https://github.com/nat-nischw/AMLworld-Compact#baselines) | |
| AMLworld-Compact is an evaluation set of 6,021 cases for anti-money-laundering | |
| research. HT-Coreset selects these cases from the HI-Small and LI-Small | |
| file-order test partitions of IBM's synthetic AMLworld dataset. Each case | |
| contains a local graph extracted from the full source graph and serialised | |
| as text, a target transaction ID in metadata, | |
| an illicit/benign label, an optional laundering typology, and an importance | |
| weight for estimating full-split metrics. | |
|  | |
| The graph inputs used in the reported LLM runs are described in | |
| [Evaluation limitations](#evaluation-limitations). | |
| | Configuration | Evaluation cases | Illicit cases retained | Full test edges | Reduction | | |
| |---|---:|---:|---:|---:| | |
| | `HI-Small` | 3,753 | 1,251 | 1,015,669 | 271× | | |
| | `LI-Small` | 2,268 | 756 | 1,384,810 | 611× | | |
| The source 60/20/20 partition follows released CSV row order without timestamp | |
| sorting. Time ranges overlap across train, validation, and test. The released | |
| coreset draw uses sampling seed 0. | |
| Both configurations contain a single `test` split. All illicit edges are | |
| retained; benign edges are sampled using supervised difficulty strata. The | |
| released set has one illicit case for every two benign cases: the smallest | |
| benign budget evaluated in the construction study, giving its largest tested | |
| reduction. | |
| Each row carries `case_id`, `center_edge_id`, `subset_index`, `label` (with the | |
| equivalent `illicit` flag), `typology` and `typology_id` (0–7, or −1 when | |
| unannotated), `ht_weight`, `n_transactions`, `n_tokens_approx`, and | |
| `typed_graph_text`. Typology IDs 0–7 correspond to `fan-out`, `fan-in`, | |
| `cycle`, `scatter-gather`, `gather-scatter`, `stack`, `bipartite`, and | |
| `random`, in that order. | |
| ## Quick start | |
| ```bash | |
| pip install datasets scikit-learn | |
| ``` | |
| ```python | |
| from datasets import load_dataset | |
| ds = load_dataset("typhoon-ai/AMLworldCompactEval", "HI-Small", split="test") | |
| case = ds[0] | |
| print(case["case_id"]) | |
| print(case["typed_graph_text"]) | |
| ``` | |
| Use `"LI-Small"` to load the other configuration. | |
| The main LLM runs used `typed_graph_text` as the graph input; `label`, | |
| `illicit`, `typology`, and `typology_id` are for scoring. Task instructions and | |
| few-shot examples are in the code repository's | |
| [prompt templates](https://github.com/nat-nischw/AMLworld-Compact/tree/main/prompts). | |
| `ICL-FS` and `ICL-ZS` share task instructions and graph inputs; `ICL-FS` adds | |
| eight illicit and four benign training demonstrations. | |
| Graphs are extracted over two hops, with at most 50 neighbours per expanded | |
| account per hop, counting incoming and outgoing neighbours together. For new | |
| target-level evaluations, use the | |
| [target-marked inputs](#target-marked-inputs-for-new-evaluations). | |
| The dataset viewer may shorten long cells; loading the dataset returns the | |
| complete text. | |
| The supplementary [frontier-API probe](https://github.com/nat-nischw/AMLworld-Compact/tree/main/results/frontier_probe) | |
| uses 198 HI-Small cases with separate instructions and condensed graph inputs. | |
| Its `ZS-Graph` and `ZS-Base` variants both have no demonstrations; the few-shot | |
| variants also add account roles and computed structural features. | |
| ## Target-marked inputs for new evaluations | |
| `extras/targeted_prompts_v1/` provides a separate input version for the same | |
| 6,021 targets. Each `evaluation_prompt` explicitly identifies the target, | |
| includes its transaction exactly once, and gives bank-qualified endpoints and | |
| elapsed time over the included graph. Outcome labels are excluded from the | |
| prompt. Target inclusion, transaction fields, endpoint presence, and time | |
| summaries are checked against the source records. | |
| ```python | |
| import pandas as pd | |
| from huggingface_hub import hf_hub_download | |
| path = hf_hub_download( | |
| repo_id="typhoon-ai/AMLworldCompactEval", | |
| repo_type="dataset", | |
| filename="extras/targeted_prompts_v1/HI-Small/test-00000-of-00001.parquet", | |
| ) | |
| prompts = pd.read_parquet(path) | |
| text_to_send = prompts.iloc[0]["evaluation_prompt"] | |
| ``` | |
| Use the complete `evaluation_prompt` directly. Join predictions to the original | |
| scoring table by configuration and `case_id`; case order, target IDs, and weights | |
| are retained. The original `data/` tables and published LLM predictions still | |
| refer to the archived format. No model results are reported for this new input | |
| version. Edge counts are preserved by replacing a non-target edge when the | |
| target was absent; the revised text can have different token lengths. Context is still drawn from the full source graph, without a prospective | |
| time cutoff. The new instructions, target fields, endpoint names, time summary, | |
| and occasional edge replacements change the representation together. | |
| The [manifest](extras/targeted_prompts_v1/manifest.json) and | |
| [schema](extras/targeted_prompts_v1/schema.json) document the checks and provenance. | |
| ## Evaluate predictions | |
| Report Horvitz–Thompson (HT)-weighted precision, recall, and F1 as the primary | |
| detection metrics. | |
| Given one binary `predictions` array in dataset row order (`1` = illicit, | |
| `0` = benign): | |
| ```python | |
| from sklearn.metrics import precision_recall_fscore_support | |
| precision, recall, f1, _ = precision_recall_fscore_support( | |
| ds["label"], | |
| predictions, | |
| average="binary", | |
| sample_weight=ds["ht_weight"], | |
| zero_division=0, | |
| ) | |
| print(f"P={precision:.4%} R={recall:.4%} F1={f1:.4%}") | |
| ``` | |
| Join external predictions by `(configuration, case_id)` before scoring: | |
| case IDs repeat across configurations. Choose any decision threshold using | |
| separate validation data. | |
| Both summaries use the same targets selected by HT-Coreset and the same predictions: | |
| | Summary | What it measures | | |
| |---|---| | |
| | HT-weighted (full test) | Estimates for the full source test partition, using `ht_weight` | | |
| | Unweighted (subset) | Scores on the same released 1:2 subset with every weight set to one, used for diagnosis | | |
| For fixed predictions and positive inclusion probabilities, weighted confusion | |
| counts are unbiased estimates of full-test counts. Precision and F1 are ratios | |
| of those counts and can have sampling bias and variance. Recall is unchanged | |
| by weighting because every illicit edge is retained with weight one. | |
| Predicting every case illicit gives 50% unweighted F1, so that value alone | |
| does not establish useful detection. | |
| The reported typology macro-F1 (TF1) covers 791 HI-Small and 174 LI-Small | |
| illicit cases with a known ground-truth typology, including missed detections. | |
| A benign verdict or missing predicted typology is scored as `none`. The macro | |
| average uses the union of true and predicted labels, including `none` or | |
| `legitimate` when present. An unannotated reference typology does not mean | |
| benign; those illicit cases remain in detection evaluation but are excluded | |
| from TF1. | |
| Published TF1 values were computed from archived, postprocessed labels; the | |
| companion code's current live parser does not reproduce every historical | |
| free-text fallback. | |
| The [evaluation guide](https://github.com/nat-nischw/AMLworld-Compact#evaluation) | |
| provides commands to score the released ensemble, run LLMs, and evaluate saved | |
| predictions. | |
| The code also provides a | |
| [sampling-uncertainty analysis](https://github.com/nat-nischw/AMLworld-Compact/blob/main/results/analysis/sampling_uncertainty/README.md) | |
| and a | |
| [held-out-family study](https://github.com/nat-nischw/AMLworld-Compact/blob/main/results/analysis/heldout_sampling/README.md). | |
| The latter uses cached full-test GFP-booster predictions over 500 draws per | |
| configuration; it does not compare full-test and coreset LLM predictions. | |
| ## Files | |
| `load_dataset()` loads only the evaluation tables, about 31.7 MiB across | |
| both configurations. | |
| | Directory | Contents | | |
| |---|---| | |
| | `data/<configuration>/` | Test Parquet files with graph text, labels, and weights | | |
| | `extras/<configuration>/` | Aligned scoring arrays, graph features, and case indices, in evaluation-table row order | | |
| | `extras/targeted_prompts_v1/` | Separately versioned target-marked prompts, schema, and integrity manifest; no new model predictions | | |
| | `ml_baselines/` | Supervised checkpoints under `weights/` and full-test predictions under `test_probs/`, five seeds each | | |
| The code repository provides | |
| [loaders and scoring examples](https://github.com/nat-nischw/AMLworld-Compact#score-the-released-supervised-ensemble) | |
| for the arrays and checkpoints. | |
| ## Models | |
| GFP means Graph Feature Preprocessor. Each booster uses 73 GFP signals and | |
| 6 raw transaction attributes (79 inputs). GCPAL adds five line-graph-derived | |
| features, giving 84 inputs for that construction scorer. | |
| The primary ML reference averages LightGBM+GFP and XGBoost+GFP across | |
| five training seeds. Both are trained on the training portion of the file-order | |
| partition. Their probabilities are in `extras/*/ensemble_probs_coreset.npy`. | |
| The inherited thresholds are 0.80 for HI-Small and 0.48 for LI-Small; they were | |
| selected on the full test set for the original construction scorer and have | |
| not been retuned. | |
| The frozen construction ensemble also included GCPAL+GFP, whose random | |
| fine-tuning split overlaps roughly 60% of the test edges. The original | |
| three-model probabilities remain in `construction_probs_coreset.npy` to | |
| reproduce the sampling design; | |
| GCPAL is excluded from the primary task comparisons. Each configuration's | |
| `scoring_metadata.json` distinguishes the two roles. The seven evaluated LLMs | |
| are listed in the code repository's | |
| [baselines table](https://github.com/nat-nischw/AMLworld-Compact#baselines). | |
| ## Evaluation limitations | |
| The reported LLM runs used the original graph text for all 6,021 cases. | |
| Target IDs are stored in `center_edge_id` metadata. The graph text does not | |
| explicitly mark the target, and the task template retains the literal `<ID>`. | |
| In 324/3,753 HI-Small and 297/2,268 LI-Small cases, | |
| the target transaction itself is absent after neighbour capping, including | |
| 128 and 181 illicit targets respectively. The `Time span` field counts distinct | |
| timestamps rather than elapsed time. | |
| The original graph strings are retained to reproduce the reported runs. | |
| The LLM scores and trace analyses describe model behaviour under this input | |
| format and do not isolate input effects from reasoning errors. A separate | |
| [target-marked version](#target-marked-inputs-for-new-evaluations) is available | |
| for new evaluations. | |
| ## Uses | |
| This synthetic benchmark supports research on transaction classification, | |
| graph-to-text prompting, and error analysis. Use the released test split for | |
| evaluation and separate data for training and tuning. Results describe the | |
| released AMLworld splits and do not establish performance on real banking | |
| transactions. | |
| ## Licences and source | |
| Derived from | |
| [IBM AMLworld](https://www.kaggle.com/datasets/ealtman2019/ibm-transactions-for-anti-money-laundering-aml). | |
| The original transaction CSVs are not included. | |
| - Data and features (`data/`, `extras/`): [CDLA-Sharing-1.0](./LICENSE-CDLA-SHARING-1.0.txt). | |
| - Supervised model parameters and outputs (`ml_baselines/`): MIT. | |
| See [NOTICE.md](./NOTICE.md) for attribution and licence scope. | |
| ## Contact | |
| Open a [GitHub issue](https://github.com/nat-nischw/AMLworld-Compact/issues) for | |
| questions about the dataset or the code. | |
| ## Acknowledgments | |
| This work was initiated at SCB 10X in late 2025, following the release of our | |
| earlier work, [FinCoT](https://arxiv.org/abs/2506.16123). We are grateful to | |
| [Oravee Smithiphol](https://th.linkedin.com/in/ornsmith) for introducing our | |
| team to Phume Ngampornsukswadi, whose interest in FinCoT led to this | |
| collaboration. We also thank the members of the | |
| [Typhoon team](https://opentyphoon.ai/) for their support, and Duncan Halverson | |
| for contributing to the early stages of this work. | |
| ## Citation | |
| <details> | |
| <summary>BibTeX</summary> | |
| ```bibtex | |
| @misc{nitarach2026amlworldcompactimportanceweighteddownsamplingcosteffective, | |
| title={AMLworld-Compact: Importance-Weighted Downsampling for Cost-Effective LLM Evaluation and Error Diagnosis}, | |
| author={Natapong Nitarach and Phume Ngampornsukswadi and Pittawat Taveekitworachai and Surapon Nonesung and Warit Sirichotedumrong and Kunat Pipatanakul}, | |
| year={2026}, | |
| eprint={2610.13627}, | |
| archivePrefix={arXiv}, | |
| primaryClass={cs.CL}, | |
| url={https://arxiv.org/abs/2610.13627}, | |
| } | |
| ``` | |
| Please also cite AMLworld. Its citation is included in the companion | |
| [README citation section](https://github.com/nat-nischw/AMLworld-Compact#citation). | |
| </details> | |