Source-linked AI summary

Geometry-Aware Hyperbolic Residual-Quantized Variational Autoencoders

Alessio Colombo, Melika Ayoughi

arXiv:2609.26342v2cs.LGcs.AI

TL;DR

Residual quantization offers coarse-to-fine codes, but most methods use Euclidean latents despite hierarchical structure in many domains, and naive hyperbolic extensions have geometric inconsistencies. GHRQ-VAE corrects residual aggregation and gradient routing on the Poincaré ball. Across tasks, it improves stability and structural organization over naive hyperbolic baselines, while Euclidean methods remain preferable for pure signal compression.

  • Problem

    Most residual quantization uses Euclidean latent spaces, although many domains have hierarchical structure and naive hyperbolic extensions have inconsistent aggregation and gradient handling.

    Source: §1 · p. 2
  • Method

    GHRQ-VAE combines Hyperbolic Residual Aggregation with discounted block-level gradient routing to address forward and backward geometric inconsistencies.

    Source: §1 · p. 2, §4.1 · p. 5, §4.2 · p. 7
  • Results

    Across four domains, GHRQ-VAE provides more stable training and structurally organized hyperbolic codes than naive hyperbolic baselines, while Euclidean models retain the edge in raw reconstruction and CIFAR-100 generation quality.

    Source: §7 · p. 14
  • Takeaways & Limitations

    Hyperbolic residual quantization is most useful for hierarchical structure, whereas Euclidean residual quantization remains preferable for pure signal compression.

    Source: §1 · p. 2, §7 · p. 14

    The naive hyperbolic lift remains strong at shallow depth on WordNet recall and recommendation R@10, and how to incorporate its leaked per-stage gradient into a geometrically consistent estimator remains open.

    Source: §7 · p. 14

Abstract

from arXiv · show

Residual Vector Quantization turns continuous representations into discrete, multi-level token sequences. Yet most methods operate in Euclidean space, despite the coarse-to-fine structure of the resulting codes and the latent hierarchies present in many data domains. Hyperbolic geometry offers a natural alternative for hierarchical representations, but naive hyperbolic extensions introduce geometric inconsistencies: non-associative hyperbolic addition prevents consistent residual aggregation, while standard straight-through gradient estimation ignores the geometry of the latent space. We propose a geometry-aware hyperbolic residual quantization that addresses these issues in both the forward and backward passes. In the forward pass, Hyperbolic Residual Aggregation restores the telescoping behavior of residual quantization on the Poincare ball. In the backward pass, a discounted Hyperbolic Straight-Through Estimator routes the reconstruction gradient through the quantizer as a single geometric block, avoiding unstable recursive gradient transport across residual stages. Evaluations on hierarchical prediction, recommendation, image tokenization, and neural audio coding tasks show that our method improves the stability and structural organization of hyperbolic residual codes over naive hyperbolic baselines. At the same time, we observe a clear structure-compression trade-off: Euclidean residual quantization remains preferable for pure compression, while geometry-aware hyperbolic quantization is most useful for hierarchically organized discrete latent spaces.

1 Introduction

Residual quantization’s coarse-to-fine codes could organize latent hierarchies, but most methods use Euclidean spaces. GHRQ-VAE addresses geometric inconsistencies in hyperbolic residual quantization, with evaluations favoring hyperbolic codes for structure and Euclidean methods for pure compression.

Motivation

  • Most residual quantizers use Euclidean spaces, although hyperbolic geometry better represents hierarchies and may suit discrete latents when organization matters beyond compression.Residual stages capture coarse information first and refine the remaining error.Source: §1 · pp. 1–2

Geometric inconsistencies

  • Naive hyperbolic extensions drift during residual aggregation because Möbius addition is non-associative and non-commutative, while Euclidean straight-through gradients ignore manifold geometry.The resulting gradient flow can become unstable across residual stages.Source: §1 · p. 2

