LLM-Based Embeddings for Program Analysis and Optimization
Not on the map. Why?
Abstract (arXiv)
Recent advances have highlighted the potential of machine learning, particularly Large Language Models (LLMs), for analyzing and optimizing programs. We present the first application of program embeddings from LLMCompiler---an LLM massively pretrained on intermediate representation (IR) code---to representative program analysis and optimization tasks. We generate program embeddings directly from source and IR code using a simple approach: split programs into chunks, independently embed each chunk with pretrained LLMs, and then aggregate the chunk embeddings into a single program embedding. Our experiments show that combining source and IR code embeddings achieves an error rate of 1.54% in algorithm classification, a 12% improvement over the current state-of-the-art, and a competitive accuracy on heterogeneous device mapping. These findings suggest that training a performance-aware LLM for embedding IR code might yield state-of-the-art results in code optimization tasks.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 13 of its 22 references that are in the map. First posted on arXiv 8 Aug 2026.
Builds on
13 of 22 references.
References · 13
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2021How Attentive are Graph Attention Networks?cited by 835
- 2020Principal Neighbourhood Aggregation for Graph Netscited by 478
- 2024NV-Embed: Improved Techniques for Training LLMs as Generalist Embedding Modelscited by 472
- 2018Neural Code Comprehension: A Learnable Representation of Code Semanticscited by 59
- 2021How could Neural Networks understand Programs?cited by 26
- 2020AutoPhase: Juggling HLS Phase Orderings in Random Forests with Deep Reinforcement Learningcited by 24
- 2023Performance Optimization using Multimodal Modeling and Heterogeneous GNNcited by 7
- 2023FAIR: Flow Type-Aware Pre-Training of Compiler Intermediate Representationscited by 4
- 2023PERFOGRAPH: A Numerical Aware Program Graph Representation for Performance Optimization and Program Analysiscited by 3
Built on by
Not cited yet.