Brep2Shape: Boundary and Shape Representation Alignment via Self-supervised Transformers

Yuanxu Sun, Yuezhou Ma, Haixu Wu, Guanyang Zeng, Muye Chen, Jianmin Wang, Mingsheng Long

Computer-Aided Design (CAD) relies heavily on Boundary Representation (B-rep) as its industry standard. However, applying deep learning to B-rep models has historically been hindered by a fundamental "representation gap." Brep2Shape introduces a novel self-supervised pre-training framework designed to align abstract mathematical boundaries with intuitive spatial shapes, achieving state-of-the-art performance in CAD classification and segmentation.

The Representation Gap in CAD

In engineering and manufacturing, B-reps describe objects using precise parametric mathematics (like NURBS) and topological connections (defining how faces and edges interact). While essential for manufacturing, this precision creates a dilemma for neural networks:

  1. Continuous Methods: Approaches that process raw mathematical coefficients are analytically perfect but visually opaque. The control points defining a curve often do not lie on the surface itself, making it difficult for models to intuitively "see" the shape.
  2. Discrete Methods: Approaches that sample shapes into point clouds or voxels are highly intuitive for AI but sacrifice the high-fidelity geometric precision required for actual manufacturing.

The authors of Brep2Shape address this gap by asking: How can we train a model that is both mathematically rigorous and geometrically intuitive?

The Brep2Shape Framework

To bridge the representation gap, Brep2Shape employs a "learning to visualize" pre-training strategy. The model is fed abstract Bézier control points (the B-rep) and tasked with predicting a dense set of spatial points that lie exactly on the surface (the Shape). Because these spatial points can be mathematically derived directly from the B-rep, the task requires zero manual labeling, enabling massive-scale self-supervised learning.

To handle the heterogeneous nature of CAD data, the architecture relies on three core innovations:

  • Dual Transformer Backbone: The model uses two parallel streams—a Face Stream for encoding surface geometry and an Edge Stream for encoding curve geometry.
  • Topology Attention: To prevent the model from treating a CAD part as a disconnected "bag of surfaces," the authors introduce Topology Attention. This mechanism uses the B-rep’s adjacency graph to bias the Transformer’s attention, forcing the model to prioritize interactions between connected faces and edges. This ensures the learned representation respects the physical connectivity of the object.
  • Lossless Decomposition: Complex industrial NURBS data is standardized into fixed-size Bézier primitives (triangles for faces, segments for edges). This allows standard deep learning architectures to process the data without losing geometric fidelity.

Datasets and Scaling Laws

The researchers curated Brep2Shape-250k, a massive pre-training corpus of 250,000 B-rep models aggregated from industrial benchmarks (MFCAD, TMCAD), design repositories (Fusion360, FabWave), and generative data (DeepCAD).

Notably, the authors demonstrated that CAD models follow scaling laws similar to those observed in natural language processing and computer vision. Increasing the pre-training data from 25k to 250k models yielded an 11.6% drop in pre-training loss and consistent downstream accuracy gains.

Key Results and Insights

By forcing the model to map opaque coefficients to intuitive spatial points, Brep2Shape develops a "spatial sense" that pure B-rep encoders lack. The framework sets new state-of-the-art benchmarks across multiple downstream tasks:

  • Classification: On the complex TMCAD dataset, Brep2Shape achieved 84.72% accuracy, significantly surpassing the previous best (BRT at 80.90%).
  • Segmentation: On Fusion360Seg, it reached an Intersection over Union (IoU) of 83.77%, compared to 79.23% for the baseline.
  • Data Efficiency: The framework proved highly robust in low-data regimes. Fine-tuning with just 100 labeled samples on TMCAD yielded 47.9% accuracy, outperforming competitors like UV-Net (41.5%) and BRT (44.8%).
  • Convergence: Pre-trained models converged to higher accuracies in just 100 epochs of fine-tuning than baseline models achieved after 350 epochs of training from scratch.

The paper also highlights that edge-level supervision acts as a critical cross-entity consistency signal—edges are the "glue" that ensures two adjacent faces meet correctly in 3D space.

Limitations and Future Directions

While highly effective, the authors note a few limitations. The fixed-order Bézier approximation, though near-lossless, may introduce microscopic biases unsuitable for ultra-precision applications like aerospace manufacturing. Additionally, the field currently lacks high-quality datasets for specific edge-level tasks. Finally, extending the framework from single-body parts to handle complex, multi-body assemblies with joint constraints remains a major frontier for future work.

Summary updated

BibTeX
@inproceedings{sun2026brep,
  author = {Yuanxu Sun and Yuezhou Ma and Haixu Wu and Guanyang Zeng and Muye Chen and Jianmin Wang and Mingsheng Long},
  title = {{Brep2Shape: Boundary and Shape Representation Alignment via Self-supervised Transformers}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=i5knGuNoRX},
}
Figure