[论文解读] Transformer-based Machine Learning for Fast SAT Solvers and Logic Synthesis
本论文提出TRSAT,一种基于Transformer的单次模型,用于在逻辑综合中通过自注意力和交叉注意力机制在变量与文字的二分图上求解MaxSAT问题。该模型通过并行消息传递和迭代文字满足机制,在通用SAT问题上实现97%的完成率,在DES电路问题上实现88.7%的完成率,显著优于启发式方法和机器学习基线模型。
CNF-based SAT and MaxSAT solvers are central to logic synthesis and verification systems. The increasing popularity of these constraint problems in electronic design automation encourages studies on different SAT problems and their properties for further computational efficiency. There has been both theoretical and practical success of modern Conflict-driven clause learning SAT solvers, which allows solving very large industrial instances in a relatively short amount of time. Recently, machine learning approaches provide a new dimension to solving this challenging problem. Neural symbolic models could serve as generic solvers that can be specialized for specific domains based on data without any changes to the structure of the model. In this work, we propose a one-shot model derived from the Transformer architecture to solve the MaxSAT problem, which is the optimization version of SAT where the goal is to satisfy the maximum number of clauses. Our model has a scale-free structure which could process varying size of instances. We use meta-path and self-attention mechanism to capture interactions among homogeneous nodes. We adopt cross-attention mechanisms on the bipartite graph to capture interactions among heterogeneous nodes. We further apply an iterative algorithm to our model to satisfy additional clauses, enabling a solution approaching that of an exact-SAT problem. The attention mechanisms leverage the parallelism for speedup. Our evaluation indicates improved speedup compared to heuristic approaches and improved completion rate compared to machine learning approaches.
研究动机与目标
- 开发一种可扩展的、无需迭代微调的单次机器学习模型,用于在逻辑综合中求解MaxSAT问题。
- 通过将注意力机制与图神经网络结合,改进启发式SAT求解器和现有基于机器学习的方法,以提升准确率与速度。
- 通过基于元路径的自注意力与交叉注意力机制,在二分图上实现对任意大小CNF公式的并行、无尺度处理。
- 通过集成迭代优化步骤,提升解的质量,使其更接近精确SAT解。
- 在真实世界逻辑综合基准上评估模型性能,并与最先进的启发式与深度学习求解器进行比较。
提出的方法
- 将Transformer架构适配于变量与文字的二分图,将它们视为异构节点。
- 使用元路径定义同质节点之间的自注意力机制——例如,共享同一文字的变量,或共享同一变量的文字。
- 在异质节点(变量与文字)之间应用交叉注意力机制,以在二分图结构上传播信息。
- 采用带有学习查询、键和值的消息传递机制,以并行方式更新节点表示。
- 引入迭代优化步骤,重新评估并满足额外文字,以提升解的质量。
- 在合成与真实世界的CNF实例上端到端训练模型,以高完成率近似MaxSAT解。
实验结果
研究问题
- RQ1基于Transformer的模型是否能在保持单次推理与任意实例规模可扩展性的前提下,实现MaxSAT问题的高完成率?
- RQ2在二分图上基于注意力的消息传递机制与顺序处理或RNN-based方法相比,在求解SAT问题时表现如何?
- RQ3自注意力与交叉注意力机制在多大程度上能够捕捉CNF公式中复杂的变量-文字交互关系?
- RQ4模型预测的部分解在多大程度上能通过减少启发式求解器中的回溯次数,加速精确SAT求解器?
- RQ5该模型在具有不同变量与文字分布的多样化逻辑综合基准上的性能如何扩展?
主要发现
- TRSAT模型在通用SAT问题上实现97%的完成率,在DES电路实例上实现88.7%的完成率,优于所有启发式与机器学习基线模型。
- 与PDP和WalkSAT相比,该模型在所有测试图结构上均表现出显著加速,平均推理速度持续更高。
- 与RL-based模型如RLSAT不同,TRSAT在泛化到更大图规模时仍保持稳定训练性能,无振荡现象。
- 并行消息传递机制减少了所需迭代次数,由于初始特征传播更充分,从而实现更快收敛。
- 该模型在多样化CNF实例(包括随机3-SAT与复杂逻辑电路)上保持高性能,无需架构调整。
- 迭代优化的集成显著提升了解的质量,使模型更接近精确SAT解,同时保持高速性能。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。