GraphBrep: Graph-based CAD Representations
- GraphBrep is a framework that represents CAD B-rep models as graphs, where boundary elements like faces and edges serve as nodes and relations capture topological connections.
- It integrates precise geometric sampling with graph-based methods to enable robust tasks such as recognition, segmentation, and direct CAD generation without mesh conversion.
- Recent advancements include self-supervised learning, language alignment, and explicit generative diffusion models that improve efficiency and accuracy in CAD applications.
GraphBrep broadly refers to representing a computer-aided design (CAD) boundary representation (B-rep) as a graph and learning over that graph. In this literature, boundary entities such as faces, edges, vertices, loops, halfedges, or coedges are treated as graph nodes or as typed relations, while adjacency or incidence encodes how parametric curves and surfaces are glued into a solid. The term also names a specific direct B-Rep generative diffusion framework that models topology as a compact undirected weighted graph over surfaces (Lai et al., 7 Jul 2025). Across the literature, GraphBrep methods support supervised recognition, self-supervised representation learning, multimodal language alignment, and direct CAD generation without converting the input to meshes or voxels (Jayaraman et al., 2020, Lambourne et al., 2021).
1. Mathematical basis and graph schemas
The common substrate of GraphBrep is the B-rep itself: a representation in which topology and parametric geometry are jointly present. One formalization defines a B-Rep model as a geometric cell complex,
and abstracts it into a Spatial Hasse Diagram , where nodes are cells and directed edges are topological incidence relations (Lu et al., 25 Jan 2026). Other works adopt more task-specific graphs. UV-Net converts a B-rep into a face-adjacency graph with one node per face and an undirected edge when two faces share at least one geometric edge (Jayaraman et al., 2020). BRepNet instead uses a typed heterogeneous graph with three disjoint node sets—faces, edges, and coedges—and sparse permutation matrices for next, prev, and mate, together with incidence from coedges to faces and edges (Lambourne et al., 2021). BRepMAE and later masked autoencoding methods use a geometric attributed adjacency graph (gAAG), again centered on faces and their BRep adjacencies, sometimes augmented with a virtual node for global aggregation (Yao et al., 26 Feb 2026, Li et al., 16 Mar 2026).
The consequence is that GraphBrep is not a single canonical graph. The graph schema changes with the intended inductive bias: face-adjacency for compact global reasoning, coedge-centered graphs for orientation-aware local kernels, gAAGs for attribute-rich self-supervision, and surface graphs for explicit topology generation.
| Formulation | Nodes or units | Topological relation |
|---|---|---|
| UV-Net | Faces | Shared geometric edge |
| BRepNet | Faces, edges, coedges | next, prev, mate, face/edge incidence |
| gAAG | Faces; in BRepMAE also a virtual node | Face-face adjacency via BRep edges |
| GraphBrep (2025) | Surfaces | counts shared geometric edges |
| Flattened -cell particles | Particles corresponding to -cells | Incidence recovered as a Spatial Hasse Diagram |
This variety explains why the same term can refer both to a general methodology and to a particular model. In the broad sense, GraphBrep denotes graph-native learning on B-reps; in the narrow sense, it can denote the explicit-topology diffusion model introduced in "GraphBrep: Learning B-Rep in Graph Structure for Efficient CAD Generation" (Lai et al., 7 Jul 2025).
2. Geometry–topology fusion in analysis-oriented GraphBrep
Early GraphBrep systems established that exact CAD topology and parametric sampling can be fused directly. UV-Net couples CNNs over UV-domain samples with a GNN over the face-adjacency graph. Face nodes are represented by regular UV grids, typically , with channels drawn from coordinates, optional normals, and a trim mask; graph edges carry 1D curve samples from the shared boundary. The node update extends GIN with messages conditioned on edge features, and the edge update is conditioned on endpoint node features. This design produced strong results across classification, segmentation, and contrastive retrieval: on Machining Feature classification, UV-Net reports accuracy; on MFCAD segmentation it reports IoU; and on ABC segmentation it reports 0 IoU, outperforming point and mesh baselines in the reported comparisons (Jayaraman et al., 2020).
BRepNet pushed the graph formalism closer to the kernel data structure by defining convolutional neighborhoods with respect to oriented coedges. A coedge stores pointers to next, prev, mate, parent face, and parent edge, so a convolution kernel can be written as a fixed ordered list of topological walks. The best-performing "winged edge" kernel gathers 1, 2, 3, 4, 5, and 6, which gives an orientation-aware local neighborhood without symmetric aggregation. Features are intentionally coordinate-free: face surface type and area, edge curve type, convexity, length, and a coedge orientation flag. On the Fusion 360 Gallery segmentation benchmark, BRepNet reports 7 accuracy and 8 IoU with about 9k parameters, substantially above mesh and point baselines in the same study (Lambourne et al., 2021).
Taken together, these systems established a central GraphBrep principle: the most informative signal is not geometry alone, but geometry indexed by exact B-rep adjacency. UV sampling, coedge orientation, trimming, and convexity all act as topologically grounded feature channels rather than post hoc annotations.
3. Self-supervised, hierarchical, and language-aligned extensions
GraphBrep later became a substrate for self-supervised representation learning. BRepMAE formulates the B-rep as a gAAG with one node per face, edge features for face adjacencies, and a virtual node connected to all faces. Its masked autoencoder masks node features while preserving graph topology, uses a default mask ratio of 0, and reconstructs masked face embeddings, UV-grid geometry, face attributes, and face axis-aligned bounding boxes. On machining feature recognition, the pretrained encoder markedly improves low-label performance: with 1 labels, it reports 2 accuracy on MFCAD2, 3 on CADSynth, and 4 on MFInstSeg, all substantially above the compared supervised baselines (Yao et al., 26 Feb 2026).
"Masked BRep Autoencoder via Hierarchical Graph Transformer" extends this line with stricter raw-input masking and a hierarchical encoder. Its gAAG again uses faces as nodes and BRep edges as graph edges, but each face carries dual-resolution UV signals: a 5 grid for coarse semantics and a 6 grid for local detail, while each BRep edge is sampled at 7 points. The encoder combines cross-scale mutual attention (CSMA) with a local MPNN, and pre-training masks both geometry and attributes of faces and edges at a default ratio of 8 while keeping the adjacency graph fixed. On MFInstSeg, it reports 9 accuracy and 0 mIoU with only 1 supervision, and on Fusion 360 Gallery Segmentation it reports 2 accuracy and 3 mIoU in the 10-shot setting (Li et al., 16 Mar 2026).
BrepLLM adapts GraphBrep to language. It converts B-reps into a topology-aware face–edge graph with adaptive UV sampling: each face receives 4 samples with 5 channels, and each boundary edge receives 6 samples with 7 channels. A hierarchical BrepEncoder decomposes the representation into fine face geometry, edge-conditioned neighborhood context, and global topology, producing per-face 8-dimensional node tokens and a global token aligned to text through a symmetric InfoNCE objective against a frozen CLIP text encoder. These tokens are then integrated into a Phi-2 backbone through a Q-Former and a Residual Mixture-of-Query Experts. The accompanying Brep2Text dataset contains 9 BRep-text question-answer pairs, and the model reports 0 average generative classification accuracy and 1 human precision on captioning evaluation (Deng et al., 18 Dec 2025).
These self-supervised and multimodal variants preserve the central GraphBrep assumption that topology should remain explicit during learning. Even when the target task is language grounding rather than CAD segmentation, the graph remains the organizing structure through which geometry is sampled, aggregated, and aligned.
4. Generative GraphBrep and explicit topology learning
The specific 2025 model named GraphBrep recasts direct B-rep generation around explicit topology. It represents a B-rep as an undirected weighted graph 2, where nodes are surfaces, each surface 3 is represented by a bounding box 4 and a Surface-VAE latent 5, each geometric edge is represented by an edge bounding box 6 and an Edge-VAE latent 7, and the adjacency matrix 8 is an integer count of how many geometric edges are shared by surfaces 9 and 0. Its probabilistic factorization is
1
with geometry further factorized into bounding boxes and latent variables (Lai et al., 7 Jul 2025). The explicit topology is intended to remove redundancy present in methods that implicitly fold topology into edge geometry. Empirically, the paper reports training time reduction up to 2 and inference time reduction up to 3 relative to BrepGen, while reaching 4 validity on DeepCAD and 5 on ABC (Lai et al., 7 Jul 2025).
Other generative systems remain graph-centric but change the decoding strategy. AutoBrep linearizes the face adjacency graph with a breadth-first traversal and uses unified discrete tokens for geometry, topology references, and bounding boxes; on ABC-1M unconditional generation it reports 6 Coverage, 7 MMD, 8 JSD, 9 Valid, and 0 s/face (Xu et al., 2 Dec 2025). BrepGPT takes a half-edge view, defines Voronoi Half-Patches on directed half-edges, and uses dual VQ-VAEs to compress connectivity and geometry into vertex-centered tokens; on DeepCAD unconditional generation it reports 1 Coverage, 2 MMD, 3 JSD, and 4 Valid (Li et al., 27 Nov 2025). BrepForge serializes the typed 5–6–7 graph into a face-aware sequence, then instantiates surfaces from boundary-conditioned priors; on full B-rep unconditional generation it reports 8 Coverage, 9 MMD, 0 JSD, 1 Valid, and 2 Cyclomatic Complexity (Li et al., 19 May 2026).
A distinct development is to retain the mathematical foundation of GraphBrep while flattening the representation. "Flatten The Complex: Joint B-Rep Generation via Compositional 3-Cell Particles" starts from the Spatial Hasse Diagram of the B-rep but reformulates it as an unordered set of heterogeneous particles 4, each 5. Higher-order entities reuse lower-order particle latents at shared boundaries, with compositional decoding written as
6
The model supports unconditional generation, single-view and point-cloud reconstruction, local in-painting, and direct non-manifold synthesis. On DeepCAD and ABC, validity improves with inference-time scaling from 7 to 8 particles, from 9 to 0 on DeepCAD and from 1 to 2 on ABC (Lu et al., 25 Jan 2026).
The generative literature therefore exhibits two opposing but related tendencies. One trend seeks more explicit graph structure, as in GraphBrep’s weighted adjacency over surfaces. The other keeps the same topological content but changes the representation class—sequences, half-edge packets, or unordered particles—while preserving graph recovery or graph-conditioned decoding.
5. Benchmarks, metrics, and empirical patterns
GraphBrep research uses a shared set of CAD benchmarks but task-specific evaluation protocols. For analysis and self-supervision, common datasets include Fusion 360 Gallery, MFCAD, MFCAD++, MFInstSeg, CADSynth, Machining Feature, FabWave, SolidLetters or SolidLetter, and ABC subsets (Jayaraman et al., 2020, Lambourne et al., 2021, Yao et al., 26 Feb 2026, Li et al., 16 Mar 2026). For generation, ABC, DeepCAD, Furniture, Roof, and ABC-1M are recurrent (Lai et al., 7 Jul 2025, Xu et al., 2 Dec 2025, Lu et al., 25 Jan 2026, Li et al., 19 May 2026). BrepLLM introduces Brep2Text, with 3 Brep-text pairs built on 4 unique B-rep models (Deng et al., 18 Dec 2025).
Metrics also separate by regime. Recognition and segmentation studies report face-level accuracy, per-class accuracy, IoU, or mIoU (Jayaraman et al., 2020, Lambourne et al., 2021, Yao et al., 26 Feb 2026, Li et al., 16 Mar 2026). Generative studies typically report Coverage, Minimum Matching Distance, Jensen–Shannon Divergence, Novelty, Uniqueness, and Validity; some add 1-NNA, Min-5 validity as complexity grows, or Cyclomatic Complexity (Lai et al., 7 Jul 2025, Lu et al., 25 Jan 2026, Li et al., 19 May 2026). Multimodal language studies add Qwen-Max semantic scoring, Sentence-BERT, SimCSE, human correctness, hallucination, and precision (Deng et al., 18 Dec 2025).
Several empirical patterns recur. First, graph-native B-rep methods consistently outperform point, voxel, or mesh baselines on CAD-native tasks when topology matters. UV-Net exceeds point and voxel baselines in classification and segmentation, while BRepNet exceeds ECC, PointNet++, and MeshCNN on Fusion 360 Gallery (Jayaraman et al., 2020, Lambourne et al., 2021). Second, validity in generation is not equivalent to distributional fidelity; papers routinely report both, and methods differ in how they trade them. GraphBrep improves validity and runtime through explicit topology learning, AutoBrep emphasizes unified autoregression over the face adjacency graph, and Flatten The Complex reports that validity declines less with increasing face count than baseline methods beyond 6 (Lai et al., 7 Jul 2025, Xu et al., 2 Dec 2025, Lu et al., 25 Jan 2026). Third, low-label transfer has become a major benchmark in GraphBrep understanding. Both BRepMAE and the hierarchical masked graph Transformer report large gains at 7 supervision, indicating that masked reconstruction over raw B-rep signals is a strong pretext task for downstream CAD understanding (Yao et al., 26 Feb 2026, Li et al., 16 Mar 2026).
6. Limitations, misconceptions, and research directions
A persistent misconception is that GraphBrep denotes one fixed graph abstraction. The literature shows otherwise: face-adjacency graphs, coedge-centered typed graphs, gAAGs, surface-topology graphs, and flattened 8-cell particle sets all appear, and they encode different parts of the same B-rep structure with different inductive biases (Jayaraman et al., 2020, Lambourne et al., 2021, Lu et al., 25 Jan 2026). Another misconception is that graph-native learning eliminates the need for CAD-kernel post-processing. In practice, many generative systems still reconstruct point samples or latent geometry and then rely on OCCT, OpenCascade, or Fusion 360 for stitching, orientation, sewing, trimming, or validity checks (Lai et al., 7 Jul 2025, Li et al., 19 May 2026, Lu et al., 25 Jan 2026).
The main technical limits are also consistent across papers. Fixed UV sampling can miss stretched parameterizations or sharp micro-geometry; UV-Net explicitly notes derivative-based adaptive sampling as future work, and BrepLLM constrains per-face and per-edge samples to 9, which can undersample very small features (Jayaraman et al., 2020, Deng et al., 18 Dec 2025). Large models with many faces stress attention and memory: the hierarchical graph Transformer reports quadratic attention cost in the number of faces, and AutoBrep caps training to 0 faces and 1 edges per sample (Li et al., 16 Mar 2026, Xu et al., 2 Dec 2025). Exact engineering constraints remain open: GraphBrep still relies on post-hoc checks, Flatten The Complex identifies wrinkled faces, boundary violations, and assembly conflicts as failure modes, and several papers explicitly list tangency, fillets, tolerance compliance, assemblies, and design-intent recovery as future work rather than solved capabilities (Lai et al., 7 Jul 2025, Lu et al., 25 Jan 2026, Yao et al., 26 Feb 2026).
A plausible implication is that future GraphBrep systems will remain hybrid. The cited work already points in that direction: richer geometric descriptors and discrete distributions over adjacency counts for explicit topology models, hierarchical or multi-resolution graphs for self-supervision, stronger constraint-aware decoding for autoregressive generators, and deeper integration with standard CAD kernels for trim handling, seam handling, and exact analytic constraints (Lai et al., 7 Jul 2025, Li et al., 16 Mar 2026, Jayaraman et al., 2020). The field has therefore moved beyond asking whether B-reps can be learned as graphs; the active question is which graph formalization most effectively preserves CAD validity, geometric precision, and task transfer at scale.