Contribution and scope

  • GHRQ-VAE repairs the forward and backward passes to stabilize deeper training and support latent hierarchical structure.Its evaluation spans hierarchical prediction, recommendation, image tokenization, and neural audio coding; the reported trade-off favors Euclidean methods for pure signal compression.Source: §1 · p. 2

2 Related Work

Related work covers vector quantization, residual codebooks, and hyperbolic representation learning. Existing hyperbolic quantizers combine these ideas but retain Euclidean gradient transport and non-associative aggregation.

Vector and residual quantization

  • Residual vector quantization builds a virtual codebook of exponential capacity without increasing memory footprint or sequence length, with early stages encoding coarser structure.Prior applications include image generation [43], audio codecs, audio generation, and generative recommendation.Source: §2 · p. 3

Hyperbolic representation learning

  • Hyperbolic representation learning supports hierarchy embeddings, generative models with unsupervised hierarchical latents, and applications including word embeddings and graph learning.Weighted trees can embed into two-dimensional hyperbolic space with arbitrarily low distortion, while Euclidean space requires O(n) dimensions [63].Source: §2 · p. 3

Hyperbolic quantization

  • Prior work has combined hyperbolic geometry with vector quantization and residual quantization [58], but retains Euclidean gradient transport and non-associative aggregation.The paper makes both components geometrically aware.Source: §2 · p. 3

3 Preliminaries

The preliminaries define the discrete bottleneck and coarse-to-fine stages of quantization, then establish the Poincaré-ball geometry and gradient operations used by the hyperbolic method.

Vector-Quantized Variational Autoencoders

  • A VQ-VAE encodes an input as a continuous latent, selects its nearest codeword, and decodes that discrete representation; its straight-through estimator passes decoder gradients to the encoder.The estimator’s Jacobian is the identity because the quantization difference is treated as constant.Source: §3 · pp. 3–4

Residual Vector Quantization

  • Residual vector quantization quantizes the latent in successive stages, with early codebooks capturing coarse structure and later ones refining detail.The resulting virtual codebook has effective size K^N.Source: §3 · p. 4

Hyperbolic Geometry

  • The Poincaré ball models hyperbolic space, whose geodesic-ball volume grows exponentially; its Möbius addition is neither commutative nor associative.The setting c = 0 recovers Euclidean space.Source: §3 · p. 4
  • A Riemannian backward pass converts gradients, transports them between tangent spaces, and converts them back, with conformal scaling able to amplify magnitudes near the boundary.The quantization objective combines reconstruction, codebook, and commitment terms using a latent-space distance.Source: §3 · pp. 4–5

4 Method

GHRQ repairs both hyperbolic residual aggregation and gradient routing: HRA restores coarse-to-fine recomposition, while block-level d-HSTE sends reconstruction gradients directly to the encoder.

4.1 Hyperbolic Residual Aggregation

  • Naive hyperbolic residual updates and left-associated aggregation fail to invert one another because Möbius addition is non-commutative and non-associative.The resulting tracked residual drifts from the true residual, and the codes no longer recompose the encoder point.Source: §4.1 · pp. 5–6
  • HRA reverse-nests Möbius additions to invert each residual update, so the codes recompose the encoder point up to the final unquantized residual.The paired left Möbius subtraction and reverse-nested aggregation use the gyrogroup's left-cancellation law.Source: §4.1 · p. 6
  • Unlike naive left-associated aggregation, HRA keeps the tracked residual's magnitude equal to the true reconstruction error at every depth.The HRA mismatch is a composition of norm-preserving rotations; the naive mismatch drifts and compounds with depth.Source: §4.1 · p. 6

4.2 Block-Level Gradient Routing with a Discounted HSTE

  • Block-level routing sends one depth-independent reconstruction gradient from the aggregate directly to the encoder, bypassing intermediate residuals and quantizations.Stop-gradients decouple the residual cascade; only the coarsest commitment term survives, while codebooks remain optimizable through per-stage codebook losses.Source: §4.2 · pp. 7–8
  • The discounted HSTE transports a gradient between Poincaré-ball points using a gyration and conformal-factor scaling, without the boundary-diverging conversion back to a Euclidean gradient.The paper uses a numerically stable equivalent gyration formulation when the quantized code closely approximates the encoder point.Source: §4.2 · pp. 7–8

