Original: Discovering Design Concepts for CAD Sketches
Revised: Discovering Design Concepts for CAD Sketches

Original: Anonymous Author(s)

Original: AfﬁliationAddress email

Original: Abstract
Revised: Abstract

Original: Sketch design concepts are recurring patterns found in parametric CAD sketches.
Revised: Sketch design concepts are recurring patterns found in parametric CAD sketches.

Original: Though rarely explicitly formalized by the CAD designers, these concepts areimplicitly used in design for modularity and regularity.
Revised: Though rarely explicitly formalized by the CAD designers, these concepts are implicitly used in design for modularity and regularity.

Original: In this paper, we propose alearning based approach that discovers the modular concepts by induction over rawsketches.
Revised: In this paper, we propose a learning based approach that discovers the modular concepts by induction over raw sketches.

Original: We propose the dual implicit-explicit representation of concept structuresthat allows implicit detection and explicit generation, and the separation of structuregeneration and parameter instantiation for parameterized concept generation, tolearn modular concepts by end-to-end training.
Revised: We propose the dual implicit-explicit representation of concept structures that allows implicit detection and explicit generation, and the separation of structure generation and parameter instantiation for parameterized concept generation, to learn modular concepts by end-to-end training.

Original: We demonstrate the design conceptlearning on a large scale CAD sketch dataset and show its applications for designintent interpretation and auto-completion.
Revised: We demonstrate the design concept learning on a large scale CAD sketch dataset and show its applications for design intent interpretation and auto-completion

Original:  Introduction
Revised:  Introduction

Original: Parametric CAD modeling is a standard paradigm for mechanical CAD design nowadays.
Revised: Parametric CAD modeling is a standard paradigm for mechanical CAD design nowadays.

Original: Inparametric modeling, CAD sketches are fundamental 2D shapes used for various 3D constructionoperations.
Revised: In parametric modeling, CAD sketches are fundamental 2D shapes used for various 3D construction operations.

Original: As shown in Fig.
Revised: As shown in Fig.

Original: 1, a CAD sketch is made of primitive geometric elements (e.g. lines,arcs, points) which are constrained by different relationships (e.g. coincident, parallel, tangent); thesketch graph of primitive elements and constraints captures design intents, and allows adaptation andreuse of designed parts by changing parameters and updating all related elements automatically [1].
Revised: 1, a CAD sketch is made of primitive geometric elements (e.g. lines, arcs, points) which are constrained by different relationships (e.g. coincident, parallel, tangent); the sketch graph of primitive elements and constraints captures design intents, and allows adaptation and reuse of designed parts by changing parameters and updating all related elements automatically [1].

Original: Designers are therefore tasked with the meticulous design of such sketch graphs, so that the inherenthigh-level design intents are easy to interpret and disentangle.
Revised: Designers are therefore tasked with the meticulous design of such sketch graphs, so that the inherent high-level design intents are easy to interpret and disentangle.

Original: To this end, meta-structures (Fig. 1),which we call sketch concepts in this paper, capture repetitive design patterns and regulate the designprocess with more efﬁcient intent construction and communication [9, 12].
Revised: To this end, meta-structures (Fig. 1), which we call sketch concepts in this paper, capture repetitive design patterns and regulate the design process with more efﬁcient intent construction and communication [9, 12].

Original: Concretely, each sketchconcept is a structure that encapsulates speciﬁc primitive elements and their compositional constraints,and the interactions of its internal elements with outside only go through the interface of the concept.
Revised: Concretely, each sketch concept is a structure that encapsulates speciﬁc primitive elements and their compositional constraints, and the interactions of its internal elements with outside only go through the interface of the concept.

Original: Is it possible to discover these modular concepts automatically from raw sketch graphs?
Revised: How to discover these modular concepts automatically from raw sketch graphs?

Original: In this paper,we cast this task as a program library induction problem by formulating a domain speciﬁc language(DSL) for sketch generation, where a sketch graph is formalized as a program, and sketch conceptsare modular functions that abstract primitive elements and compose the program.
Revised: In this paper, we cast this task as a program library induction problem by formulating a domain speciﬁc language (DSL) for sketch generation, where a sketch graph is formalized as a program, and sketch concepts are modular functions that abstract primitive elements and compose the program (Fig. 1).

Original: Discovering sketchconcepts thus becomes the induction of library functions from sketch programs.
Revised: Discovering sketch concepts thus becomes the induction of library functions from sketch programs.

Original: While previousworks address the general library induction problem via expensive combinatorial search [19, 5, 7],we present a simple end-to-end deep learning solution for sketch concepts.
Revised: While previous works address the general library induction problem via expensive combinatorial search [20, 5, 7], we present a simple end-to-end deep learning solution for sketch concepts.

Original: Speciﬁcally, we bridgethe implicit and explicit representations of sketch concepts, and separate concept structure generationfrom parameter instantiation, so that a powerful deep network can detect and generate sketch concepts,by training with the inductive objective of reconstructing sketch with modular concepts.
Revised: Speciﬁcally, we bridge the implicit and explicit representations of sketch concepts, and separate concept structure generation from parameter instantiation, so that a powerful deep network can detect and generate sketch concepts, by training with the inductive objective of reconstructing sketch with modular concepts.

Original: We conduct experiments on large-scale sketch datasets [16].
Revised: We conduct experiments on large-scale sketch datasets [17].

Original: The learned sketch concepts show thatthey provide modular interpretation of design sketches.
Revised: The learned sketch concepts show that they provide modular interpretation of design sketches.

Original: The network can also be trained on incompleteinput sketches and learn to auto-complete them.
Revised: The network can also be trained on incomplete input sketches and learn to auto-complete them.

Original: Comparisons with state-of-the-art approaches thatsolve sketch graph generation through autoregressive models show that the modular sketch conceptslearned by our approach enable more accurate and interpretable completion results.
Revised: Comparisons with state-of-the-art approaches that [Figure] solve sketch graph generation through autoregressive models show that the modular sketch concepts learned by our approach enable more accurate and interpretable completion results.

Original: [Figure]
Revised: To summarize, we make the following contributions in this paper: • We formulate the task of discovering modular CAD sketch concepts as program library induction for a declarative DSL modeling sketch graphs. • We propose a self-supervised deep learning framework that discovers modular libraries for the DSL with simple end-to-end training. • We show the framework learns from large-scale datasets sketch concepts capturing intuitive and reusable components, and enables structured sketch interpretation and auto-completion.

Original:  Related work
Revised:  Related work

Original: Concept discovery for CAD sketch It is well acknowledged in the CAD design community thatdesign intents are inherent to and implicitly encoded by the combinations of geometric primitives andconstraints [12, 10].
Revised: Concept discovery for CAD sketch It is well acknowledged in the CAD design community that design intents are inherent to and implicitly encoded by the combinations of geometric primitives and constraints [12, 10].

Original: However, there is generally no easy approach to discover the intents and makethem explicit, albeit through manual design of meta-templates guided by expert knowledge [9, 10].
Revised: However, there is generally no easy approach to discover the intents and make them explicit, albeit through manual design of meta-templates guided by expert knowledge [9, 10].

Original: We propose an automatic approach to discover such intents, by formulating the intents as modularstructures with self-contained references, and learning them through self-supervised inductive trainingwith simple objectives on large raw sketch dataset.
Revised: We propose an automatic approach to discover such intents, by formulating the intents as modular structures with self-contained references, and learning them through self-supervised inductive training with simple objectives on large raw sketch dataset.

Original: Therefore, we provide an automatic approach fordiscovering combinatorially complex structures through end-to-end neural network learning.
Revised: Therefore, we provide an automatic approach for discovering combinatorially complex structures through end-to-end neural network learning.

Original: Generative models for CAD sketch A series of recent works [6, 23, 13, 17, 24] use autoregressivemodels [21] to generate CAD sketches and constraints modeled through pointer networks [22].
Revised: Generative models for CAD sketch A series of recent works [6, 24, 13, 18, 25] use autoregressive models [22] to generate CAD sketches and constraints modeled through pointer networks [23].

