让神经网络执行程序时每一步都可解释,还能模拟低精度计算。
A Symbolic Neural CPU for Quantization-Simulated Writeback and Interpretable Program Execution

- 用符号化神经CPU设计可追踪每步操作和寄存器变化的执行机制
- 8位量化下仍能准确保持1000条指令的执行路径
- 适合需要透明、可控、低精度运行的可解释程序执行场景
神经网络可学习算法级输入输出映射,但仅靠正确结果不足以令人信任,因其内部状态转移过程通常不可见。为此,我们提出一种基于轨迹监督的符号化神经中央处理器,其采用分治式执行架构,结合循环控制、可微算术逻辑单元组的操作路由、目标掩码写回、完整轨迹监督及匹配的定点重播机制。模型在每一步均可揭示所选操作、源与目标寄存器、寄存器轨迹、内存信号及写回语义。在主流16路基准测试中,非量化执行器完全复现参考执行路径;8位量化模拟执行器在千条指令程序中仍保持符号操作路径一致。当与匹配定点重播对比时,残差数值漂移消失,表明其源于连续与低精度参考语义不匹配,而非执行错误。我们对比了循环、Transformer、时间卷积、时间图与状态空间控制器,消融实验显示操作门监督对可检视执行路径至关重要。隐藏操作码的内存压力任务暴露了延迟状态使用与时间绑定的现存局限。此外,我们扩展接口支持值记忆(ValueMemory)、混合自适应漏电积分-放电控制器、候选约束符号控制(通过行为克隆与强化学习训练)以及基于RV32I的整数语义桥接。这些成果共同构建了一个可验证轨迹、可解释、低精度且可控的神经执行框架。
原文摘要 · Abstract (English)
Neural networks can learn algorithmic input-output mappings, but trusting a learned executor requires more than a correct final answer because the state transitions that produce it are usually hidden. To make those transitions visible, we introduce a trace-supervised symbolic neural CPU, a factorized learned execution architecture that combines recurrent control, an explicit operation router over a fixed differentiable arithmetic-logic unit bank, destination-masked register writeback, complete trajectory supervision and matched fixed-point replay. The model exposes the selected operation, source and destination registers, register trajectory, memory signals and writeback semantics at every step. On the principal 16-wide benchmark, the non-quantized executor reproduces reference execution exactly, while the eight-bit quantization-simulated executor preserves the symbolic operation path through programs of 1,000 instructions. When the same execution is evaluated against a matched fixed-point replay, the residual numerical drift disappears, showing that it comes from a mismatch between continuous and low-precision reference semantics rather than from execution failure. We compare recurrent, Transformer, temporal-convolution, temporal graph-inspired and state-space controllers, and the ablations show that operation-gate supervision is necessary for an inspectable execution path. Hidden-opcode memory-pressure tasks expose the remaining limits in delayed state use and temporal binding. We also extend the interface with ValueMemory, hybrid adaptive leaky integrate-and-fire controllers, candidate-constrained symbolic control trained through behaviour cloning and actor-critic reinforcement learning, and an RV32I base-integer semantic bridge. Together, these results establish a trace-verifiable framework for interpretable, low-precision and controllable neural execution.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。