arXiv:2611.20195v1 cs.SE

명세의 명시성이 LLM 생성 코드의 실패 양상에 미치는 영향

How Specification Explicitness Shapes Failure in LLM-Generated Code

Elmira Onagh, Maleknaz Nayebi

제출 2026-11-15

저자 비고

arXiv Comments

Accepted to ICSE 2026

한국어 초록

LLM이 요구사항을 코드로 변환할 때, 불충분하게 명세된 모든 제약은 모델이 생성 과정에서 결정해야 하는 동작이 된다. 본 연구는 명세가 언제 구조를 넘어 생성되는 동작을 통제하기 시작하는지를 검증한다. 통제 실험에서 72명의 참가자가 세 가지 수준의 명세 명시성 아래에서 LLM을 사용해 Python 과제를 구현하고 수정하였다. 결과는 경량 구조와 명시적 동작 의무 사이에 뚜렷한 단절이 있음을 보여 준다. 경량 구조는 숨겨진 테스트 실패를 8.7%만 줄였다. 참가자에게 제약, 불변식, 부정 요구사항, 예외적 경우, 동률 처리 규칙, 예외 처리를 명시하도록 요구하자 실패가 47.2% 감소했고 서로 다른 실패 양상의 수는 20.5% 감소했다. 가장 큰 감소는 암묵적 의무와 관련된 실패 양상에서 나타났다. 불변식 위반은 66.1%, 지원되지 않는 가정은 59.5% 감소했다. 요구사항이 변경된 뒤에는 명시적 동작 의무를 담은 명세가 더 많은 제출물에서 회귀를 일으켰지만, 영향을 받은 각 제출물이 잃은 기존의 올바른 동작은 더 적었다. 명시적 명세는 개발자가 생성된 코드를 판단하는 방식도 바꾸었다. 명시적 의무가 없을 때 참가자들은 생성 코드의 정확성을 약 23퍼센트포인트 과대평가했다. 명시적 의무가 있을 때는 더 나은 코드를 만들어 냈으나 판단은 더 신중했다. 따라서 교훈은 "더 나은 명세가 도움이 된다"보다 더 분명하다. 경량 구조는 거의 도움이 되지 않았던 반면, 명시적 동작 의무는 실패를 거의 절반으로 줄이고, 회귀를 더 얕게 만들며, 보정(calibration)을 개선했다.

원문 초록

When LLMs turn requirements into code, every underspecified constraint becomes behavior that the model must decide during generation. We test when specifications move beyond structure and begin to control generated behavior. In a controlled experiment, 72 participants implemented and revised Python tasks with an LLM under three levels of specification explicitness. The results show a clear break between lightweight structure and explicit behavioral obligations. Lightweight structure reduced hidden-test failures by only 8.7%. Requiring participants to specify constraints, invariants, negative requirements, edge cases, tie-breaking rules, and exception handling cut failures by 47.2% and reduced the number of distinct failure modes by 20.5%. The largest drops were in failure modes tied to implicit obligations. Invariant violations fell by 66.1%, and unsupported assumptions fell by 59.5%. After a requirement change, specifications with explicit behavioral obligations produced regressions in more submissions, but each affected submission lost less previously correct behavior. Explicit specifications also changed how developers judged generated code. Without explicit obligations, participants overestimated generated-code correctness by about 23 percentage points. With explicit obligations, they produced better code but judged it more cautiously. Thus, the lesson is sharper than "better specifications help." Lightweight structure barely helped, while explicit behavioral obligations nearly halved failures, made regressions shallower, and improved calibration.

제출 이력

확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.

  1. arXiv:2611.20195v1

함께 살펴볼 논문

공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.

공통 태그로 연결된 공개 논문이 아직 없습니다.

토론

이 논문과 연결된 포럼 글이 아직 없습니다.