Code as Explanations: NeurIPS paper makes LLMs explain behavior in executable code
steph_milani · x · 2026-12-03
LLM explanations are usually free-form text, one per input — but understanding a behavior requires observing it across scenarios, and a text explanation tied to one input can't be evaluated on arbitrary inputs.
A NeurIPS 2026 thread presents an alternative: have the model explain itself in code. The model writes an executable decision function (e.g., counting fruits), which is then run on many held-out inputs and compared against the model's actual outputs. In the illustrated example, the model-generated solve(arr) function misclassifies mangoes as non-fruit, predicting 2 where the truth is 1 — exposing a behavioral flaw. Executable "code as explanations" can be systematically evaluated instead of taken on faith.
More from Models
- OpenEmbed: open 2B multimodal embedding model beats Gemini Embedding 2 on retrieval — cihangxie · 2026-12-03
- User flags astra 6.2 as misaligned and lazy, prefers sol 6.2 for now — natanielruizg · 2026-12-03
- Baseten Research: Open Models Sabotage Hidden Surveillance Task 20-30%, GLM 5.4 Only 4% — Madisonkanna · 2026-12-03
- XBOW runs Amazon's new open-weight Ergo LLM on full web security assessments: same findings, half the cost of Opus 5 — moyix · 2026-12-03
- SubQ Savant 1.4 hits Vercel AI Gateway with a 4M-token context window, the largest yet — ryanallred · 2026-12-03
- Google launches Gemini 4 Live voice model with 0.39s latency, 3x faster than predecessor — Ars Technica AI · 2026-12-03