Elamur Research

LEVER: Learning to Verify Language-to-Code Generation with Execution

Paper · 2023 · Ansong Ni, Srini Iyer, Dragomir Radev et al.

Summary

A system that writes code from a request can produce a useful program among its alternatives and still return the wrong answer. The difficulty is deciding which alternative to trust. Running the code helps, but a query can run successfully and return the wrong records, just as a calculation can finish and produce the wrong number. Asking for test cases helps when someone knows what the program should return. For a person asking a question about a database, though, finding that answer is the reason for running the query in the first place.

LEVER learns to make this choice from examples. It samples several programs from an existing code generator and runs each distinct candidate. A separately trained verifier reads the request, the code and a text representation of what happened when the code ran. It estimates whether the candidate satisfies the request. During training, the authors obtain labels by comparing the observed results with reference answers or checking them against the available tests. A reference program supplies an additional positive example where one is available. Training can also proceed with just the reference answers, and the generator's parameters stay fixed.

To make its final choice, LEVER multiplies each candidate's verification score by its generation probability. It then adds the resulting scores of distinct programs that return the same result. This lets several implementations support the same answer while giving more influence to candidates that the generator or verifier finds plausible. The verifier is approximately 0.5% of the generator's size by parameter count. The paper's experiments show how far that comparatively small component can improve selection from a fixed generator's samples.

The authors evaluate SQL generation on Spider, table question answering on WikiTableQuestions, math word problems on GSM8k and basic Python programming on MBPP. With code-davinci-002, they report execution-accuracy improvements of 4.6% to 10.9% over the baseline that discards programs with execution errors and then ranks the survivors by generation likelihood. They also report new best benchmark results on all four tasks in their comparisons. Removing the execution result from the verifier hurts performance on every benchmark. Other experiments show that much of the benefit survives with fewer training questions or without reference code, and that a verifier trained on one generator's samples often helps on another's. The method still depends on having a useful program among the samples and enough context to run it.

Deep dive: LEVER: Learning to Verify Language-to-Code Generation with Execution

LEVER runs candidate programs and learns which outputs to trust when answering database and math questions or choosing a Python function. · about 37 minutes to read

The problem and its context

A request can be easy to state and hard to check

A natural-language interface to a database connects a person's question to operations on stored data. The question may identify an entity in ordinary words, while the query has to choose the right table, interpret the constraints and return the requested information. What matters to the person may be the result of the query. A similar distinction appears in a math word problem, where instructions express relationships among quantities and a generated program computes the answer. In both cases, an implementation is useful because of the behavior it produces in a particular context.

The paper groups these problems with tasks where the executable program itself is the deliverable. A basic Python programming request, for example, asks for a function that can be called on different inputs. The test cases give the evaluator evidence about whether the function behaves as intended. A table question and a programming exercise therefore share the need to translate a verbal description into code, while the evidence available for checking the resulting code differs. The task family includes the interpretation of natural-language questions as executable expressions, a familiar problem in semantic parsing.

The authors place language-to-code generation in a line of work that includes hand-built interfaces, structured prediction and neural approaches. The earlier approaches they cite include work that learned to map database questions to formal queries and work that generated logical forms with neural attention. These examples show the longstanding concern with the meaning of the request and how to express it in a formal language. The more recent code generators change how candidates can be obtained. A prompt containing examples can elicit a program without a new round of parameter updates for the generator. Learning to Parse Database Queries Using Inductive Logic Programming and Language to Logical Form with Neural Attention.

The authors describe pretraining on code as making these generators practical candidates for natural-language interfaces. They also point to the cost of updating a large generator for a particular application. A prompt can show the generator examples of the task, including what a request looks like and what form the response should take. This use of examples at generation time is the paper's starting point for few-shot learning.

A plausible continuation of a prompt is only a starting point for choosing a program. The generator scores pieces of code according to their probability in context. That process can favor a query that looks appropriate but refers to the wrong table or a Python solution that reads naturally but performs the wrong operation. Sampling different continuations gives the system more chances to produce a useful program. It also changes the problem from accepting a single continuation to deciding among several executable possibilities. Earlier work on code generation motivates the authors' use of such candidates. Evaluating Large Language Models Trained on Code and Program Synthesis with Large Language Models.

What running the code can tell you

The paper distinguishes ways of using execution that answer different questions. A test supplies an input and an expected output, allowing a system to reject a candidate when the two disagree. In a contest-style programming task, this can help narrow a large pool of sampled solutions. The paper discusses this use of tests in AlphaCode. In a question-answering interface, the system can frequently execute a query but has no expected result for the question in front of it. The resources needed to run the program and the information needed to certify its answer are different things. AlphaCode.

Error pruning uses the first of those resources. It discards candidates that fail to run, leaving the system to choose among the rest. This can eliminate a query with an invalid reference or code that times out. A successful run gives weaker evidence. A query can legitimately return an empty table, and a mistaken condition can also produce an empty table. Both runs can satisfy the same criterion of completing without error. The criterion therefore says little about the answer's relationship to the wording of the request.

Another strategy examines agreement among candidates. Different programs can yield the same result, and the preceding work discussed in the paper exploits that agreement. For a question where the result is the answer, matching outcomes can be more informative than similar program text. Different expressions for a computation need not be treated as competing answers forever. They can support the same answer after execution. Agreement can also reflect a shared mistake, so its value depends on what the candidate pool contains and what its members agree on.

Prior work used execution earlier in the learning or generation process as well. In weakly supervised semantic parsing, a system may have questions paired with answers while the formal expressions that produce those answers are unobserved. The answer then provides training evidence about candidate expressions. Other work cited by the authors used intermediate outcomes to guide program search during training or decoding. The same kind of observable behavior can thus guide which programs a system explores, supply labels for learning or help choose among completed candidates. Semantic Parsing on Freebase from Question-Answer Pairs and Compositional Semantic Parsing on Semi-Structured Tables.

LEVER asks how to judge an outcome for the particular request that produced it. An output has properties such as its type, its range and the shape of the data it contains. Those properties can carry information about the intended answer even if the correct value is unknown. An output can also look sensible in isolation and still be implausible in context. A separate scoring component gives the system a way to learn those relationships from past attempts.

Learning how to rank completed attempts

A learned score for choosing among candidates belongs to the tradition of discriminative reranking. A generator proposes alternatives, and a second component judges them using features available once each alternative is complete. The paper notes uses of this division of labor in parsing and in other sequence tasks. It also discusses earlier code generation work that ranked candidates using information other than execution outcomes. What LEVER puts in the reranker's input is the behavior of the completed program on the task at hand. Discriminative Reranking for Natural Language Parsing.

The paper also draws on learned verification of answers to math word problems and commonsense questions. In the math precedent, the verifier can read a proposed solution and score it. Such a solution may be expressed as text. Code offers another kind of evidence because an executor can obtain a result from it. The paper asks whether that result can help a learner recognize correct solutions when the candidates are programs. Training Verifiers to Solve Math Word Problems.

Verification in LEVER is a prediction of whether observed behavior fits the programmer's intent. The paper also mentions formal verification, where the goal is to establish that a program meets a specification. Here the verifier supplies a score for ranking finite samples, learned from examples whose outcomes can be checked. Its practical task is to find promising answers when the correct output for a new request is unavailable. That meaning of verification determines what the experiments measure and what a high score can establish.

The method, step by step

From a prompt to an executable candidate pool

Consider a question about a database. The input needs to say what the user wants and supply the relevant programming context. For this task, that context concerns the database against which the query will run. For a Python exercise, it can include an assertion that helps specify how a function should be called. The authors treat these pieces together as the task input, allowing the same framework to handle requests with different kinds of context.