Original: Theseworks focus on learning from large datasets [16] to generate plausible layouts of geometric primitivesand their constraints, which can then be ﬁne-tuned with a constraint solver for more regular sketches.
Revised: These works focus on learning from large datasets [17] to generate plausible layouts of geometric primitives and their constraints, which can then be ﬁne-tuned with a constraint solver for more regular sketches.

Original: Different from these works, our aim is to discover modular structures (i.e. sketch concepts) from theconcrete sketches.
Revised: Different from these works, our aim is to discover modular structures (i.e. sketch concepts) from the concrete sketches.

Original: Therefore, our framework provides higher-level interpretation of raw sketches andmore transparent auto-completion than these works (cf.
Revised: Therefore, our framework provides higher-level interpretation of raw sketches and more transparent auto-completion than these works (cf.

Original: Sec. 6).
Revised: Sec. 6).

Original: Program library induction for CAD modeling Program library induction has been studied inthe shape modeling domain [7].
Revised: Program library induction for CAD modeling Program library induction has been studied in the shape modeling domain [7].

Original: General program synthesis assisted by deep learning is a researchtopic with increasing popularity [19, 3, 4, 18, 5].
Revised: General program synthesis assisted by deep learning is a research topic with increasing popularity [20, 3, 4, 19, 5].

Original: The library induction task speciﬁcally involvescombinatorial search, as has been handled by neural guided search [19, 5] or by pure stochasticsampling [7].
Revised: The library induction task speciﬁcally involves combinatorial search, as has been handled by neural guided search [20, 5] or by pure stochastic sampling [7].

Original: We instead present an end-to-end learning algorithm for sketch concept induction.
Revised: We instead present an end-to-end learning algorithm for sketch concept induction.

Original: In particular, based on key observations about sketch concepts, we present implicit-explicit dualrepresentations of concept library functions, and separate the concept structure generation fromparameter instantiation, to enable self-supervised training with induction objectives.CAD sketch concept formulation
Revised: In particular, based on key observations about sketch concepts, we present implicit-explicit dual representations of concept library functions, and separate the concept structure generation from parameter instantiation, to enable self-supervised training with induction objectives.

Original: To capture the notion of sketch concepts precisely, we formulate a domain speciﬁc language (DSL)(syntax given in List 1, an exhaustive list of data types given in the supplementary).

Original: In the DSL,we ﬁrst deﬁne the basic data types, including length, angle, coordinate, and the reference type,where a reference binds to another reference or a primitive for modeling the constraint relationships.

Original: Second, we deﬁne the L 0 collection of primitive and constraint types as given in raw sketches.

Original: Inparticular, we regard the constraints as functions whose arguments are the references to bind withprimitives, e.g. a coincident constraint c = λ ( r 1 , r 2 : Ref ) .

Original: {} , where a function is represented inthe lambda calculus style.

Original: Some constraints have parameters other than mere references, which are

Original: // Basic data types
Revised: // Basic data types

Original: Length, Angle, Coord, Ref // L 0 primitive types
Revised: Length, Angle, Coord, Ref // L 0 primitive types

Original: Line →
Revised: Line →

Original: c start _ x , c start _ y , c end _ x , c end _ y :
Revised: c start _ x , c start _ y , c end _ x , c end _ y :

Original: Coord Circle → c center _ x , c center _ y : Coord, l radius : Length · · · // L 0 constraint types
Revised: Coord Circle → c center _ x , c center _ y : Coord, l radius : Length · · · // L 0 constraint types

Original: Coincident → λ ( r 1 , r 2 : Ref ) .
Revised: Coincident → λ ( r 1 , r 2 : Ref ) .

Original: Parallel Distance → λ ( r 1 , r 2 : Ref ) .
Revised: Parallel Distance → λ ( r 1 , r 2 : Ref ) .

Original: { l dist : Length} · · · // L 1 composite types
Revised: { l dist : Length} · · · // L 1 composite types

Original: T 1 i → λ ([ α k : Ref ]) .
Revised: T 1 i → λ ([ α k : Ref ]) .

Original: { t 0 i,j : T 0 j ∈ L 0 , R T 1 i (cid:0)
Revised: { t 0 i,j : T 0 j ∈ L 0 , R T 1 i (cid:0)

Original: [ t 0 i,j ] ∪ [ α k ] (cid:1) } //
Revised: [ t 0 i,j ] ∪ [ α k ] (cid:1) } //

Original: Sketch decomposition
Revised: Sketch decomposition

Original: S → { t 1 i : T 1 i ∈
Revised: S → { t 1 i : T 1 i ∈

Original: L 1 , R S ([ t 1 i ]) }  treated as variables inside, e.g. parallel distance in List 1.
Revised: L 1 , R S ([ t 1 i ]) }  CAD sketch concept formulation To capture the notion of sketch concepts precisely, we formulate a domain speciﬁc language (DSL) (syntax given in List 1, an exhaustive list of data types given in the supplementary). In the DSL, we ﬁrst deﬁne the basic data types, including length, angle, coordinate, and the reference type, where a reference binds to another reference or a primitive for modeling the constraint relationships.

Original: Third, we deﬁne the sketch conceptsas
Revised: Second, we deﬁne the L 0 collection of primitive and constraint types as given in raw sketches. In particular, we regard the constraints as functions whose arguments are the references to bind with primitives, e.g. a coincident constraint c = λ ( r 1 , r 2 : Ref ) . {} , where a function is represented in the lambda calculus style (one may refer to [14] for introductory lambda calculus formality). Some constraints have parameters other than mere references, which are treated as variables inside, e.g. parallel distance in

Original:  L 1 types composed of L 0 types.
Revised: List 1 2 . Third, we deﬁne the sketch concepts as L 1 types composed of L 0 types.

Original: To be speciﬁc, a composite type T 

Revised: To be speciﬁc, a composite type T

Original: i ∈ L 1 is a function witharguments [ α k ] and members t 

Revised: i ∈ L 1 is a function with arguments [ α k ] and members t

Original: i,j : T 0 j ∈ L 0 , which are connected through a composition operator R T 1 i = { p ( q ) | p, q ∈ [ t 0 i,j ] ∪ [ α k ] } that speciﬁes how each pair of primitive elements binds together.
Revised: i,j : T 0 j ∈ L 0 , which are connected through a composition operator R T 1 i = { p ( q ) | p, q ∈ [ t 0 i,j ] ∪ [ α k ] } that speciﬁes how each pair of primitive elements binds together.

Original: For example, a coincident constraint p = λ ( r 1 , r 2 ) .
Revised: For example, a coincident constraint p = λ ( r 1 , r 2 ) .

Original: {} may take a line primitive q as its ﬁrst argumentand bind to an argument α k of the composite type as its second argument, i.e. p ( q,
Revised: {} may take a line primitive q as its ﬁrst argument and bind to an argument α k of the composite type as its second argument, i.e. p ( q,

Original: α k ) ∈
Revised: α k ) ∈

Original: R T 1 i ;on the other hand, an argument α k may bind to a primitive q , which is speciﬁed by α k ( q ) ∈ R T 1 i .
Revised: R T 1 i ; on the other hand, an argument α k may bind to a primitive q , which is speciﬁed by α k ( q ) ∈ R T 1 i .

Original: Finally, an input sketch S is restructured as a collection of composite types t 1 i : T 1 i ∈
Revised: Finally, an input sketch S is restructured as a collection of composite types t 1 i : T 1 i ∈

Original: L 1 , as well astheir connections speciﬁed by a corresponding composition operator R S .
Revised: L 1 , as well as their connections speciﬁed by a corresponding composition operator R S .

Original: R S records how differentconcepts bind through their arguments, which further transfers to L 0 typed elements inside theconcepts and translates into the raw constraint relationships of the sketch graph.
Revised: R S records how different concepts bind through their arguments, which further transfers to L 0 typed elements inside the concepts and translates into the raw constraint relationships of the sketch graph.

Revised: Fig. 1(b) shows an example DSL program encoding sketches and concepts.

