Neuro-symbolic systems aim to combine the expressive structure of symbolic logic with the flexibility of neural learning; yet, generative models typically lack mechanisms to enforce declarative constraints at generation time. We propose Logic-Guided Vector Fields (LGVF), a neuro-symbolic framework that injects symbolic knowledge, specified as differentiable relaxations of logical constraints, into flow matching generative models. LGVF couples two complementary mechanisms: (1) a training-time logic loss that penalizes constraint violations along continuous flow trajectories, with weights that emphasize correctness near the target distribution; and (2) an inference-time adjustment that steers sampling using constraint gradients, acting as a lightweight, logic-informed correction to the learned dynamics. We evaluate LGVF on three constrained generation case studies spanning linear, nonlinear, and multi-region feasibility constraints. Across all settings, LGVF reduces constraint violations by 59-82% compared to standard flow matching and achieves the lowest violation rates in each case. In the linear and ring settings, LGVF also improves distributional fidelity as measured by MMD, while in the multi-obstacle setting, we observe a satisfaction-fidelity trade-off, with improved feasibility but increased MMD. Beyond quantitative gains, LGVF yields constraint-aware vector fields exhibiting emergent obstacle-avoidance behavior, routing samples around forbidden regions without explicit path planning.
翻译:神经符号系统旨在将符号逻辑的表达性结构与神经学习的灵活性相结合;然而,生成模型通常缺乏在生成时强制执行声明性约束的机制。我们提出了逻辑引导向量场(LGVF),这是一个神经符号框架,它将符号知识(以逻辑约束的可微分松弛形式指定)注入到流匹配生成模型中。LGVF耦合了两种互补机制:(1)训练时逻辑损失,该损失惩罚沿连续流轨迹的约束违反,其权重强调在目标分布附近的正确定性;(2)推理时调整,该调整使用约束梯度引导采样,作为对学习动力学的一种轻量级、逻辑知情的校正。我们在三个约束生成的案例研究上评估LGVF,这些案例涵盖了线性、非线性和多区域可行性约束。在所有设置中,与标准流匹配相比,LGVF将约束违反减少了59-82%,并在每种情况下实现了最低的违反率。在线性和环形设置中,LGVF还提高了以MMD衡量的分布保真度,而在多障碍设置中,我们观察到满足度与保真度之间的权衡,即可行性得到改善但MMD增加。除了定量收益之外,LGVF产生了具有约束感知的向量场,展现出新兴的避障行为,能够在没有显式路径规划的情况下引导样本绕过禁止区域。