paper-with-me

Papers

Guiding Language Models of Code with Global Context using Monitors

2023-06-19 · Lakshya A Agrawal, Aditya Kanade, Navin Goyal, Shuvendu K. Lahiri, Sriram K. Rajamani

Language models of code (LMs) work well when the surrounding code provides sufficient context. This is not true when it becomes necessary to use types, functionality or APIs defined elsewhere in the repository or a linked library, especially those not seen during training. LMs suffer from limited awareness of such global context and end up hallucinating. Integrated development environments (IDEs) assist developers in understanding repository context using static analysis. We extend this assistance, enjoyed by developers, to LMs. We propose monitor-guided decoding (MGD) where a monitor uses static analysis to guide the decoding. We construct a repository-level dataset PragmaticCode for method-completion in Java and evaluate MGD on it. On models of varying parameter scale, by monitoring for type-consistent object dereferences, MGD consistently improves compilation rates and agreement with ground truth. Further, LMs with fewer parameters, when augmented with MGD, can outperform larger LMs. With MGD, SantaCoder-1.1B achieves better compilation rate and next-identifier match than the much larger text-davinci-003 model. We also conduct a generalizability study to evaluate the ability of MGD to generalize to multiple programming languages (Java, C# and Rust), coding scenarios (e.g., correct number of arguments to method calls), and to enforce richer semantic constraints (e.g., stateful API protocols). Our data and implementation are available at https://github.com/microsoft/monitors4codegen .

📄 PDF Abstract BibTeX arXiv:2306.10763

Code (1)

microsoft/monitors4codegen 공식 구현

Tasks

Code CompletionCode GenerationCode RepairCode TranslationText-to-Code Generation

Similar Papers 제목 키워드 기반

Self-Attribution Bias: When AI Monitors Go Easy on Themselves

2026-03-04 · Dipika Khullar, Jack Hopkins, Rowan Wang, Fabien Roger arxiv

Agentic systems increasingly rely on language models to monitor their own behavior. For example, coding agents may self critique generated code for pull request approval or assess the safety of tool-use actions. We show …

Factor(U,T): Controlling Untrusted AI by Monitoring their Plans

2025-12-12 · Edward Lue Chee Lip, Anthony Channg, Diana Kim, Aaron Sandoval 외 arxiv

As AI capabilities advance, we increasingly rely on powerful models to decompose complex tasks $\unicode{x2013}$ but what if the decomposer itself is malicious? Factored cognition protocols decompose complex tasks into s…

Monitor-Guided Decoding of Code LMs with Static Analysis of Repository Context

2023-09-21 · NeurIPS 2023 11

Language models of code (LMs) work well when the surrounding code provides sufficient context. This is not true when it becomes necessary to use types, functionality or APIs defined elsewhere in the repository or a linke…

Guiding Federated Graph Recommendation with LLM-encoded knowledge

2026-06-13 · Thi Minh Chau Nguyen, Hien Trang Nguyen, Duc Anh Nguyen, Van Ho-Long 외 arxiv

Graph-based recommender systems are highly effective at extracting collaborative signals from user--item interactions, and federated learning (FL) allows these models to be trained while preserving user privacy. However,…

Federated Learning

DeceptGuard :A Constitutional Oversight Framework For Detecting Deception in LLM Agents

2026-03-14 · Snehasis Mukhopadhyay arxiv

Reliable detection of deceptive behavior in Large Language Model (LLM) agents is an essential prerequisite for safe deployment in high-stakes agentic contexts. Prior work on scheming detection has focused exclusively on …