5 Experimental Setup

The experiments compare Euclidean, naive hyperbolic, and geometry-aware quantization across four tasks, using shallow and deep residual stacks and task-specific performance and hierarchy metrics.

Experimental design

  • The study tests four tasks across shallow N = 4 and deep N = 12 regimes, with quantizer geometry and gradient routing as the independent variables.Within each task, the three configurations share encoder, decoder, optimizer, data pipeline, evaluation protocols, architectures, codebook sizes, and training budgets.Source: §5 · pp. 8–9

Tasks and datasets

  • The tasks are WordNet hypernymy prediction, sequential recommendation, image reconstruction and generation, and neural audio coding.WordNet and recommendation use N = 4; image tokenization uses N = 4; the LibriTTS codec uses N = 12 and requires encoder stabilization and quantizer-depth dropout for the hyperbolic model.Source: §5 · pp. 9–10

WordNet evaluation

  • Table 1 scopes WordNet hypernymy reconstruction Recall@10 on the closure split across encoder dimensions d ∈ {8, 16} and per-stage codebook sizes b ∈ {64, 128}, with N = 4.The accompanying prose reports that hyperbolic formulations outperform the Euclidean baseline, while the naive hyperbolic baseline is unstable.Source: Table 1 · p. 10

Metrics

  • Evaluation combines task performance with latent-structure measures where applicable, including WordNet semantic coherence and CIFAR-100 superclass hierarchy recovery.Metrics include recommendation Recall and NDCG, image reconstruction MSE, FID and IS, and audio reconstruction loss and perceptual rate-distortion.Source: §5 · p. 10

6 Results

Across the reported tasks, results assess hierarchical organization, downstream performance, reconstruction fidelity, and stability (p34). Image and audio results distinguish structure-oriented gains from reconstruction or compression costs, while residual reconstruction and ablations test the geometric corrections (p08, p11, p13, p16, p18).

6.1 WordNet Hypernymy Prediction

  • On WordNet, hyperbolic formulations outperform Euclidean Recall@10, but the naive hyperbolic baseline is unstable; GHRQ-VAE has uniqueness 0.967 and more coherent semantic clusters.The naive baseline's uniqueness is 0.888, and GHRQ-VAE leads it across the reported semantic similarity metrics.Source: §6.1 · pp. 10–11, Table 2 · p. 11

6.2 Generative Sequential Recommendation

  • On Amazon Beauty recommendation, both hyperbolic methods beat Euclidean, while GHRQ-VAE leads on most ranking metrics and codebook usage.Table 3 reports test-set ranking metrics and pre-deduplication uniqueness as a codebook-health proxy.Source: §6.2 · p. 11, Table 3 · p. 11

6.3 Image Reconstruction and Generation

  • Image results trade reconstruction fidelity for structure: hyperbolic configurations incur a 19–36% relative MSE penalty, while GHRQ-VAE raises CIFAR-100 ARI from 0.048 to 0.087 (+81%).GHRQ-VAE also leads in NMI and purity; generation is dataset-dependent, with hyperbolic methods stronger on MNIST FID and Euclidean leading on CIFAR-100.Source: §6.3 · pp. 11–12, Table 5 · p. 12, Table 4 · p. 12

6.4 Neural Audio Coding

  • Across the audio depth sweep, Euclidean retains the best rate–distortion frontier, while GHRQ-VAE beats the naive Möbius lift at matched entropy rates almost everywhere.The evaluation uses N = 12 and plots PESQ-wb and SI-SDR against empirical entropy rate.Source: §6.4 · p. 12, Figure 3 · p. 13

