TL;DR
HiFi-BRep is a novel generative framework for Computer-Aided Design (CAD) that synthesizes highly accurate and structurally valid Boundary Representation (B-Rep) models. By introducing a padding-free, topology-aware encoder and a single-stage parallel decoder, it eliminates the structural "brittleness" of prior methods, achieving state-of-the-art geometric fidelity and validity while running up to nearly 7x faster than existing baselines.
What Problem Does This Paper Address?
In CAD, 3D shapes are typically stored as Boundary Representations (B-Reps), which combine continuous parametric geometry (like Bézier curves and surfaces) with discrete topology (how faces, edges, and vertices connect). Generating these models automatically using deep learning is notoriously difficult.
Existing deep generative models suffer from two main types of "brittleness":
- Representation Brittleness: B-Reps have variable numbers of faces and edges. Standard networks handle this using padding, which introduces statistical noise, or they propagate features across distant, unrelated parts of the shape, corrupting the latent space.
- Generation Brittleness: Most pipelines generate geometry and topology sequentially in multiple stages. If an error occurs early on, it cascades, resulting in invalid, non-watertight shapes. Furthermore, validity constraints are usually enforced during non-differentiable post-processing rather than during training, creating a severe train-inference mismatch.
HiFi-BRep tackles these challenges by creating a clean, high-fidelity latent space and decoding geometry and topology simultaneously in a single stage.
Methods
The HiFi-BRep framework consists of a Variational Autoencoder (VAE) paired with a Latent Diffusion Model (LDM).
1. Topology-Aware Dual-Stream Encoder
To eliminate representation noise, the encoder processes faces and edges in two separate streams. It introduces a Topo-Mask based on the explicit edge-face adjacency matrix, forcing the attention mechanism to only look at topologically adjacent pairs. This prevents feature contamination from distant primitives. Instead of using padded global summaries, it employs learnable encoder queries to pool these variable-length features into a clean, fixed-length latent code ($z$).
2. Single-Stage Validity-Constrained Decoder
Instead of a fragile, step-by-step generation process, the decoder predicts primitive counts, geometry, and topology in parallel within a single masked decoding pass.
Crucially, it embeds the physical "two faces per edge" manifold constraint directly into the training process. It projects edge and face features into a shared space to compute compatibility scores, which are then supervised by a row-wise, two-peak target distribution. This forces the network to learn valid topological adjacencies naturally.
Datasets
The approach was evaluated on two standard public benchmarks for B-Rep generation:
- DeepCAD: Contains 83,611 deduplicated and complexity-capped CAD shapes.
- ABC: A massive dataset of industrial CAD models, from which 186,148 shapes were used.
Key Insights and Ideas
- Parallel Over Cascaded: Jointly optimizing geometry and topology allows bidirectional information flow. The geometry informs the topology and vice versa, preventing early geometric errors from irreversibly ruining the shape's structure.
- Hard Masking via Topology: Treating the known topology as a hard attention mask during encoding ensures that the latent space preserves local structural interactions without being muddied by global noise.
- Differentiable Manifold Constraints: Rather than fixing broken topology after generation, formulating the "two faces per edge" rule as a two-peak softmax objective aligns the network's loss directly with the physical laws of solid modeling.
Key Results
HiFi-BRep significantly outperforms previous state-of-the-art methods across both datasets:
- Higher Structural Validity: On DeepCAD, HiFi-BRep achieved a structural Validity of 72.20%, a massive leap from the next best method, DTGBrepGen (43.20%). On the more complex ABC dataset, it achieved 32.66% Validity (vs. 24.88% for DTGBrepGen).
- Narrowing the Gap: It drastically reduced the gap between Compilability (whether a file can be parsed) and Validity (whether it forms a true watertight solid). On DeepCAD, its gap was only ~18% compared to DTGBrepGen's ~49%.
- Substantial Speedups: By utilizing a single-stage parallel decoder, HiFi-BRep is highly efficient. It averages 3.83 seconds per shape, making it 2.1× faster than BRepGen, 6.2× faster than DTGBrepGen, and 6.9× faster than BrepDiff.
Limitations and Future Work
Despite its strengths, HiFi-BRep has a few limitations:
- Fixed Budgets: It operates under a fixed maximum face/edge budget, meaning it cannot yet generate massive assemblies or highly complex, open-boundary parts.
- Residual Geometric Failures: Occasional failures still occur, such as trimming disagreements (where decoded loops fail to form a valid region) or degenerate "sliver" faces caused by ill-conditioned control points.
The authors note that future work will explore dynamic-capacity decoding to handle long-tailed topologies, differentiable feasibility projections to suppress trimming errors, and extending the framework to open-boundary models and multi-part assemblies.
Summary updated