Source-linked AI summary

HiFi-BRep: High-Fidelity Latent Representation for Robust B-Rep Generation

Junhao Hou, Chenqi Luo, Pufan Wang, Jiaying Lu, Yusheng Liu, Feiwei Qin, Meie Fang, Kun Zhou

arXiv:2608.16485v1cs.CV

TL;DR

High-fidelity, structurally valid B-Rep generation remains difficult because existing methods struggle with representational fidelity and structural validity. HiFi-BRep uses topology-aware encoding and validity-constrained single-stage decoding, significantly outperforming state-of-the-art methods in geometric fidelity and structural validity.

  • Problem

    Generating valid B-Reps requires jointly modeling parametric geometry and topology under strict validity constraints, while existing methods struggle to ensure representational fidelity and structural validity simultaneously.

  • Method

    HiFi-BRep combines a topology-aware encoder that removes padding noise with a validity-constrained single-stage decoder that jointly predicts geometry and topology.

  • Results

    72.20% Validity on DeepCAD is the highest reported, while HiFi-BRep also significantly outperforms state-of-the-art methods in geometric fidelity and structural validity overall.

  • Takeaways & Limitations

    HiFi-BRep provides state-of-the-art topology validity while maintaining strong consistency between compilability and manifold correctness.

  • Takeaways & Limitations

    The framework targets closed, watertight solids under a fixed face/edge budget and does not yet cover open-boundary parts, large assemblies, or non-manifold configurations.

Abstract

from arXiv · show

Boundary representation (B-Rep) generation is a fundamental task in computer-aided design, yet the direct synthesis of high-fidelity and structurally valid B-Reps remains a major challenge. Existing deep generative methods suffer from two forms of brittleness: representation brittleness, caused by padding noise and feature contamination in the latent space, and generation brittleness, stemming from sequential error propagation and a train-inference mismatch due to non-differentiable validity enforcement. We propose HiFi-BRep, a novel framework that addresses these limitations through two synergistic contributions. First, a topology-aware encoder constructs a high-fidelity latent representation by eliminating padding via learnable queries and preventing feature contamination with topology-guided attention. Second, a single-stage decoder jointly predicts geometry and topology in parallel, embedding core manifold constraints as a differentiable learning objective. This design ensures mutual guidance between geometry and topology while avoiding cascaded errors. Extensive experiments show that HiFi-BRep significantly outperforms state-of-the-art methods in both structural validity and geometric fidelity, providing a robust solution for high-quality B-Rep synthesis. Code and models are publicly available at https://github.com/1nnoh/HiFi-BRep.

1. Introduction

B-Rep generation must jointly model parametric geometry and topology under strict validity constraints, but existing methods suffer from representation and generation brittleness. HiFi-BRep addresses these issues with a padding-free topology-aware encoder and a validity-constrained single-stage decoder that jointly predicts geometry and topology.

  • Motivation: B-Rep encodes 3D shapes with parametric primitives and their topological connections, supporting precise modeling for CAD, engineering, and manufacturing.It represents surfaces, curves, and vertices together with their topological relationships.
  • Challenges: Strict validity rules make B-Rep generation challenging because minor errors can cascade and invalidate an entire model.The task jointly models continuous parametric geometry and discrete topology.
  • Limitations: Existing methods exhibit representation brittleness from padding noise and feature contamination, alongside generation brittleness from cascaded synthesis and one-way information flow.These weaknesses hinder simultaneous representational fidelity and structural validity.
  • HiFi-BRep: HiFi-BRep uses learnable queries and topology-guided attention to produce high-fidelity latent representations without padding noise or feature contamination.Its compact representation contains two geometric sequences and an explicit edge-face adjacency matrix.
  • HiFi-BRep: Its single-stage decoder jointly predicts geometry and topology in parallel while enforcing manifold validity through a row-wise two-peak objective.The objective explicitly steers predictions toward the “two faces per edge” constraint.

2. Related Work

