Source-linked AI summary
Learn the Solid, Not the File: Canonical Inputs for Neural Networks on CAD Boundary Representations
Heinrich Jiang, Hager Yasser Mohamed, Alexander Hitt, Valeriia Lomakina, Henning Jiang, Jennifer Jang
TL;DR
The paper asks whether B-rep neural networks remain reliable when the same CAD solid is encoded through different valid B-reps, a common consequence of modeling and file-processing choices. It introduces the canonical region graph, which derives regions, features, and coordinates from the solid itself, and reports robust behavior under tested B-rep variations while matching the strongest baseline on standard benchmarks.
Problem
Existing B-rep encoders are not robust to valid variations in how the same solid is partitioned, expressed, or transformed.
Method
The canonical region graph merges faces belonging to the same underlying surface and computes features in a frame derived from the solid’s centroid and principal directions.
Results
The method matches the strongest baseline on standard benchmarks and remains stable under the tested B-rep variations, including benchmark perturbations and human-authored alternatives.
Takeaways & Limitations
Deriving neural-network inputs from the solid rather than file-specific partitioning supports robustness to equivalent B-representations.
Takeaways & Limitations
Partition invariance can reduce performance when labels encode modeling history, as in Fusion 360 Gallery face segmentation.
Abstract
from arXiv · showhide
Boundary representation (B-rep) is the standard format used by modern CAD systems for parametric 3D models. It turns out, the exact same solid can be represented by different B-reps: for example, two engineers using different operations, a geometry kernel rebuilding the file, and an export setting repartitioning faces will lead to different B-reps even though the underlying solid remains the same. We show that existing B-rep encoders are not robust to variation in the B-rep with the same solid on perturbations applied to standard benchmarks, naturally occurring variations inherent to CAD software, and differences in how designers model the same part via a human dataset we created in FreeCAD. The performance of popular B-rep encoders often collapses catastrophically. We propose the canonical region graph, an input representation whose nodes, features and coordinate frame are derived from the solid itself and show theoretical invariance guarantees on repartitioning and rigid motions. It matches the strongest baseline on standard benchmarks, and is stable under every perturbation we test.
1 INTRODUCTION
B-reps can encode the same solid through different partitions, coordinate frames, and software-dependent construction choices, but existing encoders are not robust to these equivalent representations. The canonical region graph instead derives its regions and frame from the solid itself, with experiments targeting automatic and human-authored variation.
- Motivation: B-reps can differ substantially while representing the same solid because of partitioning, coordinate frames, surface representations, and CAD-software decisions.These variations can arise from modeling-operation order, curve construction, cleanup settings, geometry kernels, and export settings.
- Contribution: Figure 1 shows that FreeCAD and Rhino representations of one solid yield the same canonical graph, whereas baseline graphs depend on the original partitioning.The canonical-region construction removes differences caused by how the solid boundary was partitioned in the file.
- Motivation: Existing B-rep encoders should ideally produce similar outputs across equivalent B-reps, yet standard-benchmark perturbations expose significant performance breakdowns.The paper identifies this robustness gap despite widespread use of B-rep neural networks.
- Contribution: The canonical region graph merges fragments of the same underlying surface and expresses features in a solid-derived frame, making them invariant to repartitioning and rigid motions.Canonical regions replace file-dependent face fragments, while the frame is computed from the solid’s center of mass and principal directions.
- Evaluation: The evaluation tests automatic repartitioning, rigid motion, NURBS re-expression, commercial-kernel round trips, and a human FreeCAD dataset with multiple modeling approaches.The human dataset was labeled by CAD experts and includes multiple ways of modeling the same solid.
2 RELATED WORK
Related B-rep encoders transform native CAD representations into neural-network inputs using face grids, hierarchical sequences, or primitive lists, but these choices inherit file-specific structure. The canonical graph instead emphasizes information determined by the solid.
- Learning on B-reps: Native B-reps require preprocessing before neural networks can consume them, and established encoders inherit properties of the file representation rather than only the solid.The field has converged on several preprocessing strategies, each retaining different B-rep-specific information.
- Learning on B-reps: UV-Net samples parameterized face grids, while other methods tokenize the B-rep hierarchy or reduce the model to primitives with limited applicability to primitive CAD.These inputs depend on face parameterizations, hierarchical trees, or restricted primitive descriptions.
- Robustness for B-rep Neural Networks: The canonical graph avoids construction-specific information by representing the solid with canonical regions and solid-derived coordinates.This design targets variation caused by how the B-rep was constructed rather than by the underlying geometry.
- Robustness for B-rep Neural Networks: Existing robustness work addresses equivalent sampling orders within fixed faces but does not address changes to the boundary partition itself.UV-Net and AAGNet retain sensitivity to partition changes, while BRepGAT reports a gap between its own and externally authored models.
3 THE CANONICAL REGION GRAPH
The canonical region graph replaces stored B-rep faces and file coordinates with connected underlying-surface regions and a frame computed from the solid. Its features summarize these regions and boundaries for graph-transformer learning.
- Design principle: The representation is designed so its graph and features depend on the solid’s geometry rather than on arbitrary B-rep construction choices.This design connects the canonical regions, canonical frame, and feature computation into a file-independent input.
- Nodes and Edges: Canonical-region nodes are maximally connected regions formed by merging adjacent faces that represent the same underlying surface.Surface keys recognize analytic surfaces and analytic geometry expressed as splines or procedural constructions, then merge equal-key faces sharing an edge.
- The Canonical Frame: The canonical frame uses the boundary centroid as origin and principal directions as axes, with sign blending and ambiguity handling for stable orientation.This frame is computed from the solid rather than inherited from the designer’s file coordinate system.
- Node and Edge Features: Each region has 115 features and each shared boundary has 10 features, with all positions and directions expressed in the canonical frame.The feature inventory largely follows established B-rep attributes, but computes them on canonical regions instead of stored faces.
- Learning on the graph: A graph transformer processes standardized features through an MLP stem, eight rounds of edge-conditioned multi-head attention, residual blocks, and a per-region prediction head.Face-level predictions inherit the prediction of their canonical region, so faces within one region agree by construction.
4 INVARIANCE GUARANTEES
The paper proves that canonical regions, additive features, and the solid-derived frame are invariant to valid repartitioning and rigid motions, with mesh-computed features stable up to discretization error. Table 1 evaluates these invariance properties on perturbed MFInstSeg test solids.
- Canonicality: The canonical region graph is uniquely determined by the solid for valid B-reps composed of supported analytic surfaces, independent of the original partition.The resulting graph is isomorphic across valid partitions and has identical node geometry.
- Verification in practice: Table 1 compares original and perturbed MFInstSeg graphs using structure matches and largest feature disagreement, summarized by 50th and 99th percentiles and worst cases.The perturbations include repartitioning, NURBS re-expression, and rigid motions; residuals are measured in training-set standard-deviation units.
- Additivity over subdivisions: Additivity over subdivisions makes surface and edge features unchanged when valid regions are subdivided, and therefore independent of the valid partition.The same additivity also supports partition-invariant computation of the canonical frame over the whole boundary.
- Lower bound on partition-invariance: Partition-invariant predictors can depend only on underlying solid geometry, so their risk is bounded by label disagreement among B-reps encoding the same geometry.Lower risk requires exploiting partition information not determined by geometry.
- Stability and rigid-motion invariance: Mesh-computed features change by at most O(ε) when sample positions and area weights change by ε, while the canonical frame yields exact invariance to translation and rotation.The rigid-motion guarantee preserves partition invariance after expressing features in the canonical frame.
5 EXPERIMENTS
Across segmentation, retrieval, churn, augmentation, kernel, and human-authored tests, the canonical region graph remains stable under valid B-rep variations while popular baselines degrade. The method is also limited when boundary decomposition encodes the target label itself.
- Repartitioning: Figure 3 shows B-rep baseline accuracy declining monotonically as face splitting increases, whereas the proposed method stays at parity accuracy.The x-axis reports repartition intensity on a log scale, and DGCNN is partition-invariant but incurs a massive accuracy cost.
- Segmentation Benchmark: The canonical region graph remains robust across automatic segmentation perturbations, while popular B-rep baselines degrade significantly.The evaluation covers axis and diagonal splits, varying split counts, rigid motions, NURBS re-expression, and composed perturbations.
- Retrieval and Stability: Across 3000-part retrieval, predictive churn, and human-authored FreeCAD tests, the method is the most consistent or far more consistent than the baselines.Retrieval uses perturbed queries against clean B-reps; churn measures changed face predictions and changed solids.
- Data Augmentation: Data augmentation improves robustness for its matched perturbation but transfers weakly across perturbations, while the unaugmented proposed method surpasses each augmented baseline.The comparison is reported as a matrix of every baseline and augmentation evaluated on every perturbation.
- CAD Software Variations: The method remains most stable after Rhino import/export and significantly outperforms baselines under kernel-induced repartitioning.The kernel-induced experiment uses 1,049 procedurally generated pairs, while the Rhino test reports macro mIoU and predictive churn.
- Limitation: In Fusion 360 feature-label segmentation, invariance can reduce clean-data performance because the target labels may depend on modeling-history traces in the boundary decomposition.Under automatic perturbations, the proposed robustness can nevertheless overcome baseline decay.
6 CONCLUSION
The paper finds that existing B-rep encoders are sensitive to representation changes and introduces the canonical region graph to derive inputs from the solid itself. The method preserves benchmark performance while remaining stable under B-rep variation, though invariance can sacrifice information useful for modeling-history labels.
- Existing B-rep encoders are not robust to different B-representations of the same solid.
- The canonical region graph derives nodes, features, and coordinates from the solid and provides theoretical invariance guarantees.
- The method matches the strongest baseline on standard benchmarks and remains stable under B-rep variation.
- Future work targets feature trees, construction histories, assemblies, 2D sketches, and drawings while retaining invariance constraints.
A PROOFS
The proofs establish that canonical regions and solid-derived features are invariant to valid repartitioning, while the canonical frame addresses rigid-motion ambiguities. They also characterize the statistical cost of requiring predictions to depend only on geometry.
- Analytic surface decomposition makes maximal connected regions unique up to measure-zero seams, supporting canonical-region invariance.
- Integrals over a region are unchanged when its boundary is split into faces, and boundary integrals exclude internal seams introduced by such splits.
- Partition-invariant predictors factor through the solid geometry, but labels differing for the same solid impose a positive Bayes-risk lower bound.
- The centroid and principal axes transform predictably under rigid motions, while third moments and right-handedness resolve frame ambiguities subject to degeneracies.
- Soft binning and quadrature features admit Lipschitz perturbation bounds, whereas hard binning has no such bound at bin boundaries.
B EXPERIMENT IMPLEMENTATION DETAILS
The experiments use controlled geometric perturbations, explicit validity and correspondence rules, standard training protocols, and several evaluation procedures. The human-study table measures predictive churn between independently authored constructions.
- Perturbations include re-partitioning, random rotations, and exact NURBS re-expression, retaining solids only when relative volume and area changes are at most 10^-9.
- Models use AdamW with a OneCycleLR schedule, batch size 64, label smoothing, EMA, and an 8-layer, 8-head graph architecture.
- Evaluation uses official test splits, validity filtering, validation-selected checkpoints, and three random initializations for the authors’ method.
- Table 69 measures the percentage of face predictions that change between independently authored constructions, separating within- and between-designer pairs.
- Retrieval uses mean-plus-maximum pooled node features from released checkpoints and cosine similarity for top-1 database retrieval.
C THE HUMAN STUDY IN DETAIL
The human study audits how modeling habits and file-processing choices affect B-representations, while controlling for geometric identity and multi-body structure. It also defines a softer unchanged-face comparison for geometrically mismatched pairs.
- Designer habits can split cylindrical or planar faces, while cleanup and kernel normalization remove some construction artifacts before export.
- Multi-body parts are matched by volume and centroid, allowing all 100 human programs to remain usable for evaluation.
- Files are generated through one deterministic runner, and same-shape pairs are gated by a spatial identity check with a 1e-6 relative tolerance.
- Cross-designer matching narrowed 35 staged pairs to 24 confirmed geometrically identical pairs after surface-point checks.
- For geometrically mismatched pairs, consistency is scored only on identically built faces, but graph context can still change predictions on those faces.
D CANONICAL FRAME DETAILS
The canonical frame derives coordinates from the solid’s inertia tensor and resolves eigenvector sign, degeneracy, and handedness ambiguities continuously.
- Canonical frame construction: The inertia tensor provides a partition-invariant frame, replacing the arbitrary file coordinate system that makes baseline placement features rotation-sensitive.Its eigenvectors are computed from boundary integrals.
- Canonical frame construction: Third-order moments fix eigenvector signs through a closed-form cubic over mesh triangles, with continuous blending near ambiguous thresholds.This resolves sign ambiguity without discontinuous frame changes.
- Degeneracy handling: Closed-form rotational averages handle nearly equal eigenvalues, producing basis-independent features at pairwise or complete degeneracies.The projections are applied independently to avoid order dependence when multiple eigenvalue gaps are small.
- Handedness correction: The frame is constrained to remain right-handed, correcting left-handed sign assignments on the least trusted axis and blending ties continuously.This prevents mirrored solids from receiving mirrored coordinate frames with identical features.
E THE PROCEDURE IN FULL
The full procedure canonicalizes ambiguous surface representations by deterministic type selection, scale normalization, and standardized surface labels.
- Surface typing: Ambiguous analytic fits are resolved by choosing the simplest admissible surface type, with machine-precision fits taking priority.The selection order is plane, sphere, cylinder, cone, then torus.
- Normalization: Uniformly scaling each solid to unit boundary area makes later tolerances size- and unit-independent while remaining rotation-invariant.This replaces the baselines’ bounding-box normalization.
- Surface labeling: Analytic surfaces receive unique standardized labels rounded to 10−6, while freeform faces are fitted back to analytic types when residuals fall below 10−6·scale.Genuine matches measure ∼10−9, whereas non-matches are O(1); remaining freeform surfaces use their control points.
F REPRESENTATION-LEVEL VERIFICATION IN FULL
Representation-level verification compares canonical graphs directly under perturbations, separating exact invariant features from mesh-tolerance features and measuring their residual drift.
- Verification protocol: The verification tests a single structure-preserving node bijection that simultaneously matches adjacency and features, recomputing all residuals under that common assignment.Colored graph isomorphism resolves symmetric cases where feature matching alone spuriously fails.
- Feature classes: Exact features are provably invariant because they use exact kernel integration, whereas mesh-tolerance features have bounded but nonzero drift assessed empirically.Only the exact feature class is invariant by proof.
- Measured residuals: ≤10−15 residuals are measured for area, centroid, moments, type, axes/radii, and other exact features.These values are reported as raw relative errors on the stress set.
- Measured residuals: Mesh-tolerance residuals reach ≤1.8 × 10−7 for loops, boundary length, and normal integrals, while curvature integrals are 0 and dihedral histograms reach ≤3 × 10−8.Table 11 organizes drift by perturbation and reports structure-identical fractions plus residual percentiles in σ units.