Structural Affinity: An Algorithm for
Coherent Cage-Based Shape Design

Aviraj Newatia, Shengan Yang, Hantao Zhong, Rika Antonova
University of Cambridge
Top: dragging one handle of a plain cage pulls a single spike out of the mesh. Bottom: with Structural Affinity, neighbouring handles stretch along and the mesh bends smoothly.

Cage handles normally move alone. Structural Affinity makes them move together, using a second cage and one precomputed sparse matrix.

0×
t-nut co-design success
35.6% → 87.4%
0%
less cage Laplacian distortion
Neural Cages, chair, no extra losses
0/17
perturbed wings with lower drag
paired runs vs. plain CBD
O(N+L)
at deformation time
one sparse mat-mul

TL;DR

  • The problem. Cage-based deformation (CBD) lets an optimizer reshape a mesh by moving a few cage handles. But each handle moves on its own, so optimizers find spiky, tangled, degenerate shapes, and people fight back with hand-tuned regularization losses.
  • The idea. Wrap the control cage in a coarser outer cage. Two handles that hang off the outer cage the same way are structurally related, so when one moves, the other should follow.
  • The algorithm. Precompute an affinity matrix \(C_{ij}=\sum_k \min(w_{ik}, w_{jk})\) from mean-value coordinates. At run time, displacements pass through \(A=(1-\alpha)I+\alpha C^\top\). No online solve, no new losses, and every cage motion is still reachable.
  • Results. Across neural deformation transfer, aerodynamic wing optimization and robot fingertip co-design: far more regular cages, smoother surfaces, lower modeled drag, and fingertips that were cast in silicone and tested on a real robot.
Full abstract

Cage-based deformation (CBD) parametrises 3D geometry through a small set of control handles, effectively enabling a variety of tasks from animation and interactive modelling to tool-based co-design, neural deformation transfer, and aerodynamic shape optimization. Many optimization approaches relying on CBD employ regularisation strategies to reduce the distortion of the deformed mesh by encouraging smooth, regular cage deformations. These techniques offer soft guidance to an optimization algorithm towards desirable deformations, but compete with the task objective rather than changing the deformation parameterization itself. In this work we introduce Structural Affinity for CBD, an explicit regularisation method which enables smooth deformations through control cages by exploiting a two-cage structure to couple cage-handle motion directly. Structural Affinity precomputes an affinity matrix using mean-value coordinates, binding the inner control-cage to a coarser outer-cage. This matrix defines how much a cage handle displacement propagates to neighbouring handles which substantially decreases and often eliminates cage self-intersections, reduces mesh distortion, and adds linear overhead at deformation time.

Across robotic control–morphology co-design, source-to-target neural deformation transfer, and aerodynamic wing shape optimization, Structural Affinity produces more regular deformations and substantially reduces reliance on hand-designed structural loss terms. We report consistent gains on three complementary diagnostics: the cotangent Laplacian, a proxy for surface smoothness; cage distortion, capturing whether control handles move coherently; and surface roughness, which measures undesirable oscillation in wing geometry.

Playground: feel the difference

Same shape, same cage, same input. Drag any handle in either panel. Left is plain CBD; right passes the same displacements through Structural Affinity. Everything here runs live in your browser.

CBD handles move alone
cage self-intersections0
surface distortion0
CBD-SA neighbours follow
cage self-intersections0
surface distortion0

What you're seeing. The shape is bound to the inner cage (dots). The dashed polygon on the right is the outer cage; it is only used offline to build the affinity matrix. Hover a handle to see its row of the affinity matrix: brighter handles follow it more.

Try: “Optimizer kick” shoves a few random handles hard, like one step of a gradient-free optimizer. CBD pulls dents and spikes out of the surface wherever a single handle moved; CBD-SA turns the same kick into broad, coherent bulges. Push α to 0 and both panels become identical; drop d to 0 and the coupling disappears.

Surface distortion = mean squared change in the discrete Laplacian of the outline (lower is smoother). Self-intersections = crossing pairs of non-adjacent cage edges. Because the update is not normalized, uniform translations are amplified; in the paper global pose is handled separately.

Sparsified affinity matrix \(C\) (handles × handles). Hovered row outlined.

How it works

1

Bind the cage to an outer cage

Enclose the control cage \(\mathcal{C}\) in a coarser convex cage \(\mathcal{U}\) with \(M\) handles. Each inner handle gets mean-value coordinates \(V_i=\sum_k w_{ik}U_k\), with all \(w_{ik}>0\).

2

Read off who follows whom

Moving \(U_k\) moves \(V_j\) by \(w_{jk}/w_{ik}\) times as much as \(V_i\). Average over \(k\), but cap each ratio at one so followers never overshoot:

\[C_{ij}=\sum_{k} w_{ik}\min\!\Big(1,\tfrac{w_{jk}}{w_{ik}}\Big)=\sum_{k}\min(w_{ik},w_{jk})\]

Symmetric, in \([0,1]\), one on the diagonal. Without the cap the average is always exactly 1. Sparsify to density \(d\).

3

Propagate in one product

Given handle displacements \(D\in\mathbb{R}^{N\times 3}\):

\[\Delta V = A D,\;\; A=(1-\alpha)I+\alpha C^{\top}\]

\(\mathcal{O}(N+L)\) for \(L\) retained affinities. The outer cage is no longer needed.

Coupling, not constraint. For dense \(C\) the matrix is positive semidefinite, so every eigenvalue of \(A\) is at least \(1-\alpha>0\): \(A\) is invertible and every inner-cage motion stays reachable. Structural Affinity changes which shapes are easy to reach, not which are possible. Projecting onto the outer-cage subspace instead removes 90 of 126 degrees of freedom on Neural Cages, and does not reproduce the gains.

One parameterization, three domains

Co-design LEAP-hand fingertips and an RL grasping policy to pick tiny objects off a table. A gradient-free optimizer reshapes the fingertip cage while FastTD3 learns to use it.

t-nut success, 4 training seeds × 1,000 eval episodes
Nominal
CBD 35.6%
CBD-SA 87.4%
Randomized
pose, mass, friction, contact
CBD 7.3%
CBD-SA 32.6%

Spikes that cheat vs. scoops that work

Plain CBD grows thin, spiky fingertips that exploit the simulator: they stab the object so it sticks in non-physical ways.

Spatula lift

CBD
CBD-SA

Jagged CBD fingertips cannot get under the low, unbalanced spatula. CBD-SA's wide, smooth tips slide underneath and reorient it.

Cast in silicone, tested on a real robot

Real robot experiments: LEAP hand on a PiPER arm picking tweezers, scalpels, cell batteries, screws, scissors and washers, with success rates.

The best CBD-SA designs were moulded in silicone and mounted on a LEAP hand + PiPER arm: 100% tweezers, scalpel and cell battery; 90% screws & parts. The CBD designs could not be made at all: their thin spikes cannot be cast and would not survive contact.

Neural Cages learns to deform a source ShapeNet shape into a target by predicting cage-handle offsets. We drop in CBD-SA, with or without the two hand-designed shape-regularity losses.

Deformed table cage: Vanilla NC tangles, CBD-SA NoReg stays regular.
Most of the regularity comes from the parameterization itself. With neither regularization loss, CBD-SA keeps 93–98% of the cage-Laplacian gain and 85–98% of the cage-edge gain of the full-loss model, while reconstruction stays within 1% of Vanilla NC. Those losses cost +42% epoch time and +430 MiB GPU memory.
Vanilla NC CBD-SA NoReg CBD-SA NC Loss

Mean ± sample SD over six seeds. Lower is better. Labels show change vs. Vanilla NC.

Deformed table meshes for Vanilla NC, CBD-SA NoReg and CBD-SA NC Loss.
Deformed table meshes. Vanilla NC buckles the frame; both CBD-SA variants keep the legs and rails straight.
Reconstruction (DCD) against surface distortion (Cot-Laplacian) for chair, table and car.
Reconstruction (DCD) vs. surface distortion. Reconstruction barely moves; CBD-SA shifts every category toward lower distortion.

Minimize drag on the NASA CRM wing at fixed lift (\(C_L=0.5\)) under a bending-energy constraint, with OpenAeroStruct (VLM). Same optimizer, same constraints, different shape parameterization.

Final drag coefficient and deformation roughness for FFD Baseline, FFD Matched, CBD and CBD-SA at small, medium and large design-variable budgets.
At 48 and 192 design variables, CBD-SA reaches the lowest drag and the lowest roughness, with every constraint satisfied.

Paired runs from perturbed starts

Each line is one seed: identical perturbed wing and cage, identical SLSQP run (192 variables, 2,000 iterations). Only the parameterization differs. Hover a line.

Bending-energy utilization and final wing geometry for each parameterization.
Final large-budget wing geometries, coloured by vertical displacement.

Low-fidelity vortex-lattice model: we compare parameterizations with each other, not with benchmark optima.

BibTeX

@misc{newatia2026structuralaffinity,
  title  = {Structural Affinity: An Algorithm for Coherent Cage-Based Shape Design},
  author = {Newatia, Aviraj and Yang, Shengan and Zhong, Hantao and Antonova, Rika},
  year   = {2026},
  eprint = {2610.23173},
  archivePrefix = {arXiv},
  primaryClass  = {cs.LG},
  url    = {https://arxiv.org/abs/2610.23173}
}