Original: Given the explicit formulation of CAD sketches through a DSL, the discovery of sketch conceptsbecomes the task of learning program libraries L 1 by induction on many sketch samples.
Revised: Given the explicit formulation of CAD sketches through a DSL, the discovery of sketch concepts becomes the task of learning program libraries L 1 by induction on many sketch samples.

Original: Therefore,our task resembles shape program synthesis that aims at building modular programs for generatingshapes [5, 7], and differs from works that use autoregressive language models to generate CAD sketchprograms one token at a time [6, 13, 17].
Revised: Therefore, our task resembles shape program synthesis that aims at building modular programs for generating shapes [5, 7], and differs from works that use autoregressive language models to generate CAD sketch programs one token at a time [6, 13, 18].

Original: In Sec. 6.2, we show that the structured learning of CADsketches enables more robust auto-completion than unstructured language modeling.
Revised: In Sec. 6.2, we show that the structured learning of CAD sketches enables more robust auto-completion than unstructured language modeling.

Original: The search of structured concepts is clearly a combinatorial problem with exponential complexity,which is intractable unless we can exploit the inherent patterns in large-scale sketch datasets.
Revised: The search of structured concepts is clearly a combinatorial problem with exponential complexity, which is intractable unless we can exploit the inherent patterns in large-scale sketch datasets.

Original: However,to enable deep learning based detection and search of structured concepts, we need to bridge theimplicit deep representations and the explicit and interpretable structures, which we build through thefollowing two key observations:
Revised: However, to enable deep learning based detection and search of structured concepts, we need to bridge the implicit deep representations and the explicit and interpretable structures, which we build through the following two key observations:

Original: • A concept has dual representations : implicit and explicit.
Revised: • A concept has dual representations : implicit and explicit.

Original: The implicit representation as embeddings in latent spaces is compatible with deep learning, while the explicit representa- tion provides structures on which desired properties (e.g. modularity) can beimposed.•
Revised: The implicit representation as embeddings in latent spaces is compatible with deep learning, while the explicit representation provides structures on which desired properties (e.g. modularity) can be

Original: A concept is a parameterized structure .

Original: A concept is a composite type with ﬁxed modular

Original: structure for interpretability, but the structure is always instantiated by assigning parametersto its component primitives when the concept is found in a sketch.

Original: 3.1 Method overview

Original: According to the two observations, we design an end-to-end sketch concept learning framework byself-supervised induction on sketch graphs.

Original: As shown in Fig.

Original: 2, the framework has two main stepsbefore loss computation: a detection step that generates implicit representations of concepts makingup the input sketch, and an explicit generation step that expands the implicit concepts into concretestructures on which self-supervision targets like reconstruction and modularity are applied. Building on a state-of-the-art detection architecture [2], the detection module D takes a sketch S asinput and detects the modular concepts within it, i.e. { q i } = D ( S, { q i } ) , where the concepts are input sketch S =[ t 

Revised: imposed input sketch S =[ t

Original: i ] [ e (cid:48) t 0 i ]
Revised: i ] [ e (cid:48) t 0 i ]

Original: [ q i ] [ q i ] q R q R qqq (cid:48)concept lib Lstructure Tinstance t[ t 1 i ]
Revised: [ q i ] [ q i ] q R q R qqq (cid:48)concept lib Lstructure Tinstance t[ t 1 i ]

Original: R S assemble generation loss target
Revised: R S assemble generation loss target

Original: Struct
Revised: Struct

Original: Param
Revised: Param

Original: Encoder
Revised: Encoder

Original: Decoder
Revised: Decoder

Original: [Figure]
Revised: [Figure]

Original: represented implicitly as latent codes { q i } , and { q i } are a learnable set of concept instance queries.
Revised: • A concept is a parameterized structure . A concept is a composite type with ﬁxed modular structure for interpretability, but the structure is always instantiated by assigning parameters to its component primitives when the concept is found in a sketch. 3.1 Method overview According to the two observations, we design an end-to-end sketch concept learning framework by self-supervised induction on sketch graphs.

Revised: As shown in Fig.

Revised: 2, the framework has two main steps before loss computation: a detection step that generates implicit representations of concepts making up the input sketch, and an explicit generation step that expands the implicit concepts into concrete structures on which self-supervision targets like reconstruction and modularity are applied.

Revised: Building on a state-of-the-art detection architecture [2], the detection module D takes a sketch S as input and detects the modular concepts within it, i.e. { q i } =

Revised: D ( S, { q i } ) , where the concepts are represented implicitly as latent codes { q i } , and { q i } are a learnable set of concept instance queries.

Original: Notably, we apply vector quantization to the latent codes and obtain { q (cid:48) i =
Revised: Notably, we apply vector quantization to the latent codes and obtain { q (cid:48) i =

Original: min
Revised: min

Original: p ∈
Revised: p ∈

Original: L 1 || p − q
Revised: L 1 || p − q

Original: i || 2 } ,which ensures that each concept is selected from the common collection of learnable concepts L 1used for restructuring all sketches.
Revised: i || 2 } , which ensures that each concept is selected from the common collection of learnable concepts Lused for restructuring all sketches.

Original: The explicit generation module is separated into two sub-steps, structure generation and parameterinstantiation, which ensures that the modular concept structures are explicit and reused throughoutdifferent sketch instances.
Revised: The explicit generation module is separated into two sub-steps, structure generation and parameter instantiation, which ensures that the modular concept structures are explicit and reused throughout different sketch instances.

Original: Speciﬁcally, the structure network takes each quantized concept code q (cid:48) iand generates its explicit form T 1 i in terms of primitives and constraints of L 0 types along with thecomposition operator R T 1 i .
Revised: Speciﬁcally, the structure network takes each quantized concept code q (cid:48) i and generates its explicit form T 1 i in terms of primitives and constraints of L 0 types along with the composition operator R T 1 i .

Original: Subsequently, the parameter network instantiates the concept structure byassigning parameter values to each component of T 1 i conditioned on q i and input sketch, to obtain t 1 i .
Revised: Subsequently, the parameter network instantiates the concept structure by assigning parameter values to each component of T 1 i conditioned on q i and input sketch, to obtain t 1 i .

Original: The composition operator R S for combining { t 1 i } is generated from a special latent code q R transformed by D from a learnable token q R appended to { q i } .
Revised: The composition operator R S for combining { t 1 i } is generated from a special latent code q R transformed by D from a learnable token q R appended to { q i } .

Original: The entire model is trained end-to-end by reconstruction and modularity objectives.
Revised: The entire model is trained end-to-end by reconstruction and modularity objectives.

Original: In particular,we design loss functions that measure differences between the generated and groundtruth sketchgraphs, in terms of both per-element attributes and pairwise references.
Revised: In particular, we design loss functions that measure differences between the generated and groundtruth sketch graphs, in terms of both per-element attributes and pairwise references.

Original: Given our explicit modelingof encapsulated structures of the learned concepts, we can further enhance the modularity of thegeneration by introducing a bias loss that encourages in-concept references.
Revised: Given our explicit modeling of encapsulated structures of the learned concepts, we can further enhance the modularity of the generation by introducing a bias loss that encourages in-concept references.

Original:  End-to-end sketch concept induction 
Revised:  End-to-end sketch concept induction 4.1 Implicit concept detection

Original: 4.1 Implicit concept detection

Original: Sketch encoding A raw sketch S can be serialized into a sequence of L 0 primitives and constraints.
Revised: Sketch encoding A raw sketch S can be serialized into a sequence of L 0 primitives and constraints.

Original: Previous works have adopted slightly different schemes to encode the sequence [6, 13, 17, 23, 24].
Revised: Previous works have adopted slightly different schemes to encode the sequence [6, 13, 18, 24, 25].

Original: In this paper, we build on the previous works and take a simple strategy akin to [13, 24] for inputsketch encoding.
Revised: In this paper, we build on the previous works and take a simple strategy akin to [13, 25] for input sketch encoding.

Original: Speciﬁcally, we split each L 0 typed instance t 0 into several tokens: type , parameter ,and a list of references .
Revised: Speciﬁcally, we split each L 0 typed instance t 0 into several tokens: type , parameter , and a list of references .

Original: For each of the token category, we use a speciﬁc embedding module.
Revised: For each of the token category, we use a speciﬁc embedding module.