6.5 Residual Reconstruction Error Across Tasks

  • On-ball residual errors are near zero with GHRQ-VAE, corroborating accurate reconstruction of the encoder representation across tasks.The error is squared hyperbolic distance between the recomposed codes and encoder output.Source: §6.5 · p. 13, Table 7 · p. 13

6.6 Ablation

  • The ablation finds HRA and d-HSTE complementary: residual error collapses uniformly only when both are present.HRA alone with the uncorrected gradient is least faithful on recommendation; dropping HRA raises WordNet error to 30.4.Source: §6.6 · pp. 13–14, Table 8 · p. 14

7 Conclusion and Discussion

Across four domains, hyperbolic curvature is most valuable for stable hierarchical structure rather than signal fidelity, while Euclidean models retain advantages for reconstruction and some generation settings. The discussion also identifies shallow-depth strengths of the naive lift and future evaluation in continuous-generation paradigms and larger tokenizers.

7 Conclusion and Discussion

  • Across four domains, GHRQ-VAE organizes hierarchy more robustly than the naive hyperbolic lift, while Euclidean models retain an edge in raw reconstruction and CIFAR-100 generation quality.The authors locate its value in stable hierarchical structuring rather than signal fidelity.Source: §7 · p. 14
  • At shallow depth, the geometrically inexact naive lift attains the best WordNet recall and leads on recommendation R@10.The authors suggest leaked per-stage gradients as a plausible explanation and identify a geometrically consistent estimator as future work.Source: §7 · p. 14
  • Future evaluation should test hyperbolic tokenizers in diffusion and flow-matching generation and in large-scale modern tokenizers.Source: §7 · p. 14

A Architecture and Implementation Details

The appendix holds task components and protocols fixed within each task to isolate quantizer geometry and gradient routing. It describes three quantizer configurations and task-specific setups for WordNet, recommendation, images, and audio, alongside optimization settings.

A Architecture and Implementation Details

  • Within each task, encoder, decoder, downstream model, data pipeline, and evaluation protocol are held fixed; quantizer geometry and gradient routing are the independent variables.Configurations also share residual-stage counts, codebook sizes, and encoder/decoder architectures.Source: A Architecture and Implementation… · p. 22

A.1 Quantizer Configurations

  • The comparison uses Euclidean RQ, a naive hyperbolic lift with Euclidean identity STE and left-associated Möbius aggregation, and GHRQ-VAE with HRA and block-level d-HSTE routing.The GHRQ-VAE configuration also uses numerically stable gyration.Source: §A.1 · p. 22

A.2 WordNet Hypernymy Prediction

  • WordNet hypernymy prediction embeds 82,115 noun synsets and evaluates held-out closure edges using code-tuple Recall@10, with negatives sampled outside the transitive closure.The standard configuration uses a 16-dimensional embedding, four stages, and 128 codes per stage; the capacity grid varies dimension and codebook size.Source: §A.2 · pp. 22–23

A.3 Generative Sequential Recommendation

  • Recommendation maps frozen MPNet item embeddings to semantic IDs, then uses an autoregressive Transformer to predict next-item codes from interaction histories.The setup uses Amazon Reviews 2014 Beauty data, four quantization stages, 128 codes per stage, and a 50-beam search.Source: §A.3 · p. 23

A.4 Image Reconstruction and Generation

  • Image experiments use MNIST and CIFAR-100, with CIFAR-100’s fine-to-coarse labels reserved for scoring unsupervised taxonomy recovery rather than training.A four-stage convolutional VQ-VAE tokenizer feeds a spatial-and-depth RQ-Transformer prior for generation.Source: §A.4 · p. 23

A.5 Neural Audio Coding

  • Audio coding uses a 12-stage, 1024-code-per-stage SoundStream-style codec on LibriTTS; the deep stack approaches the ball boundary, where the leaked per-stage gradient diverges.An auto-calibrated encoder multiplier and quantizer-depth dropout are used; without both, all hyperbolic configurations collapse.Source: §A.5 · p. 24

