Lune

ICML2023顶会

Can Large Language Models Reason about Program Invariants?

Kexin Pei, David Bieber, Kensen Shi, Charles Sutton, Pengcheng Yin

摘要

Identifying invariants is an important program analysis task with applications towards program understanding, bug finding, vulnerability analysis, and formal verification. Existing tools for identifying program invariants rely on dynamic analysis, requiring traces collected from multiple executions in order to produce reliable invariants. We study the application of large language models to invariant prediction, finding that models trained on source code and fine-tuned for invariant generation can perform invariant prediction as static rather than dynamic analysis. Using a scratchpad approach where invariants are predicted sequentially through a program gives the best performance, finding invariants statically of quality comparable to those obtained by a dynamic analysis tool with access to five program traces.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 38 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program Verification 引用了 Lemur: Integrating Large Language Models in Automated Program Verification
  • Representing Partial Programs with Blended Abstract Semantics 引用了 Learning to Represent Programs with Property Signatures
  • NExT: Teaching Large Language Models to Reason about Code Execution 引用了 Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptions
  • NExT: Teaching Large Language Models to Reason about Code Execution 引用了 Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks
  • Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource Descriptions 引用了 Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper38

  1. "Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language ModelsXinyue Shen, Zeyuan Chen, Michael Backes, Yun Shen 等CCS 2024 · 132 次引用
  2. NExT: Teaching Large Language Models to Reason about Code ExecutionAnsong Ni, Miltiadis Allamanis, Arman Cohan, Yinlin Deng 等ICML 2024 · 73 次引用
  3. CodePlan: Repository-Level Coding using LLMs and PlanningRamakrishna Bairi, Atharv Sonwane, Aditya Kanade, Vageesh D. C. 等FSE 2024 · 67 次引用
  4. Lemur: Integrating Large Language Models in Automated Program VerificationHaoze Wu, Clark W. Barrett, Nina NarodytskaICLR 2024 · 67 次引用
  5. Enchanting Program Specification Synthesis by Large Language Models Using Static Analysis and Program VerificationCheng Wen, Jialun Cao, Jie Su, Zhiwu Xu 等CAV 2024 · 60 次引用

它引用的 Paper5

  1. CLN2INV: Learning Loop Invariants with Continuous Logic NetworksGabriel Ryan, Justin Wong, Jianan Yao, Ronghui Gu 等ICLR 2020 · 72 次引用
  2. Learning to Execute Programs with Instruction Pointer Attention Graph Neural NetworksDavid Bieber, Charles Sutton, Hugo Larochelle, Daniel TarlowNeurIPS 2020 · 51 次引用
  3. Learning to Represent Programs with Property SignaturesAugustus Odena, Charles SuttonICLR 2020 · 34 次引用
  4. Representing Partial Programs with Blended Abstract SemanticsMaxwell I. Nye, Yewen Pu, Matthew Bowers, Jacob Andreas 等ICLR 2021 · 23 次引用
  5. Static Prediction of Runtime Errors by Learning to Execute Programs with External Resource DescriptionsDavid Bieber, Rishab Goel, Daniel Zheng, Hugo Larochelle 等ICLR 2023 · 2 次引用

相关 Paper

  1. LLM Meets Bounded Model Checking: Neuro-symbolic Loop Invariant InferenceGuangyuan Wu, Weining Cao, Yuan Yao, Hengfeng Wei 等ASE 2024 · 9 次引用
  2. Ranking LLM-Generated Loop Invariants for Program VerificationSaikat Chakraborty, Shuvendu K. Lahiri, Sarah Fakhoury, Akash Lal 等EMNLP Findings 2023 · 36 次引用
  3. Not All Invariants Are Equal: Curating Training Data to Accelerate Program Verification with SLMsIdo Pinto, Yizhak Elboher, Haoze Wu, Nina Narodytska 等ICML 2026 · 1 次引用
  4. Towards More Accurate Static Analysis for Taint-Style Bug Detection in Linux KernelHaonan Li, Hang Zhang, Kexin Pei, Zhiyun QianASE 2025 · 5 次引用
  5. NESA: Relational Neuro-Symbolic Static Program AnalysisChengpeng Wang, Yifei Gao, Wuqi Zhang, Xuwei Liu 等FSE 2026 · 1 次引用
黄昏的海面,两侧是细线勾勒的悬崖