Summary
This paper looks at "self-debugging", i.e. when the LLM is tasked with debugging and repairing programs it has generated that do not pass the tests.
This is a problem that has received much attention in the literature in the last year or two; the key novelty here is:
- Looking at the impact of having the tests themselves be synthesized by the model (which risks leading it astray during debugging, if the tests are spurious)
- The second set of experiments, when the authors evaluate what they call "in-execution" repair. In the usual setting (which the authors call "post-execution"), the LLM is simply told which test failed (and, possibly, the manner in which it failed); in the "in-execution" setting, the LLM is instead given access to what is basically a partial execution trace of the program, that it can then compare to the specification.
Strengths
I think this paper makes for a nice addition to the literature.
To be honest I don't think there's much in the "post-execution" part that hasn't been done already, but it's nice to see such experiments repeated with newer models and a newer dataset (LiveCodeBench), and there are some details about the experimental setup (e.g. the test synthesis) that probably haven't been done exactly the same way before.
More importantly, the discussion thereof sets up nicely for the "in-execution" experiments, and I think the authors do a great job of analysis the relative strengths and weaknesses of each approach.
Generally speaking, I am also relatively confident that the experiments were done correctly (which is more than can be said for most work in this area), and I am happy with both the model selection (one open and one API-based) as well as the datasets (I'm glad to see that the authors not only bring on board a more modern benchmark in LiveCodeBench but that they also use the less satured "Plus" versions of HumanEval and MBPP).
As a result, I think people in the code generation community would benefit from seeing this paper presented at ICLR; my concerns are relatively minor and could certainly be addressed in time for camera-ready.
Weaknesses
- If I understand the method correctly, the way you are generating the trace for the "in-execution" method requires treating dynamic loops as one atomic unit. For example, if you have for loop which an unknown number of iterations, you can't statically insert a breakpoint halfway through it, so instead you have to break before or after. I would like to see this limitation discussed in the paper; do you, for example, have any thoughts on whether this hurts performance in practice, e.g. if the bug often lays within such a loop?
- I think the paper could do a better job emphasising that a +X.Y% increase in pass rate after 3 iterations of self-debugging does NOT mean that's what you want to do in practice, since it is compared against a baseline with 1 sample - not a baseline with the same budget as you used up during self-debugging. I apreciate that the point of this paper is not to chase numbers on these benchmarks but to actually do some cool science so we can understand *why* these things work the way they do, but again I am worried that a less familiar reader might mistakenly see this as a raw performance increase (neglecting the cost).
- Finally, I would encourage you to double check your references list. I was confused why you kept citing "Chen (2023)" when I was pretty sure that self-debugging paper was at ICLR 2024; indeed your references list it as ICLR 2023, which I do not believe to be correct. Probably worth double checking that you don't have any more mistakes in there.
Questions
- 44-46: "Reflexion [...] evaluates [the code] with hidden oracle tests." - what do you mean by this, exactly? Is there another way of evaluating *the final* code than with the hidden oracle tests? Do you mean that they evaluate the code *before repair* with the hidden oracle tests (rather than with model-generated ones)?
- 109-110: "Self-debugging does not require increasing the sample budget, making it a cost-effective solution..." Self-debugging does of course require drawing more samples from the model, and there has been prior work showing that this is not always made up for by an increase in pass rates. I know you know this, but someone who doesn't might jump to the wrong conclusions here.
- In table 1, how can the accuracy drop from 2 to 3 iterations if you are using *oracle* tests to determine correctness? Wouldn't the passing programs from 3 iterations be a superset of those passing after 2 iterations in this case?
- 310-312: It would be nice if you could give some examples of these program contracts (maybe in an appendix). I'd be curious to see the details; in particular it's not clear whether you're just checking for type mismatches or if you have more fine-grained constraints.
- 407-409: I understand you probably don't want to open this can of worms in the paper but for the record my takeaway from your results is that data contamination is likely the reason why things look so different on LiveCodeBench in comparison to HumanEval and MBPP (which most models have at this point most certainly been trained on, knowingly or not).