Original: Forexample, parameters as scalars are quantized into ﬁnite bins before being embedded as vectors (seesupplementary for the quantization details), and since there are at most ﬁve parameters for eachprimitive, we pack all parameter embeddings into a single code.
Revised: For example, parameters as scalars are quantized into ﬁnite bins before being embedded as vectors (see supplementary for the quantization details), and since there are at most ﬁve parameters for each primitive, we pack all parameter embeddings into a single code.

Original: On the other hand, each constraintreference as a primitive index is directly embedded as a code.
Revised: On the other hand, each constraint reference as a primitive index is directly embedded as a code.

Original: Therefore, each token of a L 0 typedinstance is encoded as
Revised: Therefore, each token of a L 0 typed instance is encoded as

Original: [Equation]
Revised: [Equation]

Original: where t 0 .x iterates over the split tokens, the type embedding is shared for all tokens of the instance,the position embedding counts the token index in the whole split-tokenized sequence of S , andparameter or reference embeddings are applied where applicable.
Revised: where t 0 .x iterates over the split tokens (i.e., type, parameters, references), the type embedding is shared for all tokens of the instance, the position embedding counts the token index in the whole split-tokenized sequence of S , and parameter or reference embeddings are applied where applicable.

Original: Concept detection We build the detection network as an encoder-decoder transformer following[2].
Revised: Concept detection We build the detection network as an encoder-decoder transformer following [2].

Original: The transformer encoder operates on the sketch encoded sequence [ e t 0 i ∈ S ] and produces the contextualized sequence [ e (cid:48)
Revised: The transformer encoder operates on the sketch encoded sequence [ e t 0 i ∈ S ] and produces the contextualized sequence [ e (cid:48)

Original: t 0 i ∈ S ] through layers of self-attention and feed-forward.
Revised: t 0 i ∈ S ] through layers of self-attention and feed-forward.

Original: The transformerdecoder takes a learnable set of concept queries [ q i ] of size k qry plus a special query q R forcomposition generation, and applies interleaved self-attention, cross-attention to [ e (cid:48)
Revised: The transformer decoder takes a learnable set of concept queries [ q i ] of size k qry plus a special query q R for composition generation, and applies interleaved self-attention, cross-attention to [ e (cid:48)

Original: t 0 i ] and feedforward layers to obtain the implicit concept codes [ q i ] and q R .
Revised: t 0 i ] and feedforward layers to obtain the implicit concept codes [ q i ] and q R .

Original: The concept codes are furtherquantized into [ q (cid:48) i ] by selecting concept prototypes from a library L 1 implicitly encoding L 1 , beforebeing expanded into explicit forms.
Revised: The concept codes are further quantized into [ q (cid:48) i ] by selecting concept prototypes from a library L 1 implicitly encoding L 1 , before being expanded into explicit forms.

Original: 4.2 Explicit concept structure generation
Revised: 4.2 Explicit concept structure generation

Original: Concept structure expansion Given a library code q (cid:48)
Revised: Concept structure expansion Given a library code q (cid:48)

Original: ∈ L 1 representing a type T 1 ∈ L 1 , throughan MLP we expand its explicit structure as a collection of codes [ t 0 i ] representing the L 0 type instances[ t 0 i ] and a matrix representing the composition R T 1 of [ t 0 i ] and arguments (cf.
Revised: ∈ L 1 representing a type T 1 ∈ L 1 , through an MLP we expand its explicit structure as a collection of codes [ t 0 i ] representing the L 0 type instances [ t 0 i ] and a matrix representing the composition R T 1 of [ t 0 i ] and arguments (cf.

Original: List 1).
Revised: List 1).

Original: [Table]
Revised: [Table]

Original: We ﬁx the maximum number of L 0 type instances to k L 0 (12 by default), andsplit the arguments into two groups, inward arguments and outward arguments ,each of maximum number k arg (2 by default).
Revised: We ﬁx the maximum number of L 0 type instances to k L 0 (12 by default), and split the arguments into two groups, inward arguments and outward arguments , each of maximum number k arg (2 by default).

Original: Each type code t 

Revised: Each type code t

Original: i is decodedinto discrete probabilities over L 0 with an additional probability for null typeφ to indicate the emptiness of this element (cf.
Revised: i is decoded into discrete probabilities over L 0 with an additional probability for null type φ to indicate the emptiness of this element (cf.

Original: Sec. 5.1), by dec type ( · ) asthe inverse of enc type ( · ) in Sec. 
Revised: Sec. 5.1), by dec type ( · ) as the inverse of enc type ( · ) in Sec. 4.1.

Original: An inward argument only points to aprimitive inside the concept structure and originates from a constraint outside,and conversely an outward argument only points to primitives outside andoriginates from a constraint inside the concept (see inset for illustration); the split into two groupseases composition computation, as discussed below.
Revised: An inward argument only points to a primitive inside the concept structure and originates from a constraint outside, and conversely an outward argument only points to primitives outside and originates from a constraint inside the concept (see inset for illustration); the split into two groups eases composition computation, as discussed below.

Original: The composition operator R T 1 is implemented as an assignment matrix R T 1 of shape (2 k L 0 + k arg ) ×
Revised: The composition operator R T 1 is implemented as an assignment matrix R T 1 of shape (2 k L 0 + k arg ) ×

Original: ( k L 0 + k arg ) , where each row corresponds to a constraint reference or inward argument, and eachcolumn to a primitive or outward argument.
Revised: ( k L 0 + k arg ) , where each row corresponds to a constraint reference or inward argument, and each column to a primitive or outward argument.

Original: The two-fold coefﬁcient of constraint references comesfrom that any constraint we considered in the dataset [16] has at most two arguments.
Revised: The two-fold coefﬁcient of constraint references comes from that any constraint we considered in the dataset [17] has at most two arguments.

Original: Each row is adiscrete probability distribution such that (cid:80) j R T 1 [ i, j ] = 1 , with the maximum entry signifying thatthe i -th constraint/outward argument refers to the j -th primitive/inward argument.
Revised: Each row is a discrete probability distribution such that (cid:80) j R T 1 [ i, j ] = 1 , with the maximum entry signifying that the i -th constraint/outward argument refers to the j -th primitive/inward argument.

Original: We compute R T 1by ﬁrst mapping the concept code q (cid:48) to a matrix of logits in the shape of R T 1 , and then applyingsoftmax transform for each row.
Revised: We compute R Tby ﬁrst mapping the concept code q (cid:48) to a matrix of logits in the shape of R T 1 , and then applying softmax transform for each row.

Original: Notably, we avoid the meaningless loops of an element referringback to itself, and inward arguments referring to outward arguments, by masking the diagonal blocks
Revised: Notably, we avoid the meaningless loops of an element referring back to itself, and inward arguments referring to outward arguments, by masking the diagonal blocks

Original: R T 1 [2 i :2 i
Revised: R T 1 [2 i :2 i

Original: +2 , i ] ,
Revised: +2 , i ] ,

Original: i ∈
Revised: i ∈

Original: [ k L 0 ] and the argument block R T 1 [2 k L 0 : , k L 0 :] by setting their logits to −∞ .
Revised: [ k L 0 ] and the argument block R T 1 [2 k L 0 : , k L 0 :] by setting their logits to −∞ .

Original: Cross-concept composition Aside from references inside a concept, references across concepts aregenerated to complete the whole sketch graph.
Revised: Cross-concept composition Aside from references inside a concept, references across concepts are generated to complete the whole sketch graph.

Original: We achieve cross-concept references by argumentpassing (see inset above for illustration).
Revised: We achieve cross-concept references by argument passing (see inset above for illustration).

Original: In particular, we implement the cross-concept compositionoperator R S as an assignment matrix R S of shape ( k qry · k arg ) ×
Revised: In particular, we implement the cross-concept composition operator R S as an assignment matrix R S of shape ( k qry · k arg ) ×

Original: ( k qry · k arg ) directly mapped from q Rthrough an MLP.
Revised: ( k qry · k arg ) directly mapped from q R through an MLP.

