Affine Keypoints for Sparse, Fold-Free 3D Registration

Registering two 3D medical scans means finding a smooth warp that lines up corresponding anatomy. Today the field splits into two camps. One camp predicts a single global affine transform, meaning one rotation, scale, shear, and shift for the whole volume. The other camp predicts a free displacement vector at every voxel. Unsupervised keypoint methods sit in between: they detect a few matching 3D landmarks and fit a transform to them. Each landmark gives only its position, though, so it says nothing about how the tissue around it is stretched, sheared, or rotated. In 2D multi-view geometry, the analogous problem was solved by affine correspondences. These are matches that carry a point pair plus the local $2\times 2$ Jacobian of the mapping between images. Because each such match holds three times the information of a point match, two of them are enough to recover camera motion.

We propose to bring this idea to volumes. A network detects a small set of 3D keypoints. For each matched pair it estimates the local $3\times 3$ linear map between the scans. It then converts these position-plus-Jacobian pairs, in closed form, into a smooth velocity field whose exponential is a guaranteed-invertible warp. The bet is twofold. First-order keypoints should break the density ceiling seen in point-based keypoint registration. They should also capture piecewise-affine anatomy, such as bones sliding past each other in the knee, with a few dozen interpretable parameters, without the folding that unconstrained dense fields produce.

Core Claim

At a matched number of transformation parameters, $K$ keypoints that each carry a local affine map should register 3D scans better than $4K$ position-only keypoints, the count that gives both models the same degrees of freedom. The affine keypoints should also keep improving beyond the 64-keypoint saturation point that KeyMorph reports. The resulting warps should have zero non-invertible voxels by construction. The keypoint-level log-determinants should give readable measures of local volume change.

What is new is the combination of three things. Earlier work on locally affine diffeomorphisms needs hand-placed control points and per-pair optimization. Earlier learned keypoint registration uses position-only anchors and a single global transform. Here the local affine maps are learned without supervision and differentiably, and they drive a sparse first-order velocity field in a single forward pass.

Relation to Prior Work

The method draws on two sources. Higher Order Kernels and Locally Affine LDDMM Registration shows that derivatives of smoothing kernels act as "affine atoms" around control points. With these atoms, five manually placed points can track ventricular expansion in longitudinal brain MRI. That paper supplies our deformation model. It differs from us in two ways: it optimizes an evolution equation per image pair, and its control points are chosen by hand. We replace both with a learned detector and a closed-form solve.

KeyMorph supplies the detection machinery. It uses a center-of-mass layer over 3D heatmaps to get sub-voxel keypoints, followed by a differentiable least-squares fit. KeyMorph motivates the proposal in two respects. Its keypoints are zero-order and feed only a global affine fit. Its accuracy peaks at 64 keypoints and declines at 128.

On the 2D side, Learning Affine Correspondences by Integrating Geometric Constraints constrains our design. It found that regressing raw affine matrices jointly with match positions fails through what it calls "loss ambiguity". Training became stable only after positions were decoupled from shape and the matrix was factored into scale, orientation, and residual shape. C2FViT reports the same lesson for global 3D affine prediction. We follow both by factoring each local map.

Classical 3D work offers no learned analogue of these solvers. Theory and Practice of Structure-From-Motion Using Affine Correspondences and the minimal solvers of Barath, Guan, and Eichhardt are all formulated for camera projections.

The proposal also sits against two-stage pipelines. AVSM and C2FViT handle only global affine motion, and AVSM follows it with a dense non-parametric field. AVSM's authors note boundary degradation at volume edges, where that field has no geometric structure. Our model fills the middle ground between those two stages with regional affine structure.

Research Program

Keypoint detection. A 3D encoder produces $K$ heatmap channels for each scan. Following KeyMorph, a center-of-mass layer turns these into keypoint centers $c_k$ and $c'_k$. All coordinates are kept in millimetres rather than voxel indices, so that anisotropic slice spacing is handled explicitly instead of being blurred by isotropic operators.

Local affine estimation. For each matched pair we estimate the local map $A_k \in \mathbb{R}^{3\times 3}$ in two steps.

The first step is a closed-form estimate. We sample learned feature patches around $c_k$ and $c'_k$ and run a few differentiable Gauss–Newton steps of local affine alignment, which is Lucas–Kanade alignment on learned features rather than raw intensities. This gives an estimate that is geometric by construction.

The second step is a learned correction, applied in factored form. A small head predicts a rotation increment as an axis-angle vector and a symmetric log-stretch matrix. The final map is $A_k = R_k \exp(S_k)$. This mirrors the decoupling in Sun et al. and C2FViT, and it keeps $\det A_k > 0$ always.

Field construction. Matched pairs become a velocity field $v$ that is a sum of kernel-weighted affine atoms:

$$v(x) = \sum_{k=1}^{K} G(x - c_k)\,\big(t_k + B_k (x - c_k)\big),$$

Here $G$ is a Gaussian kernel, $t_k \in \mathbb{R}^3$ is a local translation, and $B_k \in \mathbb{R}^{3\times 3}$ is a local linear velocity. The $12K$ unknowns $\{t_k, B_k\}$ are found by solving one linear system. The system requires that, at each $c_k$, the value and Jacobian of $v$ match the targets $c'_k - c_k$ and $\log A_k$.

This is Hermite-style interpolation with derivatives. It is a small dense solve of size $12K$, it is differentiable, and it uses the same affine atoms as locally affine LDDMM. Integrating $v$ by scaling-and-squaring gives a diffeomorphism, meaning a smooth warp with a smooth inverse. Folding can therefore occur only through numerical error, which we measure.

A global affine stage is composed in front of the field. Following AVSM, maps are composed analytically and the image is interpolated only once.

