[논문 리뷰] Are LLMs Reliable Code Reviewers? Systematic Overcorrection in Requirement Conformance Judgement
연구는 LLM이 자연어 요구사항에 맞는 올바른 코드 판단에서 자주 오판하며, 더 상세한 프롬프트가 오판을 증가시키는 경향이 있음을 보여준다; 이 편향을 완화하기 위한 수정-가이드 검증 접근법을 제안한다.
Large language models (LLMs) have become essential tools in software development, widely used for requirements engineering, code generation and review tasks. Software engineers often rely on LLMs to verify if code implementation satisfy task requirements, thereby ensuring code robustness and accuracy. However, it remains unclear whether LLMs can reliably determine code against the given task descriptions, which is usually in a form of natural language specifications. In this paper, we uncover a systematic failure of LLMs in matching code to natural language requirements. Specifically, with widely adopted benchmarks and unified prompts design, we demonstrate that LLMs frequently misclassify correct code implementation as non-compliant or defective. Surprisingly, we find that more detailed prompt design, particularly with those requiring explanations and proposed corrections, leads to higher misjudgment rates, highlighting critical reliability issues for LLM-based code assistants. We further analyze the mechanisms driving these failures and evaluate the reliability of rationale-required judgments. Building on these findings, we propose a Fix-guided Verification Filter that treats the model proposed fix as executable counterfactual evidence, and validates the original and revised implementations using benchmark tests and spec-constrained augmented tests. Our results expose previously under-explored limitations in LLM-based code review capabilities, and provide practical guidance for integrating LLM-based reviewers with safeguards in automated review and development pipelines.
연구 동기 및 목표
- 테스트 케이스 없이 LLM이 코드가 자연어 요구사항에 부합하는지 얼마나 신뢰성 있게 판단할 수 있는지 평가한다.
- 다양한 프롬프트 전략이 거짓 거절(false rejection)과 거짓 승인(false acceptance)에 어떤 영향을 주는지 평가한다.
- 오판 및 합리화의 기저 메커니즘을 특성화한다.
- LLM 기반 코드 리뷰 파이프라인에서 판단 편향을 줄이기 위한 완화책을 탐색한다.
제안 방법
- HumanEval, MBPP, QuixBugs에서 표준 구현과 버그 있는 구현이 쌍으로 구성된 하나의 벤치마크를 수집(1400건 이상).
- 세 가지 프롬프트 모드(Direct, Direct+Explain, Full)에서 다섯 개의 LLM(세 개의 비공개 소스, 두 개의 오픈 소스)을 평가한다.
- 혼동 행렬 지표(FPR, FNR)를 사용하여 각 모델-프롬프트-벤치마크 조합의 거짓 양성/거짓 음성을 정량화한다.
- 외부 평가자를 사용한 자기 일관성 및 결함 인지 평가를 통해 합리화의 신뢰도를 분석한다.
- 실행 가능한 반사실과 명세 제약 보강 테스트를 활용한 Fix-가이드 검증 필터를 제안하고 평가한다.

실험 결과
연구 질문
- RQ1RQ1: 테스트 없이 LLM이 코드가 명세에 부합하는지 얼마나 신뢰성 있게 판단할 수 있는가?
- RQ2RQ2: 프롬프트 설계가 합치 판단에 어떤 영향을 미치며 거짓 음성과 거짓 양성 간의 트레이드오프에 어떤 영향을 미치는가?
- RQ3RQ3: 거짓 수용/거짓 거부를 이끄는 메커니즘은 무엇이며 버그 유형의 강조와 합리화 패턴을 포함하는가?
- RQ4RQ4: 합리화가 필요한 프롬프트에서 산출된 설명의 신뢰성은 어떠하며 판단과 일치하는가?
- RQ5RQ5: 완화 전략이 LLM 기반 리뷰의 판단 편향을 효과적으로 줄일 수 있는가?
주요 결과
| 모델 | 프롬프트 | HumanEval FPR (%) | HumanEval FNR (%) | MBPP FPR (%) | MBPP FNR (%) | QuixBugs FPR (%) | QuixBugs FNR (%) |
|---|---|---|---|---|---|---|---|
| GPT-4o | Direct | 2.44 | 26.2 | 3.70 | 35.9 | 10.9 | 35.0 |
| GPT-4o | Direct+Explain | 0.00 | 58.5 | 0.00 | 74.1 | 5.00 | 45.0 |
| GPT-4o | Full | 0.00 | 73.2 | 0.20 | 87.9 | 5.00 | 60.0 |
| Gemini-2.0-flash | Direct | 8.54 | 25.6 | 10.3 | 34.7 | 22.5 | 25.0 |
| Gemini-2.0-flash | Direct+Explain | 7.32 | 23.2 | 11.1 | 35.1 | 22.5 | 22.5 |
| Gemini-2.0-flash | Full | 5.49 | 34.1 | 7.69 | 39.6 | 17.5 | 32.5 |
| Claude-4-5-sonnet | Direct | 2.44 | 26.2 | 6.57 | 58.5 | 5.00 | 40.0 |
| Claude-4-5-sonnet | Direct+Explain | 1.21 | 34.1 | 6.94 | 55.7 | 2.50 | 40.0 |
| Claude-4-5-sonnet | Full | 0.61 | 36.0 | 5.44 | 62.3 | 2.50 | 50.0 |
| Llama-3.1-8B | Direct | 17.1 | 57.3 | 3.56 | 74.7 | 27.5 | 52.5 |
| Llama-3.1-8B | Direct+Explain | 6.71 | 86.6 | 0.38 | 91.9 | 5.00 | 87.5 |
| Llama-3.1-8B | Full | 6.10 | 84.1 | 1.88 | 88.2 | 30.0 | 77.5 |
| Mistral-Small-3.1-24B | Direct | 6.71 | 35.9 | 5.25 | 60.9 | 40.0 | 40.0 |
| Mistral-Small-3.1-24B | Direct+Explain | 14.6 | 31.1 | 7.13 | 47.8 | 40.0 | 32.5 |
| Mistral-Small-3.1-24B | Full | 4.88 | 48.8 | 4.31 | 74.3 | 27.5 | 62.5 |
- LLMs는 정확한 구현을 판단할 때 상당한 거짓 음성(false negatives)을 보이는 경향이 있어 과다 수정 편향을 시사한다.
- 프롬프트의 복잡성이 자주 거짓 음성에서 거짓 양성으로 오류를 옮겨 상충 관계를 드러내며 보편적 개선이 아님을 시사한다.
- GPT-4o는 더 자세한 프롬프트에서 가장 강한 과도 수정(over-correction)을 보이며, 일부 모델은 버그 코드에 대해 높은 비안전 승인(unsafe acceptance)을 보인다.
- 합리화 출력은 판단과 일치하지 않는 경우가 있어 자기 일관성 문제를 나타내며 결함 인지적 추론을 신뢰하기 어렵다.
- 오픈 소스 모델은 일반적으로 더 높은 오류율과 프롬프트에 대한 민감도가 일부 비공개 모델보다 더 강하게 나타난다.

더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.