用可微分方法精准生成逻辑电路,支持硬件高效部署。
Differentiable Logic Synthesis: Spectral Coefficient Selection via Sinkhorn-Constrained Composition
- 通过谱系数选择与Sinkhorn约束路由,实现可梯度优化的逻辑合成。
- 在2~4变量逻辑中均达100%准确率,三值量化后仍保持性能。
- 适合需要硬件友好的神经符号逻辑设计的研究者与工程师。
基于梯度下降学习精确布尔逻辑仍具挑战:神经网络通常收敛到模糊近似,量化后性能下降。本文提出分层谱组合(Hierarchical Spectral Composition),从固定布尔傅里叶基中选取谱系数,通过带列符号调制的Sinkhorn约束路由进行组合。该方法借鉴曼达拓约束超连接(mHC)思想,将路由矩阵投影至Birkhoff多面体以保持身份映射并稳定大规模训练,并引入列符号调制实现布尔取反——这是标准双随机路由所缺失的能力。我们在四个逐步复杂的阶段验证该方法:(1) 对n=2(16种2变量操作,4维基),梯度下降达到100%准确率,无路由漂移且三值掩码量化后损失为零;(2) 对n=3(10种三变量操作),梯度下降达76%准确率,但穷举搜索3^8=6561种配置表明所有操作均有最优三值掩码(100%准确率,39%稀疏性);(3) 对n=4(10种四变量操作,16维基),结合精确Walsh-Hadamard系数、三值量化与带平行退火的MCMC精炼,实现所有操作100%准确率。该进展证明:(a) 所测试函数均存在三值多项式阈值表示;(b) 随维度增长,纯梯度下降已不足,需更复杂方法。所有操作在GPU上实现单周期组合逻辑推理,速度达10,959 MOps/s,验证其在硬件高效神经符号逻辑合成中的可行性。
原文摘要 · Abstract (English)
Learning precise Boolean logic via gradient descent remains challenging: neural networks typically converge to "fuzzy" approximations that degrade under quantization. We introduce Hierarchical Spectral Composition, a differentiable architecture that selects spectral coefficients from a frozen Boolean Fourier basis and composes them via Sinkhorn-constrained routing with column-sign modulation. Our approach draws on recent insights from Manifold-Constrained Hyper-Connections (mHC), which demonstrated that projecting routing matrices onto the Birkhoff polytope preserves identity mappings and stabilizes large-scale training. We adapt this framework to logic synthesis, adding column-sign modulation to enable Boolean negation -- a capability absent in standard doubly stochastic routing. We validate our approach across four phases of increasing complexity: (1) For n=2 (16 Boolean operations over 4-dim basis), gradient descent achieves 100% accuracy with zero routing drift and zero-loss quantization to ternary masks. (2) For n=3 (10 three-variable operations), gradient descent achieves 76% accuracy, but exhaustive enumeration over 3^8 = 6561 configurations proves that optimal ternary masks exist for all operations (100% accuracy, 39% sparsity). (3) For n=4 (10 four-variable operations over 16-dim basis), spectral synthesis -- combining exact Walsh-Hadamard coefficients, ternary quantization, and MCMC refinement with parallel tempering -- achieves 100% accuracy on all operations. This progression establishes (a) that ternary polynomial threshold representations exist for all tested functions, and (b) that finding them requires methods beyond pure gradient descent as dimensionality grows. All operations enable single-cycle combinational logic inference at 10,959 MOps/s on GPU, demonstrating viability for hardware-efficient neuro-symbolic logic synthesis.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。