Bijective-by-Construction Output Heads for Compressing Neural Surface Registration

Neural networks can now align two brain surfaces in under a second instead of hours, which makes large cohort studies and clinical use practical. But these networks are big, and the obvious way to shrink them is pruning, which means deleting most of their weights. Pruned networks keep their accuracy up to a point and then fail suddenly, a "performance cliff." In surface registration, failure has a specific and damaging form: the predicted map folds. Triangles flip over, the surface tears, and the correspondence becomes physically impossible.

This note proposes making folding structurally impossible, so that pruning can only cost alignment accuracy and can never break topology. The network does not output vertex displacements directly. It outputs two things: landmark positions on a convex polygon in the Klein model of hyperbolic space, and strictly positive edge weights. A mesh solve then places every other vertex as a weighted average of its neighbours. Tutte's and Floater's theorems guarantee that this solve gives a one-to-one map, whatever the weights are, as long as the boundary is convex. Any pruned network therefore still produces a valid map. We predict this moves the compression cliff to much higher sparsity. A fused GPU kernel for the solve keeps the guarantee from consuming the latency that pruning saves.

Core Claim

The high-sparsity cliff in neural surface registration has two parts. The first is a topological cliff, where flipped triangles appear. The second is an accuracy cliff, where alignment of cortical folds degrades. For unconstrained heads that output displacement fields, we expect the topological cliff to arrive first.

A head built on a hyperbolic metric transformation removes the topological part entirely. Discrete Ricci flow and the Poincaré-to-Klein conversion turn landmark-bounded regions into strictly convex polygons. Inside those polygons, a convex-combination solve is provably bijective.

What is new is not the guarantee itself, which is classical. The new part is using the guarantee as a compression tool: separating "where the map goes" from "whether the map is valid," so that the weights pruning removes can only affect the former. The claim can be falsified. If, at matched sparsity, the guaranteed head's alignment cliff sits at the same point as the unconstrained head's alignment cliff, the benefit is cosmetic (zero flips only), and we will report it as such.

Background and Positioning

The geometric machinery comes from computational anatomy. Hyperbolic Harmonic Brain Surface Registration with Curvature-Based Landmark Matching cuts cortical surfaces along landmark curves into multi-boundary "pants" pieces. It flattens them by discrete Ricci flow, an iterative process that adjusts mesh edge lengths until curvature is uniform. Mapping in hyperbolic space, it reports a flipped area ratio of 0%, against up to 9% for Euclidean harmonic mapping. It is slow and purely optimization-based.

High resolution cardiac shape registration using Ricci flow and Shape Analysis with Hyperbolic Wasserstein Distance use the same Klein-model convexity argument. Hyperbolic orbifold tutte embeddings extends Tutte-style guarantees to hyperbolic orbifolds. These papers supply our head's method. We reuse their guarantee, but make the weights and landmark positions outputs of a trained network.

Two neural registrars motivate the work by showing the speed is available. GeoMorph registers HCP cortices in 2.6 s on GPU, with sulcal-depth cross-correlation around 0.88 and 95th-percentile areal distortion of 0.64. It is memory-limited to a coarse control grid. Automatic Landmark Detection and Registration via Quasi-Conformal Geometry and CNNs predicts a Beltrami coefficient, a complex number per point that measures how far the map is from angle-preserving. It bounds this coefficient below 1 with a tanh, which guarantees bijectivity in the continuum, and runs in about 0.5 s. That paper is the closest competitor. It differs from our proposal in a way that matters for compression: its Beltrami equation is solved by a learned network (DBS-Net), so pruning that network voids the guarantee. It is also restricted to disk-topology surfaces.

The compression literature constrains the design. SparseGPT shows that magnitude pruning collapses early while Hessian-compensated pruning survives past 60% sparsity. OWL shows that allocating sparsity per layer matters. Cut Less, Fold More replaces cutting neurons with clustering weight vectors onto centroids ("folding") and avoids the structured-pruning cliff near 40%. Hyperbolic Aware Minimization uses a hyperbolic mirror step to keep sparse training healthy at 90%. Its "hyperbolic" refers to the parameter-space geometry, not a surface.

