Structural Language Models of Code
Not on the map. Why?
Abstract (arXiv)
We address the problem of any-code completion - generating a missing piece of source code in a given program without any restriction on the vocabulary or structure. We introduce a new approach to any-code completion that leverages the strict syntax of programming languages to model a code snippet as a tree - structural language modeling (SLM). SLM estimates the probability of the program's abstract syntax tree (AST) by decomposing it into a product of conditional probabilities over its nodes. We present a neural model that computes these conditional probabilities by considering all AST paths leading to a target node. Unlike previous techniques that have severely restricted the kinds of expressions that can be generated in this task, our approach can generate arbitrary code in any programming language. Our model significantly outperforms both seq2seq and a variety of structured approaches in generating Java and C# code. Our code, data, and trained models are available at http://github.com/tech-srl/slm-code-generation/ . An online demo is available at http://AnyCodeGen.org .
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). First posted on arXiv 30 Sep 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 2; 2022: 0; 2023: 0; 2024: 0; 2025: 1.
3 papers.
- 2021Can Machines Read Coding Manuals Yet? -- A Benchmark for Building Better Language Models for Code Understandingcited by 5
- 2021Autoencoders as Tools for Program Synthesiscited by 4
- 2025NES: An Instruction-Free, Low-Latency Next Edit Suggestion Framework Powered by Learned Historical Editing Trajectoriescited by 2
- 2025NES: An Instruction-Free, Low-Latency Next Edit Suggestion Framework Powered by Learned Historical Editing Trajectories4 Aug 2025
- 2021Can Machines Read Coding Manuals Yet? -- A Benchmark for Building Better Language Models for Code Understanding15 Sep 2021
- 2021Autoencoders as Tools for Program Synthesis16 Aug 2021