AutoBrep: Autoregressive B-Rep Generation with Unified Topology and Geometry

Xiang Xu, Pradeep Kumar Jayaraman, Joseph G. Lambourne, Yilin Liu, Durvesh Malpure, Peter Meltzer

TL;DR

AutoBrep is a single autoregressive Transformer that generates Computer-Aided Design (CAD) solid models by encoding both geometry and topology into a unified sequence of discrete tokens. By framing 3D modeling as a next-token prediction task following a breadth-first traversal, it eliminates the need for complex multi-stage pipelines, delivering a 2× to 5× inference speedup and significantly higher topological validity and scalability than prior state-of-the-art methods.

What Problem Does This Paper Address?

In CAD, the gold standard for representing 3D shapes is the Boundary Representation (B-Rep). A B-Rep model consists of two tightly coupled components: continuous geometry (the mathematical surfaces and curves) and discrete topology (the graph structure defining how faces, edges, and vertices connect). For a B-Rep to be valid, it must be "watertight"—meaning all pieces must align with absolute mathematical precision.

Directly generating B-Reps using deep learning is notoriously difficult. Previous approaches relied on multi-stage pipelines (e.g., separate neural networks to predict vertices, then edges, then faces, followed by multiple diffusion models to generate geometry). These cascaded systems suffer from cumulative error, struggle to learn the joint distribution of geometry and topology, and fail to scale to complex shapes, typically capping out at models with fewer than 50 faces.

Methods

AutoBrep solves this by unifying geometry and topology into a single stream of discrete tokens, allowing a standard GPT-style Transformer to handle the entire generation process end-to-end.

AutoBrep progressively generates B-Rep geometry and topology via a single autoregressive Transformer.

1. Geometry Tokenization

To represent arbitrary parametric surfaces and curves uniformly, the authors sample them into point grids (32×32 for faces, 32×1 for edges). They pass these grids through a Deep Compression Autoencoder paired with Finite Scalar Quantization (FSQ) to compress the continuous coordinates into compact integer tokens (4 tokens per face, 2 tokens per edge). They also introduce a simple coordinate-sorting normalization step to make the representation invariant to how the underlying UV-space was parameterized.

The geometric representation learning pipeline using deep compression and Finite Scalar Quantization (FSQ).

2. Topology Tokenization via Breadth-First Traversal (BFT)

Instead of using a global coordinate ordering, AutoBrep traverses the B-Rep's face adjacency graph using a breadth-first search. This traversal orders the sequence level by level.

Crucially, because of the properties of BFT, an edge at level $l$ can only connect to faces in the immediate previous level ($l-1$) or within the same level ($l$). This allows the authors to implement a Local Topological Reference scheme. Instead of using global face IDs, the model uses local reference tokens ($T$) that only look back at a small moving window of the two most recent BFT levels. This keeps the vocabulary size small and bounded.

The sequence ordering follows a breadth-first traversal (BFT), utilizing a local context window for topological references.

3. Autocomplete Fine-Tuning

Because the model treats generation as a sequence, B-Rep autocompletion becomes a natural extension. User-provided faces are simply injected as the first level of the BFT sequence. The model is then fine-tuned to predict the remaining levels, guaranteeing that the user's input geometry is perfectly preserved.

Datasets

The authors introduced two large-scale datasets derived from the open-source ABC dataset:

  • ABC-1M: Contains ~1.3 million unique, single-body CAD models decomposed from multi-body STEP files, filtered to remove duplicates and non-manifold geometry.
  • ABC-Constraint: A dataset specifically designed for autocompletion. It identifies common engineering interfaces—like cylindrical bolt holes and planar faces on a part's convex hull—to simulate realistic user inputs.

Key Insights and Ideas

  • CAD Generation as Language Modeling: By discretizing both the continuous geometry and the discrete graph structure, B-Rep generation maps cleanly onto standard autoregressive language modeling architectures.
  • The Power of Locality: Using a breadth-first traversal reveals a localized structure in CAD topology. Exploiting this with a moving context window prevents the model from needing global tracking, which drastically improves generation quality and reduces overfitting on long sequences.
  • Inherent Autocompletion: Treating user-guided generation as a conditional prefix sequence avoids the complex masking or post-optimization tricks required by diffusion models, ensuring 100% fidelity to user-specified faces.

Key Results

  • Higher Watertight Validity: AutoBrep achieved an overall valid/watertight ratio of 70.8%, outperforming baselines like BrepGen (46.6%) and HoLa (54.8%).
  • Unprecedented Scalability: While baseline models quickly degrade to 0% validity as the face count approaches 50, AutoBrep maintains roughly a 50% validity rate for complex solids up to 100 faces.
Validity rate of generated B-Reps as a function of face count, comparing AutoBrep against baselines.
  • Generation Speed: Thanks to KV-caching inherent to autoregressive Transformers, AutoBrep achieves an average inference time of 0.46 seconds per face, making it 2× to 5× faster than diffusion-based alternatives.
  • Qualitative Diversity: Visual evaluations show that AutoBrep successfully generates complex mechanical features like chamfers, fillets, and intricate internal topologies that baselines struggle to replicate.
Randomly sampled unconditional generation results showing AutoBrep's ability to handle highly complex shapes.

Limitations and Future Work

Despite its strengths, AutoBrep exhibits a few common failure modes:

  • Extreme Aspect Ratios: Long, winding, narrow faces—such as screw threads—are poorly captured by uniform point grids.
  • Thin Shells & Sliver Faces: Very thin structures occasionally fail to generate correctly due to the precision limits of bounding-box quantization.
  • Self-Intersections: In highly crowded volumes, the model can occasionally generate overlapping faces.

For future work, the authors suggest filtering out standard components (like bolts) that are better sourced from catalogs, improving bounding-box precision, and exploring alternative geometric representations beyond uniform point grids to better capture sharp mechanical details.

Summary updated

Abstract

The boundary representation (B-Rep) is the standard data structure used in Computer-Aided Design (CAD) for defining solid models. Despite recent progress, directly generating B-Reps end-to-end with precise geometry and watertight topology remains a challenge. This paper presents AutoBrep, a novel Transformer model that autoregressively generates B-Reps with high quality and validity. AutoBrep employs a unified tokenization scheme that encodes both geometric and topological characteristics of a B-Rep model as a sequence of discrete tokens. Geometric primitives (i.e., surfaces and curves) are encoded as latent geometry tokens, and their structural relationships are defined as special topological reference tokens. Sequence order in AutoBrep naturally follows a breadth first traversal of the B-Rep face adjacency graph. At inference time, neighboring faces and edges along with their topological structure are progressively generated. Extensive experiments demonstrate the advantages of our unified representation when coupled with next-token prediction for B-Rep generation. AutoBrep outperforms baselines with better quality and watertightness. It is also highly scalable to complex solids with good fidelity and inference speed. We further show that autocompleting B-Reps is natively supported through our unified tokenization, enabling user-controllable CAD generation with minimal changes. Code is available at https://github.com/AutodeskAILab/AutoBrep.
BibTeX
@inproceedings{xu2025autobrep,
  author = {Xiang Xu and Pradeep Kumar Jayaraman and Joseph G. Lambourne and Yilin Liu and Durvesh Malpure and Peter Meltzer},
  title = {{AutoBrep: Autoregressive B-Rep Generation with Unified Topology and Geometry}},
  booktitle = {SIGGRAPH Asia},
  year = {2025},
  url = {https://openreview.net/forum?id=78EWqAkq2a},
}
Figure