Source-linked AI summary

HCC+: Hyperbolic Guarding for Certified Attention Retrieval

Liangchen Ge

arXiv:2608.24971v1cs.DScs.LG

TL;DR

Finite-precision attention retrieval lacks deterministic guarantees that individual attention weights are preserved, motivating HCC+. HCC+ exploits three Poincaré-ball properties to guard critical keys and prove retrieval bounds, including a 6.1× storage reduction relative to FP16, while remaining a theoretical framework with synthetic numerical validation.

  • Problem

    Finite-precision representations lack deterministic guarantees on attention-weight preservation, despite key-space reconstruction error being insufficient for nonlinear attention weights.

  • Method

    HCC+ uses hyperbolic boundary truncation, logarithmic 1-center covering, and dimension-independent packing to identify critical keys and certify retrieval.

  • Results

    6.1× storage reduction relative to FP16 is obtained alongside a 10% exact-retrieval deviation bound and O(1/√nstd) standard-key aggregate error decay.

  • Takeaways & Limitations

    HCC+ provides the first deterministic, query-independent retrieval certificate in non-Euclidean geometry, with geometric guarding also producing storage savings.

  • Takeaways & Limitations

    The framework is theoretical with synthetic numerical validation, and for n > 10^5 its isolation threshold may become small enough to reduce storage benefits.

Abstract

from arXiv · show

We study the Lipschitz stability of attention retrieval in hyperbolic spaces. Existing methods lack deterministic guarantees on attention-weight preservation under finite-precision representations. We introduce HCC+, a theoretical framework exploiting three properties of the Poincaré ball: exponential volume growth enabling query-independent boundary truncation; logarithmic covering radius of hyperbolic 1-centers enabling dimension-independent critical-key identification; and a packing bound with constants independent of the embedding dimension. We prove two deterministic guarantees: for exact retrieval, the per-layer attention deviation is bounded by 10\% of its ideal value; for soft attention, the total variation distance decays as $O(1/\sqrt{n})$, the rate of finite-sample variance. As a consequence of the guarding mechanism, the framework achieves a storage reduction factor of $6.1\times$ relative to FP16. We provide the first deterministic, query-independent retrieval certificate in non-Euclidean geometry.

1 Introduction

HCC+ addresses the gap between key-space reconstruction error and attention-weight preservation by using hyperbolic geometry for deterministic, query-independent retrieval guarantees. Its proof relies on curvature properties that support boundary truncation, logarithmic covering, and dimension-independent packing.

  • 1 Introduction: Existing quantization methods optimize key reconstruction error but do not guarantee preservation of individual attention weights under nonlinear attention kernels.This mismatch is especially important in the exact-retrieval regime, where ε approaches zero.
  • 1 Introduction: HCC+ uses exponential volume growth near the Poincaré-ball boundary to enable query-independent truncation of keys with negligible individual weight.Boundary-layer keys are numerous, so each contributes negligibly under the framework’s geometric argument.
  • 1 Introduction: The hyperbolic 1-center covering radius scales logarithmically with n, enabling dimension-independent identification and packing of critical keys.The corresponding Euclidean scaling is O(n^1/d) with dimension-dependent factors.
  • 1 Introduction: Dimension-independent packing constants further support critical-key bounds in high-dimensional attention spaces.The Euclidean analogue introduces dimension-dependent volume-ratio factors.
  • 1 Introduction: HCC+ provides deterministic, query-independent, calibration-free bounds on attention-weight preservation, unlike heuristic eviction, quantization, and clustering methods.The guarantee is intended to hold uniformly over all queries and key sets within the assumed geometric bounds.

2 Geometric Preliminaries

