HardTests: LLM 코딩을 위한 고품질 테스트 케이스 합성
HardTests: Synthesizing High-Quality Test Cases for LLM Coding
May 30, 2025
저자: Zhongmou He, Yee Man Choi, Kexun Zhang, Jiabao Ji, Junting Zhou, Dejia Xu, Ivan Bercovich, Aidan Zhang, Lei Li
cs.AI
초록
검증기는 대형 언어 모델(LLM) 추론에서 중요한 역할을 하며, 강화 학습과 같은 사후 훈련 기법에 필수적입니다. 그러나 어려운 코딩 문제에 대해 신뢰할 수 있는 검증기를 얻는 것은 쉽지 않습니다. 왜냐하면 잘 위장된 잘못된 해결책은 신중하게 사람이 작성한 엣지 케이스에 의해서만 발견될 수 있는데, 이러한 엣지 케이스는 합성하기 어렵기 때문입니다. 이 문제를 해결하기 위해 우리는 LLM을 사용한 고품질 테스트 합성을 위한 파이프라인인 HARDTESTGEN을 제안합니다. 이 파이프라인을 통해 47,000개의 문제와 합성된 고품질 테스트를 포함한 포괄적인 경쟁 프로그래밍 데이터셋인 HARDTESTS를 구축했습니다. 기존 테스트와 비교했을 때, HARDTESTGEN 테스트는 LLM 생성 코드를 평가할 때 정밀도가 11.3%포인트, 재현율이 17.5%포인트 더 높은 것으로 나타났습니다. 더 어려운 문제의 경우, 정밀도 향상은 최대 40포인트까지 달할 수 있습니다. 또한 HARDTESTS는 다운스트림 코드 생성 성능을 측정했을 때 모델 훈련에 더 효과적인 것으로 입증되었습니다. 우리는 이 데이터셋과 합성 파이프라인을 https://leililab.github.io/HardTests/에서 오픈소스로 공개할 예정입니다.
English
Verifiers play a crucial role in large language model (LLM) reasoning, needed
by post-training techniques such as reinforcement learning. However, reliable
verifiers are hard to get for difficult coding problems, because a
well-disguised wrong solution may only be detected by carefully human-written
edge cases that are difficult to synthesize. To address this issue, we propose
HARDTESTGEN, a pipeline for high-quality test synthesis using LLMs. With this
pipeline, we curate a comprehensive competitive programming dataset HARDTESTS
with 47k problems and synthetic high-quality tests. Compared with existing
tests, HARDTESTGEN tests demonstrate precision that is 11.3 percentage points
higher and recall that is 17.5 percentage points higher when evaluating
LLM-generated code. For harder problems, the improvement in precision can be as
large as 40 points. HARDTESTS also proves to be more effective for model
training, measured by downstream code generation performance. We will
open-source our dataset and synthesis pipeline at
https://leililab.github.io/HardTests/.