BRepA: Graph-Based B-Rep Pretraining for Unified CAD Understanding and Generation

Dekai Zhu, Zhaiyu Chen, Stefan Gavranovic, Slobodan IlicarXiv 2026 · arXiv

TL;DR

BRepA is a unified self-supervised pretraining framework for Boundary Representation (B-Rep) CAD models that jointly learns geometric and topological features through a dual masked autoencoding (MAE) strategy. It significantly improves data efficiency in discriminative tasks—boosting segmentation mIoU by over 32% with only 1% labeled data—and accelerates the training of large-scale generative diffusion models by nearly 2×.

What Problem Does This Paper Address?

In the world of Computer-Aided Design (CAD), models are typically stored as Boundary Representations (B-Reps). Unlike simple point clouds or meshes, B-Reps are complex graphs where nodes represent surfaces and edges represent the topological connections between them.

Training deep learning models on B-Reps faces three major hurdles:

  1. Data Scarcity: High-quality, labeled B-Rep datasets are rare and expensive to produce.
  2. Complexity: B-Rep data is a mix of continuous geometry (parametric surfaces) and discrete topology (graph structures), making it difficult for standard architectures to capture the full "intent" of a design.
  3. Generative Difficulty: The discrete and symbolic nature of B-Reps makes training generative models (like diffusion models) slow and prone to convergence issues.

The authors introduce BRepA to bridge these gaps by providing a robust, pretrained backbone that understands both what a part looks like and how its pieces are connected.

Methods

BRepA uses a hybrid architecture and a novel "Dual MAE" pretraining scheme.

The Architecture

The model follows a "ConViT" design philosophy, blending the local feature extraction of CNNs with the global context of Transformers:

  • Surface & Edge Encoders: Use 2D and 1D CNN layers to capture local geometric patterns, followed by self-attention layers to model long-range dependencies across the surface or edge.
  • Graph Encoder: Employs Graph Convolutional Networks (GCN) for message passing between faces and edges, followed by Graph Attention Layers (GAT) to produce final node representations.
Figure 2. Overview of BRepA Architecture. (a) Surface Encoder Φs processes 2D surface grids xs,i using 2D CNN layers with self-attention and average pooling to extract surface embedding hs,i. (b) Edge Encoder Φe employs 1D CNN layers with self-attention to encode 1D edge grids xe,i,j and generate edge embedding he,i,j. (c) Graph Encoder Φg utilizes message-passing layers of Graph Convolutional Networks (GCN) [30] and Graph Attention Layers [31] to capture topological relationships and produce representations fi.

Dual MAE Pretraining

The core innovation is the two-pronged self-supervised objective:

  1. Geometry MAE: The model randomly masks surface features and attempts to reconstruct the original 3D coordinates and normals.
  2. Topology MAE: The model randomly drops edges in the B-Rep graph and must predict the probability of connectivity between pairs of nodes. This forces the model to learn the underlying structural logic of CAD objects.

Datasets

The authors evaluated BRepA across several standard B-Rep benchmarks:

  • MFCAD: A dataset with 16 machining-feature categories.
  • Fusion 360 Segmentation: Contains 8 face-level modeling-operation categories.
  • ABC Dataset: A massive, diverse collection of CAD models used for pretraining and testing generalization.
  • SolidLetters: Used specifically for few-shot classification tests.

Key Insights and Ideas

  • Topology is the Secret Sauce: The authors found that reconstructing geometry alone isn't enough. By adding the Topology MAE task, the model gains a much deeper understanding of how CAD parts are assembled, which directly translates to better performance in downstream tasks.
  • Small Backbone, Big Lever: BRepA is relatively compact (13.5M parameters). However, by aligning the features of much larger generative models (like the 260M parameter BrepDiff) with BRepA’s pretrained features, the larger models learn significantly faster.
  • Extreme Data Efficiency: BRepA acts as a powerful prior. In scenarios where you only have a handful of labeled examples (e.g., 1% of the dataset), the pretrained knowledge prevents the model from overfitting and provides a massive head start.

Key Results

The quantitative improvements are substantial across both "understanding" (discriminative) and "creation" (generative) domains:

  • Segmentation: On the MFCAD dataset with only 1% labeled samples, BRepA improved mIoU by 32.52% compared to training from scratch. Even with 100% labels, it still outperformed existing baselines like UV-Net.
  • Generation Speed: When used to guide the BrepDiff diffusion model, BRepA enabled the model to converge nearly 2× faster.
  • Generation Quality: Beyond speed, the final generated models were higher quality, showing better 1-Nearest Neighbor Accuracy (1-NNA) and Coverage (COV) metrics.
Figure 1. (a) Segmentation Training: With geometry and topology MAE pretraining, the BRepA model equipped with the segmenta- tion head (MLPseg) achieves a 32.52% mIoU improvement when labeled samples are rare (1%). (b) Generation Training: Lever- aging feature alignment with BRepA, BrepDiff [21] trains nearly twice as fast and converges to a better checkpoint, even though BrepDiff (260M) is roughly 20× larger than BRepA (13.5M). Both experiments are conducted on the MFCAD [3] dataset.

Limitations and Future Work

While BRepA is a significant step forward, some areas remain for exploration:

  • Pretraining Cost: While the pretraining is a "one-time" cost, it still requires significant compute on large datasets like ABC.
  • Granularity: The current model focuses on face and edge features. Future iterations might benefit from incorporating vertex-level details or higher-level assembly relationships.
  • Scaling: The authors showed that BRepA scales well (up to 80M parameters), suggesting that even larger versions trained on even more data could further push the state-of-the-art in CAD foundation models.

Summary updated

Abstract

Boundary representation (B-Rep) of CAD models encodes geometric primitives and their relations as a graph structure, enabling efficient shape modeling within CAD software. Learning on B-Reps for downstream tasks, such as segmentation and novel shape generation, requires specialized neural network designs. Moreover, performance improvements and accelerated training can be achieved with effective pretraining strategies, which is particularly important for tasks with limited labeled B-Rep data. In this paper, we introduce BRepA, a unified self-supervised pretraining framework that explicitly reconstructs both the geometry and topology of B-Rep objects via graph-based modeling. By learning from large-scale unlabeled CAD data only once, BRepA produces representations that generalize across tasks and significantly enhance both discriminative and generative learning. On segmentation tasks, BRepA demonstrates remarkable data efficiency. For instance, with only 1% labeled samples, BRepA pretraining improves mIoU by 32.52% compared to models trained from scratch. On generative tasks, aligning diffusion model representations with pretrained BRepA features substantially accelerates convergence, achieving nearly 2 times faster training while improving generation quality under the same computational budget, despite the diffusion model being roughly 20 times larger than BRepA. Overall, our results show that geometry- and topology-aware B-Rep pretraining provides a powerful foundation for both understanding and generating CAD structures, serving as a versatile representation backbone for diverse downstream applications. We will release the code to facilitate future research.
BibTeX
@misc{zhu2026brepa,
  author = {Dekai Zhu and Zhaiyu Chen and Stefan Gavranovic and Slobodan Ilic},
  title = {{BRepA: Graph-Based B-Rep Pretraining for Unified CAD Understanding and Generation}},
  year = {2026},
  eprint = {2611.22903},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.22903},
}
Figure