The prompt combines the new input with example requests and solutions. The generator uses that prompt to propose code in the expected format. It is sampled repeatedly, so the process can yield distinct ways to answer the question and can also produce the same program more than once. LEVER removes repeated program strings before running and scoring the candidates. The removal at this stage concerns duplicate programs. Distinct programs that happen to give the same answer stay in the pool.

Each remaining program is executed in the appropriate environment. A database query can return a table. A calculation can store its result in a designated variable. A Python function can return a value whose type and contents can be recorded. Execution can also fail, in which case the failure is represented as text. The verifier receives the request, the candidate code and the representation of this observed behavior together.

The verifier scores candidates individually. LEVER combines that score with the generator's support for the same candidate. It then groups programs by their execution results and sums the scores within each group. The group with the largest total determines the choice. Where the winning result corresponds to several programs, the authors break the tie among those programs at random.

How LEVER chooses among generated programs

The steps in order.

How LEVER chooses among generated programsStep 1: Build the prompt from the request and examples1. Build the prompt from the request and examplesStep 2: Sample programs and remove duplicate code2. Sample programs and remove duplicate codeStep 3: Execute each distinct candidate3. Execute each distinct candidateStep 4: Score the request, code and observed result together4. Score the request, code and observed result togetherStep 5: Multiply verification and generation probabilities5. Multiply verification and generation probabilitiesStep 6: Pool scores by matching execution result6. Pool scores by matching execution resultStep 7: Choose a program from the highest-scoring group7. Choose a program from the highest-scoring group

How candidates enter the pool

The paper writes the probability of a proposed program in terms of the complete prompt. This makes explicit where the examples enter the calculation.

P_G(y | x) = P(y | prompt(x, {(xᵢ, yᵢ)}ᵢ₍<ₘ₎))

Here x is the current task input, including the natural-language description and any programming context. The symbol y denotes program text. P_G is the generator's conditional probability for y under the prompting setup, and P is the underlying probability assigned to that program given the rendered prompt. The vertical bar means “given.” The function prompt turns the input and the demonstration set into a string. The pairs within braces are the exemplars, with xᵢ the example input, yᵢ its program and i the example index. The index condition i < m denotes the paper's fixed collection of exemplars, with m specifying how many it uses.

Greedy decoding provides the simplest way to turn the distribution into a program. It takes the most likely next token at each step. The paper treats the result as an approximation to the program with the highest overall generation probability.

ŷgreedy ≈ argmaxᵧ P_G(y | x)

ŷgreedy is the program obtained by greedy decoding. A hat marks a generated or selected candidate in this notation. The sign ≈ indicates the approximation. The expression argmaxᵧ means to take the program y that gives the largest value of the conditional generation probability P_G(y | x), with x again denoting the input. The optimization in the formula concerns the whole program. The decoding procedure itself chooses successive tokens locally.

LEVER instead draws a collection of programs by temperature sampling. The temperature affects how heavily sampling favors the generator's more likely continuations. The authors set it to 0.6 for Codex and 0.8 for InCoder and CodeGen. They motivate sampling through prior reports about degraded candidates from beam search and through the uneven availability or efficiency of beam search in the systems they evaluate.

{ŷᵢ}ᵢ₌₁,…,ₖ ∼ P_G(y | x)

Each ŷᵢ is a generated program at draw index i. The subscripts i = 1, …, k range over the k draws. The sign ∼ indicates sampling from the generator's distribution, with the experiment's temperature setting applied. P_G is the conditional generation distribution over possible program texts y, and x is the task input. This collection can contain repeats, so the number of draws and the number of distinct programs can differ.

S = {ŷᵢ}ᵢ₌₁,…,ₙ, n ≤ k

S denotes the set after duplicate program strings have been removed. Its members ŷᵢ are now indexed by i from 1 through n, the number of unique candidates. The symbol ≤ expresses that there can be at most as many distinct programs as the original k draws.

The paper generally constructs prompts by randomly selecting and ordering examples from the training set. MBPP uses the 3 demonstrations supplied with the dataset. These prompt demonstrations are separate from the test cases attached to a particular MBPP exercise. On Spider, Codex uses 8 demonstrations. InCoder and CodeGen use the first 2 from that prompt because of context length and computational constraints. The paper includes the prompts for the benchmark tasks and identifies its released implementation as LEVER.

What the verifier reads and scores

The executor is the bridge between code and the observation used for scoring. Its notation covers both a program that already contains the values needed to run and a function that must be invoked on separately supplied arguments.

ẑ = ℰ(ŷ)

ŷ is a sampled program, ℰ denotes the executor and ẑ is the observed result for that program. Applying ℰ means running the candidate under the conditions of the task. Those conditions can include a database or function inputs even though the notation keeps them implicit. The hat on ẑ distinguishes a candidate's result from the reference result used during training.

For Spider and WikiTQ, what the verifier sees is a text serialization of the table returned by SQL. For GSM8k, the verifier reads the value held in the variable answer after the generated Python program runs. On MBPP, the function's returned value is converted to text and presented with its type. Run failures are written with an ERROR marker and a reason. Thus the execution field can convey positive clues about the sort of answer produced as well as explicit evidence of failure.

The paper concatenates the task input, candidate code and result representation. This lets a classifier relate the fields to one another. For instance, an empty result can be judged in light of what the question asks and how the query constrains the data. The architecture does not require an explicit rule that assigns the same meaning to every empty result. The learning procedure provides examples of how useful or misleading such an outcome can be.

P_θ(v | x, ŷ, ℰ(ŷ)), v ∈ {0, 1}

P_θ is the verifier's conditional distribution, and θ denotes its learned parameters. The label v belongs to the set indicated by ∈ and the braces. The value 1 means that the candidate passes verification and 0 denotes the negative class. The conditioning inputs are the request and context x, the candidate ŷ and the execution outcome ℰ(ŷ). Commas in that conditioning list indicate that the classifier sees the fields together.

The paper implements this binary decision with T5 and RoBERTa variants. With T5, the training targets are the tokens yes and no. At inference time, the probability of producing yes supplies the verification score. In RoBERTa, the authors use the representation of the classification token and add a linear layer to make the decision. The two implementations produce a comparable kind of score while fitting the designs of the underlying systems. T5 and RoBERTa.

From a program score to a result score

The general reranking decision is to take the candidate with the highest score among those already sampled.

ŷrerank = argmax₍ŷ ∈ S₎ R(x, ŷ)

ŷrerank denotes the selected program. The expression argmax₍ŷ ∈ S₎ considers each candidate ŷ in the set S and returns one attaining the largest score. R is the scoring function, and its arguments x and ŷ identify the task input and candidate. What makes LEVER different from other rerankers in the paper is the construction of R.

LEVER first combines individual evidence about each candidate. Generation probability measures how much support the generator assigns to the program. The verification probability measures how plausible its correctness looks once the verifier can inspect the run. The paper expresses their product as a joint probability.

P_R(ŷ, v = 1 | x) = P_G(ŷ | x) · P_θ(v = 1 | x, ŷ, ℰ(ŷ))

P_R is the joint score for generating candidate ŷ and having it pass verification, conditional on input x. The condition v = 1 selects the positive verification label. P_G(ŷ | x) is the generator's probability of the program under the prompt for x. P_θ is the verifier with trained parameters θ, and ℰ(ŷ) is the program's execution outcome. The centered dot denotes multiplication. Both factors affect how much this candidate can contribute to the final decision.

The authors then sum over candidates that yield the same outcome. This is the marginalization in their procedure. The result score retains support from each distinct program in a group, though those programs may use different expressions to obtain the answer.

R(x, ŷ) = P_R(ℰ(ŷ), v = 1 | x) = ∑₍y ∈ S, ℰ(y) = ℰ(ŷ)₎ P_R(y, v = 1 | x)

