Diffusion and flow-matching have emerged as powerful methodologies for generative modeling, with remarkable success in capturing complex data distributions and enabling flexible guidance at inference time. Many downstream applications, however, demand enforcing hard constraints on generated samples (for example, robot trajectories must avoid obstacles), a requirement that goes beyond simple guidance. Prevailing projection-based approaches constrain the entire sampling path to the constraint manifold, which is overly restrictive and degrades sample quality. In this paper, we introduce a novel framework that reformulates hard-constrained sampling as a trajectory optimization problem. Our key insight is to leverage numerical optimal control to steer the sampling trajectory so that constraints are satisfied precisely at the terminal time. By exploiting the underlying structure of flow-matching models and adopting techniques from model predictive control, we transform this otherwise complex constrained optimization problem into a tractable surrogate that can be solved efficiently and effectively. Furthermore, this trajectory optimization perspective offers significant flexibility beyond mere constraint satisfaction, allowing for the inclusion of integral costs to minimize distribution shift and terminal objectives to further enhance sample quality, all within a unified framework. We provide a control-theoretic analysis of our method, establishing bounds on the approximation error between our tractable surrogate and the ideal formulation. Extensive experiments across diverse domains, including robotics (planning), partial differential equations (boundary control), and vision (text-guided image editing), demonstrate that our algorithm, which we name $\textit{HardFlow}$, substantially outperforms existing methods in both constraint satisfaction and sample quality.
TMPO: Trajectory Matching Policy Optimization for Diverse and Efficient Diffusion Alignment
Huazhong University of Science and Technology(华中科技大学);Kuaishou Technology(快手科技);Nanyang Technological University(南洋理工大学);Wuhan University(武汉大学);Tsinghua University(清华大学)
Tracing Generated Samples to Training-Data Clusters in Flow-Matching Models
Forschungszentrum Jülich(于利希研究中心);Technical University Dortmund(多特蒙德工业大学);Reichman University(赖希曼大学);Lamarr Institute(拉马尔研究所);Institute for AI in Medicine, University Hospital Essen(埃森大学医院医学人工智能研究所);Helmholtz AI(亥姆霍兹人工智能);University of Cologne(科隆大学)
ContextFlow: Context-Aware Flow Matching For Trajectory Inference From Spatial Omics Data
CISPA Helmholtz Center for Information Security(CISPA 高等研究院);Department of Computer Science and Technology, University of Cambridge(剑桥大学计算机科学与技术系);Institute for Computational Biomedicine, Heidelberg University Hospital(海德堡大学医院计算生物医学研究所)
Is Flow Matching Just Trajectory Replay for Sequential Data?
Department of Mathematics(数学系);Nordita KTH Royal Institute of Technology and Stockholm University(KTH皇家理工学院与斯德哥尔摩大学联合研究所);Department of Statistics(统计系);International Computer Science Institute(国际计算机科学研究所);Lawrence Berkeley National Laboratory(伯克利国家实验室)
STFlow: Data-Coupled Flow Matching for Geometric Trajectory Simulation
Machine Learning for Physical Sciences (ML4Sci/e) Group, Department of Mathematics \& Computer Science, Eindhoven University of Technology, The Netherlands
Trajectory Flow Matching with Applications to Clinical Time Series Modeling
McGill University(麦吉尔大学);Mila - Quebec AI Institute(米拉-魁北克人工智能研究所);Yale School of Medicine(耶鲁医学院);School of Clinical Medicine, University of Cambridge(剑桥大学临床医学院);Université de Montréal(蒙特利尔大学);CIFAR(加拿大高级研究院)
Trajectory-Aware Flow Matching for Topology Optimisation
School of Mechanical, Medical and Process Engineering, Queensland University of Technology(昆士兰科技大学机械、医学与过程工程学院);Institute of Biomechanics and Medical Engineering, AML, Department of Engineering Mechanics, Tsinghua University(清华大学工程力学系生物力学与医学工程研究所);School of Civil and Environmental Engineering, Queensland University of Technology(昆士兰科技大学土木与环境工程学院);State Key Laboratory of Advanced Environmental Technology, Guangzhou Institute of Geochemistry, Chinese Academy of Sciences(中国科学院广州地球化学研究所环境技术重点实验室)
Theoretical Guarantees for High Order Trajectory Refinement in Generative Flows
The University of Texas at Austin(德克萨斯大学奥斯汀分校);Stevens Institute of Technology(史蒂文斯理工学院);The University of Hong Kong(香港大学);University of Wisconsin-Madison(威斯康星大学麦迪逊分校);South China University of Technology(华南理工大学);The Simons Institute for the Theory of Computing(西蒙斯理论计算研究所)
Towards Stable and Structured Time Series Generation with Perturbation-Aware Flow Matching
State Key Laboratory of Cognitive Intelligence, University of Science and Technology of China(认知智能国家重点实验室,中国科学技术大学);The First Affiliated Hospital of University of Science and Technology of China(中国科学技术大学第一附属医院)
KTH Royal Institute of Technology(皇家理工学院);Nordita, Nordic Institute for Theoretical Physics(北欧理论物理研究所);Hasso Plattner Institute, University of Potsdam(波茨坦大学哈索 Plattner 研究院);Trinity College Dublin(都柏林三一学院);Hangzhou Institute of Technology, Xidian University(西安电子科技大学杭州研究院);The Hong Kong University of Science(香港科学大学);Mohamed bin Zayed University of Artificial Intelligence(莫莫丁·本·扎耶德人工智能大学)
UniConFlow: A Unified Constrained Flow-Matching Framework for Certified Motion Planning
Technical University of Munich (TUM)(技术大学慕尼黑);School of Mechanical Engineering, Translational Research Center, Tongji University(机械工程学院、转化研究中心,同济大学);Mohamed Bin Zayed University of Artificial Intelligence(穆罕默德·本·扎耶德人工智能大学)
MeanCache: From Instantaneous to Average Velocity for Accelerating Flow Matching Inference
Data Science & Artificial Intelligence Research Institute, China Unicom(中国unicom数据科学与人工智能研究 institute);Unicom Data Intelligence, China Unicom(中国unicom数据智能);National Key Laboratory for Novel Software Technology, Nanjing University(南京大学新型软件技术国家重点实验室)
Plan-to-Synthesis: Cross-City Human Mobility Generation via Semantic Latent Flow Matching
Singapore-MIT Alliance for Research and Technology Centre, MIT(新加坡-麻省理工学院研究与技术联盟中心(麻省理工学院));Nanyang Technological University(南洋理工大学);Hong Kong University of Science & Technology (Guangzhou)(香港科技大学(广州));Korea Advanced Institute of Science & Technology(韩国高等科学技术研究院);University of Florida(佛罗里达大学);Massachusetts Institute of Technology(麻省理工学院)
Efficient Methods for Accurate Sparse Trajectory Recovery and Map Matching
Department of Computing Hong Kong Polytechnic University(计算学系香港理工大学);Department of Computing Smart Cities Research Institute Hong Kong Polytechnic University(计算学系智慧城市研究院香港理工大学)
Beyond Trajectory Matching: Reflow with Marginal Distribution Alignment
Department of Statistics and Data Science, Tsinghua University(统计与数据科学系,清华大学);Department of Computer Science and Technology, Tsinghua University(计算机科学与技术系,清华大学);Bytedance Inc(字节跳动公司)
Enhancing Generalization via Sharpness-Aware Trajectory Matching for Dataset Condensation
University of Oxford(牛津大学);Shanghai Jiao Tong University(上海交通大学);University of Nottingham(诺丁汉大学);Chinese Academy of Sciences(中国科学院);University of Edinburgh(爱丁堡大学)