Training. The model is trained without supervision, using a similarity loss suited to the modality (normalized cross-correlation, or mutual information for multi-modal pairs) and a small penalty on $\|B_k\|$. An optional Dice term is used when atlas labels are available.

Interpretability. As a by-product, $\log\det A_k$ is a per-landmark estimate of local volume change. We will test it directly as an atrophy marker.

Baselines

The naive reference point has two parts: no registration at all, and the global affine stage alone. The global affine stage is reported against the C2FViT figure on OASIS, a Dice similarity coefficient (DSC) of 0.64 for C2FViT. This tells us how much of any gain comes from local structure rather than global alignment.

The strongest point-based competitor is KeyMorph, extended in the most favourable way we can find. Its zero-order keypoints are passed through the same Gaussian-kernel field and scaling-and-squaring integration as our method, so that it too yields a diffeomorphic non-rigid warp rather than only a global affine one. It is run at $K$ from 16 to 512 keypoints. The file gives no reported absolute KeyMorph Dice on IXI ("no reported result found on Lacuna for KeyMorph Dice on IXI"), so we reproduce it from the public code.

This extended KeyMorph is also the key ablation. It shares our encoder, field construction, data, and tuning budget, and it differs only in whether $A_k$ is used. To separate first-order information from raw parameter count, we compare $K$ affine keypoints ($12K$ degrees of freedom) against $4K$ point keypoints ($12K$ degrees of freedom).

The strongest dense competitors are VoxelMorph, which reports Dice of about 0.75 on its multi-site brain cohort, and TransMorph. TransMorph reports a mean Dice of 0.745 with 0% non-positive Jacobians on the JHU cohort. That cohort is not one we can access through the file, so on our splits we retrain TransMorph with its diffeomorphic variant.

On knee MRI the reference is AVSM, which reports Dice of 82.67% for longitudinal pairs and 68.40% for cross-subject pairs on OAI.

All learned methods receive the same preprocessing, the same training pairs, the same GPU-hour budget, and the same number of hyperparameter trials.

We define beating the baselines as follows. Against the matched-parameter point baseline, we require a statistically significant Dice gain under a paired test, plus a performance curve in $K$ that does not peak at 64. Against AVSM on OAI cross-subject pairs, we require exceeding 68.40% with zero folds. Against TransMorph on brain data, we do not claim to win on Dice. We count it as success to come within about one Dice point while using two to three orders of magnitude fewer transformation parameters, and to win under large initial rotations.

Why not just…?

Why not just add more KeyMorph keypoints and interpolate a dense field from them? This is the most serious threat, and the matched-parameter ablation exists to address it. KeyMorph's own sweep shows a decline at 128 keypoints, which suggests that discovering hundreds of consistent landmarks across subjects is hard. However, that sweep fed a global affine fit, so it is not direct evidence about non-rigid fields. If $4K$ point keypoints match $K$ affine keypoints at every $K$ under our shared field construction, the first-order claim fails. In that case we would report the method as a parameterization result rather than an information-density result.

Why not just use a dense network like TransMorph or VoxelMorph? On brain overlap they may well win. VoxelMorph's roughly 0.75 Dice and TransMorph's 0.745 are strong numbers. Our case for the affine method rests on three settings where dense fields are weaker. The first is piecewise-affine anatomy with sliding bones, where AVSM documents boundary degradation. The second is robustness to large initial misalignments, where KeyMorph shows that dense and CNN baselines collapse beyond 45 degrees of rotation. The third is interpretable sparse output. If TransMorph also wins on OAI and under rotation, the proposal narrows to an interpretability tool.

Why not just read local Jacobians off a dense field, or use a B-spline grid? Jacobians computed from a dense field after registration are cheap to obtain. However, they inherit that field's folding and noise, and they do not constrain registration itself. A B-spline grid places its parameters on a fixed lattice, whereas our keypoints are placed adaptively on anatomy. We include a B-spline control-grid baseline whose number of degrees of freedom is matched to $12K$. If it ties with our method, the adaptive placement adds nothing.

Proposed Experiments

The first experiment is the matched-parameter sweep. It runs on IXI T1-to-atlas registration, using KeyMorph's 23 SynthSeg regions as the Dice evaluation, and on OASIS. It compares affine keypoints with point keypoints and with the matched B-spline grid, plotting Dice against degrees of freedom. The prediction is that the affine curve lies above the point curve and keeps rising past 64 keypoints.

The second experiment is on OAI knee MRI, comparing against the AVSM figures above. Here we expect the largest gain, because femur, tibia, and patella move as near-affine pieces. We will measure Dice per structure and the fraction of non-positive Jacobians. As an additional check, we will test whether the learned keypoints settle on individual bones.

The third experiment covers robustness and generalization. On IXI we apply rotations from 0 to 180 degrees, and on IXI we also run T1-to-T2 multi-modal pairs. Models trained on OASIS are then tested on LPBA40, where C2FViT reports that CNN baselines drop. LPBA40 has no absolute score in the file.

The fourth experiment checks interpretability on OASIS longitudinal pairs. Following locally affine LDDMM, keypoint $\log\det A_k$ should be near zero for scan–rescan pairs and positive around the ventricles in pairs where atrophy is progressing. The file reports no absolute value for this measure from the earlier work.

The fifth experiment probes the stability concern raised by Sun et al. We train with raw unfactored $A_k$, without the Gauss–Newton initialization, and with only the Gauss–Newton estimate and no learned correction. Each variant is run on isotropic data and on data resampled to 5 mm slices.

A single decisive check summarizes the project. If, at matched degrees of freedom, affine keypoints do not beat point keypoints on both IXI and OAI, the central claim is wrong.