R(x, ŷ) is the final score assigned to candidate ŷ for input x. On the middle term, P_R assigns joint support to the execution result ℰ(ŷ) and positive label v = 1. The sign ∑ adds the per-program scores P_R(y, v = 1 | x) for candidates y in the deduplicated set S whose results under executor ℰ match the result of ŷ. The equality in the sum's condition decides which candidates belong to that result group.

The ranking of results can differ from the ranking of individual candidates. A program with the largest individual score can belong to a result group whose total is smaller than the combined score of another group. Conversely, many programs that yield a common result can influence the choice even when their individual scores are modest. The group is weighted by joint scores, so agreement receives more or less support depending on the candidates that produce it. This procedure looks only at the sampled pool. The sum does not include programs the generator could have written but did not sample.

How the verifier gets its training examples

The authors create training data by running the generator on training inputs and drawing candidate programs much as they do at inference. They remove duplicate programs and run the distinct candidates. Where a benchmark supplies a reference program, its execution determines the reference outcome. Other examples can supply that outcome directly.

z* = ℰ(y*)

y* denotes the reference program and z* denotes its reference execution result. The asterisk identifies the reference rather than a sampled candidate. The symbol ℰ is the executor. The relation applies when reference code is available. When only the answer is known, z* can still be used without a corresponding y*.

v = 𝟙(ẑ = z*)

The symbol 𝟙 is the indicator function. It gives the positive label 1 if its condition holds and the negative label 0 otherwise. The label is v, the candidate's observed result is ẑ, and the reference result is z*. The equality denotes a match under the task's evaluation procedure. For an exercise with multiple tests, a sample receives a positive label only if its outputs match on every test used to obtain the label.

For training examples with reference code, the authors add the reference program and its result as a positive example. They omit that addition when only the expected answer is known. This is the distinction between the paper's fully supervised and weakly supervised settings. Weak supervision still supplies a target against which execution can be checked. What it omits is an annotated implementation to show how the target should be obtained.

The resulting dataset reflects the attempts a generator actually makes. A question can supply both working and failing queries or several executable answers that disagree. The candidates that happen to match the reference result receive the same positive label even if their program text differs. The classifier is trained to predict the label from the fields it will have for a new request. It can see the candidate's result at inference, while comparison with the correct answer is the source of labels during training.

The objective is negative log-likelihood averaged over the program candidates for a training input.

ℒ_θ(x, S) = −(1 / |S|) · ∑₍ŷᵢ ∈ S₎ log P_θ(vᵢ | x, ŷᵢ, ẑᵢ)

ℒ_θ(x, S) is the loss for input x and candidate set S under verifier parameters θ. The notation |S| is the number of candidates. The fraction 1 / |S| averages their contributions, and the centered dot multiplies it by the sum denoted by ∑. For candidate ŷᵢ, i is the candidate index, ẑᵢ its execution result and vᵢ its training label. The term log P_θ is the logarithm of the verifier's probability for the observed label given the listed fields. The minus sign turns a low probability for that label into a larger loss.

Averaging per question matters because deduplication can leave different numbers of programs for different questions. A question that elicits a varied set of candidates would otherwise contribute more terms to the objective than a question with repeated samples. The authors also describe a memory constraint from batching programs for the same example together. Their sampling setups can draw up to 100 programs per input. They randomly select a smaller subset for training, with a new selection at the start of each epoch so the verifier can encounter different candidates over the course of training.

Experiments and results

Four benchmarks with different kinds of answers

Spider asks for SQL queries that answer natural-language questions about databases. The paper describes it as having 7k parallel training examples, where a training question has a corresponding query. This supervision also makes it possible to compare learning to verify with direct training for query generation. At evaluation, a query is judged by its result under execution. The benchmark can therefore credit a generated query that obtains the expected answer even when its text differs from the reference. Spider.

WikiTableQuestions, abbreviated WikiTQ, asks questions about source tables. The authors approach these as SQL generation problems using preprocessed tables and previously annotated SQL. The dataset was originally weakly supervised for program generation. About 80% of its examples have SQL annotations from the work the authors build on, giving LEVER access to reference programs for part of the data. A system evaluated on this benchmark can also produce answers directly. The paper flags that distinction when comparing with earlier work because those systems and LEVER are judged on answers while taking different routes to them. Compositional Semantic Parsing on Semi-Structured Tables.

GSM8k contains grade-school math word problems. LEVER has the generator express a solution in Python and uses the program's computed answer for evaluation. The dataset does not supply reference Python code, so the verifier learns from whether the programs it samples produce the correct answers. The paper also compares with approaches that produce natural-language solutions. The common point of comparison is the answer to the word problem, even though a Python execution and a written solution expose different intermediate evidence. Training Verifiers to Solve Math Word Problems.

MBPP asks for small Python programs from verbal descriptions. An exercise comes with 3 test cases. The first test is included in the generation prompt to help elicit the appropriate function signature, and all the tests are used for evaluating correctness. This matters when interpreting the experiment. The generator is given information about how the function is expected to be called, and the reported accuracy concerns passing the complete set of tests supplied for the exercise. Program Synthesis with Large Language Models.

These tasks place different demands on the executor and evaluator. Spider and WikiTQ run SQL against data. GSM8k runs a program that should calculate a particular answer. MBPP checks a callable program on concrete inputs. The shared reporting measure is execution accuracy, the percentage of evaluated examples where the selected program gives the expected result or passes all the tests. It measures the behavior of the final selection, so a correct program that remains unselected does not earn credit.

What the baselines isolate

The principal generator is Codex, accessed as code-davinci-002. The additional experiments use InCoder6B for left-to-right generation and CodeGen16B-multi. InCoder and CodeGen are evaluated on Spider and GSM8k, with T5-base used for their reported development-set comparison. The main Codex experiments use T5-base on Spider, T5-large on WikiTQ and MBPP, and RoBERTa-large on GSM8k. The authors choose those verifier variants using the development sets.

Greedy decoding returns code by repeatedly taking the highest-probability next token. Comparing LEVER with greedy decoding captures the combined effect of drawing a candidate pool and choosing from it with execution and a verifier. A second baseline, maximum likelihood, samples programs and ranks them using generation log-probability. This comparison brings the evaluation closer to isolating the choice rule because the baseline also searches among sampled alternatives.

The paper considers both the ordinary generation log-probability and its length-normalized form for likelihood-based ranking.

log P_G(ŷ | x) / |ŷ|

P_G(ŷ | x) is the generation probability for candidate ŷ given task input x. The operation log takes its logarithm. The bars in |ŷ| denote program length, and / divides the log-probability by that length. The authors use development results to choose the scoring form and report using normalization for GSM8k and MBPP. They suggest that Python program lengths vary more because the language offers more ways to express a solution.

The error-pruning plus maximum-likelihood baseline, abbreviated EP+ML, runs the candidates, excludes programs that fail and chooses the survivor with the best generation score. This is the authors' main comparison for execution-aware selection. It is already able to act on a failed run. Improvements over it show gains beyond the particular strategy of removing failures and trusting generation likelihood among survivors. The comparison alone does not isolate which of LEVER's additional signals contributes most.

A further baseline uses voting after error pruning. It keeps the candidates that ran and chooses the execution result supported by the most programs. This tests whether simple agreement is sufficient for a good answer. LEVER also groups by observed outcome, but its groups accumulate probability-based scores. Voting and LEVER can therefore prefer different outcomes from the same set of error-free candidates.

The authors use an oracle in their analyses to show how often the sample set contains a correct program. The oracle can consult correctness labels to make its choice, so it estimates the upper bound for reranking those samples. It helps interpret the selected system's execution accuracy. A failed selection is potentially recoverable if a correct program was sampled. A request with no correct candidate exposes a separate failure of generation or coverage.

How much selection improved

