---
title: 'AutoBrep: End-to-End Neural B-Rep Generation'
url: https://www.emergentmind.com/topics/autobrep
type: topic
---

# AutoBrep: End-to-End Neural B-Rep Generation

AutoBrep refers to a class of models and methodologies for fully automatic, end-to-end generation of boundary representation (B-Rep) solid models in Computer-Aided Design (CAD), synthesizing both precise geometry and watertight topology directly from learned data-driven representations. AutoBrep approaches—exemplified by the "AutoBrep" autoregressive Transformer model—address the longstanding challenge of direct B-Rep synthesis by unifying the generation of parametric geometry (NURBS, B-splines, etc.) and discrete topology (face adjacency, edge loops) within a single, coherent sequential model [2512.03018]. This paradigm replaces prior decomposed, multi-stage B-Rep pipelines, reducing error propagation and enabling scalable, high-fidelity CAD modeling at industrial complexity.

## 1. Motivation and Background

Boundary representation (B-Rep) is the canonical data structure for solid modeling in CAD, encoding a solid as an interlinked graph of vertices, edges, loops, and faces—each equipped with exact parametric geometry [2512.03018]. The requirements of watertightness (topological closure) and high geometric precision are fundamental for downstream tasks such as finite element simulation and manufacturing (CAM). Traditional generation approaches typically involve multi-stage decomposition—separate neural networks for vertices, edges, faces, followed by post-hoc "sewing"—leading to cumulative errors and fractured inductive priors [2512.03018, 2203.13944, 2401.15563]. Direct, fully neural B-Rep synthesis remained a central challenge due to the tight coupling between discrete combinatorial structure and freeform geometry.

## 2. Key Model Architecture and Tokenization

AutoBrep is structured as a single-stage, decoder-only Transformer with 16 self-attention layers, 32 attention heads, and a 2048-dimensional hidden size, operating on token sequences up to length 3 000 [2512.03018]. Its core innovation is a unified tokenization scheme that linearizes both geometry and topology:

- **Geometric primitives** (faces and edges) are sampled as uniform grids (\(32\times32\) for faces, \(32\times1\) for edges) in intrinsic parameter space. Each is compressed via a deep autoencoder and quantized by finite-scalar quantization (FSQ) into discrete tokens.
  - Each face emits 4 geometry tokens; each edge emits 2.
  - Axis-aligned bounding boxes are quantized into 1024 bins per axis, producing 6 coordinate tokens per primitive.

- **Topological relationships** are embedded by breadth-first traversal (BFT) of the face adjacency graph.
  - Novel "local reference tokens" encode the topological references: when an edge connects a new face to a previously generated face within a two-level window, only a small, local vocabulary is needed to unambiguously specify adjacency.
  - Special tokens—such as `<BOS>`, `<FACE_END>`, `<LEVEL>`, complexity meta-tokens—demarcate sequence structure and support conditional control.

Sequence generation is natively autoregressive, with next-token prediction proceeding strictly according to BFT ordering, which captures both the hierarchical structure (faces followed by their bounding edges) and local topology of the solid.

## 3. Training Objectives, Regularization, and Inference

Training optimizes next-token cross-entropy loss over all tokens in the sequence, modeling \(p(\mathbf x) = \prod_{i} p(x_i \mid x_{<i})\) [2512.03018]. Additional mechanisms include:

- **Level-based attention dropout** (randomly masking tokens more than two BFT levels old) to encourage local correlation.
- **Data augmentation** by random rotation and stochastic dropping of complexity meta tokens.

For autocompletion, user-provided substructures are encoded as level 0 with a dedicated "unassigned" reference token (`T_u`). Inference proceeds by autoregressive sampling (top-\(p\), \(p=0.9\), temperature 1.0) with key-value caching for computational efficiency. Only tokens in the current local reference window are considered valid for topological referencing, reducing vocabulary size and improving memory locality.

## 4. Experimental Protocols and Quantitative Results