Original: Similar to the in-concept composition matrix, each row of the cross-concept matrixis a discrete distribution such that (cid:80) j R S
Revised: Similar to the in-concept composition matrix, each row of the cross-concept matrix is a discrete distribution such that (cid:80) j R S

Original: [ i, j ] = 1 , with the maximum entry signifying that the( i mod k arg ) -th outward argument of the (cid:98) i/k arg (cid:99) -th concept instance refers to the ( j mod k arg ) 
Revised: [ i, j ] = 1 , with the maximum entry signifying that the ( i mod k arg ) -th outward argument of the (cid:98) i/k arg (cid:99) -th concept instance refers to the ( j mod k arg ) -th

Original: -thinward argument of the (cid:98) j/k arg (cid:99) -th concept instance.
Revised: inward argument of the (cid:98) j/k arg (cid:99) -th concept instance.

Original: The complete cross-concept reference is therefore the product of three transport matrices:
Revised: The complete cross-concept reference is therefore the product of three transport matrices:

Original: [Equation]
Revised: [Equation]

Original: arg :( i +1) · k arg , j · k arg :( j +1) · k arg ] × R t 1 j [2 k L 0 : , : k L 0 ] , where R cref [ t 1 i , t 1 j ] is a block assignment matrix of shape 2 k L 0 × k L 0 .
Revised: (2) where R cref [ t 1 i , t 1 j ] is a block assignment matrix of shape 2 k L 0 × k L 0 .

Original: Intuitively, R cref [ t 1 i , t 1 j ]speciﬁes how constraints inside t 1 i refers to primitives of t 1 j throughout all possible paths crossing thearguments of two concepts.
Revised: Intuitively, R cref [ t 1 i , t 1 j ] speciﬁes how constraints inside t 1 i refers to primitives of t 1 j throughout all possible paths crossing the arguments of two concepts.

Original: Collectively, we denote the complete reference matrix for all pairs of generated L 0 elements as R ofshape (2 k qry · k L 0 ) ×
Revised: Collectively, we denote the complete reference matrix for all pairs of generated L 0 elements as R of shape (2 k qry · k L 0 ) ×

Original: ( k qry · k L 0 ) , which includes in-concept and cross-concept references.
Revised: ( k qry · k L 0 ) , which includes in-concept and cross-concept references.

Original: 4.3 Concept instantiation by parameter generation
Revised: 4.3 Concept instantiation by parameter generation

Original: Instantiating a concept structure requires assigning parameters to the components where applicable.
Revised: Instantiating a concept structure requires assigning parameters to the components where applicable.

Original: Therefore, as shown in Fig. 2, the parameter generation network takes a concept structure T 1 andits implicit instance encoding q as input, and produces the speciﬁc parameters for each L 0 typedinstances inside the concept.
Revised: Therefore, as shown in Fig. 2, the parameter generation network takes a concept structure T 1 and its implicit instance encoding q as input, and produces the speciﬁc parameters for each L 0 typed instances inside the concept.

Original: In addition, as the parameters of generated instances are directly related to the input parameters of the raw sketch S , we ﬁnd it improves convergence and accuracy by allowingthe parameter network to attend to the input tokens.
Revised: In addition, as the parameters of generated instances are directly related to the input parameters of the raw sketch S , we ﬁnd it improves convergence and accuracy by allowing the parameter network to attend to the input tokens.

Original: We implement the parameter network as a transformer decoder in a similar way as [2].
Revised: We implement the parameter network as a transformer decoder in a similar way as [2].

Original: The instancecode q is ﬁrst expanded to k L 0 tokens by a small MLP, which are summed with [ t 0 i ] token-wise toobtain the query codes.
Revised: The instance code q is ﬁrst expanded to k L 0 tokens by a small MLP, which are summed with [ t 0 i ] token-wise to obtain the query codes.

Original: The parameter network then transforms the query codes through interleavedlayers of self-attention, cross-attention to the contextualized input sequence [ e (cid:48) t 0 ] , and feed-forward,before ﬁnally mapped to explicit parameters in the form of probabilities over quantized bins, througha decoding layer dec param ( · ) that is inverse of enc param ( · ) in Sec. 4.1.
Revised: The parameter network then transforms the query codes through interleaved layers of self-attention, cross-attention to the contextualized input sequence [ e (cid:48) t 0 ] , and feed-forward, before ﬁnally mapped to explicit parameters in the form of probabilities over quantized bins, through a decoding layer dec param ( · ) that is inverse of enc param ( · ) in Sec. 4.1.

Original:  Induction objectives
Revised:  Induction objectives

Original: Without any given labels of concepts, we use the following objectives to supervise the inductivenetwork training: sketch reconstruction, concept quantization, and modularity enhancement.
Revised: Without any given labels of concepts, we use the following objectives to supervise the inductive network training: sketch reconstruction, concept quantization, and modularity enhancement.

Original: 5.1 Reconstruction loss
Revised: 5.1 Reconstruction loss

Original: As discussed in Sec. 4, an input sketch is restructured into a set of sketch concepts which are expandedinto a graph of primitives and constraints; the generated sketch graph (cid:101) S is compared with the inputsketch S for reconstruction supervision.
Revised: As discussed in Sec. 4, an input sketch is restructured into a set of sketch concepts which are expanded into a graph of primitives and constraints; the generated sketch graph (cid:101) S is compared with the input sketch S for reconstruction supervision.

Original: The comparison of generated and target graphs requires a one-to-one correspondence betweenelements of the two graphs, on which the graph differences can be measured.
Revised: The comparison of generated and target graphs requires a one-to-one correspondence between elements of the two graphs, on which the graph differences can be measured.

Original: However, it is nontrivialto ﬁnd such a matching, because not only are there variable numbers of elements in the two graphs,but also both elements and references between elements must be taken into account for matching.
Revised: However, it is nontrivial to ﬁnd such a matching, because not only are there variable numbers of elements in the two graphs, but also both elements and references between elements must be taken into account for matching.

Original: Tothis end, we build a cost matrix that measures the difference for each pair of generated and targetelements, in terms of their attributes and references, and apply linear assignment matching on thecost matrix [11, 8] to establish the optimal correspondence between two graphs.
Revised: To this end, we build a cost matrix that measures the difference for each pair of generated and target elements, in terms of their attributes and references, and apply linear assignment matching on the cost matrix [11, 8] to establish the optimal correspondence between two graphs.

Original: Cost matrix construction To compare each pair of generated element and target element, wemeasure their type differences, and further use type casting to interpret the generated element as thetarget type, so that their parameters can be compared.
Revised: Cost matrix construction To compare each pair of generated element and target element, we measure their type differences, and further use type casting to interpret the generated element as the target type, so that their parameters can be compared.

Original: To account for reference differences betweenthe two elements, we compare the reference arrows by the differences of their pointed primitives.t
Revised: To account for reference differences between the two elements, we compare the reference arrows by the differences of their pointed primitives.

Revised: t a r g e t s generations cost matrix green: primitives orange: constraints p p.r q q.r ∼ R [2 q + r, :]

Revised: Binary cost between target constraint p and generated element q .

Original: Speciﬁcally, given the target graph S of k tgt elements and the generated graph(cid:101) S of k qry · k L 0 elements, we build the cost matrix C of shape k tgt × ( k qry · k L 0 )in two steps.
Revised: Speciﬁcally, given the target graph S of k tgt elements and the generated graph (cid:101) S of k qry · k L 0 elements, we build the cost matrix C of shape k tgt × ( k qry · k L 0 ) in two steps.

Original: First, for a pair of target element p and generated element q , wecompare their type and parameter differences by cross-entropy.
Revised: First, for a pair of target element p and generated element q , we compare their type and parameter differences by cross-entropy.

Original: We denote thecost matrix in this stage as C ury , as it accounts for the element-wise unarydistances between two graphs.
Revised: We denote the cost matrix in this stage as C ury , as it accounts for the element-wise unary distances between two graphs.

Original: Second, to measure the binary distances ofreferences, for each target constraint element p and its r -th referenced primitivep.r , its distance from the generated references of element q is computed as(also illustrated by inset ﬁgure):
Revised: Second, to measure the binary distances of references, for each target constraint element p and its r -th referenced primitive p.r , its distance from the generated references of element q is computed as (also illustrated by inset ﬁgure):