All of these were studied on language and image classifiers. None measured the cliff on networks whose outputs must remain bijective. We use them as compression methods, not as competitors to the head.

The systems component borrows from FFDP. FFDP showed that fusing memory-bound registration operators (implicit grid sampling, fused local cross-correlation) cut memory by up to 76.5% on voxel grids. It does not handle meshes or iterative solves.

Research Program

The head operates on a template cortical mesh that has been sliced along automatically detected landmark curves. Detection follows the LD-Net idea from the QC-CNN paper. Each piece is uniformized by Ricci flow into the Poincaré disk and converted to Klein coordinates with $x_K = 2x_P/(1+\|x_P\|^2)$. In Klein coordinates, the hyperbolic-geodesic boundary becomes a straight-edged convex polygon. This preprocessing is done once per template.

Per subject, the encoder reads curvature and sulcal-depth features and predicts two outputs. The first is landmark positions, constrained to lie on the polygon's edges via a sigmoid parameterization. The second is a logit per edge, mapped to a positive weight $w_{ij} = \mathrm{softplus}(s_{ij}) + \epsilon$. Interior vertex positions $u$ then solve

$$L(w)\,u = b(w,\ell),$$

where $L(w)$ is the weighted graph Laplacian restricted to interior vertices and $b$ collects contributions from the boundary landmarks $\ell$. By Floater's theorem, every positive $w$ yields a non-flipped embedding.

Gradients flow through the solve by implicit differentiation, which requires one extra solve with the transpose system. The loss combines feature alignment with a penalty on hyperbolic area distortion.

A subtlety arises at the geometry level. Conformal flattening shrinks deep sulci to near-zero area, so the guarantee can fail numerically even when it holds mathematically: float32 orientation tests on tiny triangles may misfire, and a truncated iterative solve is not exactly a convex combination. We will therefore solve to a certified residual and accumulate in mixed precision. We will also report flips measured in float64, so that a "0%" claim reflects the geometry and not rounding.

The kernel component exists because a per-sample, weight-dependent sparse solve could otherwise dominate runtime and erase pruning's gains. We will write a fused conjugate-gradient kernel. Its design follows from the mesh. Connectivity is fixed by the template, so the mesh can be reordered once into cache-friendly partitions. Each iteration's sparse matrix-vector product, the dot products, and the coordinate conversion are kept in one persistent kernel, so that intermediate vectors stay in on-chip and L2 memory rather than making round trips to global memory. The backward solve reuses the same kernel. The final Klein-to-Poincaré conversion and the distortion loss are fused into the last pass.

Baselines

The naive reference point is an unconstrained displacement head on the same encoder, trained with a standard smoothness regularizer and then pruned with plain magnitude pruning. It shows where the cliff falls when nothing is done.

The strongest existing method for fast bijective registration is the quasi-conformal CNN pipeline of Automatic Landmark Detection and Registration via Quasi-Conformal Geometry and CNNs. We will run it in two forms: as published, with the learned Beltrami solver, and with that solver replaced by an exact numerical Beltrami solve. The second form is the fairest rival, because it also carries a guarantee that survives pruning.

The strongest learned registrar on accuracy is GeoMorph. Its reported figures on HCP are cross-correlation around 0.88, areal distortion 0.64, and 2.6 s. The classical accuracy-and-validity anchor is optimization-based hyperbolic harmonic mapping, which reports 0% flips. As a slow reference it bounds achievable alignment.

All learned models share the same encoder backbone, training data, epoch budget, and hyperparameter search budget. Each is compressed with the same four methods: magnitude, SparseGPT-style second-order pruning, folding, and HAM sparse training. Each is evaluated at matched sparsity levels from 0% to 95%.

