WHALE: A Simple Recipe for Joint Harness-Weight Optimization

Haechan Kim, Yoonho Lee, Gisang Lee, Chelsea Finn, Kangwook Lee

arXiv:2609.00196 · 2026-09-04 공개 · arXiv · PDF

mathematical-reasoning model-optimization meta-harness rejection-sampling searchqa fast-slow-training weight-harness alternating-learning

Abstract

Agent performance depends jointly on the model parameters and the executable harness code that manages context and control flow. Optimizing either component in isolation can leave the system bottlenecked by its frozen counterpart: weight updates can change which harness is effective, while harness updates can change which model capabilities are exposed. Existing joint-adaptation methods optimize weights and textual prompts but leave the broader harness fixed. We propose Weight-Harness Alternating LEarning (WHALE), a simple recipe that alternates two phases: updating the model under the current harness, then searching for a better harness under the updated model. We instantiate these two phases with online rejection-sampling fine-tuning and Meta-Harness, respectively. When to switch is a key design choice: to separate real improvements from noise without over-optimizing against a changing counterpart, WHALE uses either fixed phase durations or an adaptive patience rule over training signals. Using Qwen3.5-2B/4B agents across three domains (search question answering, mathematical reasoning, and chess puzzles), WHALE outperforms weight-only, harness-only, and Fast-Slow Training by 4.15-24.38 percentage points in best mean@8 accuracy. Either component can be the bottleneck: harness search matches peak weight-only accuracy with far fewer rollouts in SearchQA, but improves math accuracy only after a weight update. Small interleaved updates also outperform stagewise weight-then-harness optimization in accuracy and rollout cost. The code is available at https://github.com/krafton-ai/WHALE.

한국어 요약

한 줄 요약

WHALE은 모델 가중치와 실행 가능한 헤이븐 코드를 번갈아 최적화함으로써 에이전트 성능을 향상시키는 모듈식 프레임워크이다.

핵심 기여도

핵심 아이디어

기존 연구는 텍스트 프롬프트만 최적화하고, 헤이븐 코드는 고정한 상태로 모델과 헤이븐을 조인트로 학습하지만, 이는 헤이븐이 모델의 능력을 제한하거나 반대로 모델이 헤이븐의 효과를 무력화할 수 있다. WHALE은 이 문제를 해결하기 위해 가중치 업데이트와 헤이븐 검색을 번갈아 수행함으로써, 두 성분이 서로의 변화에 적응하도록 설계되었다. 이 접근법은 모델과 헤이븐이 서로의 변화에 따라 성능이 달라지는 상호작용을 고려한 것이다. 예를 들어, SearchQA에서는 헤이븐 검색만으로도 최대 가중치 업데이트 성능을 달성할 수 있지만, 수학 문제에서는 가중치 업데이트가 먼저 이루어져야 헤이븐 검색이 효과를 발휘한다.

기술적 접근법

주요 결과

의의 및 한계

WHALE은 모델과 헤이븐을 별도로 최적화하는 기존 접근법의 한계를 극복하고, 두 성분이 서로의 변화에 적응하도록 설계한 첫 번째 모듈식 프레임워크이다. 이는 에이전트 시스템의 전체적인 성능을 향상시키는 데 기여하며, 헤이븐 검색의 표현력이 텍스트 프롬프트에 제한된 기존 연구와 비교해 더 넓은 최적화 가능성을 제시한다. 그러나 WHALE은 특정 도메인에서 헤이븐 또는 가중치가 한쪽으로 치우쳐 병목이 되는 경우를 해결하지 못하며, 헤이븐 검색 알고리즘의 선택이 최종 성능에 큰 영향을 미친다는 점이 한계이다.

실용적 활용

WHALE은 검색 기반 질문 답변, 수학적 추론, 체스 퍼즐 등 다양한 도메인에서 실행 가능한 헤이븐 코드와 모델 가중치를 조합적으로 최적화할 수 있어, 복잡한 에이전트 시스템 설계에 활용 가능하다. 특히, 헤이븐이 모델의 능력을 제한하는 경우에 유용하며, 효율적인 rollout 예산 관리가 필요한 실시간 시스템 개발에도 적용 가능하다.