Related work addresses B-Rep representation learning and generation, emphasizing joint modeling of geometry, topology, and structural validity. It also covers alternative CAD paradigms based on constructive solid geometry and procedural modeling.

  • Overview: B-Rep methods must learn representations capturing geometry and topology while designing generation procedures that account for structural validity.The section organizes prior work around representation learning and generation, with brief coverage of alternative CAD paradigms.
  • B-Rep Representation Learning: Graph-based B-Rep representations encode geometric entities as nodes and topological relations as edges, using homogeneous or heterogeneous graph structures.These representations support downstream tasks including shape classification, retrieval, and segmentation.
  • B-Rep Generation Methods: Prior B-Rep generators face limitations from hierarchical or multi-stage designs, sequential error propagation, complex representations, padding noise, restricted topology expressiveness, and post-processing validity enforcement.These issues prevent existing approaches from simultaneously achieving compactness, expressive topology, and consistent validity handling.
  • Constructive Solid Geometry and Procedural Modeling: CSG methods reconstruct Boolean-operation trees with strong interpretability and editability, but their expressiveness depends on the primitive library and equivalent trees can create redundancy.Procedural alternatives also include construction history sequences.

3. Method

HiFi-BRep models B-Rep solids as jointly geometric and topological structures under manifold and watertightness constraints. Its method combines topology-aware latent encoding with single-stage parallel decoding and differentiable validity objectives.

  • B-Rep Formulation: B-Rep solids are represented by parametric faces, parametric edges, and an edge-face incidence matrix while modeling their joint distribution under manifold and watertightness constraints.The formulation defines B = (F, E, A), where A captures edge-face adjacency.
  • Single-Stage Decoder: The decoder predicts counts, geometry, and edge-face adjacency in one masked pass, allowing topology and geometry to mutually guide generation without cascaded error propagation.Count queries establish hard padding masks, while geometry heads and a topology compatibility head decode the primitive sequences.
  • Input B-Rep Formulation: Faces use Bézier surfaces and edges use Bézier curves with bounding boxes, control points, and explicit endpoints, while topology is encoded by an incidence matrix.This compact parameterization reduces representation noise while preserving smooth geometry and essential topology.
  • HiFi Latent Representation: The encoder separates face and edge streams, restricts cross-stream attention to topologically adjacent primitives, and pools variable-length tokens with learnable queries into a fixed-length latent.Key-padding masks remove padded-token effects, yielding a structured latent interface for decoding and latent diffusion.
  • Topology Objective: A row-wise softmax uses a two-peak target assigning equal probability to each edge’s two incident faces, making the manifold prior differentiable during training.At inference, the two highest-scoring valid faces are selected for each valid edge.

4. Experiments

HiFi-BRep is evaluated on DeepCAD and ABC using distributional-fidelity, diversity, compilability, and validity metrics. It achieves strong structural validity, robust reconstruction across topology scales, and fast inference through its topology-aware representation and single-stage generation design.

  • Experimental setup: Evaluation uses deduplicated, complexity-capped DeepCAD and ABC benchmarks containing 83,611 and 186,148 training shapes, respectively.The study reports Coverage, MMD-CD, JSD, Novel, Unique, Compilability, and Valid metrics.
  • Unconditional generation: 72.20% Validity and 1.05 MMD-CD are achieved by HiFi-BRep on DeepCAD, while COV remains close to the programmatic DeepCAD baseline.On ABC, DTGBrepGen provides the best reported distributional alignment, whereas HiFi-BRep delivers the hig…
  • Unconditional generation: HiFi-BRep typically preserves watertightness and edge–face consistency, while baselines show collapsed plates or rods, missing faces, and non-manifold junctions.These qualitative trends mirror the reported validity and distributional-fidelity results.
  • Reconstruction analysis: Reconstruction Validity remains stable across common face counts and exceeds 61.5% in rare high–face-count bins up to 29 faces.The result is attributed to the padding-free latent and topology-constrained attention capturing intrinsic topo–geometric couplings.
  • Ablation study: Removing the two-stage setting drops Valid from 95.2% to 69.3% and Adj Acc from 97.5% to 73.2%, demonstrating the importance of joint generation.Canonicalization also yields a small but stable gain by reducing permutation-induced variance.
  • Runtime analysis: 3.83 s/shape is HiFi-BRep’s lowest total inference time over 1,000 non-parallel DeepCAD generations.Its post-processing takes 0.53 s versus 0.32 s for BRepGen, but the single-stage pipeline avoids multi-pass decoding.