No reported result was found on Lacuna for any pruned surface-registration network. Our dense-model reproductions therefore serve as the reference.

Beating the competition means one of two outcomes, at equal latency and on the same held-out surfaces. Either the guaranteed head keeps cross-correlation within 0.01 of its dense value at a sparsity where the best competitor has dropped by more than that. Or the guaranteed head shows 0% float64 flips where competitors exceed 1%.

Two ablations isolate the key ingredient. The first keeps our head but fixes the weights to positive mean-value weights. This tests whether learned weights carry the accuracy. The second keeps the learned weights but drops the Klein conversion, solving on the non-convex Poincaré boundary. This should reintroduce flips and shows the convexity is doing the work.

Why not just…?

Why not just use the quasi-conformal network's bounded Beltrami coefficient, which already guarantees bijectivity? In its published form, the equation is solved by a learned FFT network, and nothing protects that network's output once its weights are pruned. With an exact solver, however, the guarantee does survive compression. This is a real threat on disk-topology surfaces, and it is why the exact-solver variant is a headline baseline.

Our advantage there would have to come from three sources: speed of the fused linear solve, the learned weights, and the handling of multi-boundary pants pieces, which the Beltrami pipeline does not cover. If the exact-Beltrami variant matches us on disks, we will say so and confine the claim to multi-boundary and higher-genus pieces.

Why not just prune, then fine-tune with a Jacobian or folding penalty? Penalties discourage flips on training data but give no guarantee on new subjects. The long-tail argument in Understanding the Performance Cliff in Model Pruning predicts that rare anatomy is exactly what pruning erodes first. We will run this baseline at matched fine-tuning budget. We will report the worst-subject flip ratio, not only the mean, because a penalty can win on average and lose on outliers.

Why not just train a smaller dense network instead of pruning? If the guaranteed head helps, it should help small dense models too, because the claim concerns which parameters the network needs, not pruning specifically. We will therefore sweep width-reduced dense encoders alongside pruned ones. If small dense models with our head match pruned ones, the contribution is the head, and pruning is merely one way to reach the budget. We would report it that way.

Why not just let torch.compile or a sparse direct solver handle the head? General compilers fuse elementwise chains well. FFDP's experience suggests they do not restructure iterative spatial operators to avoid materializing intermediates. That is suggestive, not proof for meshes, so we will measure it.

A direct solver can reuse the symbolic factorization, because connectivity is fixed. It must still refactor numerically for every sample, because the weights change. We will compare our fused CG against torch.compile, a cuSPARSE CG, and a GPU sparse Cholesky with a reused symbolic factorization. If the factorized solve is faster, we will adopt it and drop the custom kernel claim.

Proposed Experiments

Training and testing use HCP and UK Biobank surfaces, following GeoMorph's protocol, plus OASIS surfaces, following the quasi-conformal paper's 24-subject protocol for direct comparison. Metrics are sulcal-depth cross-correlation, 95th-percentile areal distortion, flipped area ratio in float64 (mean and worst subject), and end-to-end GPU latency and memory.

The decisive check is a single figure per compression method. It plots flip ratio and cross-correlation against sparsity for the unconstrained head, the exact-Beltrami head, and ours. The hypothesis predicts three things. The unconstrained head's flip curve should rise before its accuracy curve falls. Ours should stay at zero flips throughout. Our accuracy cliff should sit at clearly higher sparsity than the unconstrained head's.

A second check is downstream. It asks whether surfaces registered by a 90%-sparse model preserve the ADNI Alzheimer's-versus-control separation that the hyperbolic Wasserstein distance achieved, which Shape Analysis with Hyperbolic Wasserstein Distance reports as 76.7% accuracy against 51.7% for surface volume. If the compressed model's registrations lower that accuracy noticeably, the compression is not clinically safe, regardless of flip counts.

A third check tests whether the fused kernel matters at all. If the head's solve is under a tenth of total latency at 90% sparsity, the kernel is not needed.