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

Original: Anonymous Author(s)
Revised: Anonymous Author(s)

Original: AfﬁliationAddress email
Revised: 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 areimplicitly 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 alearning based approach that discovers the modular concepts by induction over rawsketches.

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 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.

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 conceptlearning on a large scale CAD sketch dataset and show its applications for designintent 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: Inparametric modeling, CAD sketches are fundamental 2D shapes used for various 3D constructionoperations.

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); 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].

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 inherenthigh-level design intents are easy to interpret and disentangle.

Original: To this end, meta-structures (Fig.
Revised: To this end, meta-structures (Fig.

Original: 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: 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].

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 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.

Original: Is it possible to discover these modular concepts automatically from raw sketch graphs?
Revised: Is it possible 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 conceptsare modular functions that abstract primitive elements and compose the program.

Original: Discovering sketchconcepts thus becomes the induction of library functions from sketch programs.
Revised: Discovering sketchconcepts 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 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.

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 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.

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

Original: The learned sketch concepts show thatthey provide modular interpretation of design sketches.
Revised: The learned sketch concepts show thatthey 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 incompleteinput 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 thatsolve sketch graph generation through autoregressive models show that the modular sketch conceptslearned by our approach enable more accurate and interpretable completion results.

Original: [Figure]
Revised: [Figure]

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 thatdesign intents are inherent to and implicitly encoded by the combinations of geometric primitives andconstraints [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 makethem 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 modularstructures with self-contained references, and learning them through self-supervised inductive trainingwith 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 fordiscovering 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, 23, 13, 17, 24] use autoregressivemodels [21] to generate CAD sketches and constraints modeled through pointer networks [22].

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: 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.

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 theconcrete 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 andmore 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 inthe 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 researchtopic with increasing popularity [19, 3, 4, 18, 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 involvescombinatorial search, as has been handled by neural guided search [19, 5] or by pure stochasticsampling [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.
Revised: 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.

Original:  CAD sketch concept formulation
Revised:  CAD sketch concept formulation

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).
Revised: 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.
Revised: 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.
Revised: 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 ) .
Revised: 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.
Revised: {} , where a function is represented inthe lambda calculus style.

Original: Some constraints have parameters other than mere references, which [-aretreated as variables inside, e.g. parallel distance in List 1. Third, we deﬁne the sketch conceptsas L 1 types composed of L 0 types. To be speciﬁc, a composite type T 
-]
Revised: Some constraints have parameters other than mere references, which [-aretreated as variables inside, e.g. parallel distance in List 1. Third, we deﬁne the sketch conceptsas L 1 types composed of L 0 types. To be speciﬁc, a composite type T 
-]are

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

Original: i,j : T 0 j ∈ L 0 , which are connected through a composition operator

Original: R T 1 i = { p ( q ) | p, q ∈ [ t 0 i,j ] ∪ [ α k ] } that speciﬁes how

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 ∈

Revised: L 1 , R S ([ t 1 i ]) } treated as variables inside, e.g. parallel distance in List 1.

Revised: Third, we deﬁne the sketch conceptsas

Revised: 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:  L 1 , R S ([ t 1 i ]) } on the other hand, an argument α k may bind to a primitive q{+] and members t 
 i,j : T 0 j ∈ L 0+} , which is speciﬁed by α k ( q )  ∈ R T 1 i .
Revised: i ∈ L 1 is a function witharguments [ α k {+] and members t 
 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. For example, a coincident constraint p = λ ( r 1 , r 2 ) .

Revised: {} 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: α k ) ∈

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 astheir 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 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.

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 conceptsbecomes 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 generatingshapes [5, 7], and differs from works that use autoregressive language models to generate CAD sketchprograms one token at a time [6, 13, 17].

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 CADsketches 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 theimplicit deep representations and the explicit and interpretable structures, which we build through thefollowing 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
Revised: The implicit representation as

Original: embeddings in latent spaces is compatible with deep learning, while the explicit representa-
Revised: embeddings in latent spaces is compatible with deep learning, while the explicit representa-

Original: tion provides structures on which desired properties (e.g. modularity) can be imposed.
Revised: tion provides structures on which desired properties (e.g. modularity) can be imposed.•

Original: • A concept is a parameterized structure .
Revised: A concept is a parameterized structure .

Original: A concept is a composite type with ﬁxed modular
Revised: 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.
Revised: 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
Revised: 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.
Revised: 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.
Revised: 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.
Revised: 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.

Original: 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 } =
Revised: 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 } =

