Exploiting Code Symmetries for Learning Program Semantics
Not on the map. Why?
Abstract (arXiv)
This paper tackles the challenge of teaching code semantics to Large Language Models (LLMs) for program analysis by incorporating code symmetries into the model architecture. We introduce a group-theoretic framework that defines code symmetries as semantics-preserving transformations, where forming a code symmetry group enables precise and efficient reasoning of code semantics. Our solution, SymC, develops a novel variant of self-attention that is provably equivariant to code symmetries from the permutation group defined over the program dependence graph. SymC obtains superior performance on five program analysis tasks, outperforming state-of-the-art code models without any pre-training. Our results suggest that code LLMs that encode the code structural prior via the code symmetry group generalize better and faster.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 50 of its 91 references that are in the map. First posted on arXiv 7 Aug 2023.
Builds on
50 of 91 references.
References · 50
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,486
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2016Group Equivariant Convolutional Networkscited by 1,154
- 2016Geometric deep learning: going beyond Euclidean datacited by 1,042
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 890
- 2021Show Your Work: Scratchpads for Intermediate Computation with Language Modelscited by 871
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 728
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2019Deep Ensembles: A Loss Landscape Perspectivecited by 438
- 2021Unified Pre-training for Program Understanding and Generationcited by 361
38 more
- 2022UniXcoder: Unified Cross-Modal Pre-training for Code Representationcited by 355
- 2018Neural-Symbolic VQA: Disentangling Reasoning from Vision and Language Understandingcited by 304
- 2018Towards a Definition of Disentangled Representationscited by 294
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2017Learning SO(3) Equivariant Representations with Spherical CNNscited by 244
- 2017Learning to Represent Programs with Graphscited by 219
- 2017Neural-Symbolic Learning and Reasoning: A Survey and Interpretationcited by 195
- 2022Graph neural networks for materials science and chemistrycited by 181
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2016Harnessing Deep Neural Networks with Logic Rulescited by 135
- 2020Incorporating Symmetry into Deep Dynamics Models for Improved Generalizationcited by 123
- 2020Lorentz Group Equivariant Neural Network for Particle Physicscited by 120
- 2020LieTransformer: Equivariant self-attention for Lie Groupscited by 100
- 2022ReCode: Robustness Evaluation of Code Generation Modelscited by 100
- 2017Structured Attention Networkscited by 95
- 2016A Convolutional Attention Network for Extreme Summarization of Source Codecited by 90
- 2021Automatic Symmetry Discovery with Lie Algebra Convolutional Networkcited by 82
- 2020Code Prediction by Feeding Trees to Transformerscited by 70
- 2021DOBF: A Deobfuscation Pre-Training Objective for Programming Languagescited by 68
- 2017Neural Network-based Graph Embedding for Cross-Platform Binary Code Similarity Detectioncited by 65
- 2020Group Equivariant Stand-Alone Self-Attention For Visioncited by 63
- 2023Scallop: A Language for Neurosymbolic Programmingcited by 63
- 2018DeepSphere: Efficient spherical Convolutional Neural Network with HEALPix sampling for cosmological applicationscited by 61
- 2019Adversarial Examples for Models of Codecited by 61
- 2019TreeGen: A Tree-Based Transformer Architecture for Code Generationcited by 58
- 2018Structured Neural Summarizationcited by 53
- 2021Neural Program Repair with Execution-based Backpropagationcited by 50
- 2021PalmTree: Learning an Assembly Language Model for Instruction Embeddingcited by 49
- 2020Semantic Robustness of Models of Source Codecited by 43
- 2020On the Generalizability of Neural Program Models with respect to Semantic-Preserving Program Transformationscited by 41
- 2020Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networkscited by 35
- 2020Trex: Learning Execution Semantics from Micro-Traces for Binary Similaritycited by 34
- 2023TRACED: Execution-aware Pre-training for Source Codecited by 27
- 2022Equi-Tuning: Group Equivariant Fine-Tuning of Pretrained Modelscited by 22
- 2022Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptionscited by 11
- 2022Two Sides of the Same Coin: Exploiting the Impact of Identifiers in Neural Code Comprehensioncited by 9
- 2023LExecutor: Learning-Guided Executioncited by 7
- 2022Black-box Attacks Against Neural Binary Function Detectioncited by 3
Built on by
Citing papers per year: 2024: 2; 2025: 5; 2026: 2.
9 papers.
- 2024Large Language Models for Cyber Security: A Systematic Literature Reviewcited by 65
- 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoningcited by 57
- 2025TIF: Learning Temporal Invariance in Android Malware Detectorscited by 4
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Groundingcited by 4
- 2025Rethinking LLM-Based RTL Code Optimization Via Timing Logic Metamorphosiscited by 1
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniquescited by 0
- 2025Retrofit: Continual Learning with Controlled Forgetting for Binary Security Detection and Analysiscited by 0
- 2026SemRep: Generative Code Representation Learning with Code Transformationscited by 0
- 2026What are the Right Symmetries for Formal Theorem Proving?cited by 0
- 2026What are the Right Symmetries for Formal Theorem Proving?21 May 2026
- 2026SemRep: Generative Code Representation Learning with Code Transformations13 Mar 2026
- 2025Retrofit: Continual Learning with Controlled Forgetting for Binary Security Detection and Analysis14 Nov 2025
- 2025Rethinking LLM-Based RTL Code Optimization Via Timing Logic Metamorphosis22 Jul 2025
- 2025Large Language Models in Cybersecurity: Applications, Vulnerabilities, and Defense Techniques18 Jul 2025
- 2025ObscuraCoder: Powering Efficient Code LM Pre-Training Via Obfuscation Grounding27 Mar 2025
- 2025TIF: Learning Temporal Invariance in Android Malware Detectors7 Feb 2025
- 2024Large Language Models for Cyber Security: A Systematic Literature Review8 May 2024
- 2024LLM4Vuln: A Unified Evaluation Framework for Decoupling and Enhancing LLMs' Vulnerability Reasoning29 Jan 2024