Program Semantic Inequivalence Game with Large Language Models
Di cosa parla
Si genera automaticamente materiale di addestramento facendo "giocare" due agenti: uno produce varianti di un programma che cambiano il comportamento, l'altro trova esempi che mostrano queste differenze. L'idea serve a insegnare ai grandi modelli linguistici a ragionare sul significato del codice quando i compiti sono complessi; gli autori mettono a disposizione codice e dati sintetici per replicare il procedimento.
Cosa permette di osservare
Ti invita a esplorare se esempi sintetici creati da agenti che si sfidano possono colmare le lacune dei modelli nel ragionamento sul codice e se l'addestramento in una lingua di programmazione può aiutare anche in altre.
Dalla fonte
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…