With code-davinci-002, LEVER's reported gain over greedy decoding ranges from 6.6% execution accuracy on Spider to 17.3% on WikiTQ. Against EP+ML, the authors report improvements across the four benchmarks ranging from 4.6% to 10.9%. These are comparisons of selection systems on the same task metrics. The larger gains against greedy reflect a comparison that includes the move to sampling as well as the use of execution and verification.

The paper also compares the combined Codex and LEVER system with the best previously reported task results it considers. The reported gains in execution accuracy range from 1.2% on WikiTQ to 2.0% on MBPP. On Spider, the preceding best result came from a fine-tuned T5-3B system with changes to attention that incorporate relationships. LEVER's Spider verifier uses T5-base, with Codex doing the generation. This is a comparison of complete systems, so its result cannot be attributed to the verifier's size alone. It shows that the generator and comparatively small verifier together can surpass the specialized system in the paper's benchmark comparison.

The additional generator experiments show that the choice of a strong generator is not the sole source of the gains. The authors report improvements over greedy decoding of up to 30.0% on Spider and 15.0% on GSM8k for InCoder and CodeGen. Those are maxima in the weaker-generator comparisons. The paper also reports gains over the previous best Spider results for these particular generators. The chart shows the improvements against each generator's own previously reported comparison, so the larger gain does not on its own establish a higher final accuracy.

Spider development-set execution-accuracy gains over previous results for each generator

LEVER improves both generators over their own earlier Spider results, with a larger reported gain for CodeGen.

Spider development-set execution-accuracy gains over previous results for each generatorInCoder with LEVER: 13.2InCoder with LEVER13.2CodeGen with LEVER (this paper): 20.6CodeGen with LEVER (this paper)20.6
The numbers
System or settingreported execution-accuracy gain %
InCoder with LEVER13.2
CodeGen with LEVER (this paper)20.6

WikiTQ has an additional evaluator comparison in the appendix. The authors follow prior work in adjusting the evaluator's handling of units and Boolean values, and report the official-evaluator comparison as well. LEVER still obtains the best result among the systems compared under that setup. This matters because in table question answering the evaluation procedure determines whether different representations count as the same answer. The appendix checks that the reported advantage also appears under the alternative evaluation used there.

The gains answer a question about the effectiveness of reranking given these generators, prompts and executors. They cover several definitions of a successful run and include comparisons with earlier systems trained specifically for their tasks. For comparisons where the paper presents standard deviations, it calculates them across three runs with different random seeds. The comparisons across generator families also involve differences in prompt length and sampling settings. They establish that LEVER can help under several configurations, while the controlled comparisons within a configuration say more about the contribution of its individual components.

What the ablations show

Removing the result from the verifier

The most direct ablation changes what the verifier can observe. It keeps the task input and program text and removes the execution result from the verifier's input. With Codex as the generator, the reported absolute drops in execution accuracy are 6.6% on WikiTQ and 5.6% on MBPP. Spider drops by 3.0%, and GSM8k drops by 1.2%. The result is valuable on each benchmark, with the size of its contribution varying across tasks.

The authors find more execution errors among WikiTQ and MBPP samples and connect that observation to the larger drops on those tasks. An execution error can offer a direct clue that is hard to infer reliably from the code alone. But these drops measure the value of access to the execution field as a whole, including error indications and successful results. The paper's comparison with EP+ML supplies a second piece of evidence. LEVER generally does better even against a procedure that already uses errors to eliminate candidates.

The experiments with InCoder and CodeGen show a similar dependence on execution information. Removing it often causes larger drops with these generators, whose initial few-shot performance is weaker in the studied settings. The magnitude changes with the combination of benchmark and generator. That variation matters because the verifier works on a distribution of candidates. Different generators can produce different kinds of problems for it to recognize, even on the same requests.

Grouping by outcomes helps unevenly

The comparison with and without execution aggregation asks whether candidates that agree should add their scores together. The paper finds that pooling is more helpful on the tasks with Python outputs. For the SQL tasks its benefit is marginal. This separates the value of seeing a program's result from the value of combining scores across programs. A verifier can use an observed answer to judge an individual candidate even on a task where pooling answers adds little.

The authors suggest that flexible Python implementations can produce the same valid outcome through a wider variety of program forms. For SQL, they note that many incorrect queries can collapse to a trivial outcome, such as an empty table or a zero. If a common wrong result collects support from many candidates, pooling can put it ahead of the correct response. This is the authors' proposed explanation of the domain difference. The comparison establishes the difference in benefit across their tasks and illustrates how agreement can amplify a systematic error.

How much training information is needed

The authors remove reference programs from verifier training to simulate learning from final results alone. Across the reported comparisons, the absolute loss in execution accuracy is at most 1.1%. The weakly supervised setting still uses executed candidates and compares their outcomes with reference answers. The small drop indicates that, given that supervision and those candidate pools, adding a known reference implementation provides limited extra benefit for the final ranking. The code of the sampled program still goes into the verifier in both conditions.

The paper next reduces the number of training inputs available to create verifier examples. With only 250 training examples, improvements over the base generator comparisons range from 1.7% to 10.0% across the reported datasets and generators. Each input can supply multiple distinct programs with different labels. So this experiment reduces the number of questions used for supervision, while retaining the opportunity to see multiple attempts at each question.

Sensitivity to the number of training questions varies. In the reduced-data analysis, with Codex generating candidates, the reported drop is 6.4% for WikiTQ and 3.2% for Spider. On Spider, the reported drops for InCoder and CodeGen are 6.9% and 5.3%, respectively. The authors interpret these patterns as evidence that additional training inputs can matter more when the task or generator makes the selection problem harder. The comparisons show dependence on both the task and the candidate source.

On Spider the authors also compare verifier training with training a T5 system to generate queries directly, using the same number of training examples. At 500 examples, the paper reports an advantage of approximately 7% in execution accuracy for a T5-base verifier used with InCoder or CodeGen over a directly fine-tuned T5-3B generator. The comparison concerns the complete pipelines. The verifier can build on a pre-existing source of candidate queries, while the directly tuned system must learn to propose queries from its training examples and prior initialization. The result shows which use of the available benchmark examples performed better under this particular comparison.

Spending samples during training or inference

The paper varies how many candidate programs are drawn per question. For the inference comparison, it holds training sampling fixed. Reducing the inference budget from 50 to 10 programs per question lowers execution accuracy by 1.8% on Spider and 5.2% on WikiTQ, the endpoints of the reported range. Fewer samples restrict the pool available to the reranker. They also affect oracle performance, since more questions can wind up without a candidate that yields the expected result.

For the training comparison, the authors hold inference sampling fixed and change the number of candidates drawn for learning. The performance gaps stay below 1% across the three datasets in that analysis. This comparison changes the number of attempts associated with a training input, while the earlier reduced-data analysis changes the number of distinct inputs. The two interventions answer different questions about how to spend data and computation. In the tested ranges, the authors find more benefit in a larger candidate pool at inference than in drawing extra attempts for each training question.

Where the two scores complement each other

The paper's calibration analysis sorts deduplicated candidates by score and measures how many of the retained candidates are correct as it excludes increasing fractions of the lower-ranked candidates. It examines the generator score, the verifier score and their product. It leaves out result aggregation so that each candidate can be assessed on its own score. The resulting diagnostic is about whether sorting by the score concentrates correct programs near the top.

The verifier generally does better at separating weak candidates when the cutoff is still in the lower percentiles. The authors associate this pattern with its ability to spot conspicuous mistakes using execution information. Near the top of the ranking, its ordering is less effective on three of the four benchmarks. The authors hypothesize that the remaining candidates often have similar code and results that look alike in type and range. Where those cues are similar, the generator's ordering generally proves more informative.

