Table of Contents
Fetching ...

AutoRegressive Generation with B-rep Holistic Token Sequence Representation

Jiahao Li, Yunpeng Bai, Yongkang Dai, Hao Guo, Hongping Gan, Yilei Shi

TL;DR

BrepARG addresses the fragmentation between geometry and topology in B-rep by encoding the entire B-rep as a single holistic token sequence for autoregressive generation. It combines geometry, position, and topology tokens with a topology-aware sequence construction and trains a decoder-only transformer to predict the next token, enabling end-to-end B-rep generation. The approach achieves state-of-the-art results on multiple datasets, demonstrates competitive efficiency, and provides a foundation for class-conditioned and failure-aware improvements in generative CAD. This holistic, sequence-based formulation has practical impact by simplifying pipelines and enabling scalable, coherent generation of complex B-rep models.

Abstract

Previous representation and generation approaches for the B-rep relied on graph-based representations that disentangle geometric and topological features through decoupled computational pipelines, thereby precluding the application of sequence-based generative frameworks, such as transformer architectures that have demonstrated remarkable performance. In this paper, we propose BrepARG, the first attempt to encode B-rep's geometry and topology into a holistic token sequence representation, enabling sequence-based B-rep generation with an autoregressive architecture. Specifically, BrepARG encodes B-rep into 3 types of tokens: geometry and position tokens representing geometric features, and face index tokens representing topology. Then the holistic token sequence is constructed hierarchically, starting with constructing the geometry blocks (i.e., faces and edges) using the above tokens, followed by geometry block sequencing. Finally, we assemble the holistic sequence representation for the entire B-rep. We also construct a transformer-based autoregressive model that learns the distribution over holistic token sequences via next-token prediction, using a multi-layer decoder-only architecture with causal masking. Experiments demonstrate that BrepARG achieves state-of-the-art (SOTA) performance. BrepARG validates the feasibility of representing B-rep as holistic token sequences, opening new directions for B-rep generation.

AutoRegressive Generation with B-rep Holistic Token Sequence Representation

TL;DR

BrepARG addresses the fragmentation between geometry and topology in B-rep by encoding the entire B-rep as a single holistic token sequence for autoregressive generation. It combines geometry, position, and topology tokens with a topology-aware sequence construction and trains a decoder-only transformer to predict the next token, enabling end-to-end B-rep generation. The approach achieves state-of-the-art results on multiple datasets, demonstrates competitive efficiency, and provides a foundation for class-conditioned and failure-aware improvements in generative CAD. This holistic, sequence-based formulation has practical impact by simplifying pipelines and enabling scalable, coherent generation of complex B-rep models.

Abstract

Previous representation and generation approaches for the B-rep relied on graph-based representations that disentangle geometric and topological features through decoupled computational pipelines, thereby precluding the application of sequence-based generative frameworks, such as transformer architectures that have demonstrated remarkable performance. In this paper, we propose BrepARG, the first attempt to encode B-rep's geometry and topology into a holistic token sequence representation, enabling sequence-based B-rep generation with an autoregressive architecture. Specifically, BrepARG encodes B-rep into 3 types of tokens: geometry and position tokens representing geometric features, and face index tokens representing topology. Then the holistic token sequence is constructed hierarchically, starting with constructing the geometry blocks (i.e., faces and edges) using the above tokens, followed by geometry block sequencing. Finally, we assemble the holistic sequence representation for the entire B-rep. We also construct a transformer-based autoregressive model that learns the distribution over holistic token sequences via next-token prediction, using a multi-layer decoder-only architecture with causal masking. Experiments demonstrate that BrepARG achieves state-of-the-art (SOTA) performance. BrepARG validates the feasibility of representing B-rep as holistic token sequences, opening new directions for B-rep generation.
Paper Structure (25 sections, 6 equations, 7 figures, 5 tables)

This paper contains 25 sections, 6 equations, 7 figures, 5 tables.

Figures (7)

  • Figure 1: BrepARG is the first approach to encode the geometry and topology of a B-rep into a holistic token sequence, enabling efficient modeling and generation via an autoregressive model.
  • Figure 2: Our Holistic Token Sequence Representation comprises two parts: 1) Holistic Tokenization: Geometry Tokens are constructed by mapping VQ-VAE encoder latents to the codebook. Position Tokens are constructed by applying uniform scalar quantization to bounding boxes (Bboxes). Face Index Tokens, used for conveying topology information, are constructed by assigning an index to each face. 2) Sequence Construction: We first assemble face and edge blocks using the three token types above. These blocks are then ordered independently using DFS and the MAX-IDX-A algorithm. Finally, the ordered face and edge block sequences are concatenated with a separator and wrapped with start/end-of-sequence markers, producing the holistic token sequence representation of the entire B-rep model.
  • Figure 3: Unified vocabulary. Face Index, Geometry, Position, and Special tokens (START, SEP, END) are unified into a nonoverlapping vocabulary via predefined offsets.
  • Figure 4: B-rep generation pipeline using a sequential generative model. The holistic token sequence of the B-rep is fed into an autoregressive, decoder-only Transformer for generation, and the predicted token sequence is detokenized to reconstruct the complete B-rep.
  • Figure 5: Qualitative comparison of B-rep models generated by BrepGen brepgen, DTGBrepgen dtgbrepgen, and our method (BrepARG) on the DeepCAD dataset.
  • ...and 2 more figures