AutoBrep is trained and evaluated on the ABC-1M dataset: approximately 1.3 million unique STEP solids stratified by face count (up to 100 faces and 1 000 edges), as well as the ABC-Constraint subset for interface-driven autocompletion [2512.03018]. Performance metrics include:

| Model          | COV (%) | MMD (×10⁻²) | JSD (×10⁻²) | Valid (%) | Inference (s/face) |
|----------------|---------|-------------|-------------|-----------|--------------------|
| BrepGen        | 66.8    | 1.65        | 1.12        | 51.2      | 1.0–2.3            |
| HoLa           | 61.9    | 1.75        | 1.40        | 50.0      | 2.0                |
| DTGBrepGen*    | 69.7    | 1.61        | 1.25        | 58.9      | 1.2                |
| **AutoBrep**   | 71.5    | 1.45        | 0.97        | 70.8      | 0.46               |

Key empirical findings:

- AutoBrep achieves the highest validity (70.8%), surpassing baselines by over 20% in solids >50 faces and halving inference time.
- Geometry quantization via FSQ substantially outperforms VQ-VAE (per-point RMSE for faces: 0.075 vs. 0.338).
- Validity remains ~50% even at the largest tested solid sizes (100 faces), with consistent superiority in coverage (COV) and distributional fidelity (MMD/JSD).
- Ablation experiments reveal the necessity of local reference windows and BFT ordering: removing either degrades validity and geometric coverage significantly.

Qualitatively, AutoBrep generates solids exhibiting realistic manufacturing details (e.g., fillets, chamfers, complex cutouts) with a high degree of watertightness even at high complexity [2512.03018].

## 5. Extensions: Autocompletion, Editing, and User Control

AutoBrep's unified tokenization enables seamless support for partial B-Rep autocompletion and user-controllable generation. Given user-specified interface faces or substructures:

- The model fills in missing geometry and topology to yield watertight completions, preserving exact user input.
- Complexity meta-tokens bias toward simple or highly detailed output regimes.
- The local topology window can be restricted to enforce specified connectivity patterns.

Proposed application scenarios include CAD-aware interactive UIs, supporting commands such as "fill this hole" or "expand this flange" by modifying a small subset of tokens [2512.03018].

## 6. Comparison to Related AutoBRep Paradigms

AutoBrep advances over previous direct B-Rep models such as DTGBrepGen, BrepGen, and SolidGen by (a) integrating geometry and topology into a single token stream, (b) leveraging a purely autoregressive sequence model rather than a multi-stage pipeline, and (c) enabling scalable inference for solids at industrial complexity without cascading errors or validity collapse [2512.03018, 2503.13110, 2401.15563, 2203.13944]. Recent alternatives such as BrepGPT adopt related single-stage, holistic tokenization but differ in locality representation and quantization (Voronoi Half-Patch and dual VQ-VAEs) [2511.22171]; BrepARG proposes a holistic token sequence using hierarchical block construction [2601.16771]. Masked autoencoder paradigms (BRepMAE, [2602.22701], and hierarchical graph transformers [2603.14927]) focus on self-supervised representation learning rather than full generative synthesis.

## 7. Limitations and Future Directions

Remaining challenges for AutoBrep include accurate modeling of ultra-thin features (threads, shells), where uniform point grids and coarse quantization can degrade precision. Prospective directions involve adaptive sampling strategies, hybrid continuous–discrete representations, and integrating constraints for strict manifold validity. Embedding these models in interactive CAD environments and extending to multi-modal conditional generation (sketch → B-Rep, text → B-Rep, point cloud → B-Rep) are active areas of research [2512.03018].

---

AutoBrep establishes a new paradigm for end-to-end neural CAD generation, demonstrating that with a unified token vocabulary, a single Transformer can synthesize high-fidelity, watertight B-Reps robustly and efficiently, with powerful modes for autocompletion and user-guided editing [2512.03018].

Source: https://www.emergentmind.com/topics/autobrep