The combined score gives the best results in this analysis across all four benchmarks. On GSM8k, the paper notes that both individual scores struggle near the top, whereas their product does a better job of concentrating correct programs there. A candidate can therefore benefit from having support under both assessments even when neither assessment alone ranks the strongest alternatives especially well. This experiment is about the composition of the top-ranked sets, which is also the aspect of score quality relevant to choosing a candidate.

Where the verifier changes a choice and where it fails

The authors examine cases where LEVER replaces a highly rated generation with a correct program. Some improvements involve obvious execution failures. In the Spider case study, a candidate queries the wrong table and produces an error. The verifier assigns that candidate a low score. Other replacements involve available clues such as the type or range of an output even when the program ran. The authors also observe successful reranking when the competing outputs have the same type and range. They suggest that the program text may become particularly informative in such cases.

Failures expose a corresponding distinction. The most frequent reason for a failed reranking decision in the authors' analysis is that the candidate pool contains no correct program, especially with weaker generators. In the second most common case, the selected program is incorrect, yet its output matches the correct program’s output in both type and range, with both programs drawn from the same pool. In the WikiTQ case study, both SQL candidates return county names. A result field that looks appropriate for the question gives little assistance in deciding which county was requested.

Changing the verifier or the generator

The authors treat the verifier backbone as a development-set choice. Their selected architecture and size vary across tasks, which shows how the general scoring procedure accommodates more than one classifier design. Their attempt to use the code generator itself as a few-shot verifier performs worse than EP+ML. This comparison is with the specific self-verification setup tried in the paper. It supports the use of the separately trained verifier in these experiments.

The transfer experiments train a verifier on samples from one generator and apply it to another generator's programs on Spider and GSM8k. In most of the reported comparisons, the transferred verifier still improves on the baseline. The authors identify transfers from InCoder or CodeGen to Codex on GSM8k as exceptions. They also observe that transfer tends to work better when the generators produce similar proportions of positively labeled samples. Transfer between InCoder and CodeGen is generally more successful than transfer involving Codex. This makes reuse of a verifier a possible way to reduce new training-data collection, with the characteristics of the source and target candidate pools affecting its success.

Limitations

Limits identified by the authors

Execution requires an environment that can actually run the proposed program. A query needs a database. A function needs arguments and any other context required for the call. The authors point out that these may be missing in a prospective application. This is a different issue from being able to label training examples. A task can have historical examples with known answers and still lack the execution context needed for new requests.

The paper also notes that generated programs cannot always be assumed safe to run. LEVER's verification score is computed from an observed outcome, so the program must already have been executed before that score can inform ranking. The experiments establish the usefulness of execution evidence in the benchmark settings. They give no general guarantee about the safety of obtaining that evidence.

The authors discuss the choice to judge the selected output by execution accuracy. For question answering, the accuracy of the returned result closely matches the practical objective described in the paper. For general programming tasks such as MBPP, measures that examine multiple candidates can offer a different perspective. A candidate pool with useful code in it and a system that reliably identifies that code are valuable in different ways. Final-selection accuracy emphasizes the latter while incorporating the former through the sampling stage.

The authors also leave combinations with more advanced prompting and specialized architectures for future work. Their experiments study a relatively simple arrangement of prompting and verification. Some of the comparison systems use specialized architectures or different ways of obtaining an answer. The benchmark results establish the performance of the tested arrangements, and the possible benefit of further combinations remains open in the paper.

Limits visible in the evaluation

A positive label establishes agreement with an observed reference on the available executions. In a SQL task, two queries can return the same result on the supplied database even if they would diverge on other data. An incorrect restriction can have no observable effect in a database instance where the excluded cases never arise. For a Python function, passing the benchmark tests establishes behavior on those tests. The supervised labels inherit this scope, and result aggregation groups programs using the same kind of observable equivalence.

This matters differently depending on what the user needs. A person asking a question about a particular table often wants the answer for that table. Matching the expected answer can therefore be adequate for the use case. A person asking for reusable code may care about behavior on inputs beyond those examined by the verifier or evaluator. The case of MBPP illustrates why the function and its observed results are related deliverables with different possible requirements.

The training and inference setups also create a dependency on which programs a generator tends to write. The verifier learns from those programs, including the generator's recurring mistakes and the examples it gets right. A new generator or prompting setup can change the mix of program styles, errors and correct outputs. The transfer experiment demonstrates some portability on the two studied benchmarks, but the exceptions show why a learned scorer cannot be assumed to carry its gains to any candidate distribution.

Similarly, the use of a small verifier and a fixed generator reduces the amount of parameter training required for the generation component. The complete system still draws samples, executes them and scores the resulting inputs. The paper's sampling analysis demonstrates a performance cost when some of that work is reduced. The parameter-size comparison addresses the size of the trainable verifier, while operational cost also depends on sample budgets and execution. The reported results do not establish a general latency or cost advantage over every system in the benchmark comparisons.

The sample-pool ceiling is fundamental to the method as evaluated. The verifier reorders completed programs, and result pooling can only favor results the candidates already produced. The authors use the oracle to expose this constraint. When oracle performance leaves substantial room, candidate generation is itself limiting. When the oracle can succeed and LEVER does not, improvements could in principle come from selection. Observed accuracy alone does not tell those cases apart.

Finally, the analyses give evidence that execution can help distinguish candidates. They give much less evidence that a verification score can be read as a dependable absolute probability of correctness for arbitrary new programs. The score diagnostic measures how correctness concentrates as lower-ranked candidates are removed. The case study where both results are county names shows how plausible output properties can coexist with a wrong answer. The score supports a relative choice under the benchmark's task conditions, and the strength of that evidence depends on what execution reveals.

What came after

Later papers cite LEVER from several directions. Some study ways of checking or revising generated code. Others address the broader question of how a system should spend extra computation before delivering an answer. A citation establishes a connection to LEVER. Where the later work's stated subject supplies the evidence, the comparison below concerns that subject and the part of LEVER's problem it addresses.

Several works frame the next decision after observing code behavior as debugging. Teaching Large Language Models to Self-Debug puts the focus on diagnosing one's own proposed code, a task that can involve revising an attempt. LEVER studies whether evidence from an attempt can help a separate component select among completed proposals. CRITIC frames correction around tool-interactive criticism. Its stated problem connects observation to correction, while LEVER connects an execution observation to the ranking of a sampled program. Teaching Large Language Models to Self-Debug and CRITIC.

Debug like a Human emphasizes verifying runtime execution step by step. That focus concerns where in a run evidence of a problem becomes available. LEVER gives its verifier a representation of the observed outcome of a completed candidate. From Code to Correctness takes hierarchical debugging as its subject and likewise addresses how to organize diagnosis of generated programs. NExT asks how to teach reasoning about code execution itself, bringing the interpretation of program behavior into the learning problem. Debug like a Human and From Code to Correctness and NExT.

InterCode makes interactive coding with execution feedback the focus of standardization and benchmarking. Interaction changes what feedback is for. It can inform the next coding action as well as support a final judgment of a submitted candidate. CRUXEval benchmarks code reasoning, understanding and execution. L2CEval evaluates language-to-code generation capabilities. These subjects place scrutiny on the capacities that the verifier and generator bring to LEVER's pipeline and on the evaluation of the pipeline's output. InterCode and CRUXEval and L2CEval.

Verifier training remains an explicit topic in V-STaR, whose focus is verifiers for self-taught reasoners. ALGO addresses the synthesis of algorithmic programs with generated oracle verifiers. These titles point to different sources and uses of correctness evidence. LEVER obtains labels from benchmark outcomes during training and predicts correctness from the behavior of candidate programs at selection time. ALGO puts the generation of a verifier into the program-synthesis problem, while V-STaR asks about learning a verifier in the setting of self-taught reasoning. V-STaR and ALGO.

