In the ongoing quest for hybridizing discrete reasoning with neural nets, there is an increasing interest in neural architectures that can learn how to solve discrete reasoning or optimization problems from natural inputs, a task that Large Language Models seem to struggle with. Objectives: We introduce a differentiable neuro-symbolic architecture and a loss function dedicated to learning how to solve NP-hard reasoning problems. Methods: Our new probabilistic loss allows for learning both the constraints and the objective, thus delivering a complete model that can be scrutinized and completed with side constraints. By pushing the combinatorial solver out of the training loop, our architecture also offers scalable training while exact inference gives access to maximum accuracy. Results: We empirically show that it can efficiently learn how to solve NP-hard reasoning problems from natural inputs. On three variants of the Sudoku benchmark -- symbolic, visual, and many-solution --, our approach requires a fraction of training time of other hybrid methods. On a visual Min-Cut/Max-cut task, it optimizes the regret better than a Decision-Focused-Learning regret-dedicated loss. Finally, it efficiently learns the energy optimization formulation of the large real-world problem of designing proteins.
翻译:在将离散推理与神经网络融合的持续探索中,人们对能够从自然输入中学习如何解决离散推理或优化问题的神经架构日益关注,而大型语言模型似乎在此类任务上面临困难。目标:我们提出一种可微分的神经符号架构及专门用于学习如何解决NP难推理问题的损失函数。方法:我们提出的新概率损失函数能够同时学习约束条件和目标函数,从而提供一个完整的模型,该模型可被详细检查并可通过附加约束进行完善。通过将组合求解器移出训练循环,我们的架构在实现可扩展训练的同时,通过精确推理获得最高精度。结果:我们通过实验证明,该架构能够高效地从自然输入中学习如何解决NP难推理问题。在数独基准测试的三种变体(符号型、视觉型、多解型)上,本方法所需的训练时间仅为其他混合方法的零头。在视觉最小割/最大割任务中,其优化遗憾度的表现优于专注遗憾度优化的决策聚焦学习损失函数。最后,该方法成功学习了蛋白质设计这一大型现实世界问题的能量优化建模。