Original: [Equation]
Revised: [Equation]

Original: where R [2 q + r, j ] is the probability of q taking j as its r -th reference, as predicted by the compositionoperation (Sec. 4.2).
Revised: where R [2 q + r, j ] is the probability of q taking j as its r -th reference, as predicted by the composition operation (Sec. 4.2).

Original: Intuitively, the binary cost is a summation of unary costs weighted by predictedreference probabilities, where the unary costs measure how different a generated pointed primitive isfrom the target pointed primitive.
Revised: Intuitively, the binary cost is a summation of unary costs weighted by predicted reference probabilities, where the unary costs measure how different a generated pointed primitive is from the target pointed primitive.

Original: The complete cost matrix is C = w ury C ury + w bry C bry , withw ury = 50 , w bry = 1 ; we give a larger weight to the unary costs because meaningful binary costsdepend on reliable unary costs in the ﬁrst place, as evident in Eq.
Revised: The complete cost matrix is C = w ury C ury + w bry C bry , with w ury = 50 , w bry = 1 ; we give a larger weight to the unary costs because meaningful binary costs depend on reliable unary costs in the ﬁrst place, as evident in Eq.

Original: Matching and reconstruction loss Given the cost matrix C , we apply linear assignment to obtain amatching σ : (cid:101) S
Revised: Matching and reconstruction loss Given the cost matrix C , we apply linear assignment to obtain a matching σ : (cid:101) S

Original: → S ∪{ φ } between (cid:101) S and S .
Revised: → S ∪{ φ } between (cid:101) S and S .

Original: Note that the number of elements of these two graphscan be different, but we have chosen k qry , k L 0 such that the generated elements always cover thetarget elements.
Revised: Note that the number of elements of these two graphs can be different, but we have chosen k qry , k L 0 such that the generated elements always cover the target elements.

Original: Therefore, σ ( q ) = p assigns a matched generation q ∈ M ⊂ (cid:101) S to a target p ∈ S , butassigns the rest unmatched generations M (cid:48)
Revised: Therefore, σ ( q ) = p assigns a matched generation q ∈ M ⊂ (cid:101) S to a target p ∈ S , but assigns the rest unmatched generations M (cid:48)

Original: = (cid:101)
Revised: = (cid:101)

Original: S \ M to the empty target φ , i.e. σ ( M (cid:48) )
Revised: S \ M to the empty target φ , i.e. σ ( M (cid:48) )

Original: =
Revised: =

Original: φ .
Revised: φ .

Original: Theloss terms for matched generations are simply the corresponding cost terms C [ σ ( q ) , q ] , q ∈ M ; for unmatched generations, we supervise its type to be the empty type φ and neglect its parameters orreferences.
Revised: The loss terms for matched generations are simply the corresponding cost terms C [ σ ( q ) , q ] , q ∈ M ; for unmatched generations, we supervise its type to be the empty type φ and neglect its parameters or references.

Original: We denote the average loss of all generated terms as L recon .
Revised: We denote the average loss of all generated terms as L recon .

Original: Besides matching cost, we also use an additional reference loss to encourage the generated referencesto be sharp (i.e., R being closer to binary).
Revised: Besides matching cost, we also use an additional reference loss to encourage the generated references to be sharp (i.e., R being closer to binary).

Original: This loss complements the binary costs mentioned aboveby making sure that even if the generated primitives are similar, a generated constraint only refers toone primitive sharply.
Revised: This loss complements the binary costs mentioned above by making sure that even if the generated primitives are similar, a generated constraint only refers to one primitive sharply.

Original: We deﬁne the sharp reference loss as
Revised: We deﬁne the sharp reference loss as

Original: [Equation]
Revised: [Equation]

Original: where p iterates over the target constraints S c , σ − 1 ( · ) is the inverse mapping from target element togeneration, and we skip a term if p.r does not exist for constraints with one reference.
Revised: where p iterates over the target constraints S c , σ − 1 ( · ) is the inverse mapping from target element to generation, and we skip a term if p.r does not exist for constraints with one reference.

Original: 5.2 Concept quantization loss
Revised: 5.2 Concept quantization loss

Original: Following [20, 15], we optimize the concept code quantization against library L 1 with:
Revised: Following [21, 16], we optimize the concept code quantization against library L 1 with:

Original: [Equation]
Revised: [Equation]

Original: where sg ( · ) is the stop gradient operation.
Revised: where sg ( · ) is the stop gradient operation.

Original: For training stability, we follow [15] and replace the ﬁrstterm with EMA updates of q (cid:48)
Revised: For training stability, we follow [16] and replace the ﬁrst term with EMA updates of q (cid:48)

Original: ∈ L 1 .
Revised: ∈ L 1 .

Original: Furthermore, we improve spare code usage by reviving unusedcode in L 1 periodically [15] (please refer to supplementary for details).
Revised: Furthermore, we improve spare code usage by reviving unused code in L 1 periodically [16] (please refer to supplementary for details).

Original: 5.3 Modularity enhancement loss
Revised: 5.3 Modularity enhancement loss

Original: We look for modular L 1 concepts that have rich and meaningful encapsulated structures, rather thanarbitrary groups of L 0 elements that rely on cross-group references to recover the graph structures.
Revised: We look for modular L 1 concepts that have rich and meaningful encapsulated structures, rather than arbitrary groups of L 0 elements that rely on cross-group references to recover the graph structures.

Original: This modularity can be enhanced by limiting the use of arguments for sketch concepts.
Revised: This modularity can be enhanced by limiting the use of arguments for sketch concepts.

Original: Insteadof allocating very few arguments as a hard constraint, we introduce a soft bias loss to encouragethe restrictive use of arguments, which may still cover cases when more arguments are needed foraccurate reconstruction.
Revised: Instead of allocating very few arguments as a hard constraint, we introduce a soft bias loss to encourage the restrictive use of arguments, which may still cover cases when more arguments are needed for accurate reconstruction.

Original: To be speciﬁc, we penalize the accumulated probability of elements pointingto outward arguments:
Revised: To be speciﬁc, we penalize the accumulated probability of elements pointing to outward arguments:

Original: [Equation]
Revised: [Equation]

Original: where again p iterates over the target constraints S c , σ − 1 ( · ) is the inverse mapping from targetelement to generation, and i + k L 0 slices the reference probabilities to outward arguments.
Revised: where again p iterates over the target constraints S c , σ − 1 ( · ) is the inverse mapping from target element to generation, and i + k L 0 slices the reference probabilities to outward arguments.

Original: 5.4 Total loss
Revised: 5.4 Total loss

Original: The training objective sums up losses of reconstruction, concept quantization and modularity bias:
Revised: The training objective sums up losses of reconstruction, concept quantization and modularity bias:

Original: [Equation]
Revised: [Equation]

Original: where we empirically use weights w recon = 1 , w sharp = 20 , w vq = 1 , w bias = 25 throughout allexperiments unless otherwise speciﬁed in the ablation studies.
Revised: where we empirically use weights w recon = 1 , w sharp = 20 , w vq = 1 , w bias = 25 throughout all experiments unless otherwise speciﬁed in the ablation studies.

Original:  Results
Revised:  Results

Original: Dataset and implementation Following previous works [6, 13, 17], we adopt the SketchGraphsdataset [16] which contains millions of real-world CAD sketches for training and evaluation.
Revised: Dataset and implementation Following previous works [6, 13, 18], we adopt the SketchGraphs dataset [17] which contains millions of real-world CAD sketches for training and evaluation.

Original: Weﬁlter the data by removing trivially simple sketches and duplicates, and limit the sketch complexitysuch that the number of primitives and constraints is within [20 , 50] .
Revised: We ﬁlter the data by removing trivially simple sketches and duplicates, and limit the sketch complexity such that the number of primitives and constraints is within [20 , 50] .

Original: As a result, we obtain around 1million sketches and randomly split them into 950k for training and 50k for testing.
Revised: As a result, we obtain aroundmillion sketches and randomly split them into 950k for training and 50k for testing.

