← blog

Partition Geometry: Profile Complexity and the Axis-Alignment Tax

geometrytheorymachine-learning

Decision trees, ReLU networks, and linear models all do the same thing at heart: they partition space into regions and assign a label to each. They just do it with different primitives. A tree stacks axis-aligned cuts; a linear model draws one oblique hyperplane; a ReLU network folds space with layered hyperplanes. Partition geometry is a small framework for comparing these mechanisms on equal footing, by laying them on the same labeled grid and asking how expensive the target is for each.

The same oblique-halfspace target under three mechanisms.

The same oblique-halfspace target under three mechanisms. A linear model needs one cut, a ReLU net folds space with many hyperplanes, and an axis-aligned tree is forced into a staircase (18 leaves here). That staircase is the axis-alignment tax.

Mechanisms as (primitive, composition, resource)

The organizing idea is to describe any mechanism by three coordinates: the primitive cut it uses, how those cuts compose, and the resource we count.

MechanismPrimitiveCompositionResourceGeometry
Linearhyperplanenonenumber of cutstwo halfspaces
Treeaxis-aligned hyperplanehierarchicalnumber of leavesunion of boxes
ReLUlearned hyperplanelayeredwidthpolyhedral complex

The interesting quantity is alignment: how compatible the target's boundary geometry is with a mechanism's cut family. A diagonal boundary is badly aligned with axis-aligned tree cuts, so a tree pays a tax to approximate it with a staircase. A checkerboard, on the other hand, is perfectly aligned. Alignment is a geometric explanatory principle for cost, not a single formula, and different regimes need different invariants.

Scan-line profiles and runs

To measure a labeling's boundary complexity in a mechanism-agnostic way, read the labels along each vertical grid line, bottom to top. That column of labels is its vertical profile. Let PxP_x be the number of distinct vertical profiles across all columns, and PyP_y the analogous count across rows.

Profiles alone turn out to be a little too coarse for a clean proof. The right refinement counts runs: maximal stretches of adjacent columns that share the same profile.

def profile(column):        # labels read bottom-to-top
    return tuple(column)
 
def runs(profiles):         # maximal runs of equal adjacent profiles
    r = 1
    for a, b in zip(profiles, profiles[1:]):
        if a != b:
            r += 1
    return r
 
# columns / rows are the ordered lists of profiles along each axis
# Theorem 3:  L >= runs(columns) + runs(rows) - 1

Write RxR_x for the number of runs among the column profiles and RyR_y for the rows. Since a run can only merge equal neighbors, RxPxR_x \ge P_x always. These profiles measure boundary complexity in the directions orthogonal to axis-aligned cuts, which makes them the natural language for the poorly-aligned regime, and useless in the well-aligned one.

Three theorems

The framework is built around three proved results about Πtree\Pi_{\mathrm{tree}}, the minimum number of leaves LL needed for an axis-aligned tree to classify a grid labeling exactly.

Theorem 1 (the axis-alignment tax, exactly). On the triangular halfspace R={x1+x21}R = \{x_1 + x_2 \le 1\} with the grid Gm={(i/m,j/m):0i,jm}G_m = \{(i/m, j/m) : 0 \le i, j \le m\},

Πtree(R,0;Gm)=2m+1=Px+Py1,Px=Py=m+1.\Pi_{\mathrm{tree}}(R, 0; G_m) = 2m + 1 = P_x + P_y - 1, \qquad P_x = P_y = m + 1.

The visible staircase suggests a bound of Lm+1L \ge m + 1, but that conservative count underestimates the truth by nearly a factor of two. The exact answer is 2m+12m + 1. Every one of the m+1m + 1 column profiles is distinct, so paying for both axes (minus one shared corner) is unavoidable.

Theorem 2 (good alignment). On a checkerboard with kk blocks per side,

Πtree=(k+1)2.\Pi_{\mathrm{tree}} = (k + 1)^2.

Here the boundary is perfectly axis-aligned, and the cost is governed by a cell count, not by profiles. In fact Px=Py=2P_x = P_y = 2 while L=(k+1)2L = (k+1)^2, so profile bounds are hopelessly loose: quadratic truth against a linear bound.

A two-block checkerboard under three mechanisms.

