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.
Figures & tables
Figure 1: (a) Segmentation Training: With geometry and topology MAE pretraining, the BRepA model equipped with the segmentation head ( MLPseg ) achieves a 32.52% mIoU improvement when labeled samples are rare (1%). (b) Generation Training: Leveraging 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.
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 .
Figure 3: Overview of the Dual MAE Pretraining Pipeline in BRepA. (a) The geometry MAE reconstructs masked surface feature xs,i′ from representation fi of node i encoded by BRepA, which contains surface, edge, and graph encoders. (b) The topology MAE predicts pairwise connectivity between surface nodes based on their encoded representations. By learning to infer missing edges, it enables BRepA to capture the underlying topological structure and relational dependencies among surfaces.
Figure 4: (a) Segmentation Training: The pretrained BRepA encoder is fine-tuned to provide surface representation fi of node i , which is fed into a segmentation head MLPseg for surface-wise prediction. (b) Generation Training: BRepA guides the training of B-Rep diffusion models. The representation fi from BRepA are aligned with intermediate diffusion representations through the alignment loss Lalign , combined with the standard noise prediction loss Lnoise to form the total generation objective Lgen .
Method
0.10%
0.20%
0.50%
1%
10%
20%
50%
100%
UV-Net [ 15 ]
6.73
9.46
14.08
19.92
49.87
68.15
83.94
90.58
UV-Net++ [ 15 ]
7.89
12.17
18.43
28.06
63.85
79.24
90.91
95.88
UV-Net++ [ 15 ] & SDF SSL [ 17 ]
9.42
14.63
21.87
34.12
72.94
87.16
94.73
97.85
BRepA (w/o SSL)
8.98
14.89
20.31
35.06
79.15
92.91
98.18
99.19
BRepA (w/ only geo. MAE)
14.29 (+5.31)
20.22 (+5.33)
36.64 (+16.33)
63.10 (+28.04)
88.73 (+9.58)
95.79 (+2.88)
98.27 (+0.09)
99.14 (-0.05)
BRepA (ours)
15.87 (+6.89)
22.76 (+7.87)
40.33 (+20.02)
67.58 (+32.52)
91.24 (+12.09)
96.95 (+4.04)
99.12 (+0.94)
99.20 (+0.01)
Table 1: Segmentation performance on the MFCAD [ 3 ] dataset under different label ratios. Results are reported in IoU (%). The table compares UV-Net baselines with BRepA variants, including configurations without self-supervised learning (SSL), with only geometry MAE, and with full dual-MAE pretraining. Across all label ratios, BRepA with dual-MAE pretraining consistently achieves the best performance. Notably, under the setting of 1% labeled samples, dual-MAE pretraining yields a substantial improvement of 32.52% in mIoU.
Method
0.10%
0.20%
0.50%
1%
10%
20%
50%
100%
UV-Net [ 15 ]
4.23
6.15
7.84
11.92
36.47
41.83
53.76
61.34
UV-Net++ [ 15 ]
5.87
8.24
10.93
13.68
41.12
48.35
57.64
62.85
UV-Net++ [ 15 ] & SDF SSL [ 17 ]
8.91
9.76
14.25
16.83
43.58
51.47
58.32
63.15
BRepA (w/o SSL)
9.21
11.90
15.57
19.11
48.19
53.22
61.10
65.20
BRepA (w/ only geo. MAE)
14.92 (+5.71)
18.73 (+6.83)
23.26 (+7.69)
25.84 (+6.73)
52.35 (+4.16)
55.78 (+2.56)
61.94 (+0.84)
66.27 (+1.07)
BRepA (ours)
17.94 (+8.73)
24.16 (+12.26)
29.20 (+13.63)
32.04 (+12.93)
55.27 (+7.08)
58.69 (+5.47)
63.97 (+2.87)
67.19 (+1.99)
Table 2: Segmentation performance on the Fusion 360 [ 32 ] dataset under different label ratios. Results are reported in mIoU (%). The table compares UV-Net baselines with BRepA variants, including configurations without self-supervised learning (SSL), with only geometric MAE, and with full dual-MAE pretraining. Across all label ratios, BRepA with dual-MAE pretraining consistently achieves the best performance, and notably, under the setting of 0.5% labeled samples, dual-MAE pretraining yields a considerable improvement of 13.63% in mIoU.
Figure 5: Comparison of segmentation accuracy across varying label ratios on the MFCAD [ 3 ] dataset. Our BRepA consistently outperforms UV-Net and its variants, especially under low-label regimes, demonstrating strong label-efficiency. The combination of geometric and topology MAE pretraining yields the highest overall accuracy across all label ratios.
Figure 6: Comparison of segmentation accuracy across varying label ratios on the Fusion 360 segmentation [ 32 ] dataset. Our BRepA consistently outperforms UV-Net and its variants. The combination of geometric and topology MAE pretraining yields the highest overall accuracy across all label ratios.
Figure 7: Qualitative comparison of segmentation results on the Fusion 360 segmentation [ 32 ] dataset (100% of the labels are used). The visualization shows ground truth (GT) across different CAD models, along with the prediction from (1) BRepA + MLP seg , and (2) UV-Net++ [ 15 ] with SDF SSL pretraining [ 17 ] . Incorrectly predicted surfaces are highlighted with black dashed circles.
Figure 8: Training convergence comparison of BrepDiff [ 21 ] with and without BRepA feature alignment. The integration of BRepA accelerates training speed by nearly 2× while achieving superior final coverage (COV) performance (higher is better).
Dataset
Model
1-NNA ( ↓ )
COV ( ↑ )
MMD ( ↓ )
MFCAD
BrepDiff
0.574
0.469
0.038
BrepDiff †
0.541
0.500
0.037
Fusion 360
BrepDiff
0.577
0.486
0.026
BrepDiff †
0.542
0.510
0.025
Table 3: Generative performance comparison of BrepDiff [ 21 ] and on the MFCAD [ 3 ] and Fusion 360 [ 32 ] datasets , trained with and without BRepA representations. Results are reported in terms of 1-NNA, Coverage (COV), and Minimum Matching Distance (MMD). The symbol † indicates that BrepDiff is trained with BRepA feature alignment.
Figure 9: Training convergence comparison of BrepDiff [ 21 ] with and without BRepA feature alignment in terms of MMD. The integration of BRepA accelerates training speed by nearly 2× (for MMD, lower is better).
Model
Params
0.50%
1%
10%
BRepA
13.5M
40.33
67.58
91.24
BRepA-L
27M
42.81
69.63
92.70
BRepA-XL
80M
44.37
71.58
93.97
Table 4: Effect of model scaling on BRepA performance on the MFCAD [ 3 ] dataset. Larger variants (BRepA-L and BRepA-XL) are obtained by uniformly increasing the feature dimensions and attention heads in all encoders. Scaling up BRepA consistently improves mIoU across all label ratios, demonstrating the strong scalability of BRepA.
1-shot
2-shot
5-shot
w/ BRepA
12.40
27.13
58.95
w/o BRepA
11.83
17.76
38.37
Table 5: Few-shot classification accuracy (%) on the SolidLetters dataset. BRepA consistently enhances performance across all settings, demonstrating its strong generalization as a discriminative feature extractor.
Figure 10: Loss curves for the Surface LDM (a) and Edge LDM (b) during the training of BrepGen. The results demonstrate that integrating BRepA leads to significantly faster convergence across both generative components.
Figure 11: Training convergence of BrepDiff on ABC. Pretrained BRepA accelerates convergence and improves the 1-NNA metric, demonstrating its generalization to diverse B-Rep distributions.
Figure 12: Comparison of segmentation performance (mIoU) under different masking strengths in BRepA’s dual-MAE pretraining. Medium masking consistently achieves the best performance across different label ratios (0.5%, 1%, 10%).
Method
mIoU (%)
UV-Net [ 15 ]
19.85 ± 0.41
UV-Net++ [ 15 ]
28.12 ± 0.58
UV-Net++ [ 15 ] & SDF SSL [ 17 ]
34.05 ± 0.87
BRepA (w/o SSL)
35.18 ± 0.62
BRepA (w/ only geo. MAE)
63.25 ± 0.68
BRepA
67.42 ± 0.71
Table 6: Repeated segmentation results of BRepA and baseline models on a 1% labeled subset. Each model was evaluated five times to assess robustness to the randomness of subset selection. The table reports the mean and standard deviation of mIoU (%).
Figure 13: Effect of the number of graph layers on segmentation performance of BRepA. The plot shows mIoU (%) on the MFCAD dataset for different numbers of layers in the graph encoder, evaluated under 0.5%, 1%, and 10% labeled subsets.
Figure 14: Qualitative comparison of segmentation results on the Fusion 360 segmentation [ 32 ] dataset (100% of the labels are used). The visualization shows ground truth (GT) across different CAD models, along with the prediction from (1) BRepA + MLP seg , and (2) UV-Net++ [ 15 ] with SDF SSL pretraining [ 17 ] . Incorrectly predicted surfaces are highlighted with black dashed circles.