Original: We defer networkdetails to  and -source and data to facilitate future research 1 .
Revised: We defer network details to the supplementary and open-source code and data to facilitate future research 3 .

Original: Evaluation metrics We evaluate the generated sketches in terms of reconstruction accuracy andsketch concept modularity, which are the two major objectives of our task.
Revised: Evaluation metrics We evaluate the generated sketches in terms of reconstruction accuracy and sketch concept modularity, which are the two major objectives of our task.

Original: We measure reconstructionaccuracy by the F-scores of generated primitives and constraints, where F-score is simply the harmonicmean of precision and recall.
Revised: We measure reconstruction accuracy by the F-scores of generated primitives and constraints, where F-score is simply the harmonic mean of precision and recall.

Original: A generated primitive is considered a correct match with ground-truthif its type and parameters are correct, where for the scalar parameters we allow a threshold of 10% ofquantization levels.
Revised: A generated primitive is considered a correct match with ground-truth if its type and parameters are correct, where for the scalar parameters we allow a threshold of 10% of quantization levels.

Original: A constraint is correct if and only if its type, parameter and references matchground-truth, i.e., the generated q is correct w.r.t target p iff q has the same type and parameters withp and the primitives q.r and p.r are correctly matched.
Revised: A constraint is correct if and only if its type, parameter and references match ground-truth, i.e., the generated q is correct w.r.t target p iff q has the same type and parameters with p and the primitives q.r and p.r are correctly matched.

Original: Modularity is measured by the percentage ofconstraints with references entirely within the encapsulating concepts, among all correct constraints. 
Revised: Modularity is measured by the percentage of constraints with references entirely within the encapsulating concepts, among all correct constraints. [Figure] arg [Figure]

Revised: In arg

Original: [Figure]
Revised: [Figure]

Revised: arg

Revised: [Figure]

Revised: arg

Revised: [Figure]

Revised: In arg

Revised: [Figure]

Revised: arg

Revised: [Figure]

Revised: Perpend

Revised: [Figure]

Revised: Coinc

Revised: [Figure]

Revised: Coinc

Revised: [Figure]

Revised: Out arg

Revised: [Figure]

Revised: Coinc

Original: [Figure]
Revised: [Figure]

Revised: arg

Original: [Figure]
Revised: [Figure]

Revised: Coinc

Original: [Figure] 
Revised: [Figure] [Figure] [Figure] [Figure]

Original: [Figure]
Revised: [Figure]

Original: 6.1 Design intent interpretation
Revised: 6.1 Design intent interpretation

Original: By training our model on the raw sketches with self-supervised induction losses, we obtain a resultlibrary of sketch concepts and a model for design intent parsing that interprets a given sketch intomodular concepts and their combination.
Revised: By training our model on the raw sketches with self-supervised induction losses, we obtain a result library of sketch concepts and a model for design intent parsing that interprets a given sketch into modular concepts and their combination.

Original: Indeed, we ﬁnd the automatically discovered concepts capture natural design intents and modular structures.
Revised: Indeed, we ﬁnd the automatically discovered concepts capture natural design intents and modular structures.

Original: For example, through the restructured sketchesand constraint graphs in Figs. 1 and 3, we ﬁnd that our network decomposes sketches into modularstructures like rectangles, line-arcs and parallel lines that align symmetrically, even though no suchprior knowledge is applied during training except for concept modularity.
Revised: For example, through the restructured sketches and constraint graphs in Figs. 1 and 3, we ﬁnd that our network decomposes sketches into modular structures like rectangles, line-arcs and parallel lines that align symmetrically, even though no such prior knowledge is applied during training except for concept modularity.

Original: Fig.
Revised: Fig.

Original: 4 shows that a givenconcept can be used repetitively in different sketches, and structures with subtle differences inconstraint relations can be detected and distinguished into different concepts of the library.
Revised: 4 shows that a given concept can be used repetitively in different sketches, and structures with subtle differences in constraint relations can be detected and distinguished into different concepts of the library.

Original: Note thatthese subtle structural differences are subsumed in the input sketch graph, which makes them moredifﬁcult to detect.
Revised: Note that these subtle structural differences are subsumed in the input sketch graph, which makes them more difﬁcult to detect.

Original: We refer to the supplementary for more examples of design intent parsing andinstantiation of learned concepts, as well as quantitative analysis of the learned library.
Revised: We refer to the supplementary for more examples of design intent parsing and instantiation of learned concepts, as well as quantitative analysis of the learned library.

Original: 6.2 Auto completion
Revised: 6.2 Auto completion

Original: Auto-completion is a critical feature of CAD modeling software for assisting designers.
Revised: Auto-completion is a critical feature of CAD modeling software for assisting designers.

Original: Given apartial sketch of primitives and their constraints, auto-completion aims at complementing them withthe rest primitives and constraints to form regular and well-structured designs.
Revised: Given a partial sketch of primitives and their constraints, auto-completion aims at complementing them with the rest primitives and constraints to form regular and well-structured designs.

Original: Therefore, our conceptdetection and generation approach would naturally enhance the auto-completion task with betterregularity.
Revised: Therefore, our concept detection and generation approach would naturally enhance the auto-completion task with better regularity.

Original: For training and evaluation, following previous work [17], we synthesize the partial inputby removing a sufﬁx of random length (up to 50% ) from the sketch sequence, along with constraintsthat refer to the removed primitives, and make the model learn to generate the full sketches.
Revised: For training and evaluation, following previous work [18], we synthesize the partial input by removing a sufﬁx of random length (up to 50% ) from the sketch sequence, along with constraints that refer to the removed primitives, and make the model learn to generate the full sketches.

Original: State-of-the-art methods [6, 13, 17, 23] formulate auto-completion through a combination of primitiveand constraint generation models, both of which operate in an autoregressive fashion, with theconstraint model conditioned on and referring (by pointers [22]) to the generated primitives.
Revised: State-of-the-art methods [6, 13, 18, 24] formulate auto-completion through a combination of primitive and constraint generation models, both of which operate in an autoregressive fashion, with the constraint model conditioned on and referring (by pointers [23]) to the generated primitives.

Original: Sincethese works use diverse sketch encodings and have no publicly released code at submission time, forfair comparison, we implement the autoregressive baseline with our sketch encoding (Sec. 4.1).
Revised: Since these works use diverse sketch encodings and have no publicly released code at submission time, for fair comparison, we implement the autoregressive baseline with our sketch encoding (Sec. 4.1).

Original: Fig.
Revised: Fig.

Original: 6 compares our method with autoregressive baseline under various primitive mask ratios: ourmethod has superior primitive and constraint accuracy than the autoregressive baseline at almost allmask ratios.
Revised: 6 compares our method with autoregressive baseline under various primitive mask ratios: our method has superior primitive and constraint accuracy than the autoregressive baseline at almost all mask ratios.

Original: This difference conﬁrms that since our method completes sketches concept-by-conceptinstead of primitive-by-primitive, more meaningful structures are likely to be generated.
Revised: This difference conﬁrms that since our method completes sketches concept-by-concept instead of primitive-by-primitive, more meaningful structures are likely to be generated.

Original: Our modelalso gains advantage by taking primitives and constraints together as input and generating primitivesand constraints simultaneously, while in comparison the autoregressive baseline separates generationin two steps (primitives followed by constraints).
Revised: Our model also gains advantage by taking primitives and constraints together as input and generating primitives and constraints simultaneously, while in comparison the autoregressive baseline separates generation in two steps (primitives followed by constraints).

Original: Indeed, in practice CAD designers rarely ﬁnish allprimitives ﬁrst before supplementing the constraints, but rather apply constraints on partial primitivesimmediately whenever they form a design intent.
Revised: Indeed, in practice CAD designers rarely ﬁnish all primitives ﬁrst before supplementing the constraints, but rather apply constraints on partial primitives immediately whenever they form a design intent.

Original: Fig.
Revised: Fig.

