atle.dev
activeJEPAhyperbolic geometryPoincaré ballresearch

Hyperbolic latents for branching futures

Does hyperbolic geometry help a predictor represent futures that fork? Tested on a grid maze against an identical Euclidean baseline. Answer so far: yes at low latent dimension, and it reverses at high dimension.

WhenSep 2026 – now
Headline41–55 / 70 · maze junctions favour hyperbolic at dim 8
A random spanning-tree maze. Each junction is a fork: from one cell, the set of places you can be H steps later grows combinatorially. That is the structure hyperbolic space should hold well.

The question

Hyperbolic space grows exponentially with radius, so it can hold an exponentially branching tree of distinguishable points in low dimension. Euclidean space can't do that at the same dimension. If a world model has to represent several possible futures at once, does a hyperbolic latent help?

Fundamental vs. convenience My first attempt on ball-in-cup just swapped the loss to hyperbolic distance on an ordinary point predictor. That is the same mechanism as Euclidean MSE with a different distance function, and it predictably did nothing special. The "radial hierarchy" hypothesis was cleanly disconfirmed there. Ball-in-cup also has no real forks: its dynamics are one smooth basin. The maze was chosen because it has forks by construction.

Phase 0: synthetic check first

Before building any environment, I fit free points to k synthetic "future modes" in both geometries, sweeping k, dimension and separation (20 random placements per cell, paired t-test + Wilcoxon). The result was a clean crossover by branching factor. At k=3, Euclidean wins. At k=8, hyperbolic wins, and the effect grows with separation (p < 0.001 at dim 8). So the maze experiment had to predict several steps ahead through junctions to reach k ≥ 8.

Phase 2: the maze

E is an embedding table (one vector per cell). P maps (E(start), horizon) to a predicted end latent, deliberately not conditioned on the action sequence, so the target is genuinely multimodal. Loss is squared distance in each geometry plus a VICReg covariance term, which fixed an early collapse.

The metric is nearest-true-endpoint distance over mean endpoint spacing, per junction, on held-out rollouts. A diagnostic caught an early artifact: with only 8 holdout rollouts per junction, the observable k was capped at 8. The fix was 5× more rollouts and a bigger 16×16 maze with 70 junctions.

Headline: a dimension crossover

Same maze, same data, only the latent dimension changes. Number of junctions (of 70) where each geometry did better:

Latent dim = 8 · hyperbolic wins at every horizon (mostly p < 0.0001)
HEuclidean betterhyperbolic better
3
24
46
5
29
41
8
19
51
12
15
55
20
19
51
Latent dim = 32 · Euclidean wins at every horizon (mostly p < 0.0001)
HEuclidean betterhyperbolic better
3
56
14
5
56
14
8
46
24
12
48
22
20
41
29

At dim 16 the result was mixed. This is the theory's actual claim: hyperbolic's advantage is a low-dimension effect. With enough dimensions, Euclidean space has room too, and here it wins outright. My own guess after the first sweep was the opposite ("hyperbolic needs more room"), and the data corrected it.

Geometry of the learned embedding

For every fork, are both children closer to their parent than to each other? Hyperbolic E passes 63% of these checks. Euclidean E passes 0%: every sibling pair is inverted, the result of a checkerboard parity pattern competing with real distance.

Phase 3: planning. Open, and honest about it.

A CEM planner on top of the dim-8 model has been hard. With an oracle cost it solves 40/40. With the learned model, the best run reached 13/40. Along the way:

  • Drift in the one-step predictor. The unrolled loss from ball-in-cup wasn't enough on its own. The real cause was a train/deploy distribution mismatch, reduced with goal-directed data.
  • The predictor never learned that walking into a wall means no movement. A wall-bump fix plus DAgger-style on-policy data gave the first real successes.
  • An automated CEM hyperparameter search showed fewer iterations work better under replanning.

After several rounds of tuning aggregate metrics, I stopped and built a mechanistic test. A one-step lookahead at every branch cell, with no sampling noise, picks the correct first action 69% of the time. Accuracy rises with distance to the target: 58% within 5 steps, 75% beyond 30. The encoder resolves global structure well and local structure poorly, and it is worst exactly where the goal is decided.

Where it stands I'm now tracking down why specific branch cells are misresolved. The latest suspect is training windows that step into a dead end and straight back out. After that comes a direct objective for E: every maze edge should have unit length. In hyperbolic space, Sarkar's construction shows unit edges plus small angular separation are enough to keep whole subtrees apart. It will run as a separate, labelled experiment, so the Euclidean vs. hyperbolic comparison stays clean.