教LLM字符串匹配、回溯与错误恢复:为组合爆炸的位操作谜题推导基和真值表
Teaching LLMs String Matching, Backtracking, and Error Recovery to Deduce Bases and Truth Tables for the Combinatorially Exploding Bit Manipulation Puzzles
AI总结:
提出一种新方法,通过字符串相似性、结构化搜索和自主错误恢复,避免复杂布尔逻辑,解决位操作谜题中的组合爆炸问题,实现96%以上验证准确率。
摘要:
本文介绍了我们在NVIDIA Nemotron模型推理挑战赛中的算法创新,重点关注位操作谜题。在该任务中,目标是发现将输入二进制字符串转换为输出的隐藏逻辑规则,然后将其应用于未见过的输入。大型语言模型(LLM)在此任务中表现不佳;传统方法迫使他们模拟复杂的布尔逻辑和算术,导致幻觉。此外,位运算(移位、旋转和逻辑门的组合)的搜索空间遭受严重的组合爆炸。为了克服这种计算上的棘手性,我们提出了一种新颖的方法,完全放弃算术逻辑,转而采用字符串相似性、结构化搜索和自主错误恢复。我们的核心贡献是:1. 基和真值表公式化:我们将逻辑门推导重新构建为基选择任务,利用字符串相似性(最小位翻转)来隔离原始变换(“基”),并在无需复杂算术的情况下推导真值表。2. 回溯DFS和错误恢复:我们形式化了一个搜索过程,测试候选基,检测跨示例的逻辑冲突,并在失败时回溯以进行稳健的错误恢复。3. 位分词和交互推理SFT:我们强制分词器将二进制字符串编码为单个位令牌。我们使用动态掩码模拟外部预言反馈,训练模型原生地假设、自我评估和回溯。在位操作谜题上的评估显示,我们的方法达到了超过96%的验证准确率。这代表了该类别中的最高性能,推动我们在比赛中获得总排名第7。
英文摘要:
This paper presents our algorithmic innovations for the NVIDIA Nemotron Model Reasoning Challenge, focusing on Bit Manipulation Puzzles. In this task, the objective is to discover a hidden logical rule transforming input binary strings to outputs, then apply it to unseen inputs. Large Language Models (LLMs) notoriously struggle here; traditional methods force them to simulate complex boolean logic and arithmetic, leading to hallucinations. Furthermore, the search space of bitwise operations (combinations of shifts, rotations, and logic gates) suffers from a severe combinatorial explosion. To overcome this computational intractability, we present a novel approach that abandons arithmetic logic entirely in favor of string similarity, structured search, and autonomous error recovery. Our core contributions are: 1. Bases and Truth Table Formulation: We reframe logic-gate deduction into a base-selection task, leveraging string similarity (minimal bit flips) to isolate primitive transformations ("bases") and deduce truth tables without complex arithmetic. 2. Backtracking DFS and Error Recovery: We formalize a search process that tests candidate bases, detects logical collisions across examples, and backtracks upon failure to perform robust error recovery. 3. Bit Tokenization and Interactive Reasoning SFT: We force the tokenizer to encode binary strings as individual single-bit tokens. We use dynamic masking to simulate external oracle feedback, training the model to hypothesize, self-evaluate, and backtrack natively. Evaluated on bit manipulation puzzles, our approach achieved over 96% validation accuracy. This represents the highest performance in this category. These algorithmic and training innovations ultimately earned our team the Best Fine-tuning Method and Best Data/Synthetic Data Method awards in the contest, alongside a 7th Place overall finish on leaderboard.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。