Generating diverse solutions to the Boolean Satisfiability Problem (SAT) is a hard computational problem with practical applications for testing and functional verification of software and hardware designs. We explore the way to generate such solutions using Denoising Diffusion coupled with a Graph Neural Network to implement the denoising function. We find that the obtained accuracy is similar to the currently best purely neural method and the produced SAT solutions are highly diverse, even if the system is trained with non-random solutions from a standard solver.
translated by 谷歌翻译
We present the Neural Satisfiability Network (NSNet), a general neural framework that models satisfiability problems as probabilistic inference and meanwhile exhibits proper explainability. Inspired by the Belief Propagation (BP), NSNet uses a novel graph neural network (GNN) to parameterize BP in the latent space, where its hidden representations maintain the same probabilistic interpretation as BP. NSNet can be flexibly configured to solve both SAT and #SAT problems by applying different learning objectives. For SAT, instead of directly predicting a satisfying assignment, NSNet performs marginal inference among all satisfying solutions, which we empirically find is more feasible for neural networks to learn. With the estimated marginals, a satisfying assignment can be efficiently generated by rounding and executing a stochastic local search. For #SAT, NSNet performs approximate model counting by learning the Bethe approximation of the partition function. Our evaluations show that NSNet achieves competitive results in terms of inference accuracy and time efficiency on multiple SAT and #SAT datasets.
translated by 谷歌翻译
我们提出了一个通用图形神经网络体系结构,可以作为任何约束满意度问题(CSP)作为末端2端搜索启发式训练。我们的体系结构可以通过政策梯度下降进行无监督的培训,以纯粹的数据驱动方式为任何CSP生成问题的特定启发式方法。该方法基于CSP的新型图表,既是通用又紧凑的,并且使我们能够使用一个GNN处理所有可能的CSP实例,而不管有限的Arity,关系或域大小。与以前的基于RL的方法不同,我们在全局搜索动作空间上运行,并允许我们的GNN在随机搜索的每个步骤中修改任何数量的变量。这使我们的方法能够正确利用GNN的固有并行性。我们进行了彻底的经验评估,从随机数据(包括图形着色,Maxcut,3-SAT和Max-K-Sat)中学习启发式和重要的CSP。我们的方法表现优于先验的神经组合优化的方法。它可以在测试实例上与常规搜索启发式竞争,甚至可以改善几个数量级,结构上比训练中看到的数量级更为复杂。
translated by 谷歌翻译
命题模型计数或#SAT是计算布尔公式满足分配数量的问题。来自不同应用领域的许多问题,包括许多离散的概率推理问题,可以将#SAT求解器解决的模型计数问题转化为模型计数问题。但是,确切的#sat求解器通常无法扩展到工业规模实例。在本文中,我们提出了Neuro#,这是一种学习分支启发式方法,以提高特定问题家族中的实例的精确#sat求解器的性能。我们通过实验表明,我们的方法减少了类似分布的持有实例的步骤,并将其推广到同一问题家族的更大实例。它能够在具有截然不同的结构的许多不同问题家族上实现这些结果。除了步骤计数的改进外,Neuro#还可以在某些问题家族的较大实例上在较大的实例上实现壁式锁定速度的订单,尽管开头查询了模型。
translated by 谷歌翻译
命题满足(SAT)是一个NP完整的问题,它影响了许多研究领域,例如计划,验证和安全性。主流现代SAT求解器基于冲突驱动的子句学习(CDCL)算法。最近的工作旨在通过图神经网络(GNNS)产生的预测来改善其可变分支启发式方法来增强CDCL SAT求解器。但是,到目前为止,这种方法要么尚未使解决方案更有效,要么需要在线访问大量的GPU资源。为了使GNN改进实用,本文提出了一种称为Neurocomb的方法,该方法以两个见解为基础:(1)重要变量和条款的预测可以与动态分支相结合,为更有效的混合分支策略,(2)它是(2)它是足以在SAT解决开始之前仅查询神经模型一次。 NeuroComb被实施,以增强称为Minisat的经典CDCL求解器,以及最新的CDCL求解器,称为葡萄糖。结果,它允许Minisat在最近的SATCOMP-2021竞争问题设置中解决11%和葡萄糖更多的问题,仅计算资源需求只有一个GPU。因此,NeuroComb是通过机器学习改善SAT解决的有效和实用方法。
translated by 谷歌翻译
随着深度学习技术的快速发展,各种最近的工作试图应用图形神经网络(GNN)来解决诸如布尔满足(SAT)之类的NP硬问题,这表明了桥接机器学习与象征性差距的潜力。然而,GNN预测的解决方案的质量并未在文献中进行很好地研究。在本文中,我们研究了GNNS在学习中解决最大可满足性(MaxSAT)问题的能力,从理论和实践角度来看。我们构建了两种GNN模型来学习来自基准的MaxSAT实例的解决方案,并显示GNN通过实验评估解决MaxSAT问题的有吸引力。我们还基于算法对准理论,我们还提出了GNNS可以在一定程度上学会解决MaxSAT问题的影响的理论解释。
translated by 谷歌翻译
在本文中,我们提出了Satformer,这是一种基于新颖的变压器解决方案,可用于布尔(SAT)解决方案。与现有的基于学习的SAT求解器不同,在问题实例级别上学习的satformer学习了难以满足的问题实例的最低限度不满意的内核(MUC),这些实例为这些问题的因果关系提供了丰富的信息。具体而言,我们应用图形神经网络(GNN)以在连接正常格式(CNF)中获得条款的嵌入。层次变压器体系结构应用于子句嵌入以捕获条款之间的关系,并且当组成UNSAT核心的条款在一起时,自我发项权的权重被学到了很高,并将其设置为低。通过这样做,Satformer有效地了解了SAT预测条款之间的相关性。实验结果表明,Satformer比现有的基于端到端学习的SAT求解器更强大。
translated by 谷歌翻译
Generative models for learning combinatorial structures have transformative impacts in many applications. However, existing approaches fail to offer efficient and accurate learning results. Because of the highly intractable nature of the gradient estimation of the learning objective subject to combinatorial constraints. Existing gradient estimation methods would easily run into exponential time/memory space, or incur huge estimation errors due to improper approximation. We develop NEural Lovasz Sampler (Nelson), a neural network based on Lov\'asz Local Lemma (LLL). We show it guarantees to generate samples satisfying combinatorial constraints from the distribution of the constrained Markov Random Fields model (MRF) under certain conditions. We further present a fully differentiable contrastive-divergence-based learning framework on constrained MRF (Nelson-CD). Meanwhile, Nelson-CD being fully differentiable allows us to take advantage of the parallel computing power of GPUs, resulting in great efficiency. Experimental results on three real-world combinatorial problems reveal that Nelson learns to generate 100% valid structures. In comparison, baselines either time out on large-size data sets or fail to generate valid structures, whereas Nelson scales much better with problem size. In addition, Nelson outperforms baselines in various learning metrics, such as log-likelihood and MAP scores.
translated by 谷歌翻译
Alphazero及其扩展Muzero是使用机器学习技术在国际象棋,GO和其他一些游戏的超人级别上玩的计算机程序。他们仅通过从自我玩法中学习的强化学习才能达到这种水平,除了游戏规则外,没有任何领域知识。适应alphazero中用于解决搜索问题的方法和技术是一个自然的想法。给定搜索问题,如何代表alphazero启发的求解器?这个搜索问题的“解决规则”是什么?我们用简单的求解器和自我还原来描述可能的表示形式,并为满足性问题提供了此类表示的例子。我们还描述了适合搜索问题的蒙特卡洛树搜索版本。
translated by 谷歌翻译
有限的线性时间逻辑($ \ mathsf {ltl} _f $)是一种强大的正式表示,用于建模时间序列。我们解决了学习Compact $ \ Mathsf {ltl} _f $ formul的问题,从标记的系统行为的痕迹。我们提出了一部小说神经网络运营商,并评估结果架构,神经$ \ mathsf {ltl} _f $。我们的方法包括专用复发过滤器,旨在满足$ \ Mathsf {ltl} _f $ temporal运算符,以学习痕迹的高度准确的分类器。然后,它离散地激活并提取由学习权重表示的真相表。此实话表将转换为符号形式并作为学习公式返回。随机生成$ \ Mathsf {LTL} _F $公式显示神经$ \ MATHSF {LTL} _F $尺寸,比现有方法更大,即使在存在噪声时也保持高精度。
translated by 谷歌翻译
组合优化是运营研究和计算机科学领域的一个公认领域。直到最近,它的方法一直集中在孤立地解决问题实例,而忽略了它们通常源于实践中的相关数据分布。但是,近年来,人们对使用机器学习,尤其是图形神经网络(GNN)的兴趣激增,作为组合任务的关键构件,直接作为求解器或通过增强确切的求解器。GNN的电感偏差有效地编码了组合和关系输入,因为它们对排列和对输入稀疏性的意识的不变性。本文介绍了对这个新兴领域的最新主要进步的概念回顾,旨在优化和机器学习研究人员。
translated by 谷歌翻译
We present a way to create small yet difficult model counting instances. Our generator is highly parameterizable: the number of variables of the instances it produces, as well as their number of clauses and the number of literals in each clause, can all be set to any value. Our instances have been tested on state of the art model counters, against other difficult model counting instances, in the Model Counting Competition. The smallest unsolved instances of the competition, both in terms of number of variables and number of clauses, were ours. We also observe a peak of difficulty when fixing the number of variables and varying the number of clauses, in both random instances and instances built by our generator. Using these results, we predict the parameter values for which the hardest to count instances will occur.
translated by 谷歌翻译
黑匣子优化(BBO)可用于优化分析形式未知的功能。实现BBO的一种常见方法是学习一个替代模型,该模型近似于目标黑匣子函数,然后可以通过白盒优化方法解决该模型。在本文中,我们介绍了我们的方法盒子,其中替代模型是QUBO矩阵。但是,与以前的最先进方法不同,该矩阵不是完全通过回归训练的,而是主要是通过“好”和“坏”解决方案之间的分类来训练的。这更好地说明了QUBO矩阵的低容量,从而使整体解决方案明显更好。我们测试了针对四个领域的最先进的方法,在所有域中,盒子中的结果表现出明显更好的结果。本文的第二个贡献是解决白框问题的想法,即可以通过黑匣子优化直接将其直接提出为Qubo的问题,以便将Qubos的大小减少到其信息理论的最小值中。实验表明,这大大改善了最大$ K $ -SAT的结果。
translated by 谷歌翻译
MD4 and MD5 are seminal cryptographic hash functions proposed in early 1990s. MD4 consists of 48 steps and produces a 128-bit hash given a message of arbitrary finite size. MD5 is a more secure 64-step extension of MD4. Both MD4 and MD5 are vulnerable to practical collision attacks, yet it is still not realistic to invert them, i.e. to find a message given a hash. In 2007, the 39-step version of MD4 was inverted via reducing to SAT and applying a CDCL solver along with the so-called Dobbertin's constraints. As for MD5, in 2012 its 28-step version was inverted via a CDCL solver for one specified hash without adding any additional constraints. In this study, Cube-and-Conquer (a combination of CDCL and lookahead) is applied to invert step-reduced versions of MD4 and MD5. For this purpose, two algorithms are proposed. The first one generates inversion problems for MD4 by gradually modifying the Dobbertin's constraints. The second algorithm tries the cubing phase of Cube-and-Conquer with different cutoff thresholds to find the one with minimal runtime estimation of the conquer phase. This algorithm operates in two modes: (i) estimating the hardness of an arbitrary given formula; (ii) incomplete SAT-solving of a given satisfiable formula. While the first algorithm is focused on inverting step-reduced MD4, the second one is not area-specific and so is applicable to a variety of classes of hard SAT instances. In this study, for the first time in history, 40-, 41-, 42-, and 43-step MD4 are inverted via the first algorithm and the estimating mode of the second algorithm. 28-step MD5 is inverted for four hashes via the incomplete SAT-solving mode of the second algorithm. For three hashes out of them this is done for the first time.
translated by 谷歌翻译
监督学习可以改善最先进的求解器的组合问题的设计,但是由于指数性最差的复杂性,标记大量组合实例通常是不切实际的。受图像的对比预训练的最新成功的启发,我们对增强设计对布尔满意度问题的对比预训练的影响进行了科学研究。虽然典型的图形对比前训练使用了标签 - 敏捷的增强,但我们的主要见解是,许多组合问题都有良好的态度,这允许设计具有标签的增强功能。我们发现,保留标签的增强对于对比度预训练的成功至关重要。我们表明,我们的表示形式能够达到与完全监督学习的可比测试准确性,而仅使用1%的标签。我们还证明,我们的表示形式更容易转移到看不见的域中的更大问题。我们的代码可在https://github.com/h4duan/contrastive-sat上找到。
translated by 谷歌翻译
Partial MaxSAT (PMS) and Weighted PMS (WPMS) are two practical generalizations of the MaxSAT problem. In this paper, we propose a local search algorithm for these problems, called BandHS, which applies two multi-armed bandits to guide the search directions when escaping local optima. One bandit is combined with all the soft clauses to help the algorithm select to satisfy appropriate soft clauses, and the other bandit with all the literals in hard clauses to help the algorithm select appropriate literals to satisfy the hard clauses. These two bandits can improve the algorithm's search ability in both feasible and infeasible solution spaces. We further propose an initialization method for (W)PMS that prioritizes both unit and binary clauses when producing the initial solutions. Extensive experiments demonstrate the excellent performance and generalization capability of our proposed methods, that greatly boost the state-of-the-art local search algorithm, SATLike3.0, and the state-of-the-art SAT-based incomplete solver, NuWLS-c.
translated by 谷歌翻译
We present an approach for the verification of feed-forward neural networks in which all nodes have a piece-wise linear activation function. Such networks are often used in deep learning and have been shown to be hard to verify for modern satisfiability modulo theory (SMT) and integer linear programming (ILP) solvers.The starting point of our approach is the addition of a global linear approximation of the overall network behavior to the verification problem that helps with SMT-like reasoning over the network behavior. We present a specialized verification algorithm that employs this approximation in a search process in which it infers additional node phases for the non-linear nodes in the network from partial node phase assignments, similar to unit propagation in classical SAT solving. We also show how to infer additional conflict clauses and safe node fixtures from the results of the analysis steps performed during the search. The resulting approach is evaluated on collision avoidance and handwritten digit recognition case studies.
translated by 谷歌翻译
优化在离散变量上的高度复杂的成本/能源功能是不同科学学科和行业的许多公开问题的核心。一个主要障碍是在硬实例中的某些变量子集之间的出现,导致临界减慢或集体冻结了已知的随机本地搜索策略。通常需要指数计算工作来解冻这种变量,并探索配置空间的其他看不见的区域。在这里,我们通过开发自适应梯度的策略来介绍一个量子启发的非本球非识别蒙特卡罗(NMC)算法,可以有效地学习成本函数的关键实例的几何特征。该信息随行使用,以构造空间不均匀的热波动,用于以各种长度尺度集体未填充变量,规避昂贵的勘探与开发权衡。我们将算法应用于两个最具挑战性的组合优化问题:随机k可满足(K-SAT)附近计算阶段转换和二次分配问题(QAP)。我们在专业的确定性求解器和通用随机求解器上观察到显着的加速和鲁棒性。特别是,对于90%的随机4-SAT实例,我们发现了最佳专用确定性算法无法访问的解决方案,该算法(SP)具有最强的10%实例的解决方案质量的大小提高。我们还通过最先进的通用随机求解器(APT)显示出在最先进的通用随机求解器(APT)上的时间到溶液的两个数量级改善。
translated by 谷歌翻译
冲突驱动的子句学习(CDCL)是解决命题逻辑令人满意问题的非常成功的范式。这种求解器不是简单的深度优先回溯方法,而是以其他条款的形式了解了发生冲突的原因。但是,尽管CDCL求解器取得了巨大的成功,但仍然对以什么方式影响这些求解器的性能有限。考虑到不同的措施,本文非常令人惊讶地证明,从句学习(不摆脱某些条款)不仅可以帮助求解器,而且可能会大大恶化解决方案过程。通过进行广泛的经验分析,我们进一步发现,CDCL求解器的运行时分布是多模式的。这种多模式可以看作是上面描述的恶化现象的原因。同时,这也表明了为什么从条款删除结合条款学习的原因实际上是SAT解决的事实标准,尽管存在这种现象。作为最终贡献,我们表明Weibull混合物分布可以准确描述多模式分布。因此,在基本实例中添加新的子句具有长期运行时间的固有效果。该洞察力提供了一个解释,即为什么忘记条款的技术在CDCL求解器中有用,除了单位传播速度的优化。
translated by 谷歌翻译
代表SAT实例的图表的视觉布局可以突出显示SAT实例的社区结构。SAT实例的社区结构与实例硬度和已知条款质量启发式方法有关。我们的工具SATVIZ使用可变交互图和强制定向的布局算法可视化CNF公式。借助SATVIZ,可以对条款证明进行动画,以连续突出最近学习子句的移动窗口中发生的变量。如果需要,Satviz还可以使用调整后的边缘权重创建可变交互图的新布局。在本文中,我们描述了Satviz的结构和特征集。我们还提出了一些使用Satviz创建的有趣的可视化。
translated by 谷歌翻译