5. Limitations and Future Work

HiFi-BRep currently targets closed, watertight solids under fixed face/edge budgets, with residual failures arising from trimming, junction consistency, and degenerate geometry. Future work will improve robustness and scalability through dynamic-capacity decoding, differentiable feasibility projections, broader model coverage, and stronger consistency constraints.

  • Current limitations: The framework currently targets closed, watertight B-Rep solids under fixed face/edge budgets, excluding open-boundary parts, large assemblies, and non-manifold configurations.Its one-shot decoder also depends on accurate masks and consolidation tolerances.
  • Current limitations: Residual failures include missing trimmed faces, non-manifold junctions, and sliver or self-intersecting patches despite correct face counts or top-2 adjacency.These arise from trimming disagreement, duplicated or inconsistent segments after consolidation, and ill-conditioned control points.
  • Current limitations: These failure modes contribute to the remaining Compilability–Validity gap because exact surface–curve intersection and trimming remain delegated to the CAD kernel.The gap reflects limitations in both geometric trimming and consolidated manifold incidence.
  • Future work: Future work will pursue dynamic-capacity decoding with variable-length queries, differentiable feasibility projections, extensions to open-boundary models and assemblies, and explicit vertex constraints with global consistency checks.These directions aim to handle long-tailed topology and suppress trimming and junction errors without sacrificing the pipeline’s one-shot nature.

6. Conclusion

HiFi-BRep addresses representation and generation brittleness in B-Rep generation through a topology-aware encoder and a single-stage decoder. The encoder produces high-fidelity latent representations, while the decoder jointly generates geometry and topology using differentiable validity objectives.

  • Framework overview: HiFi-BRep addresses representation and generation brittleness through two synergistic innovations.The framework targets both limitations in prior B-Rep generation methods.
  • Topology-aware encoder: A topology-aware encoder uses query-based pooling and topology-guided attention to eliminate padding noise and feature contamination.These mechanisms produce high-fidelity latent representations.
  • Single-stage decoder: A single-stage decoder embeds validity constraints as differentiable objectives for joint geometry-topology generation.The decoder integrates geometry and topology generation in a unified stage.

Supplementary Material · A. Implementation Details · B. Novelty Verification

The supplementary material specifies HiFi-BRep’s training and inference configuration and describes a retrieval-based check for whether generated B-Reps are novel rather than memorized. The implementation uses distinct precision settings and a DDPM latent-diffusion setup, while novelty is evaluated against the full training corpus using geometric and rendering-based distances.

  • A. Implementation Details: HiFi-BRep uses 12 attention heads by default across its attention modules.
  • A. Implementation Details: The model trains in mixed-precision bfloat16 and performs inference in float32.
  • A. Implementation Details: Its latent diffusion model uses DDPM for 1,000 diffusion steps.
  • A. Implementation Details: The diffusion configuration sets beta start= 1e−4, beta end= 2e−2, the squaredcos cap v2 schedule, and prediction type to sample.
  • B. Novelty Verification: The novelty check evaluates 500 randomly generated B-reps against the entire training corpus.
  • B. Novelty Verification: For each generated B-rep, the protocol retrieves two nearest training neighbors using Chamfer Distance on sampled surfaces and Light Field Distance on multi-view renderings.

C. Conditional Generation · D. Unconditional Generations on ABC