Search gives scoring a different role. The study of when tree search is useful for planning highlights the discriminator, the component that decides which possibilities deserve support. CodeTree studies agent-guided tree search specifically for code generation. LEVER shows the importance of scoring when the candidates are already available. Tree search raises the related question of how a choice among partial possibilities changes which completed candidates can become available at all. When Is Tree Search Useful for LLM Planning? and CodeTree.

Universal Self-Consistency addresses agreement in generation more generally. Agreement in LEVER has a concrete form because execution lets distinct programs support a matching result. From Decoding to Meta-Generation concerns inference-time algorithms, a setting in which producing several alternatives and deciding among them can be treated as an algorithm around the generator. The survey of test-time scaling asks how additional work at inference is used. LEVER's separate sampling-budget experiments supply a specific instance of that question, with more samples making a difference to what the reranker has available to choose from. Universal Self-Consistency and From Decoding to Meta-Generation and A Survey on Test-Time Scaling in Large Language Models.

Other citing papers concern settings where generated code or intermediate computation serves a larger task. SatLM studies declarative prompting aided by satisfiability. Chain-of-Table studies how tables evolve within the reasoning process for table understanding. PaD places programs in the service of distillation, with the goal of teaching smaller systems to reason. Each makes computational structure relevant to a different decision. LEVER's corresponding decision is which computed result should count as the answer to a request. SatLM and Chain-of-Table and PaD.

A Real-World WebAgent connects program synthesis to planning and long-context understanding in a web setting. MetaGPT concerns collaborative meta-programming with multiple agents, and Corex studies collaboration for complex reasoning. MathChat puts conversation among agents in the setting of difficult math problems. These works frame code or reasoning as part of a larger process with several actions or participants. LEVER's division of labor is narrower and fixed in advance, with one component generating candidates and another assessing them using observed behavior. A Real-World WebAgent and MetaGPT and Corex and MathChat.

The surveys on self-correction and automated correction ask when a system can identify and repair its own errors and how correction procedures differ. LEVER offers a case where such improvement can be examined through observable outputs, a learned check and a fixed candidate pool. Its failure analysis also offers a concrete distinction relevant to interpreting correction studies. A method may fail because it cannot recognize the right answer among plausible alternatives or because it never produced the right answer to begin with. When Can LLMs Actually Correct Their Own Mistakes? and Automatically Correcting Large Language Models.

The code generation survey situates work of this kind within the wider study of how code is produced. The survey on verification and validation connects the terminology to safety and trustworthiness, and the security and privacy survey addresses another setting in which executing generated code raises questions about what can be trusted. The survey of long chains of reasoning concerns an alternative place to examine how intermediate work supports a final answer. These are broader subjects than LEVER's benchmark measure of whether one selected program produces the expected result. A Survey on Large Language Models for Code Generation and A Survey of Safety and Trustworthiness through Verification and Validation and A Survey on Large Language Model Security and Privacy and Towards Reasoning Era.

Many-Shot In-Context Learning puts the supply of demonstrations in the prompt at the center of the investigation. That is a separate point of intervention from training a verifier on sampled programs. Assessing Creativity in Proposing Novel Solutions to Mathematical Problems concerns the novelty of mathematical solutions. LEVER's math evaluation treats solutions that produce the same checked answer as compatible evidence for that answer, leaving novelty outside the scoring objective. Both comparisons make clear how the purpose of an evaluation determines which distinctions between possible solutions are worth retaining. Many-Shot In-Context Learning and Assessing Creativity in Proposing Novel Solutions to Mathematical Problems.

 Fields, topics and concepts

Cite

Cite as Ansong Ni, Srini Iyer, Dragomir Radev, Ves Stoyanov, Wen-tau Yih, Sida I. Wang and Xi Victoria Lin. 2023. LEVER: Learning to Verify Language-to-Code Generation with Execution. arXiv:2302.08468.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2302.08468 · arXiv 2302.08468

@misc{ni2023lever,
  title = {{LEVER: Learning to Verify Language-to-Code Generation with Execution}},
  author = {Ansong Ni, Srini Iyer, Dragomir Radev, Ves Stoyanov, Wen-tau Yih, Sida I. Wang and Xi Victoria Lin},
  year = {2023},
  doi = {10.48550/arxiv.2302.08468},
  eprint = {2302.08468},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2302.08468}
}

References

