Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization Prediction
Haolin Pan, Dong Jinyuan, Hongbin Zhang, Hongyu Lin, Mingjie Xing, Yanjun Wu
摘要
Learning effective numerical representations, or embeddings, of programs is a fundamental prerequisite for applying machine learning to automate and enhance compiler optimization. Prevailing paradigms, however, present a dilemma. Static representations, derived from source code or intermediate representation (IR), are efficient and deterministic but offer limited insight into how a program will behave or evolve under complex code transformations. Conversely, dynamic representations, which rely on runtime profiling, provide profound insights into performance bottlenecks but are often impractical for large-scale tasks due to prohibitive overhead and inherent non-determinism. This paper transcends this trade-off by proposing a novel quasi-dynamic framework for program representation. The core insight is to model a program's optimization sensitivity. We introduce the Program Behavior Spectrum, a new representation generated by probing a program's IR with a diverse set of optimization sequences and quantifying the resulting changes in its static features. To effectively encode this high-dimensional, continuous spectrum, we pioneer a compositional learning approach. Product Quantization is employed to discretize the continuous reaction vectors into structured, compositional sub-words. Subsequently, a multi-task Transformer model, termed PQ-BERT, is pre-trained to learn the deep contextual grammar of these behavioral codes. Comprehensive experiments on two representative compiler optimization tasks---Best Pass Prediction and -Oz Benefit Prediction---demonstrate that our method outperforms strong static baselines. Our code is publicly available at https://github.com/Panhaolin2001/PREP/.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
它引用的顶会 Paper6
- Global Relational Models of Source CodeVincent J. Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis 等ICLR 2020 · 被引用 252 次
- ProGraML: A Graph-based Program Representation for Data Flow Analysis and Compiler OptimizationsChris Cummins, Zacharias V. Fisches, Tal Ben-Nun, Torsten Hoefler 等ICML 2021 · 被引用 140 次
- Efficient Compiler Autotuning via Bayesian OptimizationJunjie Chen, Ningxin Xu, Peiqi Chen, Hongyu ZhangICSE 2021 · 被引用 73 次
- Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement LearningHaolin Pan, Hongyu Lin, Haoran Luo, Yang Liu 等NeurIPS 2025 · 被引用 14 次
- PEM: Representing Binary Program Semantics for Similarity Analysis via a Probabilistic Execution ModelXiangzhe Xu, Zhou Xuan, Shiwei Feng, Siyuan Cheng 等FSE 2023 · 被引用 8 次
相关 Paper
- FAIR: Flow Type-Aware Pre-Training of Compiler Intermediate RepresentationsChangan Niu, Chuanyi Li, Vincent Ng, David Lo 等ICSE 2024 · 被引用 5 次
- Unleashing the Power of Compiler Intermediate Representation to Enhance Neural Program EmbeddingsZongjie Li, Pingchuan Ma, Huaijin Wang, Shuai Wang 等ICSE 2022 · 被引用 25 次
- Phaedrus: Predicting Dynamic Application Behavior with Lightweight Generative Models and LLMsBodhisatwa Chatterjee, Neeraj Jadhav, Santosh PandeOOPSLA 2026
- Evaluating Representation Learning of Code Changes for Predicting Patch Correctness in Program RepairHaoye Tian, Kui Liu, Abdoul Kader Kaboré, Anil Koyuncu 等ASE 2020 · 被引用 81 次
- PERFOGRAPH: A Numerical Aware Program Graph Representation for Performance Optimization and Program AnalysisAli TehraniJamsaz, Quazi Ishtiaque Mahmud, Le Chen, Nesreen K. Ahmed 等NeurIPS 2023 · 被引用 12 次