The Poincaré-ball geometry makes boundary keys uniformly distant from interior queries, supporting query-independent truncation and dimension-independent key packing. The exact-retrieval guarantee holds when reconstruction error satisfies a sufficient ε-dependent condition.

  • Boundary geometry: Boundary divergence makes keys near the ball boundary uniformly far from interior queries, enabling a query-independent truncation radius.Unlike Euclidean space, this does not require knowing a data-dependent global maximum norm.
  • Attention regime: As ε approaches zero, attention becomes one-hot, making exact-retrieval fidelity especially sensitive to key reconstruction error.The closest key receives weight approaching 1 while other keys receive weight approaching 0.
  • Residency region: The residency ball retains keys with norm at most ζ, while keys outside it are discarded or projected to the boundary.The framework assumes ζ < 1, with ζ = 0.8 given as an example.
  • Exact-retrieval sensitivity: 10% attention-weight deviation requires reconstruction error of approximately Δ ≈ √(ε/10), establishing the precision–fidelity trade-off used by guarding.The sufficient condition is Δ² < ε/10; the resulting bound is |W̃j* − 1| < 0.1 + o(1).
  • Exact-retrieval sensitivity: The 10% threshold is a convenient analytical constant rather than an optimized value, and other thresholds would produce different constants.Smaller ε sharpens attention and increases sensitivity to reconstruction error, whereas larger ε tolerates coarser reconstruction.

3 Three Principles of HCC+

HCC+ combines query-independent boundary truncation, geometrically identified critical keys, and concentration of standard-key errors to certify attention retrieval in hyperbolic space.

  • 3.1 Principle 1: Hyperbolic Boundary Truncation: Boundary truncation uses a geometry-only radius τr to discard keys whose maximum attention weight is below δ for every query.Near-boundary hyperbolic distances diverge uniformly from interior queries, allowing static pre-filtering; approximately 15% of keys are discarded at τr = 0.90 under the stated distribution.
  • 3.2 Principle 2: Critical-Key Guarding (CKG): O(log n) covering radius and hyperbolic packing control the critical-key count with dimension-independent bounds.The logarithmic radius follows from exponential volume growth, while the stated packing argument bounds critical keys through geometric separation and containment.
  • 3.2 Principle 2: Critical-Key Guarding (CKG): Critical keys are those near the hyperbolic 1-center and isolated from their nearest neighbors, identifying keys requiring high-precision reconstruction.Keys failing either condition are standard: distant keys have localized influence, while nearby neighbors can serve as substitutes.
  • 3.2 Principle 2: Critical-Key Guarding (CKG): Removing or reconstructing a critical key with error ∆ > δiso/2 changes the HIDA output by Ω(1) for queries within δiso/2.The proof gives the critical key at least 1/9 of the total weight mass under the stated uniform-distribution condition.
  • 3.3 Principle 3: Aggregate Concentration for Standard Keys: Standard-key aggregate error concentrates around its expectation and decays as O(1/√nstd), matching finite-sample variance.The concentration result uses bounded differences and McDiarmid’s inequality; discretization bias remains as a constant factor.
  • 3.2 Principle 2: Critical-Key Guarding (CKG): The deterministic CKG partition computes the hyperbolic 1-center, covering radius, and minimum separation before assigning critical or standard precision.Critical keys receive (14, 14)-level precision, standard keys receive (4, 4)-level precision, and center computation costs O(n · T · d) for T ≤50 iterations.

4 Theoretical Storage Analysis

