Lune

NeurIPS2021Top-tier venue

Neural Program Generation Modulo Static Analysis

Rohan Mukherjee, Yeming Wen, Dipak Chaudhari, Thomas W. Reps, Swarat Chaudhuri, Christopher M. Jermaine

Abstract

State-of-the-art neural models of source code tend to be evaluated on the generation of individual expressions and lines of code, and commonly fail on long-horizon tasks such as the generation of entire method bodies. We propose to address this deficiency using weak supervision from a static program analyzer. Our neurosymbolic method allows a deep generative model to symbolically compute, using calls to a static-analysis tool, long-distance semantic relationships in the code that it has already generated. During training, the model observes these relationships and learns to generate programs conditioned on them. We apply our approach to the problem of generating entire Java methods given the remainder of the class that contains the method. Our experiments show that the approach substantially outperforms state-of-the-art transformers and a model that explicitly tries to learn program semantics on this task, both in terms of producing programs free of basic semantic errors and in terms of syntactically matching the ground truth.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

5 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • On Distribution Shift in Learning-based Bug Detectors cites CodeBERT: A Pre-Trained Model for Programming and Natural Languages
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Fault-Aware Neural Code RankersJeevana Priya Inala, Chenglong Wang, Mei Yang, Andrés Codas et al.NeurIPS 2022 · 61 citations
  2. Monitor-Guided Decoding of Code LMs with Static Analysis of Repository ContextLakshya A. Agrawal, Aditya Kanade, Navin Goyal, Shuvendu K. Lahiri et al.NeurIPS 2023 · 55 citations
  3. On Distribution Shift in Learning-based Bug DetectorsJingxuan He, Luca Beurer-Kellner, Martin T. VechevICML 2022 · 20 citations
  4. Rethinking Repetition Problems of LLMs in Code GenerationYihong Dong, Yuchen Liu, Xue Jiang, Bin Gu et al.ACL 2025
  5. XFL: Naming Functions in Binaries with Extreme Multi-label LearningJames Patrick-Evans, Moritz Dannehl, Johannes KinderS&P 2023

Builds on4

  1. CodeBERT: A Pre-Trained Model for Programming and Natural LanguagesZhangyin Feng, Daya Guo, Duyu Tang, Nan Duan et al.EMNLP Findings 2020 · 2,828 citations
  2. Learning Differentiable Programs with Admissible Neural HeuristicsAmeesh Shah, Eric Zhan, Jennifer J. Sun, Abhinav Verma et al.NeurIPS 2020 · 56 citations
  3. Learning to Represent Programs with Property SignaturesAugustus Odena, Charles SuttonICLR 2020 · 34 citations
  4. Program Synthesis Using Deduction-Guided Reinforcement LearningYanju Chen, Chenglong Wang, Osbert Bastani, Isil Dillig et al.CAV 2020 · 30 citations

Related papers

  1. Web question answering with neurosymbolic program synthesisQiaochu Chen, Aaron Lamoreaux, Xinyu Wang, Greg Durrett et al.PLDI 2021 · 25 citations
  2. Guess & Sketch: Language Model Guided TranspilationCeline Lee, Abdulrahman Mahmoud, Michal Kurek, Simone Campanoni et al.ICLR 2024 · 8 citations
  3. Representing Partial Programs with Blended Abstract SemanticsMaxwell I. Nye, Yewen Pu, Matthew Bowers, Jacob Andreas et al.ICLR 2021 · 23 citations
  4. Blended, precise semantic program embeddingsKe Wang, Zhendong SuPLDI 2020 · 53 citations
  5. Towards Reliable Code-as-Policies: A Neuro-Symbolic Framework for Embodied Task PlanningSanghyun Ahn, Wonje Choi, Junyong Lee, Jinwoo Park et al.NeurIPS 2025 · 14 citations
Dusk over the sea between two cliffs drawn in fine vertical lines