Behavioral Embeddings of Programs: A Quasi-Dynamic Approach for Optimization Prediction
Not on the map. Why?
Abstract (arXiv)
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 state-of-the-art static baselines. Our code is publicly available at https://github.com/Panhaolin2001/PREP/.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 12 of its 34 references that are in the map. First posted on arXiv 15 Oct 2025.
Builds on
12 of 34 references.
References · 12
- 2017Attention Is All You Needcited by 60,361
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
- 2018Neural Code Comprehension: A Learnable Representation of Code Semanticscited by 59
- 2023Large Language Models for Compiler Optimizationcited by 52
- 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
- 2021CompilerGym: Robust, Performant Compiler Optimization Environments for AI Researchcited by 41
- 2018A Survey on Compiler Autotuning using Machine Learningcited by 40
- 2020AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learningcited by 24
- 2025Compiler-R1: Towards Agentic Compiler Auto-tuning with Reinforcement Learningcited by 7
- 2023Compiler Auto-tuning through Multiple Phase Learningcited by 5
- 2023PEM: Representing Binary Program Semantics for Similarity Analysis via a Probabilistic Execution Modelcited by 5
- 2025Eliminating Hallucination-Induced Errors in LLM Code Generation with Functional Clusteringcited by 2
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2024CompilerDream: Learning a Compiler World Model for General Code Optimization
- 2026Toward Compiler World Models: Learning Latent Dynamics for Efficient Tensor Program Search
- 2026LLMs program using Reusable and Composable Abstract Representations
- 2026SemRep: Generative Code Representation Learning with Code Transformations
- 2025FORGE: Foundational Optimization Representations from Graph Embeddings
- 2021Learning to Superoptimize Real-world Programs
- 2026Compressed code: the hidden effects of quantization and distillation on programming tokens
- 2025Behavior and Representation in Open-Weight Large Language Models for Combinatorial Optimization: From Feature Extraction to Algorithm Selection