← Back to the note

Linear stacks shear space; ReLU hinges fold manifolds

Compare an uncreased linear stack against piecewise-linear ReLU hinges on the exact same points. Scrub the fold slider from 0% to 100% to watch the coordinate grid deform in the right panel while the pulled-back boundary updates in the left panel.

Three-panel summary comparing a 3-layer linear shear (CE = 0.6931), a two-hinge ReLU V-fold (CE = 0.0011, 100% at H=8), and a 3-crease closed Zaslavsky triangle on concentric rings (100%).
1 · Geometry & activation rule
100% · Fully folded h(x)

Left · Input space x = (x₀, x₁) & crease lines

Clay circles: Class 0 · Slate squares: Class 1 · Dashed ink: hinge lines · Solid moss: pulled-back readout cut.

Right · Deformed hidden space & single linear cut

The final readout layer can only ever draw one straight moss line in this panel.

ArchitectureReLU V-fold (H=2/8)
2D linear regions2 folded half-planes
Verified CE loss0.0011
Verified accuracy100.0%
Verdict (Cross · ReLU V-fold): Two opposing hinges ReLU(+x₀) + ReLU(-x₀) = |x₀| fold (-2, 0) across the vertical crease directly onto (+2, 0) at |x₀| = 2, while (0, ±2) remain at |x₀| = 0. One straight vertical cut separates them cleanly—though under random SGD initialization, expanding width from H=2 (4/20 seeds) to H=8 (20/20 seeds) avoids dead-hinge traps.

Verified float64 benchmark summary (plain-first static record)

Every figure below comes directly from deterministic float64 runs in verify_manifold_folding.py, cross-checked without PyTorch by recompute_check.py.

Dataset & geometry Model / crease budget Active 2D regions (Zaslavsky cap) Cross-entropy loss Accuracy / seed reliability
Symmetric cross (4 pts: (±2,0) vs (0,±2)) 3-layer Linear (2→16→16→2, no ReLU) 1 (flat shear) 0.6931 (ln 2) 25%–50% (collapses to 2×2 matrix to 1.3×10⁻¹⁶)
Symmetric cross (4 pts) Analytic 2-hinge V-fold (ReLU(+x₀)+ReLU(-x₀)) 2 0.00005 100.0% (exact construction)
Symmetric cross (4 pts, 20 SGD seeds) Random-init ReLU: H=2 → H=4 → H=8 (4× d_in) 2–4 → 8–14 0.4124 → 0.0059 → 0.0011 20% (4/20) → 85% (17/20) → 100% (20/20)
Concentric rings (240 pts: r≈1.0 vs r≈2.4) 3-layer Linear (2→16→16→2, no ReLU) 1 (flat shear) 0.6931 (ln 2) 50.0% (matches single matrix to 2.5×10⁻¹⁶)
Concentric rings (240 pts) ReLU H=1 / H=2 (no bounded 2D cell possible) 2 (cap 2) / 3 (cap 4) 0.5625 / 0.3776 67.5% / 85.0% (open corridor leaks outer ring)
Concentric rings (240 pts) ReLU H=3 (triangle) / H=6 (polygon) 7 (cap 7) / 14 (cap 22) 0.0257 / 0.0061 100.0% / 100.0% (closed crease cage)
All six preset state verdicts (plain-text mirror for script-free readers)