A two-block checkerboard. A linear model is helpless (48% accuracy), while the axis-aligned tree nails it with exactly 9=(k+1)29 = (k+1)^2 leaves at k=2k = 2. This is the well-aligned regime, where profiles say nothing useful.

Theorem 3 (the general run bound). For every grid labeling,

LRx+Ry1.L \ge R_x + R_y - 1.

This is the flagship result, because it proves in full generality the two facts that were previously only conjectured or open:

LPx+Py1andLmax(Px,Py).L \ge P_x + P_y - 1 \qquad \text{and} \qquad L \ge \max(P_x, P_y).

It also recovers the Theorem 1 lower bound as a special case, since on the triangle Rx=Ry=m+1R_x = R_y = m + 1 gives Rx+Ry1=2m+1R_x + R_y - 1 = 2m + 1.

Why runs, and not just profiles

The proof is a strong induction on LL over the recursive guillotine structure of the tree (an axis-aligned tree is just a recursive sequence of guillotine cuts). The subtlety is what survives a cut parallel to the scan direction. Distinct-profile counts are only sub-multiplicative there, Py(G)Py(GL)Py(GR)P_y(G) \le P_y(G_L)\, P_y(G_R), which is too weak to induct on. Run counts behave far better: they are sub-additive with a 1-1 gain,

Ry(G)Ry(GL)+Ry(GR)1,R_y(G) \le R_y(G_L) + R_y(G_R) - 1,

because concatenating two pieces can never manufacture a new adjacency between equal profiles. Summing the inductive bounds across a root cut yields LRx+Ry1L \ge R_x + R_y - 1. Strengthening the induction hypothesis from counts to runs is the whole trick.

The bound is tight on the triangle (L=2m+1L = 2m + 1) and on alternating stripes (L=nL = n, where the plain profile bound would give only 2), and it was checked exhaustively by an exact guillotine dynamic program over all 512 labelings of the 3×33 \times 3 grid and all 65,536 labelings of the 4×44 \times 4 grid.

Three alignment regimes

Putting the theorems together gives a clean picture of when each invariant is the right one.

RegimeExampleTight invariantStatus
PoorOblique halfspaceRx+Ry1=Px+Py1R_x + R_y - 1 = P_x + P_y - 1proved (tight via Theorem 1)
GoodCheckerboard(k+1)2(k+1)^2 cellsproved (Theorem 2)
NeutralDiskMx+MyM_x + M_y (approximation)conjectured

The disk, and what stays open

Smooth targets sit between the two extremes. For a disk at grid resolution m=20m = 20, the exact tree complexity is L=29L = 29, and the run bound gives 2121, the best rigorous lower bound available but no longer tight.

A disk target under three mechanisms.

A disk. The greedy tree shown here uses 31 leaves; the exact optimum at this resolution is 29, and the run bound guarantees only 21. Smooth boundaries are the neutral regime, where no simple invariant is tight.

Counting mixed columns and rows (Mx,MyM_x, M_y, those that a cut cannot keep pure) approximates LL closely, and the revised conjecture is that L=Θ(Mx+My)L = \Theta(M_x + M_y) for strictly convex smooth targets. It is worth being honest about what the data says: Mx+My1M_x + M_y - 1 is neither a lower nor an upper bound. It reads 3131 against L=29L = 29 at m=20m = 20, then 3939 against 4141 at m=24m = 24, then 5151 against 4747 at m=32m = 32, erring in both directions. And vertical stripes (MyM_y large, L=2L = 2) kill any general lower-bound version outright. So it is an approximation law, not a bound, and proving the two-sided constants is open.

The larger open question is a single invariant that interpolates between the run bound (poor alignment, linear cost) and the cell-count law (good alignment, quadratic cost), and ideally one that lifts to higher dimensions, perhaps as LiRi(d1)L \ge \sum_i R_i - (d - 1).

Takeaway

Once every mechanism lives on a shared labeled grid, "which model is simpler here" stops being a matter of taste and becomes a matter of counting. Profiles and runs supply the vocabulary, the triangle and checkerboard pin down the two extreme regimes exactly, and the run bound LRx+Ry1L \ge R_x + R_y - 1 gives one general lower bound that holds for every labeling.