arXiv:2604.05716cs.AI2026-04

测试大模型能否在删除知识后重新发明经典算法,发现它具备一定创新能力。

Can Large Language Models Reinvent Foundational Algorithms?

  • 通过移除特定算法知识,让大模型在控制环境中重新发明它们。
  • 最强模型无提示时可重发明50%算法,有提示时成功率升至90%。
  • 生成式验证器能防止思维崩溃,对成功重发明至关重要。

大语言模型在科学发现方面展现出巨大潜力,但其是否具备基础性创新的能力仍不明确。本文聚焦于基础创新的前提:大模型能否重新发明计算机科学中的基础算法?我们提出「去学习与重发明」流程,使用基于GRPO的在线策略去学习方法,从大模型的预训练知识中移除如Dijkstra或Euclid算法等特定基础算法,再在受控环境中测试其能否重新发明这些算法。在10个目标算法、3个开源大模型和3种提示层级下,实验表明:(1)最强模型Qwen3-4B-Thinking-2507在无提示时成功重发明50%算法,提示等级1下达70%,等级2下达90%;(2)少量高层提示可提升成功率,但逐步提示对复杂算法仍无效;(3)测试时强化学习使模型在提示等级2下成功重发明Strassen算法。通过对输出轨迹和消融实验分析发现,重发明阶段的生成式验证器对维持推理能力至关重要,有助于避免「思维坍塌」现象。这些发现揭示了大模型创新思维的潜力与当前局限。

原文摘要 · Abstract (English)

LLMs have shown strong potential to advance scientific discovery. Whether they possess the capacity for foundational innovation, however, remains an open question. In this work, we focus on a prerequisite for foundational innovation: can LLMs reinvent foundational algorithms in computer science? Our \textit{Unlearn-and-Reinvent} pipeline applies LLM unlearning to remove a specific foundational algorithm, such as Dijkstra's or Euclid's algorithm, from an LLM's pretrained knowledge, and then tests whether the model can reinvent it in a controlled environment. To enable effective unlearning, we adopt a GRPO-based, on-policy unlearning method. Across 10 target algorithms, 3 strong open-weight models, and 3 hint levels, our experiments demonstrate that (1) the strongest model Qwen3-4B-Thinking-2507 successfully reinvents 50% of the algorithms with no hint, 70% at hint level 1, and 90% at hint level 2; (2) a few high-level hints can enhance the reinvention success rate, but even step-by-step hints fail for those complicated algorithms; and (3) test-time reinforcement learning enables successful reinvention for the Strassen algorithm at hint level 2. Through analyses of output trajectories and ablation studies, we find that generative verifier in the reinvention phase plays a critical role in sustaining models' reasoning strength, helping to avoid the ``thought collapse'' phenomenon. These findings offer insights into both the potential and current limits of LLMs' innovative thinking.

大模型创新算法重发明思维验证强化学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。