Fieldwork: does a small network learn the rule or the shortcut?

Train a small neural network on made-up data, then change one input while holding its weights fixed. Can it distinguish a rule from a useful shortcut? Everything runs in this browser.

The task and its limits

Each example is a point (a, b) with a cue of −1 or +1. Its label is 1 when a and b have the same sign. In the training data the cue agrees with the label at a rate ρ, 95% by default, so reading the cue can score well without learning the sign rule.

Held-out rows with the training settings are labelled IID below, though class and cue-agreement counts are fixed rather than sampled independently. Diagnostic rows reverse the agreement rate to 1 − ρ. They are never used to train; once inspected to choose between runs, they are no longer an unseen final test. A gap between scores, a cue flip, and a unit contribution each answer a different question; none alone establishes a complete mechanism.

The default network has 3 inputs, 12 hidden units and 1 output. All examples are synthetic. Nothing is sent anywhere.

Open lab Choose settings, compare runs and inspect one example.

No run yet.

Type a question. Recognized settings are underlined; every other word is kept as a note and configures nothing.

More recipes and accepted settings

This is a fixed settings parser, not an AI assistant. Recognized terms configure the run; every other word is kept as a note.

Recipes ordinary60 paired60 original120 longer150 logistic60. Settings steps=60 or 60 steps (1–500), seed=17 (init seed), lr=0.03 (0.001–0.1), ρ=0.95 or rho=0.95 (multiples of 0.005), words paired ordinary mlp logistic. Conflicting or out-of-range values are rejected. All other words are kept as your note and change nothing. Questions and open questions are limited to 400 characters.

Comparing 400 examples × 120 steps with 800 examples × 60 steps matches how many times examples are seen in all; it does not match the number of optimizer steps or the CPU time.

Compare the two cue values p(y=1) over a × b · label: same sign, a·b > 0

no run yet

Both views use the same run, checkpoint and axes. The diamond marks the same a and b at each cue value. Colored points are actual rows with that view’s cue.

Cue slice on a small screen
+1

Cue −1

No model yet. After a run, the field shades a finite grid: each cell is coloured by one forward pass of the selected checkpoint at the cell centre, with the cue fixed at the chosen slice (−1 or +1).

Cue +1

The same captured model, evaluated at cue +1.

Points

class-disagreement band: no run

Class-disagreement band: the cells of the supported grid (a finite set) where the predicted class changes when the cue goes from −1 to +1. An empty band does not mean the cue has no effect on the probability, and a band of any size is not a complete causal explanation.

Arrows: nearest example · Enter: inspect · F: flip cue · [ ]: step · Space: replay · Home/End: first/last checkpoint

Field and points as a table

Selected example

select a point

Three numbers, not a picture. Shading marks the gap |v| < 0.2, where no examples are generated. A dashed ring (or *) marks the example’s stored value before you moved it.

Move this example · the model stays fixed — — cue
—

Generated examples have |a| ≥ 0.2 and |b| ≥ 0.2, so a and b snap out of the central gap (−0.2, 0.2). The cue is only −1 or +1. Values outside that support are not evaluated.

Contributions as a table

Runs over training

step —

solid: IID accuracy · dashed: reversed-cue accuracy · dotted: band cells / supported grid cells (class disagreement between cue −1 and +1)

The next run that would tell these apart

    400 × 120 vs 800 × 60 matches how many times examples are seen, not optimizer steps or CPU time.

    Run histories as a table

    Keep this investigation and come back to it

    This browser keeps one saved copy for this site address, and only when you choose to save. Work opened at another address (another port) is kept apart: export its JSON there, then choose Import JSON here.

    Checking the saved copy…

    Copy the saved JSON

    These are the exact stored bytes. Its hashes stay unchecked until rebuilding it here succeeds.

    Copy text you have not added yet

    This text is not a finished investigation you can reopen. Add your note and pin your next question before saving; unfinished runs stay in this tab only. Export JSON keeps finished work.

    Rebuilding reruns the same code and fixed seeds: it checks the arithmetic, not the finding, and is not an independent experiment. Once you have looked at the diagnostic rows, they are evidence you used to choose between runs, not a final unseen test. Flipping the cue keeps a, b and the captured weights fixed; moving a or b recomputes the label from a·b. Fieldwork tabs take turns to save under one shared lock, check that the saved copy is exactly what they last saw, and read it back after writing. Anything else writing to this browser’s storage is outside that arrangement, and a copied hash proves nothing by itself.