Fitting Every Hint Is Not Enough: Premature Floods in Recurrent Algorithmic Reasoners
Organizations: University of Zanjan
Abstract
Recurrent algorithmic reasoners are trained with per-step hints on small graphs and run for many more steps on large ones. On breadth-first search in SALSA-CLRS, we find that a reasoner can reproduce every training hint and still fail on deep graphs: after some exact steps, it declares nodes reached before the search gets there. We call this a premature flood and trace two routes to it. In our GRU processor with a degree input, the flood is carried in the hidden state and set off when that input is in the tail of the training distribution. Setting the input higher at inference brings the flood sooner, and none of the six flooding models counts steps. Without the input, summing the neighbors' states instead of averaging them also breaks the processor. In the benchmark's own GIN and PGN, trained with its code, some seeds instead flood from a fixed step, on sparse and dense graphs alike. Clamping the degree input or adding 200 dense training graphs removes every failure of the GRU processor. Detaching the state between steps avoids the flood in that processor (0 of 23 seeds, against 6 under full backpropagation) but not with sums or a residual update, and two published remedies leave floods. None of the benchmark's test sets is both deep and dense, but its deepest one shows the second route: on its Delaunay graphs at 1,600 nodes, one GIN seed floods from step 18. We therefore recommend auditing the range of every input and aggregate, which catches the first route, and testing on deep graphs, which catches both.
Figures & tables
| seeds perfect | node accuracy | |||
|---|---|---|---|---|
| rule | blob | maze | ER 800 | deg. 17 |
| BPTT | 17/23 | 23/23 | 0.581 | 0.413 |
| truncated, | 16/23 | 23/23 | 0.587 | 0.425 |
| BPTT, progressive loss | 18/23 | 23/23 | 0.615 | 0.468 |
| BPTT, random | 22/23 | 23/23 | 0.538 | 0.346 |
| 23/23 | 23/23 | 0.771 | 0.722 | |
Appendix figures & tables30 assets
Supplementary material from the paper’s appendix.
Appendix
| lowest-index rule | all reached at 1 | |||
|---|---|---|---|---|
| test set | node | graph | node | graph |
| ER 16 (A) | 0.327 | 0.000 | 0.613 | 0.025 |
| ER 80 (A) | 0.285 | 0.000 | 0.380 | 0.000 |
| ER 160 (A) | 0.249 | 0.000 | 0.311 | 0.000 |
| ER 800 (A) | 0.240 | 0.000 | 0.257 | 0.000 |
| Delaunay 16 (A) | 0.257 | 0.000 | 0.523 | 0.025 |
| node accuracy on | graph accuracy | exact-timing radius (hops) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| test set | ecc | deg | BPTT | K 1 | paired | sign | BPTT | K 1 | BPTT | K 1 | sign |
| ER 16 | 2.6 | 6.4 | 1.000 | 1.000 | +0.000 | 0+/0 /23= | 1.000 | 1.000 | 4 | 4 | 0+/0 /23= |
| ER 80 | 3.5 | 9.4 | 0.998 | 0.999 | +0.000 | 3+/2 /18= | 0.991 | 0.992 | 7 | 7 | 0+/0 /23= |
| ER 160 | 3.6 | 11.6 | 0.972 | 0.979 | +0.007 | 18+/3 /2= | 0.867 | 0.914 | 4.74 | 4.61 | 1+/2 /20= |
| ER 800 | 4.1 | 15.1 | 0.651 | 0.802 | +0.151 | 19+/3 /1= | 0.378 | 0.567 | 1.43 | 2.91 | 12+/0 /11= |
| Delaunay 16 | 3.3 | 5.7 | 1.000 | 1.000 | +0.000 | 0+/0 /23= | 1.000 | 1.000 | 4 | 4 | 0+/0 /23= |
| test set | graphs | ecc. | deg. | ||
| ER 16 | 16 | 40 | 2.6 | 6.4 | 3.6 |
| ER 80 | 80 | 40 | 3.5 | 9.4 | 4.5 |
| ER 160 | 160 | 40 | 3.6 | 11.6 | 4.6 |
| ER 800 | 800 | 20 | 4.1 | 15.1 | 5.1 |
| Delaunay 16 | 16 | 40 | 3.3 | 5.7 | 4.3 |
| Delaunay 80 | 80 | 40 | 6.8 | 6.6 | 7.8 |
| eccentricity | nodes first reached at step | |||||||
|---|---|---|---|---|---|---|---|---|
| pool | graphs | mean | mean deg. | mean | max | |||
| SALSA-CLRS (benchmark) | 6,000 | 10 | 4.5 | 2.7 | 8 | 0.05 | 156 | 0 |
| blob16x4 2,000 | 2,000 | 64 | 15.2 | 5.5 | 7 | 0.83 | 13,789 | 0 |
| blob16x8 200 | 200 | 128 | 15.2 | 10.9 | 15 | 1.00 | 11,687 | 5,751 |
| blob16x8 2,000 | 2,000 | 128 | 15.2 | 11.0 | 15 | 1.00 | 115,789 | 58,245 |
| grid4x24 2,000 | 2,000 | 96 | 3.4 | 20.0 | 26 | 1.00 | 130,414 | 93,915 |
| seeds perfect | node accuracy | ||||
|---|---|---|---|---|---|
| rule | training pool | blob | maze | ER 800 | deg. 17 |
| BPTT | +2,000 blob16x4 ( ) | 23/23 | 23/23 | 1.000 | 1.000 |
| +2,000 blob16x4 ( ) | 23/23 | 23/23 | 1.000 | 1.000 | |
| BPTT | +200 blob16x8 ( ) | 23/23 | 23/23 | 1.000 | 1.000 |
| +200 blob16x8 ( ) | 23/23 | 23/23 | 1.000 | 1.000 | |
| BPTT | +2,000 blob16x8 ( ) | 23/23 | 23/23 | 1.000 | 1.000 |
| benchmark pool (GRU) | GRU processor, min of two rules | residual variant, min of two rules | |||||
| cell (node/graph) | BPTT | blob16x4 | 200 blob16x8 | no deg. | blob16x4 | 200 blob16x8 | |
| ER 16 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 |
| ER 80 | 0.999/0.993 | 0.999/0.989 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 |
| ER 160 | 0.969/0.824 | 0.981/0.917 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 |
| ER 800 | 0.581/0.226 | 0.771/0.520 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 |
| Delaunay 16 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 | 1.000/1.000 |
| scheme | carried | gradient |
|---|---|---|
| SALSA baselines | own state | full |
| truncated BPTT | own state | last |
| DEAR | fixed point | implicit |
| DNAR | true hints | none |
| ForgetNet | pred. hints | via hints |
| (here) | own state | none |
| experiment | what we expected | refuted by | what happened |
|---|---|---|---|
| Head to head (2 seeds, then 3, then 23) | matches BPTT within 0.02 everywhere (45%); trails by 0.02–0.15 somewhere (35%) | trails by more than 0.15 (20%) | neither: matched on every cell but ER , where was ahead. No predicted outcome covered this, so we retested at 23 seeds under new predictions, which held |
| Degree sweep | BPTT falls monotonically with degree while stays above 0.90 (50%); both fall, BPTT faster (30%) | neither falls | the second, but only in the band, not as a slope: both perfect at low degree, both on the floor at high degree |
| Truncation axis, | a step at (40%); monotone in (35%) | flat in (25%) | the step |
| Learning-rate control | ’s advantage survives three learning rates at six seeds | ’s advantage disappears at some rate | held: wins at every rate, the two rules’ gradient norms are close, clipping is rare, and the runs at the operating rate reproduce the earlier ones |
| Deep families: grids and paths | the two rules separate on depth alone | they do not | they do not: both reach 508 hops on grids and 1,023 on paths in 3 of 3 seeds. The family was saturated |
| Deep families: blobs | the radius prediction at 3 seeds, then four at 23 seeds: perfect in at least 20 (60%); BPTT’s rate below it (70%); BPTT’s failures at a bounded radius; at least one failure (45%) | fewer than 15 seeds perfect, or BPTT’s rate at or above ’s | the radius prediction held; the first three held; the fourth did not ( failed in no seed), and is reported as a bound |
| experiment | what we expected | refuted by | what happened |
|---|---|---|---|
| Counting or drift, on the saved weights of 12 models | mixed (35%), drift (35%), counting (30%); the control holds in at least 5 of the 6 failing models (80%) | a drift outcome, for counting as the mechanism | mixed: no model counts, three drift and three lie between; the control held in 6 of 6 and every model reproduced its recorded results, so the paper does not describe the flood as counting |
| Onset against a uniform degree input | each failing model first floods above the pool’s 99th percentile (65%); its onset does not rise with the input (80%) | a failing model flooding at 1.3 or below | both: first floods at 1.4 to 2.0, onsets falling with the input in 6 of 6 |
| Healthy models under the same input | a delayed flood up to 3.0 in at least one model (45%), in none (30%), or only immediate floods or stalls (25%); in at least one healthy BPTT model (65%) | a delayed flood in a model, for ’s protection | all three models and two of three healthy BPTT models: changes how far out the input must be |
| Mazes at the blob input | at least 4 of the 6 failing models flood on a maze with at 1.9 (60%); at most 1 (25%) | at most 1, for the input’s value as the trigger | 6 of 6 |
| Healthy models under the switch and transplant | none floods (85%) | none named | none floods |
| Progressive loss under BPTT, 23 seeds | at least 4 seeds fail, as floods (55%); 1 to 3 (30%); none (15%) | either remedy at 0/23 | the first: 5 of 23 fail, all as floods; all runs have low logged training loss |
| experiment | what we expected | refuted by | what happened |
|---|---|---|---|
| The sums brought back into range, on the saved weights | at the pool’s median count at least 20 of the 25 failing models are exact (65%); failures begin only above the pool’s 95th percentile (60%) | more than 5 models failing at a count of 7, for the range as the cause | 17 of 25 repaired, but 12 fail at 7: the range is not the whole account |
| The same, further predictions | at five, at least 19 of 21 healthy models stay exact (85%); further out, floods come no later and stalls grow no smaller (70% and 60%); at thirty, at least 11 healthy models fail (55%) and at least 20 of the 25 keep their type (70%); capping the sums at eleven helps the dense ER cells in at least 18 of 25 (60%) | none named | 19 of 21 stay exact; the predicted flood trend held in 10 of 11 models, but the predicted stall trend held in only 6 of 14; at thirty, 13 healthy models fail on blob16x64 and 14 on either deep cell (Table 18 ); only 15 of 25 keep their type; the cap helps in 8 of 25, all , and hurts most BPTT models |
| The readout of untouched nodes, degree input, 6 failing models | with the true reach mask fed in, its median climbs over steps 2 to 20 at , and at most a quarter as fast at 1.0, in at least 5 of 6 models (70%) | none named; descriptive | held in 6 of 6, at most a fifth as fast |
| The same for the 25 failing sum models | floods: the untouched nodes’ readout climbs at 30 neighbors’ worth and at most a quarter as fast at five, in at least 8 of 11 (60%); stalls: the readout of nodes due at the step falls at 30 and at most a quarter as fast at five, in at least 10 of 14 (50%) | none named; descriptive | held for the floods, 10 of 11; failed for the stalls, 2 of 14, so the stalls stay unexplained |
| The sum models with the training graphs’ self-loops | the failing models still fail (65%); at five neighbors’ worth at least 20 of 25 are exact (50%); at seven at most 5 fail (45%); at least 19 of 21 healthy models stay exact (70%) | 13 or more exact under the self-loops, for the missing self-loops as the cause | none of the 25 repaired, so the failures are not an artifact of the missing self-loops; but only 15 are exact at five (17 without them), the same 12 fail at seven, and 4 of the 21 healthy models break |
| The benchmark’s own models (GIN, PGN and RecGNN as released; GIN with sums), 10 seeds each | the three released models reproduce their published accuracy (65%); in each, at most 1 fitting seed floods at blob16x64 (40%), or 3 or more in one of them (35%); GIN with sums floods in at least 3 (55%) and more often than GIN in at least 7 paired seeds (55%); at most 1 per model floods on maze32 (55%) | a released model flooding in 3 or more seeds, for our account of the trigger in models of that kind | all three reproduce; GIN floods in 3 of 7 fitting seeds, PGN in 1 of 10, RecGNN in 0 of 8 (one seed timed out), each flooding seed on the mazes too, from nearly the same step; GIN with sums declares nodes early in 7 of 7; only 4 seeds fit in both GIN models, too few for the paired predictions. Our account of the trigger covers our processor only |
| comparison | where | counts [95% interval] (discordant) | test | Holm | |
| Floods, BPTT against (GRU processor) | § 4.1 | 6/23 [0.10, 0.48] vs. 0/23 [0.00, 0.15] (6, 0) | McNemar | 0.031 | 0.156 |
| Failures, sums against means, BPTT | § 4.5 | 15/23 [0.43, 0.84] vs. 0/23 [0.00, 0.15] (15, 0) | McNemar | 0.001 | 0.001 |
| Failures, sums against means, | § 4.5 | 10/23 [0.23, 0.66] vs. 0/23 [0.00, 0.15] (10, 0) | McNemar | 0.002 | 0.012 |
| Failures with sums, BPTT against | § 4.5 | 15/23 [0.43, 0.84] vs. 10/23 [0.23, 0.66] (10, 5) | McNemar | 0.302 | 0.604 |
| Floods, progressive loss against BPTT | § 4.7 | 5/23 [0.07, 0.44] vs. 6/23 [0.10, 0.48] (1, 2) | McNemar | 1 | 1 |
| Floods, random initial states against BPTT | § 4.7 | 1/23 [0.00, 0.22] vs. 6/23 [0.10, 0.48] (0, 5) | McNemar | 0.062 | 0.250 |
| node accuracy | blob16x64 | maze32 | node acc. | |||||
|---|---|---|---|---|---|---|---|---|
| model | reproduced | 16-node sets | 15 sets | fitting | F/S/M/E | early | F/S/M/E | blob16x64 (floor) |
| GIN (max), as released | yes | 0.982 | 0.787 | 7/10 | 3/1/0/3 | 3 [0.10, 0.82] | 3/2/0/2 | 0.21 (0.19) |
| PGN (max), as released | yes | 1.000 | 0.889 | 10/10 | 1/0/0/9 | 1 [0.00, 0.45] | 1/0/0/9 | 0.34 (0.19) |
| RecGNN (max), as released | yes | 1.000 | 0.853 | 8/9 | 0/0/0/8 | 0 [0.00, 0.37] | 0/0/0/8 | 0.48 (0.19) |
| GIN with sums | – | 0.993 | 0.651 | 7/10 | 6/0/1/0 | 7 [0.59, 1.00] | 3/0/3/1 | 0.27 (0.19) |
| flooding seed | blob16x32 | blob16x64 | maze16 | maze32 | Delaunay 1,600 |
|---|---|---|---|---|---|
| GIN seed 42 | 18 [18–19] (20/20) | 18 [18] (20/20) | 18 [18] (40/40) | 18 [18] (20/20) | 18 [18–19] (199/200) |
| GIN seed 43 | 40 [40–43] (7/20) | 39 [39–43] (20/20) | 39 [38–43] (40/40) | 39 [38–40] (20/20) | – |
| GIN seed 46 | – (0/20) | 94 [94–95] (4/20) | 98 [95–135] (15/40) | 94 [94–102] (20/20) | – |
| PGN seed 46 | 28 [27–28] (13/20) | 28 [28] (20/20) | 30 [29–36] (29/40) | 28 [27–38] (20/20) | – |
| WS 16 | WS 80 | WS 160 | WS 800 | WS 1,600 | ER 1,600 | Delaunay 1,600 | |
|---|---|---|---|---|---|---|---|
| mean trajectory length | 3.7 | 7.2 | 8.0 | 12.9 | 9.9 | 5.4 | 23.3 |
| GIN | 0/7 | 0/7 | 0/7 | 0/7 | 0/7 | 0/7 | 1/7 |
| PGN | 0/10 | 0/10 | 0/10 | 0/10 | 0/10 | 0/10 | 0/10 |
| RecGNN | 0/8 | 0/8 | 0/8 | 0/8 | 0/8 | 0/8 | 0/8 |
| GIN with sums | 1/7 | 6/7 | 7/7 | 7/7 | 7/7 | 7/7 | 7/7 |
| perfect at blob 32 & 64 | cells exact (of 21) | radius lost | ER 800 node | Delaunay 800 node | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| model, rule (23 seeds) | std. | std. | (max, deep sets) | std. | std. | ||||||
| GRU, BPTT | 17/23 | 23/23 | 23/23 | 9 | 21 | 21 | 0 | 0.581 | 1.000 | 1.000 | 1.000 |
| GRU, | 23/23 | 23/23 | 23/23 | 13 | 21 | 21 | 0 | 0.771 | 1.000 | 1.000 | 1.000 |
| residual, BPTT | 0/23 | 0/23 | 10/23 | 2 | 6 | 4 | 534 | 0.379 | 0.998 | 0.439 | 0.381 |
| residual, | 0/23 | 11/23 | 16/23 | 2 | 9 | 11 | 533 | 0.653 | 1.000 | 0.781 | 0.749 |
| unscaled | rescaled count | |||||
| rule | seed | type | exact at 5 | first failure | fails at 7 | type at 30 |
| BPTT | 0 | stall | no | 5 | yes | exact |
| BPTT | 1 | flood | yes | 13 | no | flood |
| BPTT | 2 | flood | yes | 15 | no | flood |
| BPTT | 3 | flood | yes | 11 | no | flood |
| BPTT | 6 | stall | no | 5 | yes | flood |
| rescaled at inference | |||
|---|---|---|---|
| hidden-state sum only | 15 / 1 | 16 / 1 | 0 / 21 |
| reach-mask sum only | 0 / 21 | 0 / 20 | 7 / 8 |
| both sums | 17 / 2 | 13 / 2 | 2 / 14 |
| perfect at blob 32 & 64 | radius lost | |||
|---|---|---|---|---|
| rule (23 seeds) | none | (max, any set) | ||
| full BPTT | 17/23 | 22/23 | 22/23 | 0 |
| 23/23 | 23/23 | 23/23 | 0 | |
| standard rollout | radius, reset | ||||
|---|---|---|---|---|---|
| residual model | radius | early | late | ||
| BPTT, seed 0 | 1 | 0.976 | 0.000 | 1 | 1 |
| BPTT, seed 1 | 2 | 0.975 | 0.000 | 2 | 2 |
| BPTT, seed 9 | 2 | 0.975 | 0.000 | 2 | 2 |
| , seed 0 | 6 | 0.901 | 0.000 | 108 | 108 |
| , seed 1 | 3 | 0.952 | 0.000 | 108 | 3 |
| -clique chains | early | |||||
|---|---|---|---|---|---|---|
| model | at 16 | radius | early | |||
| BPTT, seed 3 | 87 | 102 | 5 | 0.92 | 108 | 0.00 |
| BPTT, seed 0 | 87 | 102 | 11 | 0.81 | 108 | 0.00 |
| BPTT, seed 13 | 87 | 102 | 16 | 0.75 | 108 | 0.00 |
| BPTT, seed 16 | 87 | 102 | 21 | 0.58 | 108 | 0.00 |
| BPTT, seed 22 | 87 | 102 | 23 | 0.59 | 108 | 0.00 |
| radius at cliques (mean ecc.) | early | ||||
| BPTT model | 8 (11) | 16 (21) | 32 (41) | 64 (77) | at 64 |
| seed 3 | 5 | 5 | 5 | 5 | 0.92 |
| seed 0 | 12 | 11 | 11 | 11 | 0.81 |
| seed 13 | 15 | 16 | 16 | 16 | 0.74 |
| seed 16 | 15 | 28 | 26 | 19 | 0.55 |
| seed 22 | 15 | 28 | 26 | 24 | 0.57 |
| onset | share of typical steps that count | reading | first flood | maze32 early | |||
|---|---|---|---|---|---|---|---|
| model | switch | transplant | control | at | at | ||
| BPTT seed 3 | 4 | 0.33 | 0.33 | 1.00 | mixed | 1.4 | 0.99 |
| BPTT seed 0 | 10 | 0.40 | 0.44 | 1.00 | mixed | 1.9 | 0.97 |
| BPTT seed 13 | 16 | 0.27 | 0.29 | 1.00 | mixed | 1.6 | 0.96 |
| BPTT seed 16 | 24.5 | 0.12 | 0.17 | 1.00 | drifts | 2.0 | 0.91 |
| BPTT seed 22 | 23 | 0.11 | 0.18 | 1.00 | drifts | 1.9 | 0.92 |
| model | observed | drift | count | observed | drift | count | observed | drift | count | |
|---|---|---|---|---|---|---|---|---|---|---|
| BPTT seed 3 | 4 | 6 | 6 | 4 | 11 | 12 | 9 | 35 | 36 | 33 |
| BPTT seed 0 | 10 | 12 | 12 | 10 | 17 | 18 | 10 | 38 | 42 | 33 |
| BPTT seed 13 | 16 | 18 | 18 | 16 | 22 | 24 | 16 | 40 | 48 | 33 |
| BPTT seed 16 | 24.5 | 30 | 26.5 | 24.5 | 31 | 32.5 | 24.5 | 53 | 56.5 | 33 |
| BPTT seed 22 | 23 | 33 | 25 | 23 | 33 | 31 | 23 | 50 | 55 | 33 |
| failing | McNemar against | paired with BPTT | node acc. against BPTT | ||||
|---|---|---|---|---|---|---|---|
| added to BPTT | seeds | BPTT | repaired | broken | ER 800 | deg. 17 | |
| progressive loss, | 5/23 | 1 | 0.062 | 2 | 1 | 0.034 (14+/5 ) | 0.055 (13+/6 ) |
| random initial state | 1/23 | 0.062 | 1 | 5 | 0 | 0.043 (5+/15 ) | 0.067 (5+/15 ) |
| node accuracy, mean of 8 seeds | wins | ||||||
|---|---|---|---|---|---|---|---|
| test set | BPTT | vs | vs BPTT | ||||
| ER 800 | 0.854 | 0.652 | 0.662 | 0.688 | 0.688 | 8/8 | 8/8 |
| ER 800, deg. 17 | 0.837 | 0.537 | 0.555 | 0.604 | 0.604 | 8/8 | 8/8 |
| node accuracy | graph accuracy | radius | ||||
|---|---|---|---|---|---|---|
| test set | BPTT | BPTT | BPTT | |||
| ER 16 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| ER 80 | 0.003 | 0.003 | 0.018 | 0.018 | 0.000 | 0.000 |
| ER 160 | 0.038 | 0.042 | 0.120 | 0.147 | 0.864 | 1.033 |
| ER 800 | 0.107 | 0.192 | 0.101 | 0.261 | 0.507 | 2.130 |
| Delaunay 16 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 |
| BPTT | |||
|---|---|---|---|
| family | MB/appl. | OOM at | GB, all |
| Delaunay | 284 | 64 | 0.39 |
| grid | 273 | 64 | 0.36 |
| blob | 569 | 32 | 0.91 |