The theoretical storage analysis attributes compression to geometric guarding together with quantization and coding components, while qualifying the headline ratio as an idealized upper bound.

  • Storage reduction: 6.1× is the theoretical storage reduction upper bound relative to FP16 under ideal packing.Standard INT4 provides 4.0× uniformly; HCC+ adds compression through geometric guarding.
  • Guarding mechanism: The guarding mechanism selects high-precision critical keys and compressible standard keys; storage reduction is a consequence rather than its primary objective.The reduction follows from most keys being standard.
  • Storage attribution: The CKG-plus-boundary components yield approximately 2.24× from 15% truncation and mixed precision, not the table’s 8.5× aggregate factor.The 8.5× factor additionally includes HPQ, whose exact contribution depends on the quantization scheme.
  • Storage attribution: The full 6.1× figure combines boundary truncation, HPQ, SAVC value compression, and ECPP entropy coding rather than guarding alone.SAVC contributes 2.13× and ECPP contributes 1.25×; the cited arithmetic presents these as multiplicative pipeline components.
  • Theoretical versus practical storage: The storage analysis is theoretical and assumes perfect entropy coding without hardware overhead, metadata, or mixed-precision access costs.Alignment and implementation-dependent overhead can reduce practical savings, so 6.1× is an upper bound rather than an engineering guarantee.
  • Retrieval guarantee: For exact retrieval, the theorem states that the per-layer deviation is below 0.1 under ε = 10^-4 for the specified critical-key condition.The supplied theorem fragments state the ε value and deviation threshold but do not provide the complete condition in one passage.

5 Limitations and Empirical Scope

HCC+ is a theoretical framework whose deterministic certificate is enabled by hyperbolic geometry, but its guarantees remain conservative and its practical scope is not yet fully validated. Several scaling, projection, computation, and integration boundaries remain open.

  • Empirical and systems scope: Full-scale transformer validation on LongBench and PG19, actual throughput measurements, and compatibility with systems such as FlashAttention or vLLM remain unevaluated.Mixed-precision (14,4) storage also requires custom GPU kernels for efficient access.
  • Geometric basis: HCC+ relies on exponential volume growth, logarithmic covering radius, and dimension-independent packing constants to underpin its guarantees.The analytic proofs instantiate these properties using Lipschitz continuity and the triangle inequality.
  • Long-sequence behavior: For n > 10^5, δiso = δmin/2 can become vanishingly small, potentially marking many keys as critical and reducing storage benefits.The paper suggests approximate CKG methods such as random subsampling for such long-sequence regimes.
  • Boundary projection: Boundary projection for keys with ∥k∥ > ζ distorts inter-key distances, and this distortion is not included in the current error bounds.The paper states that far-boundary keys usually have negligible attention weight and retained-key projection is minimal.
  • Computational scaling: Exact hyperbolic 1-center computation may be expensive at very large scale, while approximation would loosen covering-radius constants and certificate tightness.A full trade-off analysis between approximation error and certificate tightness is left for future work.
  • Deterministic conservatism: The certificate provides universal validity over queries and admissible key sets, but its worst-case upper bounds may overestimate typical errors and resource needs.The paper frames this looseness as inherent to deterministic worst-case analysis rather than as a framework-specific design flaw.

6 Conclusion

HCC+ establishes deterministic attention-retrieval certification in the Poincaré ball. Its logarithmic, dimension-independent covering-radius bound separates the framework from Euclidean heuristics, while guarding also reduces storage relative to FP16.

  • Conclusion: HCC+ provides the first query-independent retrieval certificate in non-Euclidean geometry.The framework certifies deterministic attention retrieval in the Poincaré ball.
  • Conclusion: O(log n) covering-radius scaling independent of dimension contrasts with Euclidean O(n^1/d) scaling and dimension-dependent constants.The logarithmic scaling is presented as a strict quantitative separation from Euclidean heuristics.
  • Conclusion: 6.1× storage reduction relative to FP16 accompanies the guarding mechanism.The paper presents this as evidence that geometric structure supports both provable guarantees and practical efficiency.
  • Conclusion: The work contributes a certificate rather than a compression algorithm, complementing data-dependent heuristics with uniform worst-case bounds.The choice between deterministic certification and typical-case heuristic efficiency depends on application requirements.
  • Conclusion: Future work targets tighter certificates under added assumptions, large-scale transformer validation, other non-Euclidean geometries, approximate embeddings, and faster 1-center computation.These directions include empirical validation on LLMs and optimization for ultra-long sequences.
Loading 2608.24971v1…