mlsanityData to 7 Oct 2026

Guess & Sketch: Language Model Guided Transpilation

arXiv 2309.14396 ↗First posted 25 Sep 2023cs.SE cs.LG cs.PLcited by 3

Not on the map. Why?

Abstract (arXiv)

Maintaining legacy software requires many software and systems engineering hours. Assembly code programs, which demand low-level control over the computer machine state and have no variable names, are particularly difficult for humans to analyze. Existing conventional program translators guarantee correctness, but are hand-engineered for the source and target programming languages in question. Learned transpilation, i.e. automatic translation of code, offers an alternative to manual re-writing and engineering efforts. Automated symbolic program translation approaches guarantee correctness but struggle to scale to longer programs due to the exponentially large search space. Their rigid rule-based systems also limit their expressivity, so they can only reason about a reduced space of programs. Probabilistic neural language models (LMs) produce plausible outputs for every input, but do so at the cost of guaranteed correctness. In this work, we leverage the strengths of LMs and symbolic solvers in a neurosymbolic approach to learned transpilation for assembly code. Assembly code is an appropriate setting for a neurosymbolic approach, since assembly code can be divided into shorter non-branching basic blocks amenable to the use of symbolic methods. Guess & Sketch extracts alignment and confidence information from features of the LM then passes it to a symbolic solver to resolve semantic equivalence of the transpilation input and output. We test Guess & Sketch on three different test sets of assembly transpilation tasks, varying in difficulty, and show that it successfully transpiles 57.6% more examples than GPT-4 and 39.6% more examples than an engineered transpiler. We also share a training and evaluation dataset for this task.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 22 of its 45 references that are in the map. First posted on arXiv 25 Sep 2023.

Builds on

22 of 45 references.

References · 22

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Language Models are Few-Shot Learnerscited by 32,199
  4. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  5. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  7. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  8. 2023Large Language Modelscited by 774
  9. 2022The Stack: 3 TB of permissively licensed source codecited by 354
  10. 2020Unsupervised Translation of Programming Languagescited by 262
  11. 2016A Decomposable Attention Model for Natural Language Inferencecited by 214
  12. 2018Tree-to-tree Neural Networks for Program Translationcited by 93
10 more
  1. 2021Leveraging Automated Unit Tests for Unsupervised Code Translationcited by 82
  2. 2022Efficient Long-Text Understanding with Short-Text Modelscited by 71
  3. 2019Learning to Infer Program Sketchescited by 44
  4. 2022Code Translation with Compiler Representationscited by 42
  5. 2023The Larger They Are, the Harder They Fail: Language Models do not Recognize Identifier Swaps in Pythoncited by 29
  6. 2023SLaDe: A Portable Small Language Model Decompiler for Optimized Assemblycited by 28
  7. 2021Learning to Complete Code with Sketchescited by 23
  8. 2023R-U-SURE? Uncertainty-Aware Code Suggestions By Maximizing Utility Across Random User Intentscited by 10
  9. 2021Toward Code Generation: A Survey and Lessons from Semantic Parsingcited by 8
  10. 2022Towards Porting Operating Systems with Program Synthesiscited by 1

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 2.

3 papers.