Two hidden layer suffice: the caterpillar net
The work asks how to represent the maximum of N inputs exactly with a two-hidden-layer ReLU network, and how small the hidden layers can be. A conjecture predicting logarithmic depth for maxima has since been disproved.
The Caterpillar Net is a nonrecursive construction built from labelled caterpillar trees. Their edge and head functions define a dictionary of face functions. Alternating sums of support functions of caterpillar polytopes, corrected by face support functions and linear terms, yield the maximum exactly. Equal second-layer units are merged by normalizing hinge orientations. Definitions and theorems are linked to a Lean formalization, and the results were found through proof search in Lean using Claude Code and Codex.
The maximum of N inputs is represented with two hidden layers of widths O(N^2) and 2^{O(N log N)}. A separate Lean development extends a known first-layer width lower bound of C(N,2) - floor(4N/3) to networks with affine skip connections. It sharpens the bound to C(N,2) - N when every first-layer weight vector is proportional to some e_i - e_j.
