Crucible
Target leakage audit

Find the columns that are giving away the answer.

Upload a table, name what you are predicting, and say when the prediction happens. Crucible reads every column, tells you which ones encode the outcome, why each one does, and how much accuracy they were faking.

Predicting survived correlation with the target vs. what the column actually is
boat 0.013 decides the outcome
body none decides the outcome
sex 0.529 legitimate

A correlation threshold keeps both leaks and deletes the real predictor.

Drop your dataset, or click to select Parsed in your browser. Only column names are ever sent, and only when you start the audit — a comment header or an unusual delimiter is worked out for you.
Optional

Data dictionary

A second file with one row per column and its documented meaning. Two columns is enough: the column name, and its description.

Supplying it changes what you get back. Verdicts stop being inferred from column names and start being grounded in your dataset’s own documentation, and every dropped column arrives with a quotable sentence explaining why — which is the difference between a decision that looks reasonable and one you can defend in a paper.

1,309 passengers, two real leaks. No upload and no API key needed.
The formulation this implements

Kaufman, S., Rosset, S., Perlich, C., & Stitelman, O. (2012). Leakage in Data Mining: Formulation, Detection, and Avoidance. ACM Transactions on Knowledge Discovery from Data 6(4), Article 15. Earlier as KDD 2011, 556–563. doi:10.1145/2382577.2382579

Kaufman and colleagues set the legitimacy condition a feature has to meet, in terms of what was knowable at the moment of prediction. What has been missing since is a way to apply it to a table you have just been handed, because the condition turns on what each column means and that is not in the numbers.

Leakage has been surveyed across 17 scientific fields and 294 affected papers.

Kapoor, S., & Narayanan, A. (2023). Leakage and the Reproducibility Crisis in Machine-Learning-Based Science. Patterns 4(9), 100804. doi:10.1016/j.patter.2023.100804

Why this matters

A leaked column makes every number better, right up until it doesn’t.

01

The failure looks like success

A column that records why the outcome happened is perfectly correlated with it. The model learns to read the answer instead of predicting it. Accuracy climbs, the validation score climbs with it, and nothing anywhere reports a problem. The model ships.

02

Cross-validation cannot see it

Splitting the data does not help, because the leaked column sits on both sides of every split. Each fold independently confirms the model is excellent. This is structural: no amount of resampling, nesting, or holding out catches a column that was contaminated before the split was drawn.

03

Statistics point the wrong way

The obvious defense is a correlation threshold, and it fails in both directions. On Titanic, boat correlates −0.013 with survival and decides it outright, while sex correlates −0.529 and is entirely legitimate. A threshold keeps the leak and deletes the real signal.

04

The information is in the name

A person reading autopsy_code in a mortality table knows instantly, without computing anything, because the name says where the value comes from. That reasoning is semantic, not statistical, which is exactly why a language model can do it and a correlation cannot.

What happens next

  1. DataRead every column and every row, see what is missing, and set the target and the prediction point.
  2. ModelChoose which model reads your columns, or bring your own key.
  3. DetectionBoth screens run: one reads the names, one measures correlation.
  4. ReviewYou confirm or reject each flagged column. Nothing is dropped without you.
  5. ResultsThe same models fit twice, with and without the leaks, and compared.
Without a browser

The same audit, from a terminal

This page and the command line call the same function, so the two cannot drift apart. Use the terminal when you have more than one table, when the audit belongs in a pipeline, or when the column names should not leave your machine until you say so.

Python 3.11 or later. The measurement commands need no API key at all.

$ pip install crucible-leakage
$ crucible impact titanic.csv --target survived \
      --drop boat --drop body --against-correlation

correlation would drop: sex

  Your model scored 0.174 macro F1 higher than it deserved to.

  1,309 rows, 2 classes (0, 1)

  random forest
    arm            macro F1  weighted  mistakes
    with leaks       0.9715    0.9732        35
    cleaned          0.7970    0.8079       252
    correlation      0.9740    0.9755        32
    leaks overstated macro F1 by +0.1745, weighted by +0.1653
    a correlation threshold would have left +0.1770 of that in place

Real output, not a mock-up. The third arm is the point: a correlation threshold scores 0.9740, above the 0.9715 you get by doing nothing at all, because it deleted sex and kept both leaks.

crucible --help lists every flag, and the README in the repository carries the protocol in full.

Stage 2

Your data, in full

Every column and every row, nothing truncated. Scroll in both directions; the header row and the first column stay put.

Table

Completeness by column

Every column named, with how much of it is actually filled. A column that is mostly empty is worth a second look: values that exist for only one outcome are a common shape for a leak.

Set the job

Two facts about your problem that nothing in the file can supply: what you are predicting, and the moment you would be predicting it.

