arXiv:2508.13316cs.LG2025-08被引 1

提出新方法让生成模型自动满足约束条件,无需复杂假设。

Constraint-Aware Flow Matching via Randomized Exploration

  • 用随机探索学习均值流,避免违反约束。
  • 在合成数据上约束满足率显著提升,分布匹配效果不变。
  • 适合无梯度、黑箱约束场景,如对抗样本生成。

本文研究如何设计能处理约束违规问题的生成模型。针对两种情况:(a) 给定可微的距离函数到约束集;(b) 约束集仅可通过成员查询接口获取。对于 (a),在流匹配目标中加入惩罚项,最小化生成样本与约束集的距离;对于 (b),引入随机化机制,学习一个均值流,数值实验表明其高概率满足约束。该方法不依赖凸约束、障碍函数或反射机制。进一步证明两阶段方法(第二阶段通过随机化探查约束)比单阶段更高效。在多个合成生成任务中,所提方法显著提升约束满足率,同时保持目标分布匹配。作为实际应用,展示了如何利用黑箱分类器查询生成对抗样本。代码已公开于 https://github.com/ZhengyanHuan/FM-RE。

原文摘要 · Abstract (English)

We consider the problem of designing constraint-aware flow matching (FM) models that address the issue of constraint violations commonly observed in vanilla generative models. We consider two scenarios, viz.: (a) when a differentiable distance function to the constraint set is given, and (b) when the constraint set is only available via queries to a membership oracle. For case (a), we propose a simple adaptation of the FM objective with an additional term that penalizes the distance between the constraint set and the generated samples. For case (b), we propose to employ randomization and learn a mean flow that is numerically shown to have a high likelihood of satisfying the constraints. This approach deviates significantly from existing works that require simple convex constraints, knowledge of a barrier function, or a reflection mechanism to constrain the probability flow. Furthermore, in the proposed setting we show that a two-stage approach, where both stages approximate the same original flow but with only the second stage probing the constraints via randomization, is more computationally efficient than the corresponding one-stage approach. Through several synthetic cases of constrained generation, we numerically show that the proposed approaches achieve significant gains in terms of constraint satisfaction while matching the target distributions. As a showcase for a practical oracle-based constraint, we show how our approach can be used for training an adversarial example generator, using queries to a hard-label black-box classifier. We conclude with several future research directions. Our code is available at https://github.com/ZhengyanHuan/FM-RE.

生成模型约束满足随机探索

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。