Original: 5 shows how our approach interprets the partialinputs and completes with modular concepts (see supplementary for more examples); in comparison,the autoregressive baseline does not provide such interpretable or regular completions.
Revised: 5 shows how our approach interprets the partial inputs and completes with modular concepts (see supplementary for more examples); in comparison, the autoregressive baseline does not provide such interpretable or regular completions.

Original: 6.3 Ablation study
Revised: 6.3 Ablation study

Original: To evaluate the impact of different loss terms of the induction objective (Sec. 5), we train severalmodels in the absence of these losses respectively on the auto-encoding task.
Revised: To evaluate the impact of different loss terms of the induction objective (Sec. 5), we train several models in the absence of these losses respectively on the auto-encoding task.

Original: The results are shownin Table.
Revised: The results are shown in Table.

Original: We see that removing the binary costs C bry from reconstruction loss results in signiﬁcantdrop of constraint reconstruction, showing its necessity for constraint reference learning.
Revised: We see that removing the binary costs C bry from reconstruction loss results in signiﬁcant drop of constraint reconstruction, showing its necessity for constraint reference learning.

Original: Removing sharp reference loss
Revised: Removing sharp reference loss

Original: L sharp similarly fails constraint reference learning, although modularityenhancement bias loss makes all constraint references inside concepts.
Revised: L sharp similarly fails constraint reference learning, although modularity enhancement bias loss makes all constraint references inside concepts.

Original: Removing the modularityenhancement bias loss L bias only results in a slight drop in reconstruction quality but a signiﬁcantdrop in modularity, since without it cross-concept reference through arguments is more likely andtherefore modularity suffers.
Revised: Removing the modularity enhancement bias loss L bias only results in a slight drop in reconstruction quality but a signiﬁcant drop in modularity, since without it cross-concept reference through arguments is more likely and therefore modularity suffers.

Original: We provide more ablation tests on hyper parameters like the numbers ofconcept queries k qry and arguments k arg in the supplementary.
Revised: We provide more ablation tests on hyper parameters like the numbers of concept queries k qry and arguments k arg in the supplementary.

Original:  Conclusion
Revised:  Conclusion

Original: CAD sketch concepts are meta-structures containing primitives and constraints that deﬁne modularsub-graphs and capture design intents.
Revised: CAD sketch concepts are meta-structures containing primitives and constraints that deﬁne modular sub-graphs and capture design intents.

Original: By formulating the sketch concepts as program libraries ofa DSL, we present an end-to-end approach for discovering CAD sketch concepts through libraryinduction learning.
Revised: By formulating the sketch concepts as program libraries of a DSL, we present an end-to-end approach for discovering CAD sketch concepts through library induction learning.

Original: Key to our approach are the implicit-explicit representation of concepts and theseparated structure generation and parameter instantiation for concept generation, which togetherenable the end-to-end training under self-supervised induction objectives.
Revised: Key to our approach are the implicit-explicit representation of concepts and the separated structure generation and parameter instantiation for concept generation, which together enable the end-to-end training under self-supervised induction objectives.

Original: By training on large-scale sketch dataset, our approach enables the discovery of repetitive and modular concepts from rawsketches, and more structured and interpretable auto-completion than baseline autoregressive models.
Revised: By training on large-scale sketch dataset, our approach enables the discovery of repetitive and modular concepts from raw sketches, and more structured and interpretable auto-completion than baseline autoregressive models.

Original: Limitations and future work Design intents can be hierarchical [10], meaning that higher ordermeta-structures can be built out of lower order ones.
Revised: Limitations and future work Design intents can be hierarchical [10], meaning that higher order meta-structures can be built out of lower order ones.

Original: In this sense, our framework only addressesthe ﬁrst order library induction, and should be extended for higher order library learning; towardthis goal, we believe a progressive approach like [5] can be used with our framework as the one-stepinduction.
Revised: In this sense, our framework only addresses the ﬁrst order library induction, and should be extended for higher order library learning; toward this goal, we believe a progressive approach like [5] can be used with our framework as the one-step induction.

Original: In addition, similar strategies of end-to-end induction learning can be applied to constraintgraphs involving 3D CAD operations or even more general programs in other domains, as long asthey have similar declarative and parametric structures as sketch graphs.
Revised: In addition, similar strategies of end-to-end induction learning can be applied to constraint graphs involving 3D CAD operations or even more general programs in other domains, as long as they have similar declarative and parametric structures as sketch graphs.

Original: Checklist
Revised: Checklist

Original: For all authors... (a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s contributions and scope?
Revised: For all authors... (a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’s contributions and scope?

Original: [Yes](b) Did you describe the limitations of your work?
Revised: [Yes] (b) Did you describe the limitations of your work?

Original: [Yes] Please see Sec.
Revised: [Yes] Please see Sec.

Original: (c) Did you discuss any potential negative societal impacts of your work?
Revised: (c) Did you discuss any potential negative societal impacts of your work?

Original: [Yes] Please see Appendix.
Revised: [Yes] Please see Appendix.

Original: (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
Revised: (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?

Original: [Yes]
Revised: [Yes]

Original: If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
Revised: If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?

Original: [N/A]
Revised: [N/A]

Original: We present a deep learning algorithm rather than theorems in this paper.
Revised: We present a deep learning algorithm rather than theorems in this paper.

Original: (b) Did you include complete proofs of all theoretical results?
Revised: (b) Did you include complete proofs of all theoretical results?

Original: [N/A] 
Revised: [N/A] 3.

Original: If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experi- mental results (either in the supplemental material or as a URL)?
Revised: If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?

Original: [No] We will update the urlin Sec. 6 to open-source our code and data soon.
Revised: [Yes] We provided the url to open-source repository in Sec. 6.

Original: (b) Did you specify all the training details (e.g., data splits, hyperparameters, how theywere chosen)?
Revised: (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?

Original: [Yes] Please refer to Sec. 6 and Appendix.
Revised: [Yes] Please refer to Sec. 6 and Appendix.

Original: (c) Did you report error bars (e.g., with respect to the random seed after running experi- ments multiple times)?
Revised: (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?

Original: [No] We did not report error bars due to lack of computational resources for running all comparisons and ablations multiple times consistently.
Revised: [No] We did not report error bars due to lack of computational resources for running all comparisons and ablations multiple times consistently.

Original: But we note that the contrasts between different methods are very obvious, and we did run different methods in non-uniform repetitions and have found the same conclusions.
Revised: But we note that the contrasts between different methods are very obvious, and we did run different methods in non-uniform repetitions and have found the same conclusions.

Original: (d) Did you include the total amount of compute and the type of resources used (e.g., typeof GPUs, internal cluster, or cloud provider)?
Revised: (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?

Original: [Yes] Please see Appendix.4.
Revised: [Yes] Please see Appendix. 4.

Original: If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
Revised: If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?

Original: [Yes] Please see Sec.6.
Revised: [Yes] Please see Sec.

Original: (b) Did you mention the license of the assets?
Revised: (b) Did you mention the license of the assets?

Original: [Yes] The citation [16] clearly states thatthe SketchGraphs dataset we use has an MIT license.
Revised: [Yes] The citation [17] clearly states that the SketchGraphs dataset we use has an MIT license.

Original: (c) Did you include any new assets either in the supplemental material or as a URL?
Revised: (c) Did you include any new assets either in the supplemental material or as a URL?

Original: [No] We will update the url  in Sec. 6 to released source code and cleaned data soon.
Revised: [Yes] We have provided the url to open-source repository in Sec. 6.

Original: (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?
Revised: (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating?

Original: [Yes] The MIT license of [16] permits research purpose usage as done in this paper.
Revised: [Yes] The MIT license of [17] permits research purpose usage as done in this paper.

Original: (e) Did you discuss whether the data you are using/curating contains personally identiﬁable information or offensive content?
Revised: (e) Did you discuss whether the data you are using/curating contains personally identiﬁable information or offensive content?

Original: [N/A]
Revised: [N/A]

Original: The CAD sketch graph data used in this paper is not personally related.
Revised: The CAD sketch graph data used in this paper is not personally related.

Original: If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, ifapplicable?
Revised: If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?

Original: [N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
Revised: [N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?

Original: [N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
Revised: [N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?

Original: [N/A]
Revised: [N/A]