69 references, from the paper's own bibliography.

  1. Agashe, R., Iyer, S., and Zettlemoyer, L. JuICe: A large scale distantly supervised dataset for open domain context-based code generation. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 5436–5446, Hong Kong, China, November 2019. Association for Computational Linguistics. . URL https://aclanthology.org/D19-1546. our card
  2. Artzi, Y. and Zettlemoyer, L. Weakly supervised learning of semantic parsers for mapping instructions to actions. Transactions of the Association for Computational Linguistics, 1:0 49–62, 2013. our card
  3. Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021. our card
  4. Berant, J., Chou, A., Frostig, R., and Liang, P. Semantic parsing on Freebase from question-answer pairs. In Empirical Methods in Natural Language Processing (EMNLP), 2013. our card
  5. Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. Advances in neural information processing systems, 33:0 1877–1901, 2020. our card
  6. Chen, B., Zhang, F., Nguyen, A., Zan, D., Lin, Z., Lou, J.-G., and Chen, W. Codet: Code generation with generated tests, 2022a. URL https://arxiv.org/abs/2207.10397. OpenAlex ↗ · Scholar ↗
  7. Chen, M., Tworek, J., Jun, H., Yuan, Q., Pinto, H. P. d. O., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021a. our card
  8. Chen, W., Ma, X., Wang, X., and Cohen, W. W. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. arXiv preprint arXiv:2211.12588, 2022b. OpenAlex ↗ · Scholar ↗
  9. Chen, X., Liu, C., and Song, D. Execution-guided neural program synthesis. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=H1gfOiAqYm. OpenAlex ↗ · Scholar ↗
  10. Chen, X., Song, D., and Tian, Y. Latent execution for neural program synthesis beyond domain-specific languages. In Ranzato, M., Beygelzimer, A., Dauphin, Y. N., Liang, P., and Vaughan, J. W. (eds.), Advances in Neural Information Processing Systems 34: Annual Conference on Neural Information Processing Systems 2021, NeurIPS 2021, December 6-14, 2021, virtual, pp. 22196–22208, 2021b. OpenAlex ↗ · Scholar ↗
  11. Cheng, J. and Lapata, M. Weakly-supervised neural semantic parsing with a generative ranker. In Proceedings of the 22nd Conference on Computational Natural Language Learning, pp. 356–367, 2018. OpenAlex ↗ · Scholar ↗
  12. Cheng, Z., Xie, T., Shi, P., Li, C., Nadkarni, R., Hu, Y., Xiong, C., Radev, D., Ostendorf, M., Zettlemoyer, L., et al. Binding language models in symbolic languages. arXiv preprint arXiv:2210.02875, 2022. our card
  13. Chowdhery, A., Narang, S., Devlin, J., Bosma, M., Mishra, G., Roberts, A., Barham, P., Chung, H. W., Sutton, C., Gehrmann, S., et al. Palm: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311, 2022. our card
  14. Cobbe, K., Kosaraju, V., Bavarian, M., Hilton, J., Nakano, R., Hesse, C., and Schulman, J. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021. our card
  15. Collins, M. and Koo, T. Discriminative reranking for natural language parsing. Computational Linguistics, 310 (1):0 25–70, 2005. our card
  16. Devlin, J., Chang, M., Lee, K., and Toutanova, K. BERT: pre-training of deep bidirectional transformers for language understanding. In Burstein, J., Doran, C., and Solorio, T. (eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, NAACL-HLT 2019, Minneapolis, MN, USA, June 2-7, 2019, Volume 1 (Long and Short Papers), pp. 4171–4186. Association for Computational Linguistics, 2019. . URL https://doi.org/10.18653/v1/n19-1423. our card
  17. Dong, L. and Lapata, M. Language to logical form with neural attention. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, ACL 2016, August 7-12, 2016, Berlin, Germany, Volume 1: Long Papers. The Association for Computer Linguistics, 2016. . URL https://doi.org/10.18653/v1/p16-1004. our card
  18. Fried, D., Aghajanyan, A., Lin, J., Wang, S., Wallace, E., Shi, F., Zhong, R., Yih, W.-t., Zettlemoyer, L., and Lewis, M. Incoder: A generative model for code infilling and synthesis. arXiv preprint arXiv:2204.05999, 2022. our card
  19. Gao, L., Madaan, A., Zhou, S., Alon, U., Liu, P., Yang, Y., Callan, J., and Neubig, G. Pal: Program-aided language models. arXiv preprint arXiv:2211.10435, 2022. OpenAlex ↗ · Scholar ↗
  20. Goldman, O., Latcinnik, V., Nave, E., Globerson, A., and Berant, J. Weakly supervised semantic parsing with abstract examples. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1809–1819, 2018. OpenAlex ↗ · Scholar ↗
  21. Gulwani, S. and Marron, M. Nlyze: interactive programming by natural language for spreadsheet data analysis and manipulation. In Dyreson, C. E., Li, F., and Özsu, M. T. (eds.), International Conference on Management of Data, SIGMOD 2014, Snowbird, UT, USA, June 22-27, 2014, pp. 803–814. ACM, 2014. . URL https://doi.org/10.1145/2588555.2612177. OpenAlex ↗ · Scholar ↗
  22. Guu, K., Pasupat, P., Liu, E. Z., and Liang, P. From language to programs: Bridging reinforcement learning and maximum marginal likelihood. In Association for Computational Linguistics (ACL), 2017. our card
  23. He, P., Liu, X., Gao, J., and Chen, W. Deberta: Decoding-enhanced bert with disentangled attention, 2020. URL https://arxiv.org/abs/2006.03654. our card
  24. Jiang, Z., Mao, Y., He, P., Neubig, G., and Chen, W. Omnitab: Pretraining with natural and synthetic data for few-shot table-based question answering. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 932–942, 2022. OpenAlex ↗ · Scholar ↗
  25. Kadavath, S., Conerly, T., Askell, A., Henighan, T., Drain, D., Perez, E., Schiefer, N., Hatfield-Dodds, Z., DasSarma, N., Tran-Johnson, E., Johnston, S., El-Showk, S., Jones, A., Elhage, N., Hume, T., Chen, A., Bai, Y., Bowman, S., Fort, S., Ganguli, D., Hernandez, D., Jacobson, J., Kernion, J., Kravec, S., Lovitt, L., Ndousse, K., Olsson, C., Ringer, S., Amodei, D., Brown, T., Clark, J., Joseph, N., Mann, B., McCandlish, S., Olah, C., and Kaplan, J. Language models (mostly) know what they know, 2022. URL https://arxiv.org/abs/2207.05221. our card
  26. Lai, Y., Li, C., Wang, Y., Zhang, T., Zhong, R., Zettlemoyer, L., Yih, S. W.-t., Fried, D., Wang, S., and Yu, T. Ds-1000: A natural and reliable benchmark for data science code generation. arXiv preprint arXiv:2211.11501, 2022. OpenAlex ↗ · Scholar ↗
  27. Lee, A., Auli, M., and Ranzato, M. Discriminative reranking for neural machine translation. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 7250–7264, 2021. OpenAlex ↗ · Scholar ↗
  28. Li, Y., Choi, D., Chung, J., Kushman, N., Schrittwieser, J., Leblond, R., Eccles, T., Keeling, J., Gimeno, F., Lago, A. D., et al. Competition-level code generation with alphacode. arXiv preprint arXiv:2203.07814, 2022a. our card
  29. Li, Y., Lin, Z., Zhang, S., Fu, Q., Chen, B., Lou, J.-G., and Chen, W. On the advance of making language models better reasoners. arXiv preprint arXiv:2206.02336, 2022b. OpenAlex ↗ · Scholar ↗
  30. Lin, X. V., Wang, C., Pang, D., Vu, K., Zettlemoyer, L., and Ernst, M. D. Program synthesis from natural language using recurrent neural networks. Technical Report UW-CSE-17-03-01, University of Washington Department of Computer Science and Engineering, Seattle, WA, USA, March 2017. OpenAlex ↗ · Scholar ↗
  31. Lin, X. V., Wang, C., Zettlemoyer, L., and Ernst, M. D. Nl2bash: A corpus and semantic parser for natural language interface to the linux operating system. In Proceedings of the Eleventh International Conference on Language Resources and Evaluation LREC 2018, Miyazaki (Japan), 7-12 May, 2018., 2018. our card
  32. Liu, Q., Chen, B., Guo, J., Ziyadi, M., Lin, Z., Chen, W., and Lou, J.-G. Tapex: Table pre-training via learning a neural sql executor. In International Conference on Learning Representations, 2021. our card
  33. Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. Roberta: A robustly optimized BERT pretraining approach. CoRR, abs/1907.11692, 2019. URL http://arxiv.org/abs/1907.11692. our card
  34. Ni, A., Inala, J. P., Wang, C., Polozov, O., Meek, C., Radev, D., and Gao, J. Learning from self-sampled correct and partially-correct programs. arXiv preprint arXiv:2205.14318, 2022. OpenAlex ↗ · Scholar ↗
  35. Nijkamp, E., Pang, B., Hayashi, H., Tu, L., Wang, H., Zhou, Y., Savarese, S., and Xiong, C. A conversational paradigm for program synthesis. arXiv preprint arXiv:2203.13474, 2022. OpenAlex ↗ · Scholar ↗
  36. Olabiyi, O., Salimov, A., Khazane, A., and Mueller, E. T. Multi-turn dialogue response generation in an adversarial learning framework. CoRR, abs/1805.11752, 2018. URL http://arxiv.org/abs/1805.11752. OpenAlex ↗ · Scholar ↗
  37. OpenAI. Chatgpt: Optimizing language models for dialogue, November 2022. URL https://openai.com/blog/chatgpt/. OpenAlex ↗ · Scholar ↗
  38. Pasupat, P. and Liang, P. Compositional semantic parsing on semi-structured tables. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 1470–1480, Beijing, China, July 2015. Association for Computational Linguistics. . URL https://aclanthology.org/P15-1142. our card
  39. Qi, J., Tang, J., He, Z., Wan, X., Zhou, C., Wang, X., Zhang, Q., and Lin, Z. Rasat: Integrating relational structures into pretrained seq2seq model for text-to-sql. arXiv preprint arXiv:2205.06983, 2022. OpenAlex ↗ · Scholar ↗
  40. Rabinovich, M., Stern, M., and Klein, D. Abstract syntax networks for code generation and semantic parsing. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1139–1149, Vancouver, Canada, July 2017. Association for Computational Linguistics. . URL https://aclanthology.org/P17-1105. our card
  41. Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21:0 140:1–140:67, 2020. URL http://jmlr.org/papers/v21/20-074.html. our card
  42. Rajkumar, N., Li, R., and Bahdanau, D. Evaluating the text-to-sql capabilities of large language models. arXiv preprint arXiv:2204.00498, 2022. our card
  43. Scholak, T., Schucher, N., and Bahdanau, D. Picard: Parsing incrementally for constrained auto-regressive decoding from language models. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 9895–9901, 2021. OpenAlex ↗ · Scholar ↗
  44. Seligman, E., Schubert, T., and Kumar, M. V. A. K. Formal Verification: An Essential Toolkit for Modern VLSI Design. Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 2015. ISBN 9780128008157. OpenAlex ↗ · Scholar ↗
  45. Shen, J., Yin, Y., Li, L., Shang, L., Jiang, X., Zhang, M., and Liu, Q. Generate & rank: A multi-task framework for math word problems. In Findings of the Association for Computational Linguistics: EMNLP 2021, pp. 2269–2279, Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. . URL https://aclanthology.org/2021.findings-emnlp.195. OpenAlex ↗ · Scholar ↗
  46. Shen, L., Sarkar, A., and Och, F. J. Discriminative reranking for machine translation. In Proceedings of the Human Language Technology Conference of the North American Chapter of the Association for Computational Linguistics: HLT-NAACL 2004, pp. 177–184, 2004. OpenAlex ↗ · Scholar ↗
  47. Shi, F., Fried, D., Ghazvininejad, M., Zettlemoyer, L., and Wang, S. I. Natural language to code translation with execution. arXiv preprint arXiv:2204.11454, 2022. our card
  48. Shi, T., Zhao, C., Boyd-Graber, J., Daumé III, H., and Lee, L. On the potential of lexico-logical alignments for semantic parsing to SQL queries. In Findings of the Association for Computational Linguistics: EMNLP 2020, pp. 1849–1864, Online, November 2020. Association for Computational Linguistics. . URL https://aclanthology.org/2020.findings-emnlp.167. OpenAlex ↗ · Scholar ↗
  49. Shridhar, M., Thomason, J., Gordon, D., Bisk, Y., Han, W., Mottaghi, R., Zettlemoyer, L., and Fox, D. Alfred: A benchmark for interpreting grounded instructions for everyday tasks. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 10737–10746. IEEE, 2020. our card
  50. Templeton, M. and Burger, J. D. Problems in natural-language interface to DSMS with examples from EUFID. In 1st Applied Natural Language Processing Conference, ANLP 1983, Miramar-Sheraton Hotel, Santa Monica, California, USA, February 1-3, 1983, pp. 3–16. ACL, 1983. . URL https://aclanthology.org/A83-1002/. OpenAlex ↗ · Scholar ↗
  51. Tufano, M., Drain, D., Svyatkovskiy, A., Deng, S. K., and Sundaresan, N. Unit test case generation with transformers. CoRR, abs/2009.05617, 2020. URL https://arxiv.org/abs/2009.05617. OpenAlex ↗ · Scholar ↗
  52. Wan, X., Cao, Z., Wei, F., Li, S., and Zhou, M. Multi-document summarization via discriminative summary reranking. CoRR, abs/1507.02062, 2015. URL http://arxiv.org/abs/1507.02062. OpenAlex ↗ · Scholar ↗
  53. Wang, B., Shin, R., Liu, X., Polozov, O., and Richardson, M. Rat-sql: Relation-aware schema encoding and linking for text-to-sql parsers. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 7567–7578, 2020. our card
  54. Wang, C., Tatwawadi, K., Brockschmidt, M., Huang, P.-S., Mao, Y., Polozov, O., and Singh, R. Robust text-to-sql generation with execution-guided decoding, 2018. URL https://arxiv.org/abs/1807.03100. OpenAlex ↗ · Scholar ↗
  55. Wang, X., Wei, J., Schuurmans, D., Le, Q., Chi, E., and Zhou, D. Self-consistency improves chain of thought reasoning in language models. arXiv preprint arXiv:2203.11171, 2022. our card
  56. Wang, Y., Wang, W., Joty, S., and Hoi, S. C. CodeT5: Identifier-aware unified pre-trained encoder-decoder models for code understanding and generation. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp. 8696–8708, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. . URL https://aclanthology.org/2021.emnlp-main.685. OpenAlex ↗ · Scholar ↗
  57. Wei, J., Bosma, M., Zhao, V., Guu, K., Yu, A. W., Lester, B., Du, N., Dai, A. M., and Le, Q. V. Finetuned language models are zero-shot learners. In International Conference on Learning Representations, 2021. our card
  58. Welleck, S., Lu, X., West, P., Brahman, F., Shen, T., Khashabi, D., and Choi, Y. Generating sequences by learning to self-correct. arXiv preprint arXiv:2211.00053, 2022. our card
  59. Woods, W. A. Progress in natural language understanding: an application to lunar geology. In American Federation of Information Processing Societies: 1973 National Computer Conference, 4-8 June 1973, New York, NY, USA, volume 42 of AFIPS Conference Proceedings, pp. 441–450. AFIPS Press/ACM, 1973. . URL https://doi.org/10.1145/1499586.1499695. OpenAlex ↗ · Scholar ↗
  60. Xiao, C., Dymetman, M., and Gardent, C. Sequence-based structured prediction for semantic parsing. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1341–1350, Berlin, Germany, August 2016. Association for Computational Linguistics. . URL https://aclanthology.org/P16-1127. OpenAlex ↗ · Scholar ↗
  61. Xie, T., Wu, C. H., Shi, P., Zhong, R., Scholak, T., Yasunaga, M., Wu, C.-S., Zhong, M., Yin, P., Wang, S. I., et al. Unifiedskg: Unifying and multi-tasking structured knowledge grounding with text-to-text language models. arXiv preprint arXiv:2201.05966, 2022. our card
  62. Yin, P. and Neubig, G. Reranking for neural semantic parsing. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 4553–4559, Florence, Italy, July 2019. Association for Computational Linguistics. . URL https://aclanthology.org/P19-1447. OpenAlex ↗ · Scholar ↗
  63. Yu, T., Zhang, R., Yang, K., Yasunaga, M., Wang, D., Li, Z., Ma, J., Li, I., Yao, Q., Roman, S., Zhang, Z., and Radev, D. Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-SQL task. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 3911–3921, Brussels, Belgium, October-November 2018. Association for Computational Linguistics. . URL https://aclanthology.org/D18-1425. our card
  64. Zelle, J. M. and Mooney, R. J. Learning to parse database queries using inductive logic programming. In Clancey, W. J. and Weld, D. S. (eds.), Proceedings of the Thirteenth National Conference on Artificial Intelligence and Eighth Innovative Applications of Artificial Intelligence Conference, AAAI 96, IAAI 96, Portland, Oregon, USA, August 4-8, 1996, Volume 2, pp. 1050–1055. AAAI Press / The MIT Press, 1996. URL http://www.aaai.org/Library/AAAI/1996/aaai96-156.php. our card
  65. Zettlemoyer, L. S. and Collins, M. Learning to map sentences to logical form: Structured classification with probabilistic categorial grammars. In UAI '05, Proceedings of the 21st Conference in Uncertainty in Artificial Intelligence, Edinburgh, Scotland, July 26-29, 2005, pp. 658–666. AUAI Press, 2005. URL https://dslpitt.org/uai/displayArticleDetails.jsp?mmnu=1\&smnu=2\&article\_id=1209\&proceeding\_id=21. our card
  66. Zhang, T., Yu, T., Hashimoto, T. B., Lewis, M., Yih, W.-t., Fried, D., and Wang, S. I. Coder reviewer reranking for code generation. arXiv preprint arXiv:2211.16490, 2022. our card
  67. Zhong, V., Xiong, C., and Socher, R. Seq2sql: Generating structured queries from natural language using reinforcement learning. CoRR, abs/1709.00103, 2017. URL http://arxiv.org/abs/1709.00103. our card
  68. Zhou, F., Hu, M., Dong, H., Cheng, Z., Han, S., and Zhang, D. Tacube: Pre-computing data cubes for answering numerical-reasoning questions over tabular data. arXiv preprint arXiv:2205.12682, 2022. OpenAlex ↗ · Scholar ↗
  69. Zhou, S., Yin, P., and Neubig, G. Hierarchical control of situated agents through natural language. arXiv preprint arXiv:2109.08214, 2021. OpenAlex ↗ · Scholar ↗

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/ni-2023-lever-learning-verify-language-code/