paper-with-me

Papers

Synchromesh: Reliable code generation from pre-trained language models

2022-01-26 · ICLR 2022 4 · Gabriel Poesia, Oleksandr Polozov, Vu Le, Ashish Tiwari, Gustavo Soares, Christopher Meek, Sumit Gulwani

Large pre-trained language models have been used to generate code,providing a flexible interface for synthesizing programs from natural language specifications. However, they often violate syntactic and semantic rules of their output language, limiting their practical usability. In this paper, we propose Synchromesh: a framework for substantially improving the reliability of pre-trained models for code generation. Synchromesh comprises two components. First, it retrieves few-shot examples from a training bank using Target Similarity Tuning (TST), a novel method for semantic example selection. TST learns to recognize utterances that describe similar target programs despite differences in surface natural language features. Then, Synchromesh feeds the examples to a pre-trained language model and samples programs using Constrained Semantic Decoding (CSD): a general framework for constraining the output to a set of valid programs in the target language. CSD leverages constraints on partial outputs to sample complete correct programs, and needs neither re-training nor fine-tuning of the language model. We evaluate our methods by synthesizing code from natural language descriptions using GPT-3 and Codex in three real-world languages: SQL queries, Vega-Lite visualizations and SMCalFlow programs. These domains showcase rich constraints that CSD is able to enforce, including syntax, scope, typing rules, and contextual logic. We observe substantial complementary gains from CSD and TST in prediction accuracy and in effectively preventing run-time errors.

📄 PDF Abstract BibTeX arXiv:2201.11227

Code (2)

kanishkg/synchromesh
uiuc-focal-lab/syncode

Tasks

Code GenerationLanguage ModelingLanguage Modellingvalid

Methods 이 논문이 사용한 방법론

Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Cosine Annealing Cosine Annealing is a type of learning rate schedule that has the effect of starting with a large learning rate that is relatively rapidly decreased to a minimum value before…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…

Similar Papers 제목 키워드 기반

When Forgetting Builds Reliability: LLM Unlearning for Reliable Hardware Code Generation

2025-12-05 · Yiwen Liang, Qiufeng Li, Shikai Wang, Weidong Cao arxiv

Large Language Models (LLMs) have shown strong potential in accelerating digital hardware design through automated code generation. Yet, ensuring their reliability remains a critical challenge, as existing LLMs trained o…

Code Generation

Poisoning Programs by Un-Repairing Code: Security Concerns of AI-generated Code

2024-03-11 · Cristina Improta

AI-based code generators have gained a fundamental role in assisting developers in writing software starting from natural language (NL). However, since these large language models are trained on massive volumes of data c…

Code GenerationData PoisoningPosition

Ro-SLM: Onboard Small Language Models for Robot Task Planning and Operation Code Generation

2026-04-13 · Wenhao Wang, Yanyan Li, Long Jiao, Jiawei Yuan arxiv

Recent advances in large language models (LLMs) provide robots with contextual reasoning abilities to comprehend human instructions. Yet, current LLM-enabled robots typically depend on cloud-based models or high-performa…

Robot Task PlanningCode Generation

VisCoder2: Building Multi-Language Visualization Coding Agents

2025-10-24 · Yuansheng Ni, Songcheng Cai, Xiangchao Chen, Jiarong Liang 외 arxiv

Large language models (LLMs) have recently enabled coding agents capable of generating, executing, and revising visualization code. However, existing models often fail in practical workflows due to limited language cover…

ReFactX: Scalable Reasoning with Reliable Facts via Constrained Generation

2025-08-23 · Riccardo Pozzi, Matteo Palmonari, Andrea Coletta, Luigi Bellomarini 외 arxiv

Knowledge gaps and hallucinations are persistent challenges for Large Language Models (LLMs), which generate unreliable responses when lacking the necessary information to fulfill user instructions. Existing approaches, …

Question Answering