Original: D ( S, { q i } ) , where the conceptsarerepresented implicitly as latent codes { q i } , and { q i } are a learnable set of concept instance queries. Notably, we apply vector quantization to the latent codes and obtain { q (cid:48) i = min
Revised: D ( S, { q i } ) , where the concepts are input sketch S

Original: p ∈ L 1 || p − q i || 2 } ,which ensures that each concept is selected from the common collection of learnable concepts L 1used for restructuring all sketches. 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 throughout input sketch S =[ t 0 i ]{+
+}
Revised: =[ t {+
+}

Original:  [ e (cid:48) t 0 i ] [ q i ] [ q i ] q R q R qqq (cid:48)concept lib Lstructure Tinstance t[ t 1 i ]
Revised: i ] [ e (cid:48) t 0 i ] [ 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]

Revised: represented implicitly as latent codes { q i } , and { q i } are a learnable set of concept instance queries.

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

Revised: min

Original: different sketch instances.
Revised: p ∈ L 1 || p − q i || 2 } ,which ensures that each concept is selected from the common collection of learnable concepts L 1used for restructuring all sketches. 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.

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) 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 .

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 byassigning 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 sketchgraphs, 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 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.

Original:  End-to-end sketch concept induction
Revised:  End-to-end sketch concept induction

Original: [Figure] [Table]
Revised: 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, 17, 23, 24].

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, 24] for inputsketch 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: 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.

Original: On the other hand, each constraintreference as a primitive index is directly embedded as a code.
Revised: On the other hand, each constraintreference 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 typedinstance 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, 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.

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 thecontextualized 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 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)

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 furtherquantized into [ q (cid:48) i ] by selecting concept prototypes from a library L 1 implicitly encoding L 1 , beforebeing 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 , 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.

Original: List 1).concept A concept B R S primitive constraint inward arg outward arg
Revised: List 1). [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), andsplit 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 decodedinto 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 ( · ) asthe inverse of enc type ( · ) in Sec.

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 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.

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 eachcolumn 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 comesfrom that any constraint we considered in the dataset [16] 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 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.

Original: We compute R T 1by
Revised: We compute R T 1by

Original: ﬁ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: ﬁ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.

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 referringback 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 aregenerated 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 argumentpassing (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 compositionoperator 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 Rthrough 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 matrixis 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 )

