Code-to-Harness: Distilling Black-Box Optimizers from Self-Play

Yi Wu, Zheng Ren, Zhiyu Hu, Haochen Wang, Daryl Chang +6 more
9/8/2026
cs.LG

No confident code implementation found for this paper.

Abstract

Can an agent learn a numerical search strategy through executable practice and then transfer that strategy as text? We study low-budget black-box optimization, where unaided language models remain well below strong classical optimizers.

Show full abstract

During development, an agent repeatedly writes and evaluates optimizer programs. It then distills the resulting program and practice record once into a 197-word primary Harness A, which is frozen before evaluation. Harness A reduces Gemini Flash regret by 48\% in an independent $N=30$ study ($p<.001$), enters the GP-BO performance range on the practice family, and lowers mean regret on all three held-out BBOB landscapes. The same text improves every tested Gemini executor and transfers to Claude Sonnet, reducing regret by 43\% and 49\% ($p\leq.005$). An independent end-to-end replication produces Harness B, a different program and text at the same performance tier. The same framework also attains the lowest regret on a sealed YouTube reward-tuning production benchmark. Executable practice is thus a viable way to discover a search policy, and language a portable medium for deploying it.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wu2026codetoharness,
  title  = {Code-to-Harness: Distilling Black-Box Optimizers from Self-Play},
  author = {Yi Wu and Zheng Ren and Zhiyu Hu and Haochen Wang and Daryl Chang and Li Wei and Ting Wang and Zhen Li and Pooja Gupta and Nitin Jindal and Lukasz Heldt},
  year   = {2026},
  eprint = {2609.09468},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.09468v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.09468.svg)](https://codeofpaper.com/paper/2609.09468)

Discussion