← 피드로
[Submitted on 2 May 2025 (v1), last revised 12 Aug 2026 (this version, v3)]
Abstract:Large Language Models (LLMs) can achieve strong performance on everyday coding tasks, but they can fail on complex tasks that require non-trivial reasoning about program semantics. Finding training examples to teach LLMs to solve these tasks can be challenging.
In this work, we explore a method to synthetically generate code reasoning training data based on a semantic inequivalence game (SInQ): a generator agent creates program variants that are semantically distinct, derived from a dataset of real-world programming tasks, while an evaluator agent has to identify input examples for which they behave differently. The agents train each other semi-adversarially, improving their ability to understand the underlying logic of code.
We evaluated our approach on multiple code generation and understanding benchmarks, including cross-language vulnerability detection (Lu et al., 2021),, where our method improves vulnerability detection in C/C++ code despite being trained exclusively on Python code, and the challenging Python builtin identifier swap benchmark (Miceli Barone et al., 2023),, showing that whereas modern LLMs still struggle with this benchmark, our approach yields substantial improvements.
We release the code needed to replicate the experiments, as well as the generated synthetic data, which can be used to fine-tune LLMs.
Submission history
From: Antonio Valerio Miceli Barone [view email]
[v1]
Fri, 2 May 2025 20:03:35 UTC (221 KB)
[v2]
Thu, 28 Aug 2025 16:38:13 UTC (370 KB)
[v3]
Wed, 12 Aug 2026 12:41:22 UTC (492 KB)
추출 본문 · 출처: arxiv.org · https://arxiv.org/abs/2505.03818
답글 남기기
댓글을 달기 위해서는 로그인해야합니다.