Original: -thinward argument of the (cid:98) j/k arg (cid:99) -th concept instance.
Revised: -thinward 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:  where R cref [ t 1 i , t 1 j ] is a block assignment matrix of shape 2 k L 0 × k L 0 .
Revised: 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 .

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 thearguments 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 ofshape (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 andits implicit instance encoding q as input, and produces the speciﬁc parameters for each L 0 typedinstances inside the concept.

Original: In addition, as the parameters of generated instances are directly relatedto 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 allowingthe 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 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.

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 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.

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 inductivenetwork 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 expandedinto a graph of primitives and constraints; the generated sketch graph (cid:101) S is compared with the inputsketch 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 betweenelements 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 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.

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: 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.

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, wemeasure their type differences, and further use type casting to interpret the generated element as thetarget 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. [Table] p
Revised: To account for reference differences betweenthe two elements, we compare the reference arrows by the differences of their pointed primitives.t

Original: [Table] 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 , wecompare 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 thecost matrix in this stage as C ury , as it accounts for the element-wise unarydistances 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 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):

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 compositionoperation (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 predictedreference probabilities, where the unary costs measure how different a generated pointed primitive isfrom 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 , 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.

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 amatching σ : (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 graphscan be different, but we have chosen k qry , k L 0 such that the generated elements always cover thetarget 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 , butassigns 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 ; forunmatched generations, we supervise its type to be the empty type φ and neglect its parameters orreferences.
Revised: 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.

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 referencesto 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 aboveby making sure that even if the generated primitives are similar, a generated constraint only refers toone 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 togeneration, 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 [20, 15], 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 [15] and replace the ﬁrstterm 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 unusedcode in L 1 periodically [15] (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 thanarbitrary 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: 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.

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 pointingto 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 targetelement 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 [Equation] 1 , w [Equation]
Revised: 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.

Original: throughout allexperiments 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, 17], we adopt the SketchGraphsdataset [16] 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 complexitysuch 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 around 1million sketches and randomly split them into 950k for training and 50k for testing.

Original: We defer networkdetails tothe supplementary and will open-source code and data to facilitate future research 1 .
Revised: We defer networkdetails to and -source and data to facilitate future research 1 .

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 andsketch 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 reconstructionaccuracy by the F-scores of generated primitives and constraints, where F-score is simply the harmonicmean 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-truthif its type and parameters are correct, where for the scalar parameters we allow a threshold of 10% ofquantization 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 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.

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 ofconstraints with references entirely within the encapsulating concepts, among all correct constraints.

Original: [Figure]
Revised: [Figure]

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

Original: and groundtruth completion (red), result of the autoregressive baseline, and our result (colored by concepts).

Original: [Figure] [Table]
Revised: [Figure] [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 resultlibrary of sketch concepts and a model for design intent parsing that interprets a given sketch intomodular concepts and their combination.

Original: Indeed, we ﬁnd the automatically discovered conceptscapture 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 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.

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 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.

Original: Note thatthese subtle structural differences are subsumed in the input sketch graph, which makes them moredifﬁcult to detect.
Revised: Note thatthese subtle structural differences are subsumed in the input sketch graph, which makes them moredifﬁ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 andinstantiation 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 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.

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

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 [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.

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, 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.

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: 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).

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: ourmethod has superior primitive and constraint accuracy than the autoregressive baseline at almost allmask 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-conceptinstead 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 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).

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 allprimitives ﬁrst before supplementing the constraints, but rather apply constraints on partial primitivesimmediately 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 partialinputs 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 severalmodels in the absence of these losses respectively on the auto-encoding task.

Original: The results are shownin Table.
Revised: The results are shownin 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ﬁcantdrop 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 modularityenhancement 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 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.

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 ofconcept 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 modularsub-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 ofa DSL, we present an end-to-end approach for discovering CAD sketch concepts through libraryinduction 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 theseparated structure generation and parameter instantiation for concept generation, which togetherenable the end-to-end training under self-supervised induction objectives.

Original: By training on large-scalesketch 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 rawsketches, 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 ordermeta-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 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.

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 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.

Original: Checklist
Revised: Checklist

Original: For all authors...
Revised: For all authors...

Original: (a) Do the main claims made in the abstract and introduction accurately reﬂect the paper’scontributions and scope?
Revised: (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.7.(c)
Revised: [Yes] Please see Sec.

Original:  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
Revised: [Yes] Please see

Original: Appendix.
Revised: Appendix.

Original: (d) Have you read the ethics review guidelines and ensured that your paper conforms tothem?
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...
Revised: If you are including theoretical results...

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

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

Original: We present a
Revised: We present a

Original: deep learning algorithm rather than theorems in this paper.
Revised: 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]

Original: If you ran experiments...
Revised: If you ran experiments...

Original: (a) Did you include the code, data, and instructions needed to reproduce the main experi-
Revised: (a) Did you include the code, data, and instructions needed to reproduce the main experi-

Original: mental results (either in the supplemental material or as a URL)?
Revised: mental results (either in the supplemental material or as a URL)?

Original: [No] We will updatethe url in Sec.
Revised: [No] We will update the url in Sec.

Original: 6 to open-source our code and data soon.
Revised: 6 to open-source our code and data soon.

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 theywere 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-
Revised: (c) Did you report error bars (e.g., with respect to the random seed after running experi-

Original: ments multiple times)?
Revised: ments multiple times)?

Original: [No] We did not report error bars due to lack of computational
Revised: [No] We did not report error bars due to lack of computational

Original: resources for running all comparisons and ablations multiple times consistently.
Revised: resources for running all comparisons and ablations multiple times consistently.

Original: But
Revised: But

Original: we note that the contrasts between different methods are very obvious, and we did run
Revised: we note that the contrasts between different methods are very obvious, and we did run

Original: different methods in non-uniform repetitions and have found the same conclusions.
Revised: 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., typeof GPUs, internal cluster, or cloud provider)?

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

Original: If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
Revised: If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...

Original: (a) If your work uses existing assets, did you cite the creators?
Revised: (a) If your work uses existing assets, did you cite the creators?

Original: [Yes] Please see Sec. 6.(b)
Revised: [Yes] Please see Sec. 6.

Original:  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 that the SketchGraphs dataset we use has an MIT license.
Revised: [Yes] The citation [16] clearly states thatthe 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: [No] We will update the url in Sec. 6 to released source code and cleaned data soon.

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

Original: using/curating?
Revised: using/curating?

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

Original:  Did you discuss whether the data you are using/curating contains personally identiﬁableinformation 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 paperis 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...
Revised: If you used crowdsourcing or conducted research with human subjects...

Original: (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
Revised: (a) Did you include the full text of instructions given to participants and screenshots, ifapplicable?

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

Original: (b) Did you describe any potential participant risks, with links to Institutional Review
Revised: (b) Did you describe any potential participant risks, with links to Institutional Review

Original: Board (IRB) approvals, if applicable?
Revised: Board (IRB) approvals, if applicable?

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

Original: (c) Did you include the estimated hourly wage paid to participants and the total amount
Revised: (c) Did you include the estimated hourly wage paid to participants and the total amount

Original: spent on participant compensation?
Revised: spent on participant compensation?

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