Table of Contents
Fetching ...

Target-Guided Bayesian Flow Networks for Quantitatively Constrained CAD Generation

Wenhao Zheng, Chenwei Sun, Wenbo Zhang, Jiancheng Lv, Xianggen Liu

TL;DR

This work tackles the challenge of generating parametric CAD sequences under quantitative geometric constraints by introducing Target-Guided Bayesian Flow Network (TGBFN), a framework that unifies discrete CAD commands and continuous parameters in a differentiable space. It adds three mechanisms—Unbiased Bayesian Inference for exposure-bias reduction, Guided Bayesian Flow for principled constraint guidance, and Calibrated Distribution Estimation for moment-preserving discretization—complemented by a new dataset with explicit surface-area and volume targets. Empirical results show state-of-the-art performance on single- and multi-condition constrained generation tasks, with strong improvements in MSE, MAE, and PCC over baselines while managing computational resources effectively. The approach promises more reliable, constraint-aware CAD generation suitable for design workflows and multi-objective optimization, with potential extensions to more complex constraint regimes in future work.

Abstract

Deep generative models, such as diffusion models, have shown promising progress in image generation and audio generation via simplified continuity assumptions. However, the development of generative modeling techniques for generating multi-modal data, such as parametric CAD sequences, still lags behind due to the challenges in addressing long-range constraints and parameter sensitivity. In this work, we propose a novel framework for quantitatively constrained CAD generation, termed Target-Guided Bayesian Flow Network (TGBFN). For the first time, TGBFN handles the multi-modality of CAD sequences (i.e., discrete commands and continuous parameters) in a unified continuous and differentiable parameter space rather than in the discrete data space. In addition, TGBFN penetrates the parameter update kernel and introduces a guided Bayesian flow to control the CAD properties. To evaluate TGBFN, we construct a new dataset for quantitatively constrained CAD generation. Extensive comparisons across single-condition and multi-condition constrained generation tasks demonstrate that TGBFN achieves state-of-the-art performance in generating high-fidelity, condition-aware CAD sequences. The code is available at https://github.com/scu-zwh/TGBFN.

Target-Guided Bayesian Flow Networks for Quantitatively Constrained CAD Generation

TL;DR

This work tackles the challenge of generating parametric CAD sequences under quantitative geometric constraints by introducing Target-Guided Bayesian Flow Network (TGBFN), a framework that unifies discrete CAD commands and continuous parameters in a differentiable space. It adds three mechanisms—Unbiased Bayesian Inference for exposure-bias reduction, Guided Bayesian Flow for principled constraint guidance, and Calibrated Distribution Estimation for moment-preserving discretization—complemented by a new dataset with explicit surface-area and volume targets. Empirical results show state-of-the-art performance on single- and multi-condition constrained generation tasks, with strong improvements in MSE, MAE, and PCC over baselines while managing computational resources effectively. The approach promises more reliable, constraint-aware CAD generation suitable for design workflows and multi-objective optimization, with potential extensions to more complex constraint regimes in future work.

Abstract

Deep generative models, such as diffusion models, have shown promising progress in image generation and audio generation via simplified continuity assumptions. However, the development of generative modeling techniques for generating multi-modal data, such as parametric CAD sequences, still lags behind due to the challenges in addressing long-range constraints and parameter sensitivity. In this work, we propose a novel framework for quantitatively constrained CAD generation, termed Target-Guided Bayesian Flow Network (TGBFN). For the first time, TGBFN handles the multi-modality of CAD sequences (i.e., discrete commands and continuous parameters) in a unified continuous and differentiable parameter space rather than in the discrete data space. In addition, TGBFN penetrates the parameter update kernel and introduces a guided Bayesian flow to control the CAD properties. To evaluate TGBFN, we construct a new dataset for quantitatively constrained CAD generation. Extensive comparisons across single-condition and multi-condition constrained generation tasks demonstrate that TGBFN achieves state-of-the-art performance in generating high-fidelity, condition-aware CAD sequences. The code is available at https://github.com/scu-zwh/TGBFN.

Paper Structure

This paper contains 34 sections, 2 theorems, 18 equations, 6 figures, 5 tables, 4 algorithms.

Key Result

theorem 1

Let $\mathcal{C} \in \mathbb{R}_+^d$ denote target numerical conditions, and let $\mathbf{x} \in \mathcal{X}$ represent a parametric CAD token sequence. If $\mathcal{C}$ and $\mathbf{x}$ are conditionally independent given the current distribution parameters $\boldsymbol{\theta}_i$, i.e., then the conditional Bayesian update admits the following decomposition: which separates the intrinsic BFN d

Figures (6)

  • Figure 1: (a) Conceptual illustration of the diffusion process, which learns a mapping from discrete data samples to a continuous Gaussian prior. (b) Conceptual illustration of our proposed guided Bayesian inference approach. Unlike diffusion models that map samples to a prior, our method directly learns the mapping between the data distribution and a Gaussian distribution. Moreover, it enables precise control over target quantitative CAD properties via a conditional guidance module without necessitating retraining of the Bayesian flow skeleton networks.
  • Figure 2: Method Overview. The proposed Target-Guided Bayesian Flow Network (TGBFN) implements a Bayesian generative framework for quantitatively constrained parametric CAD sequence generation. During training, the core denoising network and conditional feature extractor (MLP) are optimized by minimizing the KL divergence $\mathcal{D}_{\text{KL}}(p_S \| p_R)$ between the sender and receiver distributions. At inference time, TGBFN performs target-guided sampling using only the desired quantitative condition, enabling accurate and controllable sequence generation.
  • Figure 3: Statistical analysis of geometric properties in the proposed CAD dataset: (a) Distribution of surface area; (b) Distribution of volume; (c) Dual-axis boxplots comparing area and volume; (d) Correlation heatmap illustrating covariance between geometric attributes.
  • Figure 4: Ablation study on the number of parallel samples $m$ in our Unbiased Bayesian Inference (UBI) and sampling granularity $H$ in our Calibrated Distribution Estimation (CDE). Performance consistently improves across all metrics as $m$ and $H$ increase.
  • Figure 5: Case study of CAD sequence generation under surface area and volume constraints. Each row corresponds to a unique area-volume target pair. The leftmost column depicts the ground truth CAD sequence visualizations, while the remaining columns present outputs generated by various models under the specified constraints.
  • ...and 1 more figures

Theorems & Definitions (2)

  • theorem 1: Proof in Appendix
  • theorem 2: Proof in Appendix