HiFi-BRep supports conditional B-Rep generation across class, point-cloud, sketch, and view-based inputs while preserving structural and geometric consistency. Additional unconditional ABC results show coherent solids with consistent edge–face incidence and fewer topology errors from single-stage decoding.

  • C. Conditional Generation: Conditions are encoded as vectors and injected into the diffusion denoiser through Adaptive LayerNorm to steer denoising while maintaining valid topology.Class labels use 768-dimensional embeddings; point clouds use PointNet++ features from 2,048 points.
  • C. Conditional Generation: Class-conditioned Furniture generations express category-specific structures while preserving variation within each class.Furniture provides ten balanced categories with clear visual differences.
  • C. Conditional Generation: Point-cloud-conditioned CADNet40 outputs follow input geometry and preserve key features including holes and fillets.CADNet40 contains realistic industrial parts and supports practical control tasks.
  • C. Conditional Generation: Partial point-cloud conditioning completes missing local regions while keeping observed parts consistent with the input.The input point clouds contain missing local areas.
  • C. Conditional Generation: Sketch-conditioned outputs align with silhouettes and recover coherent faces and edges, while single-view outputs typically capture global shape without multi-view cues.For each single-view input, two candidates are sampled and at least one is view-consistent.
  • C. Conditional Generation: Multi-view conditioning yields viewpoint-consistent generations that recover fine details more reliably than single-view inputs.The result is illustrated in Fig. 13.
  • D. Unconditional Generations on ABC: Unconditional ABC examples produce coherent solids with consistent edge–face incidence and fewer topology errors through single-stage decoding.These examples align with the validity gains reported in Sec. 4.2.

E. Data Preprocessing and Postprocessing

The pipeline preprocesses B-Reps by removing periodic elements, normalizing and ordering entities, and representing geometry with control points. Postprocessing reconstructs topology, refines sampled geometry, and validates final solids through OpenCascade closure and volume checks.

  • Preprocessing: Preprocessing removes periodic seams, normalizes each model to [-1, 1]^3, records face and edge position boxes, and orders sequences lexicographically.Torus faces and ring edges are split so no periodic faces or edges remain.
  • Preprocessing: The method stores control points instead of sampled points, reducing parameter count and improving surface smoothness.This representation choice follows benefits reported for control-point representations in prior work.
  • Postprocessing: Postprocessing reconstructs face loops from predicted edge–face incidence by pairing each edge endpoint with the nearest endpoint on a different edge.The preprocessing guarantee that no ring edges remain ensures loop corners connect different edges.
  • Postprocessing: Faces and edges are sampled with 32 × 32 grid points and 32 points, respectively, then de-normalized and refined so connected surfaces and curves meet cleanly.Sampling uses predicted control points together with face and edge geometry representations.
  • Postprocessing: OpenCascade treats construction exceptions as compile failures and accepts samples only when the model is closed and has finite volume.These checks certify closure and watertightness, while topological legality is enforced before compilation.
  • Postprocessing: Postprocessing is slightly slower than BRepGen because it fits curves and surfaces from control points, despite sharing the same assembly procedure.The additional fitting and control-point processing account for the reported slowdown.

F. Generality of the Proposed Generator

HiFi-BRep handles common cases in which face pairs share multiple edges by predicting unique edges and faces with explicit incidence assignments, rather than tying edge creation to a single intersection. Such cases are prevalent in ABC, while the proposed single-step, validity-aware decoding avoids special rules for frequent multi-edge configurations.

  • Multi-edge modeling: HiFi-BRep predicts unique edges and faces, then assigns each edge to its two incident faces through an explicit incidence matrix.This design imposes no built-in cap on the number of edges shared by a face pair.
  • Multi-edge prevalence: The shared-edge distribution is long tailed, making a practical cap a modeling limitation for rare but valid cases.The reported cap covers 99.9% of ABC statistics, but does not cover every valid configuration.
  • Multi-edge modeling: Separating edge and face sets with explicit incidence lets HiFi-BRep cover frequent multi-edge cases without special rules in a single-step, validity-aware decoder.This contrasts with tying edge creation to a single face-pair intersection, which practically permits one shared edge unless extra logic is added.
  • Multi-edge prevalence: 63.37% of ABC models have a maximum shared-edge count greater than one after splitting periodic faces and ring edges at seams.Without splitting, the corresponding share remains 23.71%.
Loading 2608.16485v1…