LawKAN: Group-Law Layers for Composition -- When Imposing a Known Law Pays Off
Organizations: Independent researchers
Abstract
Many tasks compose transformations by a known rule: chained rotations in robotics and navigation. Learned models relearn it, compounding error; classical estimators hardcode it and miss hardware deviations. We impose the known structure and learn only the remainder: an exact non-commutative group law sits in the node of a self-contained layer, its edges learn local increments, and a zero-initialized correction psi learns unknown deviations of the law. A pre-training criterion predicts exact representability. On fixed-angle SU(2) composition, a 54-parameter dense edge is the most accurate dense model, at 27x fewer parameters than the strongest fixed-matrix baseline, and lies 0.05 deg above the Bayes floor. On real robot arms, an isolated 306-parameter psi reaches 1.12-1.14 mm versus 1.29-1.33 mm for Gauss-Newton at N >= 60, and the recipe transfers across three vendors and two protocols. The recipe matches classical fits where the data obey the law and loses where the imposed law is not the task's.
Figures & tables
| Instance | Chart (input coords) | Learned edge exact node | Result |
|---|---|---|---|
| LawKAN-SU(2) | axis phases | Fourier features , exp Hamilton | exact (Lemma 1 ) |
| LawKAN-GL + | Iwasawa | 6 product features (group elem.), matrix product | (dense ) |
| LawKAN-SE(3) | axis, angle, translation | , exp rigid product | (MLP ) |
| Model | Params | Error (deg) |
|---|---|---|
| LawKAN-SU(2), edge: Fourier ( ), node: exact | 54 | 2.78 0.02 (5 seeds) |
| Opponents | ||
| MLP + quaternion head | 1476 | 3.36 0.06 (5 seeds) |
| MLP + quaternion head + RPMG ( Chen et al., 2022 ) | 1476 | 3.42 0.15 (5 seeds) |
| MLP + 6D ( Zhou et al., 2019 ) | 1542 | 3.91 0.11 |
| MLP + 9D-SVD ( Levinson et al., 2020 ) | 569 | 4.32 0.46 |
| # | kind | model | params | note | ||||
|---|---|---|---|---|---|---|---|---|
| 1 | reference | per-joint screw G | strongest | |||||
| 2 | reference | PoE P | weaker class | |||||
| 3 | reference | per-joint screw A | sanity check | |||||
| 4 | opponent | residual MLP A | k– k | selected | ||||
| 5 | opponent | residual MLP, oracle A | k– k | optimistic | — | — | ||
| 6 | LawKAN | exact node A | — |
| Socket consistency (MUKCa; seeds for KUKA/Panda/Kinova, for the FR3 unit) | ||||||||||||
| reference | LawKAN (reduced-edge base) | LawKAN (per-joint-screw base) | ||||||||||
| Platform | dense screw | global | two-slot | global | kernel | two-slot | ||||||
| KUKA iiwa14 | ||||||||||||
| Panda | ||||||||||||
| Kinova ‡ | ||||||||||||
| FR3 unit ‡ | parity | |||||||||||
| Range-only (ABB RobotCali, draw-wire; seeds) | ||||
| reference | LawKAN | |||
| GN | (Adam) | global (Adam) | ||
| Task type | Verdict | Reason | Example tasks |
|---|---|---|---|
| Analytic estimator exists (gyro, strapdown; FK/arm calibration) | parity, tiny model | the exact analytic optimum is already reachable; classical strapdown and PoE calibration are the constant-edge limits of the same recipe (Section 5.5.1 , Section G.1 , Section 5.1 ) | strapdown integration; PoE arm calibration |
| Latent but identifiable increment (robot calibration) | win / match | identifiable increments; the gain is in the data-scarce regime, and a relaxed-node correction beats the classical fit at large when the hardware deviates from the law (App. G ; Section 5.1 ) | arm kinematic calibration ; monocular SLAM alignment ; inertial odometry |
| Latent increment with evolving state (rigid-body ODE) | only with the state-conditioned edge | needs a recurrence / ODE edge (Section G.2 ) | rigid-body dynamics (Baxter, Section G.2 ); trajectory-conditioned odometry |
| The imposed law is not the task’s (null task) | loses | we impose the wrong law (Section E.3 ) | generic regression targets (Section E.3 ) |
Appendix figures & tables36 assets
Supplementary material from the paper’s appendix.
Appendix
| Block | Paper location / contents |
|---|---|
| E1–E14 | Section 4.2.1 –Section 4.2.3 : the synthetic core (opponent matrix, null, boundaries) |
| E15–E37 | Section 4 –Section 4.2 : the group instances and edge/head variants |
| X5–X10 | Section 5 : the applied probes (IMU, gyro, arm, FK) |
| X37–X52 | Section 5.3 –Section 5.5 : socket heads, ABB range-only, matched-optimizer and capacity/locality probes |
| X11–X36 | Section 5.1 –Section 5.5 : the phase-2 probes and controls |
| X53–X61 | Section 5.2 : the pole-fix branch (chart singularity, EMA, group-metric kernel, T1/T2); scripts X53_socket_convergence.py – X61_confirm.py |
| Experiment | Seeds |
|---|---|
| E1: LawKAN-SU(2), MLP-Quat , MLP-Quat +RPMG, MLP-6D , MLP | 5 |
| E1: remaining 13 rows | 3 |
| E3.1 ( ), E7 (scope), E8 (chains), E9 (LR sweep) | 3 |
| E3.2 (noise), E3.3 (sample eff.), E4, E12 (paired t), E13 ( ablation) | 5 |
| E3.4 (extrapolation), E5 ( ) | 2 |
| E6 (dead zones), E11 (Lie baseline), E14 ( ) | 10 |
| Figure | File | Script | Data source |
|---|---|---|---|
| Figure A1 | fig02_crossgroup.pdf | fig02_crossgroup.py | E16 v2 ( ), E22 (SE(3)) |
| Figure A2 | fig09_node_capacity.pdf | fig09_node_capacity.py | E31/E31b/E31c, E13; controls E1/E11/E32; floor E33 |
| Figure 2 | fig04_matrix_pareto.pdf | fig04_matrix_pareto.py | E1 (opponent matrix, error vs parameters; main text) |
| Figure A3 | fig05_sample_efficiency.pdf | fig05_sample_efficiency.py | E4 |
| Figure A4 | fig12_noise_extrap.pdf | fig12_noise_extrap.py | E3.2 (noise), E3.4 (pole extrapolation) |
| Figure A5 | fig08_imu.pdf | fig08_imu.py | X5 (BROAD, error vs horizon) |
| edge | Form |
|---|---|
| Fourier | order ; dense or pruned to top- |
| MLP | width |
| per-joint | one constant screw per joint, in screw coordinates |
| state | sees the evolving state (the ODE/dynamics task; Section G ) |
| analytic | a fixed, non-learned support |
| node | head | Form / Use |
|---|---|---|
| exact | — | the known group law exactly (the default) |
| relaxed | global | a linear readout on the pair features (Fourier on the arm; a small MLP on the socket/range protocols); smooth, data-rich deformations |
| relaxed | local kernel | an RBF kernel over the pair features; localized deformations and the data-starved corner; the collapse-safe choice |
| relaxed | two-slot | their sum; the default |
| Model | Params | Rel. Frobenius | Per-seed |
|---|---|---|---|
| LawKAN-GL + (exp, all inputs) | 48 | 0.823 0.005 | [0.818, 0.828, 0.819, 0.829, 0.820] |
| LawKAN-GL + (no exp: edge emits the group element) | 48 | 0.719 0.004 | [0.723, 0.718, 0.714, 0.723, 0.717] |
| LawKAN-GL + (analytic edge) | 48 | 0.0024 0.0005 | [0.003, 0.002, 0.002, 0.003, 0.003] |
| MLP (matched) | 55 | 0.806 0.094 | [0.729, 0.686, 0.945, 0.873, 0.796] |
| MLP | 4996 | 0.534 0.016 | [0.543, 0.504, 0.553, 0.534, 0.535] |
| Model | Error (deg) |
|---|---|
| LawKAN-SU(2) | 6.12 0.05 |
| Lie head (strongest opponent) | 6.86 0.10 |
| MLP-Quat ( RPMG) | 7.05 0.08 |
| MLP-6D | 7.73 0.17 |
| MLP-9D-SVD | 7.73 0.08 |
| Model | Params | Error (deg) |
|---|---|---|
| LawKAN-SU(2), edge: Fourier ( ), node: exact | 54 | 2.78 0.02 (5 seeds) |
| Opponents | ||
| MLP + quaternion head | 1476 | 3.36 0.06 (5 seeds) |
| MLP + quaternion head + RPMG ( Chen et al., 2022 ) | 1476 | 3.42 0.15 (5 seeds) |
| MLP + quaternion head | 484 | 3.77 0.07 |
| MLP + 6D ( Zhou et al., 2019 ) | 1542 | 3.91 0.11 |
| Model | Params | Error, ∘ |
|---|---|---|
| LawKAN-SU(2) | ||
| MLP | ||
| MLP | ||
| MLP-Quat RPMG | ||
| low-data: LawKAN-SU(2) | ||
| low-data: MLP |
| Task | Bayes floor | LawKAN-SU(2) | Top opponent |
|---|---|---|---|
| (fixed angles) | ( ) | ( ) | |
| (fixed angles) | ( ) | ( ) | |
| random | ( ) | ( ) |
| Edge (same node unless noted) | Params | Error (deg) |
|---|---|---|
| Fourier edge ( ) | 54 | |
| analytic edge | 18 | |
| MLP edge ( ) | 278 | |
| MLP edge ( ) | 2630 | |
| MLP edge ( , best lr) | 2630 | |
| MLP edge ( , 2 layers) | 110 |
| Model | s | s | s |
|---|---|---|---|
| VQF 6D † fusion (gyro+accel) | |||
| Strapdown (training-free) | |||
| LawKAN-SU(2) dense ( p) | / / | / / | |
| LawKAN-SU(2) sparse ( p) | — | ||
| MLP | |||
| MLP |
| Correction | s | s | s | |
|---|---|---|---|---|
| none (raw integration) | — | |||
| bias-only, per-trial | — | |||
| classical LM ( p) | ||||
| LawKAN-SU(2), learned ( p) | ||||
| TinyGC-style subnet ( p) |
| Platform (LawKAN-SE(3)) | const. fit, | gain, | |||
|---|---|---|---|---|---|
| FR3 ( p) | |||||
| UR10 ( p) | |||||
| UR5 ( p, pos.) |
| Setting | Head | Why |
|---|---|---|
| Deformed composition, data not scarce (KUKA, Panda) | two-slot on KUKA; global on Panda | KUKA: two-slot lowest; Panda: global lowest, two-slot within noise |
| Deformed arm deep-dive (FR3) | two-slot | ties the best pure head; kernel-safe |
| Small fixed set, seed-unstable (Kinova) | local kernel | the global slot re-collapses; the kernel stays below the edge |
| Range-only, smooth (ABB) | global (MLP) | the kernel adds nothing |
| Model | Params | Error ( ∘ ) |
|---|---|---|
| LawKAN-SU(2) | ||
| MLP | ||
| MLP RPMG |
| Model | Params | Error ( ∘ ) |
|---|---|---|
| Analytic integrator (metric floor) | ||
| State-conditioned (LawKAN-SE(3), E25; state edge, sees the evolving ): | ||
| quadratic | ||
| linear | ||
| cubic | diverged ( ) | |
| Feed-forward (LawKAN-SE(3), E25b; edge sees only , one pass): | ||
| Edge (learned) | Params | In-dist | Circle |
| dt ms | |||
| zero (constant velocity, no learning) | |||
| linear exact integrator | |||
| physics features exact integrator | |||
| MLP exact integrator | |||
| flat MLP (no integration) | |||
| Head | Support | Verdict on our battery | Scope (when it wins) |
|---|---|---|---|
| global linear | global | no collapse protection; overfits at small | smooth distributed deformations, data abundant; statistical niche at large |
| bounded chart (rotation) | global | collapse not cured ( ) | refuted as our mechanism ; retained for large-angle deformations ( signals activation) |
| magnitude bound | global | never engaged ( ) | refuted as our mechanism ; a safety cap where extrapolation is possible |
| weight decay | global, capped | cures; dose size, narrow window | second layer on the global slot; dose from the size table (X26c) |
| local kernel | local | cures; no dose; improves healthy fits | localized mechanisms (backlash, friction, compliance); data-starved corner |
| two-slot (default) | sum | dominates both pure heads at every ; grows with | no per-task choice required |
| Model (params) | ||||
|---|---|---|---|---|
| LawKAN-SE(3), node: relaxed (two-slot), isolated ( p) | ||||
| LawKAN-SE(3), node: relaxed (two-slot), joint control ( p) | ||||
| LawKAN-SE(3), node: relaxed (Fourier ), only ( p) | ||||
| LawKAN-SE(3), node: relaxed (MLP ) ( p) | ||||
| LawKAN-SE(3), node: relaxed (MLP ), only ( p) | ||||
| Matched residual MLP ( , opponent) |
| Edge | |||
| LawKAN-SU(2), tensor edge ( features, trained) | |||
| fixed, features (no ) | |||
| no | — | — | |
| no | — | — |
| Task | ||
|---|---|---|
| first harmonic only ( ) | ||
| with a second harmonic ( ) | ( ) | |
| same, noiseless ( ) | (floor) |
| Removed element | Measured effect |
|---|---|
| Phase pairing (single-phase edges) | edges cannot build composition unreachable ( – vs , development battery; P4, Remark 4 ) |
| Group-product nodes (additive instead) | non-commutativity unexpressible; stalls below Bayes ceiling |
| Exp-map ( ) | 3/10 runs fail ( – ); all 10 runs enter the dead zone (min-norm 0.30–0.50), 7 recover (Section I.2 ) |
| Quaternion node ( RealKAN+6D head) | at 550 params: worse at params |
| Group law ( strongest standard head, full battery Section E.1 ) | error on ; extrapolation collapse; plateau above LawKAN-SU(2) at data |
| Verdict | Count |
|---|---|
| Met the registered threshold (or its registered boundary branch) | |
| Predicted direction held, threshold not met | |
| Refuted (kept and reported) | |
| Registered non-signal branch / withdrawn / not triggered |
| Verdict | Count | Representative |
| met | P42: the state is necessary (feed-forward controls fail) | |
| direction holds, threshold not met | P49: node isolated; matched linear edge refuted | |
| refuted | P11: no BKT signature at (demoted to motivation) | |
| withdrawn (premise failed) | P40: tuning-free classical filters already win | |
| Late probes ( ): | ||
| met / boundary branch | P-FR1: backlash sign signature (fraction ) | |
Compositional Representation Learning
Compositional representation learning studies how models encode reusable parts and relations to understand combinations they have not seen.
See all 98 papers