# Graph features at a fixed review budget

How much do links between transactions add to a model that sees only each transaction's own features, when a review
team can look at 100 transactions per time step and only what was known at scoring time may be used? And where do
graph features mislead? This study answers that on a real, public, anonymized Bitcoin transaction graph, with planted
leaks that show how an evaluation can flatter graph features, and a simple linking rule (attribute the neighbours of a
confirmed case) scored for its false merges. The page is `index.html`; the design was committed before any model was
fitted, and its settings are in `protocol.json`.

## What is here

- `fetch.py`: downloads the archive from its source and checks its sha256. No transaction row is in this folder.
- `tgf/data.py`: loads the archive into arrays. `tgf/graph.py`: the graph features, the label counts known at scoring
  time, score propagation and the linking rules. `tgf/models.py`: gradient boosting and the logistic baseline.
- `tgf/run.py`: runs the declared design once and writes `results/steps.json`, sums per test time step only.
  `tgf/summarize.py` turns those into `results/results.json` (periods, paired bootstrap intervals over time steps,
  review effort, the declared predictions); `tgf/derive.py` writes the arithmetic the page shows on top of it to
  `results/derived.json`, and `tgf/page.py` builds the page from both.
- `results/`: aggregates only. `page-numbers.json` records where each number on the page comes from.
- `tests/`: the graph features on a small graph written into the tests. No network and no data file needed.
- `tools/check_numbers.py`: every number a reader sees must come from the results files or a declared constant.

## Reproduce

```
python -m venv .venv && .venv/bin/pip install -r requirements.lock
.venv/bin/python fetch.py
.venv/bin/python -m tgf.run data/download/elliptic.zip
.venv/bin/python -m tgf.summarize && .venv/bin/python -m tgf.derive && .venv/bin/python -m tgf.page
.venv/bin/python -m pytest tests -q
.venv/bin/python tools/check_numbers.py
```

With early stopping off and no subsampling, gradient boosting here ignores its seed, so the three seeds
give identical scores by construction.

## Data and licence

The Elliptic Data Set (Weber et al., 2019), from https://www.kaggle.com/datasets/ellipticco/elliptic-data-set,
licensed CC BY-NC-ND 4.0. The licence allows no adapted copies, so this folder publishes only sums over time steps or
groups and its own code. See `NOTICE.txt`.

Some files are packed in transaction-graph-features-data-1.zip; unzip it here to restore the full export, which the manifest lists file by file.