The column you are trying to predict. Everything else is a feature, and every feature is judged against it.
start from
The moment the prediction would be made in real life. Any column whose value is only knowable after this moment is a leak. This is a fact about how your model gets used, not about the data, so nothing can infer it for you.
Stage 3

Which model reads your columns

This choice is not cosmetic, and the models fail in a specific way. Asked about leakage, they read the question as being about timing. In the benchmark behind this tool, across ten models from eight laboratories, recall averaged 97% on columns recorded after the prediction point and 89% on columns that exist because the outcome happened, but only 62% on columns that record why a label was assigned — and eight of the ten scored worse on that third kind than on the second in the very same tables. Every model here is sent a clause written to close that gap. The card says how far it closed, and under which wording, because no wording works uniformly across models.

Model

Stage 4

Detection

Two screens run against every column. One reads what the names mean. The other measures how strongly each column correlates with the target. They fail in opposite directions, which is what makes their disagreement worth reading.

Stage 5 · human in the loop

Nothing is dropped without you

The screen has found columns whose meaning encodes the outcome — the kind a correlation test is blind to by construction. That is the work it saves you: you no longer have to read a data dictionary line by line looking for them. What it does not do is decide. A column can be flagged and still be one you need, and only you know your data well enough to say so. Accept the set as it stands, or change it.

Three ways a column can leak, and one verdict that is yours

The first three name how the outcome got into the column; they are accounts, not severities. The fourth is not a mechanism at all — it is what the tool says when it has found something arguable and declines to decide for you.

REASON

The column was an input to deciding the label. Whoever assigned the outcome looked at this value to do it, so the model is reading the decision, not predicting it.

e.g. the diagnostic code a claim was rejected for, when predicting rejection
CONSEQUENCE

The column exists only because the outcome happened. Its presence or absence is the label, whatever the value says. This is the one that survives a correlation check, because on the rows where the outcome did not occur the column is simply empty.

e.g. a lifeboat number, when predicting survival
TIMING

The value is recorded after the moment you said the prediction happens. It may be perfectly ordinary data; it just will not exist yet when the model has to run.

e.g. total length of stay, when predicting at admission
CONTESTED

Flagged, but the documentation says the value was already fixed at the prediction point — so it could honestly have been obtained. A prior estimate of the target is the standing example: using it is usually a bad idea, and that is a judgement about what your model is for, not about whether the value was available.

the tool surfaces these and stops; the call is yours

Columns

What each column of this table means
Verdict
What the model concluded, and by which mechanism. CONSEQUENCE the column exists only because the outcome happened · REASON it was used to assign the label · TIMING it is recorded after the prediction point · CONTESTED flagged, but documented as fixed at the prediction point, so the decision is handed to you rather than made for you.
Orders
The columns are read three times in three different orders, because order alone changes what a model flags. Each filled dot is one order that called it a leak; the majority settles it.
|r|
Correlation with the target, ignoring direction. The statistical screen flags anything above 0.5.
Agreement
Which screens flagged it. Model only is the interesting case: a real leak whose correlation is far too low for any threshold to catch. Statistics only is usually a strong but legitimate predictor.
Stage 6

What the leaks were buying

Each model is fit twice: once with every column, once with your confirmed drops removed. Same folds, same encoding, and the same hyperparameter search on both arms, so the cleaned fit is the best version of itself rather than a strawman. There is no comparison against ground truth here, because your data does not come with one — the honest number is simply what the model can do without reading the answer.

Edit the column set

The comparison above used the set you confirmed. Change it here — drop something else, or put a column back — and measure again. Nothing is locked in; disagreeing with the screen is a legitimate result, not a mistake.

Dataset

Audit report (JSON)
Settings

Credentials

Leave this empty and the audit runs on a small shared pool, which is there so the tool can be tried without an account. Supply a key and every audit uses it instead, with no daily cap and nothing shared.

Shared pool

Checking…

Your own API key

One field, any provider. Paste whatever you have and Crucible works out who issued it and which models it unlocks. Its quota is yours rather than shared with everyone else on this page.

Google AI Studio
Gemini 3.7 Flash and 3.5 Flash. Free to create. The only provider with a shared pool, so this is the one you can skip.
Anthropic
Claude Opus 5 — the strongest result in the benchmark, F1 0.929.
OpenAI
GPT-5.6 Sol — F1 0.918, and the one model that gave an identical answer under three column orders, so one shuffle is enough.
Featherless
Kimi K3, an open-weight reasoning model. Minutes per audit rather than seconds.

A key is held in memory for the length of one audit. Never written to disk, never returned by any endpoint, never logged — not even a prefix, which is still a key to anyone who has the rest. A test asserts this. A key is also never sent to a provider that did not issue it: pick a model it cannot run and the audit refuses rather than forwarding your column names to the wrong company.