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难推理问题。在数独基准测试的三种变体(符号型、视觉型及多解型)上,本方法所需的训练时间仅为其他混合方法的极小部分。在视觉最小割/最大割任务中,其优化后悔值的能力优于专为后悔值设计的决策聚焦学习损失函数。最后,该架构高效学习了蛋白质设计这一大型实际问题的能量优化表述。