Lune

ICLR2026顶会

The Natural Geometry of Code: Hyperbolic Representation Learning for Program Reasoning

Weilin Zhou

摘要

State-of-the-art models for code representation, such as GraphCodeBERT, embed the hierarchical structure of source code into Euclidean space. This approach can lead to significant representation distortion, especially when embedding deep or highly branched hierarchies,limiting the models' ability to capture deep program semantics. We argue that the natural geometry for code is hyperbolic, as its exponential volume growth perfectly matches the tree-like structure of a code's Abstract Syntax Tree (AST), enabling low-distortion hierarchical embeddings. We introduce HypeCodeNet, a geometric deep learning framework that operates natively in hyperbolic space. Formulated in the numerically stable Lorentz model, its manifold-aware components include a hyperbolic embedding layer, a tangent space message-passing mechanism, and a geodesic-based attention module. On code clone detection, code completion, and link prediction, HypeCodeNet significantly outperforms existing Euclidean models, especially on tasks requiring deep structural understanding. Our work suggests that hyperbolic geometry offers a geometrically sound foundation for code representation, establishing hyperbolic geometry as a key to unlocking the structured semantics of code.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
  • CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation 引用了 Learning and Evaluating Contextual Embedding of Source Code
  • Hyperbolic Neural Networks++ 引用了 Mixed-curvature Variational Autoencoders
  • Mixed-curvature Variational Autoencoders 引用了 Hyperbolic Neural Networks++
  • CodeBERT: A Pre-Trained Model for Programming and Natural Languages 引用了 Learning and Evaluating Contextual Embedding of Source Code
  • Learning and Evaluating Contextual Embedding of Source Code 引用了 CodeBERT: A Pre-Trained Model for Programming and Natural Languages
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper7

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan 等EMNLP Findings 2020 · 2,828 次引用
  2. CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and GenerationYue Wang, Weishi Wang, Shafiq R. Joty, Steven C. H. HoiEMNLP 2021 · 1,224 次引用
  3. Hyperbolic Neural Networks++Ryohei Shimizu, Yusuke Mukuta, Tatsuya HaradaICLR 2021 · 791 次引用
  4. Learning and Evaluating Contextual Embedding of Source CodeAditya Kanade, Petros Maniatis, Gogul Balakrishnan, Kensen ShiICML 2020 · 438 次引用
  5. Mixed-curvature Variational AutoencodersOndrej Skopek, Octavian-Eugen Ganea, Gary BécigneulICLR 2020 · 122 次引用

相关 Paper

  1. HypEHR: Hyperbolic Modeling of Electronic Health Records for Efficient Question AnsweringYuyu Liu, Sarang Rajendra Patil, Mengjia Xu, Tengfei MaACL Findings 2026
  2. Hypformer: Exploring Efficient Transformer Fully in Hyperbolic SpaceMenglin Yang, Harshit Verma, Delvin Ce Zhang, Jiahong Liu 等KDD 2024 · 14 次引用
  3. Lorentzian Graph Convolutional NetworksYiding Zhang, Xiao Wang, Chuan Shi, Nian Liu 等WWW 2021 · 119 次引用
  4. Discrete-time Temporal Network Embedding via Implicit Hierarchical Learning in Hyperbolic SpaceMenglin Yang, Min Zhou, Marcus Kalander, Zengfeng Huang 等KDD 2021 · 101 次引用
  5. Hyperbolic Dataset DistillationWenyuan Li, Guang Li, Keisuke Maeda, Takahiro Ogawa 等NeurIPS 2025 · 17 次引用
黄昏的海面,两侧是细线勾勒的悬崖