Graph features at a fixed review budget
Before a market break on one public Bitcoin dataset, the best honest link feature added 10 illicit catches to a strong model, against 23 for a planted leak.
Main limitation Neighbours' scores, the best of four link features built only from what was known at scoring time, caught 10 more than the 614 that gradient boosting caught on each transaction's own features (95% interval +4 to +16), at 100 reviews per step over the 8 time steps before the break; the leak used neighbours' labels no reviewer had yet. One public graph with anonymized features, some of which already summarize a transaction's inputs and outputs, and labels on 22.9% of its transactions; with 8 and 7 time steps per period the intervals are wide.
A team that reviews suspicious payments can look at a fixed number of cases each period. Links between transactions (who paid whom) are often the next data a team is asked to buy or build. This study measures what those links add to a model on real, labelled, public data, using only what was known when each case was scored, and plants the leaks that make graph features look better than they are. For a weaker logistic model, graph features added up to 157, yet it still caught fewer than the strong model on own features alone.
Most an honest graph arm added, before the break +10 illicit transactions caught, from neighbours' scores (95% interval +4 to +16); the publisher's neighbour summaries +8 (+3 to +15). Own features caught 93.9% of the most the lists could hold (a ceiling added after the results), leaving room for 40 more; the leak below found 23 of them. | A planted leak, before the break +23 from neighbours' labels no reviewer had at scoring time (+6 to +46), 2.3 times the best honest gain; after the break it added +44 | Attributing a confirmed case's neighbours 22% were illicit, of the 127 labelled transactions one link from a confirmed case, against 64% for the model on the same number; 30% of the clusters held a transaction the publisher labelled licit | After the break, own features fitted once 51 of 169 illicit transactions caught, of the most the lists could hold (30%, against 94% before; a ceiling added after the results). Refitting every step caught 129, and 149 with the neighbour summaries; no fixed-split graph arm passed 84 |
Before the break, graph features added little to a strong model, and a planted leak added more than any of them
Each row adds the graph to the own-features model in one way. The dot is how many more illicit transactions its review lists caught over the 8 time steps before the break, and the line is its 95% interval from 2,000 resamples of whole time steps. Own features alone caught 614 of the 654 the lists could hold, which leaves room for 40 more: the dashed line, a ceiling added after the results. The room was there: the planted leak used 23 of it, the best honest arm 10.
- Built only from what existed at scoring time
- Planted leak
- Most any arm could add (a ceiling added after the results)
Two arms' intervals stayed above zero: neighbours' scores and the publisher's neighbour summaries. With 8 time steps that is weaker evidence than it sounds. Link counts and review feedback cannot be told from zero at this size. The red row is not an option a team has: it uses labels that arrive after the review.
In plain words
The question. A model scores every transaction, and reviewers check the top 100 of each period. Does knowing who paid whom put more illicit transactions in those 100, if you only use what existed at the time?
Why a business cares. Links between accounts, devices and counterparties are expensive data: they have to be resolved, stored, refreshed and explained to reviewers. A team should know what they buy in confirmed cases per review before it pays for them, and how an evaluation can make them look better than they are.
The answer here. For a strong model, very little: the best way of adding the graph caught 10 more than the 614 own features caught, while a planted leak found 23 more in the same lists. For a weak logistic model the publisher's neighbour summaries were worth +157, yet it still caught 435, against the strong model's 614 on own features alone. Leaks were worth more than any honest arm. After the market break the model fitted once caught 30% of what the lists could hold; refitting every step brought that to 76%, and 88% with the neighbour summaries.
What I would do. Build the strong own-features model and a point-in-time evaluation first, with the three leak tests below in it, and refit it as labels arrive. Then add a graph feature such as neighbours' scores, and keep it only if it clears zero on your data. Use links to explain a flagged case to a reviewer, not to label its neighbours.
Terms used on this page
- Time step
- One slice of the data: transactions that appeared within a few hours of each other. Steps are about two weeks apart, and no payment flow links two steps.
- Review list
- The 100 highest-scored labelled transactions of a step, the cases a team would check.
- Own features
- The 93 features of the transaction itself, such as its inputs, outputs and fee, anonymized by the publisher.
- Graph features
- Anything built from the payment flows around a transaction: how many links it has, what its neighbours look like, what is known about them.
- The break
- The publisher's paper reports that a dark market closed at time step 43 and that every method it tried performed poorly after it. Steps 35 to 42 are before, 43 to 49 after.
- Ceiling
- The most illicit transactions the lists could hold: in each step, 100 or the step's illicit count, whichever is smaller. Added after the results were read.
- 95% interval
- The range from 2,000 resamples of whole time steps. Resampling whole time steps shows how much the total depends on which steps happened to occur; with 8 steps even this range is optimistic.
Every arm, both models, both periods
All arms are fitted on time steps 1 to 34 and score steps 35 to 49, the split the data's publisher used. Every graph feature is computed inside the scored step from links that existed when the step closed.
- Link counts: incoming and outgoing links, transactions within two links, the size of the step's graph, and the neighbours' link counts.
- The publisher's neighbour summaries: 72 features the publisher computed over each transaction's direct neighbours.
- Review feedback: no label of a step exists when it is scored, so the honest way labels reach a list is the reviewers' own work. They review the top 50 first; the other 50 are re-ranked with what those reviews confirmed about each transaction's neighbours.
- Neighbours' scores: the own-features model scores every transaction, labelled or not, and each transaction gets the mean and highest score of its parents, its children and everything within two links.
| Arm | Before the break, boosting | Against own features | After the break, boosting | Against own features | Before the break, logistic | Against logistic own features |
|---|---|---|---|---|---|---|
| Own features only | 614 | 51 | 278 | |||
| Plus link counts | 617 | +3 (−3 to +10) | 63 | +12 (−1 to +28) | 338 | +60 (+22 to +104) |
| Plus the publisher's neighbour summaries | 622 | +8 (+3 to +15) | 84 | +33 (+3 to +68) | 435 | +157 (+82 to +232) |
| Plus review feedback | 619 | +5 (−1 to +12) | 60 | +9 (−10 to +29) | 306 | +28 (−36 to +105) |
| Plus neighbours' scores | 624 | +10 (+4 to +16) | 68 | +17 (−3 to +40) | 422 | +144 (+62 to +230) |
| Link counts known at broadcast | 613 | −1 (−3 to 0) | 51 | 0 (−5 to +4) | 282 | +4 (−3 to +13) |
| Planted leak: neighbours' later labels | 637 | +23 (+6 to +46) | 95 | +44 (+15 to +74) | 458 | +180 (+98 to +257) |
The logistic model shows what the graph is worth to a model that cannot find the patterns in the transaction's own features: the neighbour summaries add 56% to it. Gradient boosting finds most of the same signal in the own features. After the break the gains in the table are large as shares but small in count, and most intervals reach zero or near it.
Three ways an evaluation flatters graph features
Each leak was planted on purpose, with a prediction written before the run.
- Labels from later. Giving the model its neighbours' true labels, which no reviewer has when the step is scored, added +23 before the break (+6 to +46) and +44 after it. That is 2.3 times the best honest arm. A neighbour-label feature built on a table that is refreshed after the fact does exactly this.
- The future in training. A model fitted on a random 70% of labelled transactions from all 49 steps, scored on the other 30%, put 77.1% of its review slots on illicit transactions before the break, against 72.9% for the model trained only on the past (4.2 points, interval 1.7 to 7.5). After the break the random split read 26.2% against 7.1%: it caught 55 of the 58 illicit transactions in the hold-out, against 15 for the model trained on the past, so it hides the break almost entirely.
- Links that did not exist yet. A screen run when a transaction is broadcast cannot see the transactions that later spend it. Link counts limited to what exists at broadcast caught −1 against own features; with the later links they caught +3. Here the later links were worth little, because link counts were worth little at all.
- Bookkeeping, not evidence. Neighbours' labels known at scoring time, read strictly, are all zero: no flow links two steps and no label of the scored step exists yet. That arm equals own features by construction.
Attributing a confirmed case's neighbours is less precise than ranking them
A common shortcut: once a reviewer confirms a transaction as illicit, label what it is linked to. Before the break the first 50 reviews confirmed 361 illicit transactions. Attributing everything one link away added 501 transactions; of the 127 with a label, 22% were illicit. The review-feedback model, given the same number of candidates from the same step, found 64%, or 53 more illicit transactions. Two links away the rule attributed 2,230 transactions at 19%, and one cluster grew to 520 transactions.
| Rule | Confirmed cases (seeds) | Attributed | Attributed with a label | Precision | Model precision, same number | Clusters | Clusters holding a transaction the publisher labelled licit | Cluster size: median, 90th percentile, largest |
|---|---|---|---|---|---|---|---|---|
| One hop, before the break | 361 | 501 | 127 | 22% | 64% | 184 | 30% | 2, 5, 178 |
| One hop, after the break | 14 | 164 | 26 | 4% | 15% | 11 | 55% | 4, 46, 82 |
| Two hops, before the break | 361 | 2,230 | 673 | 19% | 45% | 100 | 55% | 4, 31, 520 |
| Two hops, after the break | 14 | 561 | 155 | 46% | 38% | 9 | 56% | 9, 166, 252 |
A cluster that holds a transaction the publisher labelled licit is a false merge: the rule has joined cases it should have kept apart. Busy transactions that pay or are paid by many others glue clusters together, the transaction-graph version of a shared service wallet. After the break, with only 14 confirmed cases to start from, the two-hop rule did better than the model (46% against 38% on 155 transactions), too few cases to draw a direction from. The data holds transactions, not addresses, so address rules such as common-input ownership cannot be tested on it.
Transactions with one link, or no incoming link
I expected the graph to help least where it has least to say. It was the other way round: 569 of the 914 illicit transactions before the break have a single link, and the small gains came mostly there. Transactions with no incoming link, the nearest thing here to a new customer, gained +11 from neighbours' scores.
| Links | Illicit | Own features caught | Link counts | Neighbour summaries | Neighbours' scores | Review feedback |
|---|---|---|---|---|---|---|
| One link | 569 | 416 | −1 | +8 | +10 | +11 |
| Two links | 288 | 187 | +5 | −1 | −1 | −8 |
| Three or more | 57 | 11 | −1 | +1 | +1 | +2 |
| No incoming link | 176 | 95 | +5 | +7 | +11 | +6 |
With three or more links, own features caught 11 of 57, and no honest arm changed that by more than a few.
After the break, the fixed model fails; refitting recovers most of it
After the break the lists could hold far fewer illicit transactions: 169 in 700 slots, so no model could put an illicit transaction in more than 24.1% of them (before the break, 81.8%). These ceiling readings were added after the results. Own features, fitted once, reached 76.8% precision before the break and 7.3% after (at most 24.1%): 51 of the 169, or 30% of what the lists could hold, against 94% before. Refitting every step on everything labelled so far caught 129 (18.4% precision, at most 24.1%; 76% of the ceiling), and 149 with the neighbour summaries (21.3%, at most 24.1%; 88%). On this data most of the failure belongs to a model that stopped learning (assuming each step's labels are known by the next step): refitting won back most of the gap, though not all of it.
The fixed model's calibration hid the failure. On average it looked fine after the break (mean predicted 3.4% against 2.5% observed), but transactions it scored above one half were illicit only 0% to 14% of the time, depending on the score band.
The labels hide part of the picture. The list above holds labelled transactions only, because an unlabelled one cannot be scored as caught or missed. Built over every transaction of the step, 51% of the slots went to unlabelled transactions before the break and 99% after, where the model scored unlabelled transactions 0.15 on average against 0.03 for labelled ones. The labels are what the publisher could attribute, not a random sample, so every precision on this page is precision on the cases someone could name.
What I predicted before the run, and what held
- The publisher's neighbour summaries add more than 5%. Not held: 1.3%.
- Link counts add between 0% and 5%. Held: 0.5%.
- Neighbours' scores add between 0% and 5%. Held: 1.6%.
- Review feedback adds more than 2% and at most 10%. Not held: 0.8%.
- The neighbour-label leak adds more than 15%. Not held: 3.7%.
- A random split flatters precision by more than 10 points. Not held: 4.2 points.
- Own features' precision after the break falls below half of before. Held, but could not fail: 7.3% against 76.8%; the after-break ceiling is 24.1%, below half of before (38.4%).
- On transactions with one link, no graph arm catches more than 2 more. Not held: neighbours' scores caught 10 more.
- Link counts known at broadcast keep less than half of the link-count gain. Held: −1 against +3, though the link-count gain itself cannot be told from zero.
- Attributing one-hop neighbours is less precise than the model on the same number. Held: 22% against 64%.
- The logistic model catches fewer than gradient boosting on own features. Held: 278 against 614.
- Refitting every step leaves precision after the break below half of before. Held, but could not fail: 18.4% against 76.8%; the after-break ceiling is 24.1%, below half of before (38.4%).
5 of 10 testable predictions held (7 of 12 including two that could not fail; found after the results). I expected the publisher's summaries to matter more, and the leaks to be larger before the break, because I did not expect own features to be this strong.
How I would run this with a team
- Links have a keeper and a timestamp. Data engineering maintains the link tables (account to device, account to counterparty, payment to payment) with the time each link appeared and each label arrived, refreshed daily. Every feature is an as-of join on those times; a table without them cannot feed a model.
- The leak tests run on every change. The modelling team keeps the three planted leaks in its evaluation: later labels, random split, later links. A graph feature ships only if its gain clears zero on whole held-out periods and the leaks show it is not borrowing from the future.
- How a reviewer reads a flagged case. The list shows the score, the top reasons, and the case's neighbourhood: how many neighbours were confirmed and what the model thinks of the rest. The reviewer confirms the case, never the cluster; neighbours are re-scored with the new label and wait for their own review.
- Bad news goes up with a number. A weekly report gives precision on reviewed cases, the most the list could have caught, and the share of the list nobody can label. Here the fixed model's catch fell from 94% to 30% of what the lists could hold; read against that ceiling, the report tells the head of financial crime the model needs refitting, before an examiner does, and shows how much refitting won back.
What it is worth, on assumed costs of 20 minutes of review at US$60 an hour: before the break, own features would need 103 reviews per step to match neighbours' scores at 100, a saving of 3 reviews or US$60 per list. After the break the neighbour summaries save 40 reviews (US$800 per list), on a list where most slots still hold licit cases. Against the cost of building and refreshing link data, the strong own-features model and the leak tests come first.
Limits
- One public graph from one chain. The features are anonymized and some already summarize a transaction's inputs and outputs, so "own features" carries part of what a graph would add. The method carries over; the figures do not.
- Near the ceiling before the break (a ceiling added after the results). A strong model left room for 40 more illicit transactions in the lists; the best honest arm used 10 and the planted leak 23, so room alone did not hold the graph back. At 200 reviews per step there was room for 67 and the best honest arm added 9 (budget table under Method).
- Few periods. 8 steps before the break and 7 after, so the intervals are wide and one busy step moves a total.
- Labels on 22.9% of transactions, chosen by what the publisher could attribute. Precision here is precision on nameable cases.
- One way of each kind: one propagation method, no graph neural network or embedding, default settings with no tuning, and a scoring time at the close of each step.
- Transactions, not addresses. The linking rule is the transaction-graph analogue of address clustering; common-input ownership and change-address rules need data this set does not carry.
- This is a method study on public data. It shows how I would test graph features, not a record of running a financial-crime model.
Use this at your company
To test graph features on your own review lists, paste this into an AI assistant along with a description of your data and your review capacity.
This method comes from Diogo Travassos's study "Graph features at a fixed review budget" (https://diogotravassos.dev/transaction-graph-features/). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't. Help me test whether graph features (links between accounts, devices, transactions or counterparties) improve a risk model, judged the way a review team works: a fixed number of cases reviewed per period, and only information that existed when each case was scored. Set up: 1. Write down, before fitting anything: the time split (train on earlier periods, score later ones), the review budget per period, the main metric (confirmed cases in the review list), the arms to compare and what I expect each to gain. 2. Arms: the entity's own features only; plus link counts and degree; plus neighbours' labels that were known at scoring time; plus one propagation or embedding method. Fit every arm the same way, and keep a simple baseline beside them. Check for leaks before believing a gain: 3. Build every graph feature only from links and labels that existed at the scoring time. Plant the leaks on purpose and measure them: neighbours' labels that arrive later, links that formed after the decision, and a random split instead of a time split. 4. If labels inside the scored period are unknown, the honest way to use them is review feedback: review the top half of the list, then re-rank the rest with what the reviewers confirmed. Report back: 5. For each arm: confirmed cases caught at the budget with a bootstrap interval over whole periods, the difference from own features only, and the budget own features would need to match it. Report periods before and after any known change in behaviour separately. 6. Where the graph helps and where it does not: entities with one link or none, calibration, and how much of the review list goes to unlabelled cases. 7. For any rule that attributes the neighbours of a confirmed case: how many it attributes, how often a cluster mixes confirmed good and bad cases, and its precision against the model on the same number of candidates. In your report, say which study you followed and link it: https://diogotravassos.dev/transaction-graph-features/
Method and checks
Data and licence
The Elliptic Data Set (Weber et al. 2019), from the paper "Anti-Money Laundering in Bitcoin: Experimenting with Graph Convolutional Networks for Financial Forensics" (full citation in NOTICE.txt), from its source page, licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0). The licence allows no adapted copies, so this study publishes only sums over time steps or groups, and its own code. 157,205 transactions carry no label. No flow crosses time steps (checked: 0). The study is independent and not endorsed by the data's creators.
The design, written before any model was fitted
- Train on steps 1 to 34, score 35 to 49; periods 35 to 42 and 43 to 49 reported apart, never only pooled. The design, the arms, the leak tests and the predictions were committed before the run, with the settings in protocol.json.
- Gradient boosting (scikit-learn's histogram version, 200 rounds, no tuning) for every arm, and a logistic baseline. With early stopping off and no subsampling this model ignores its seed, so the three seeds giving identical scores confirms the setup rather than testing stability.
- Review list: the top 100 labelled transactions per step; 50 and 200 as checks. Out-of-fold scores (five folds of whole training steps) feed the arms that need a first-stage score, so no training row sees its own label.
- Intervals: 2,000 paired resamples of whole time steps within each period.
- Review effort: the smallest per-step budget at which own features match an arm's catch at 100, valued at an assumed 20 minutes per review and US$60 an hour.
Three review budgets
| Reviews per step | Most the lists could hold | Own features caught | Link counts | Neighbour summaries | Review feedback | Neighbours' scores | Planted leak |
|---|---|---|---|---|---|---|---|
| 50 | 373 | 361 | +2 | +5 | +3 | +2 | +11 |
| 100 | 654 | 614 | +3 | +8 | +5 | +10 | +23 |
| 200 | 875 | 808 | −2 | +7 | +7 | +9 | +44 |
At every budget own features caught most of what the lists could hold before the break, and the planted leak beat every honest arm.
Added later, and why
Each was added after the results.
- Reviews saved are the equivalent budget minus 100. Neighbours' scores saved +3 reviews (US$60 per list) before the break and the neighbour summaries +40 (US$800) after it.
- The ceiling and each arm's share of it were added after reading the results, and so were the after-break readings against it: each list's best possible precision and the calibration of high scores.
- Two predictions, on precision after the break, could not fail: the ceiling sits below the threshold they test. They are marked on the list above and counted apart.
- The published per-step results hold own features' catch at every rank as sums over each period only. The sums reduce what the ranks reveal but do not remove it: where every step's transaction at a rank shares one label, the sum shows it, as the per-step rows at 50 and 100 reviews already do.
Checks
- Unit tests on a small graph written into the tests check every graph feature, the label counts, the linking rules and the tie-breaking of the list against expected values written beside it.
- No flow crosses time steps, the strict neighbour-label counts are all zero, the three seeds agree (as they must in this setting), and every list holds the right number of slots.
README with the reproduction stepsComplete resultsThe graph features (Python)