A.6 Optimization

  • Optimization uses AdamW for base parameters and Riemannian Adam for codebooks, while recommendation weights reconstruction 1000 times more than commitment.The per-task optimization settings are listed in Table 9, and downstream models are trained on frozen quantizers.Source: §A.6 · pp. 24–25, Table 9 · p. 24

A.7 Evaluation Protocol

Evaluation metrics are selected by task, covering hierarchy quality, recommendation, image reconstruction and generation, and audio rate–distortion.

A.7 Evaluation Protocol

  • WordNet uses graph-based similarity and code-tuple metrics; recommendation uses Recall and NDCG; images use MSE, FID, IS, and superclass-clustering scores; audio uses reconstruction loss, PESQ, and SI-SDR against estimated bitrates.Source: §A.7 · p. 25

B Proofs

The proofs use Möbius gyrogroup identities to justify the left-cancellation law underlying the residual aggregation argument. They also distinguish left cancellation from the generally invalid corresponding right-hand statement.

B Proofs

  • The proof setup defines Möbius addition, the inverse notation, the conformal factor, and gyration, then invokes left gyroassociativity and the rotational properties of gyrations.Gyrations are linear orthogonal maps that preserve vector norms.Source: B Proofs · p. 25

B.1 The Left-Cancellation Law

  • Applying left gyroassociativity with middle argument −a yields the left-cancellation identity, using a ⊕c (−a) = 0 and gyr[a, −a] = Id.Source: §B.1 · p. 25
  • The corresponding right-hand cancellation does not generally hold because Möbius addition is non-associative, so a left-subtracting residual update must be inverted by left-associated addition.Source: §B.1 · p. 25

B.2 The HRA Residual Mismatch is a Pure Rotation

Under Hyperbolic Residual Aggregation, the mismatch between the tracked and true residuals is a rotation that preserves magnitude. This keeps the coarse-to-fine magnitude decomposition faithful at every depth.

B.2 The HRA Residual Mismatch is a Pure Rotation

  • The rotation is a composition of gyrations, which is orthogonal and therefore preserves the true residual's norm.The composition is the identity at the first code stage.Source: §B.2 · p. 26
  • At every depth, HRA's tracked-versus-true residual mismatch is an orthogonal rotation, so the residual norms match.The true residual is the part of the encoder point not yet captured by the codes.Source: §B.2 · p. 26
  • Unlike naive aggregation, whose mismatch drifts and corrupts residual magnitudes with depth, HRA incurs zero magnitude error at every depth.Source: §B.2 · p. 26

B.3 The Residual Gradient Leaks on the Ball

On the Poincaré ball, the Euclidean straight-through cancellation fails at non-exact quantization stages, and the resulting gradient paths can amplify with depth and radius. The appendix also gives a numerically stable, exact gyration reformulation and confirms recovery of Euclidean residual quantization at zero curvature.

B.3 The Residual Gradient Leaks on the Ball

  • For c > 0, the residual Jacobian leaks whenever quantization is not exact, unlike the c = 0 cancellation; this holds for d ≥ 3.The leak is zero only when q_i = r_{i−1} under the stated dimensional condition.Source: §B.3 · p. 27
  • The leaked reconstruction and commitment paths form a depth-dependent superposition whose magnitude can grow with depth and as residuals approach the ball boundary.The proposed block-level routing removes the recursive residual paths and reinstates a depth-independent reconstruction-gradient copy.Source: §B.3 · p. 27

B.4 Exactness of the Numerically Stable Gyration

  • The reformulated gyration evaluation is algebraically identical to the closed form and remains finite as 1 − c∥z_e∥^2 approaches zero.Its terms avoid floating-point cancellation of the O(1) contributions.Source: §B.4 · pp. 29–30

B.5 Recovery of Euclidean Residual Quantization at Zero Curvature

  • At zero curvature, GHRQ recovers the Euclidean residual-quantization forward pass, and the implementation uses the identity estimator to recover the baseline exactly.Source: §B.5 · p. 30
Loading 2609.26342v2…