Curvature Learning for Generalization of Hyperbolic Neural Networks

Xiaomeng Fan, Yuwei Wu, Zhi Gao, Mehrtash Harandi, Yunde Jia · OpenReview

Abstract: Hyperbolic neural networks (HNNs) have demonstrated notable efficacy in representing real-world data with hierarchical structures via exploiting the geometric properties of hyperbolic spaces characterized by negative curvatures. Curvature plays a crucial role in optimizing HNNs. Inappropriate curvatures may cause HNNs to converge to suboptimal parameters, degrading overall performance. So far, the theoretical foundation of the effect of curvatures on HNNs has not been developed. In this paper, we derive a PAC-Bayesian generalization bound of HNNs, highlighting the role of curvatures in the generalization of HNNs via their effect on the smoothness of the loss landscape. Driven by the derived bound, we propose a sharpness-aware curvature learning method to smooth the loss landscape, thereby improving the generalization of HNNs. In our method, we design a scope sharpness measure for curvatures, which is minimized through a bi-level optimization process. Then, we introduce an implicit differentiation algorithm that efficiently solves the bi-level optimization by approximating gradients of curvatures. We present the approximation error and convergence analyses of the proposed method, showing that the approximation error is upper-bounded, and the proposed method can converge by bounding gradients of HNNs. Experiments on four settings: classification, learning from long-tailed data, learning from noisy data, and few-shot learning show that our method can improve the performance of HNNs.

Introduction

Hyperbolic Neural Networks (HNNs) have emerged as a powerful paradigm for modeling data with inherent hierarchical structures, such as social networks, biological taxonomies, and linguistic trees. The core advantage of hyperbolic space lies in its exponential volume growth, which naturally accommodates the branching nature of tree-like data. However, the performance of these networks is highly sensitive to the curvature ($c$) of the underlying manifold.

Historically, selecting the optimal curvature has been an empirical challenge, often relying on manual tuning or simple heuristics. Suboptimal curvature can lead the optimization process toward "sharp" minima—regions where small perturbations in model weights result in significant increases in loss—thereby hindering generalization. This research provides the first formal theoretical link between hyperbolic curvature and generalization performance, proposing a principled method to learn curvature by smoothing the loss landscape.

Theoretical Framework

To understand how curvature affects generalization, the authors first establish a rigorous mathematical foundation. They analyze the Lipschitz continuity of fundamental hyperbolic operations, including Möbius addition ($\\oplus_c$), exponential maps ($\\text{expm}^c_y$), and logarithmic maps ($\\logm^c_y$).

Notation table for hyperbolic operations and generalization analysis.

By bounding the Lipschitz constants of these operations, they derive a PAC-Bayesian generalization bound specifically for HNNs. This bound demonstrates that the gap between training and testing error is constrained by the "sharpness" of the loss landscape. Crucially, the analysis reveals that curvature acts as a regulator for this sharpness; by adjusting $c$, one can effectively control the smoothness of the error surface, facilitating the discovery of flatter, more robust minima.

Sharpness-Aware Curvature Learning

Building on this theoretical insight, the paper introduces a "sharpness-aware curvature learning" method. The goal is to minimize a scope sharpness measure, ensuring the model finds parameters that are not only accurate but also reside in a smooth neighborhood of the loss landscape.

Bi-level Optimization

The training process is formulated as a bi-level optimization problem:

  1. Inner Level: The network weights ($w$) are optimized to minimize the standard training loss for a given curvature.
  2. Outer Level: The curvature ($c$) is optimized to minimize the sharpness measure of the resulting loss landscape.

Efficient Gradient Approximation

Solving bi-level optimization problems is computationally intensive, often requiring the calculation of second-order derivatives (Hessians). To maintain efficiency, the authors employ an implicit differentiation algorithm. By using Neumann series to approximate Hessian inversions, they avoid the "memory explosion" typically associated with such calculations. This approach keeps the computational overhead modest—approximately 10-20% increase in training time—making it viable for large-scale architectures like ResNet.

Experimental Evaluation

The proposed method was rigorously tested across four diverse tasks using standard benchmarks:

  • Standard Image Classification: On CIFAR100, the method improved the accuracy of a standard HNN from 69.97% to 80.61% using a ResNet18 backbone.
  • Long-tailed Learning: In scenarios with extreme class imbalance (CIFAR100-LT, imbalance ratio 200), the method achieved 52.33% accuracy, significantly outperforming the baseline HNN's 33.60%.
  • Learning from Noisy Data: On the Clothing1M dataset, which contains real-world label noise, the method reached 82.27% accuracy, surpassing several specialized noise-cleansing algorithms.
  • Few-shot Learning: The method established new state-of-the-art performance on tiered-ImageNet, demonstrating that optimized hyperbolic geometry is particularly effective when training data is scarce.

Conclusion

This work bridges the gap between Riemannian geometry and classical learning theory by demonstrating that curvature is a critical factor in the generalization of HNNs. By treating curvature as a learnable parameter that regulates the smoothness of the loss landscape, the proposed sharpness-aware method enables HNNs to achieve superior performance across a wide range of challenging tasks. Future research may explore varying curvatures across different layers or the use of product manifolds to better capture complex, multi-scale data hierarchies.

Summary updated

Abstract

Hyperbolic neural networks (HNNs) have demonstrated notable efficacy in representing real-world data with hierarchical structures via exploiting the geometric properties of hyperbolic spaces characterized by negative curvatures. Curvature plays a crucial role in optimizing HNNs. Inappropriate curvatures may cause HNNs to converge to suboptimal parameters, degrading overall performance. So far, the theoretical foundation of the effect of curvatures on HNNs has not been developed. In this paper, we derive a PAC-Bayesian generalization bound of HNNs, highlighting the role of curvatures in the generalization of HNNs via their effect on the smoothness of the loss landscape. Driven by the derived bound, we propose a sharpness-aware curvature learning method to smooth the loss landscape, thereby improving the generalization of HNNs. In our method, we design a scope sharpness measure for curvatures, which is minimized through a bi-level optimization process. Then, we introduce an implicit differentiation algorithm that efficiently solves the bi-level optimization by approximating gradients of curvatures. We present the approximation error and convergence analyses of the proposed method, showing that the approximation error is upper-bounded, and the proposed method can converge by bounding gradients of HNNs. Experiments on four settings: classification, learning from long-tailed data, learning from noisy data, and few-shot learning show that our method can improve the performance of HNNs.
BibTeX
@article{fan2025curvature,
  author = {Xiaomeng Fan and Yuwei Wu and Zhi Gao and Mehrtash Harandi and Yunde Jia},
  title = {{Curvature Learning for Generalization of Hyperbolic Neural Networks}},
  journal = {Int. J. Comput. Vis.},
  year = {2025},
  doi = {10.1007/s11263-025-02567-4},
}
Figure