BatCoder: 역번역을 통한 자기 지도형 양방향 코드-문서 학습
BatCoder: Self-Supervised Bidirectional Code-Documentation Learning via Back-Translation
코드 관련 작업에 대한 LLM(대규모 언어 모델) 훈련은 일반적으로 고품질의 코드-문서 쌍에 의존하지만, 이러한 쌍을 확보하고 관리하는 데 비용이 많이 들고, 특히 틈새 프로그래밍 언어의 경우 흔하지 않습니다. 본 논문에서는 코드 생성과 문서 생성을 동시에 최적화하도록 설계된 자기 지도형 강화 학습 프레임워크인 BatCoder를 소개합니다. BatCoder는 역번역 전략을 사용합니다. 먼저 코드를 기반으로 문서를 생성하고, 생성된 문서를 사용하여 원래 코드를 재구성합니다. 원래 코드와 재구성된 코드 간의 의미적 유사성은 암묵적인 보상으로 작용하며, 이를 통해 강화 학습은 모델이 문서로부터 코드를 생성하고, 반대로 코드를 통해 문서를 생성하는 성능을 모두 향상시킬 수 있습니다. 이러한 접근 방식을 통해 모델은 코드만 사용하여 훈련할 수 있으며, 이는 사용 가능한 훈련 예제를 크게 늘립니다. 70억 개의 파라미터를 가진 모델로 HumanEval 및 MBPP 데이터셋에서 BatCoder는 각각 83.5% 및 81.0%의 pass@1 성능을 달성했으며, 이는 강력한 오픈 소스 모델을 능가하는 결과입니다. 또한, 본 프레임워크는 훈련 코퍼스 크기와 모델 용량 모두에 대해 일관된 확장성을 보여줍니다.
Training LLMs for code-related tasks typically depends on high-quality code-documentation pairs, which are costly to curate and often scarce for niche programming languages. We introduce BatCoder, a self-supervised reinforcement learning framework designed to jointly optimize code generation and documentation production. BatCoder employs a back-translation strategy: a documentation is first generated from code, and then the generated documentation is used to reconstruct the original code. The semantic similarity between the original and reconstructed code serves as an implicit reward, enabling reinforcement learning to improve the model's performance both in generating code from documentation and vice versa. This approach allows models to be trained using only code, substantially increasing the available training examples. Evaluated on HumanEval and MBPP with a 7B model, BatCoder achieved 83.5% and 81.0% pass@1, outperforming strong open-source baselines. Moreover, the framework demonstrates consistent scaling with respect to both training corpus size and model capacity.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.