用字符串相似性破解二进制逻辑谜题,避免复杂计算导致的错误
Teaching LLMs String Matching, Backtracking, and Error Recovery to Deduce Bases and Truth Tables for the Combinatorially Exploding Bit Manipulation Puzzles
- 将逻辑门推理转为基底选择,通过最小位翻转找核心变换
- 结合回溯搜索与自纠错机制,失败后自动修正路径
- 把二进制串拆成单比特令牌,训练模型自主试错与修正
本文介绍针对NVIDIA Nemotron模型推理挑战中二进制操作谜题的算法创新。目标是发现隐藏的逻辑规则,将输入二进制串映射到输出。大语言模型在此任务上表现差,传统方法依赖复杂布尔逻辑与算术模拟,易产生幻觉。且位操作组合(移位、旋转、逻辑门)存在严重组合爆炸。为此,提出新方法:完全舍弃算术逻辑,改用字符串相似性、结构化搜索和自主错误恢复。核心贡献:1. 基底与真值表建模:将逻辑门推导转化为基底选择问题,利用最小位翻转识别基础变换“基底”,无需复杂算术即可推导真值表;2. 回溯DFS与错误恢复:形式化搜索流程,测试候选基底,检测示例间逻辑冲突,失败时回溯以实现鲁棒错误恢复;3. 位级分词与交互式推理微调:强制分词器将二进制串拆分为单比特令牌,使用动态掩码模拟外部反馈,训练模型原生具备假设、自检与回溯能力。在二进制操作谜题上验证,准确率超96%,为该类别最高表现。该方法获竞赛最佳微调方法、最佳数据/合成数据方法奖,并列第七名。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。