Title: GENERATIVE HIERARCHICAL MODELS FOR PARTS, OBJECTS, AND SCENES

Abstract: Compositional structures between parts and objects are inherent in natural scenes. Modeling such compositional hierarchies via unsupervised learning can bring various benefits such as interpretability and transferability, which are important in many downstream tasks. In this paper, we propose the first deep latent variable model, called RICH, for learning Representation of Interpretable Compositional Hierarchies. At the core of RICH is a latent scene graph representation that organizes the entities of a scene into a tree structure according to their compositional relationships. During inference, taking top-down approach, RICH is able to use higher-level representation to guide lower-level decomposition. This avoids the difficult problem of routing between parts and objects that is faced by bottom-up approaches. In experiments on images containing multiple objects with different part compositions, we demonstrate that RICH is able to learn the latent compositional hierarchy and generate imaginary scenes.

1. INTRODUCTION:

Compositional hierarchies prevail in natural scenes where primitive entities are recursively composed into more abstract entities. Modeling such compositional generative process allows discovery of modular primitives that can be reused across a variety of scenes. Hence, it would bring interpretability and transferability, in which current deep learning models are not quite successful. Due to expensive labeling, such compositional relationships should ideally be learned in an unsupervised manner. Unsupervised approaches can also provide more flexibility and generalization ability since the model is allowed to choose the most appropriate compositional hierarchy for a given scenario.

Despite its importance, there has not been much work on unsupervised generative modeling of the compositional hierarchy. Earlier work on hierarchical representation learning (Lee et al., 2009) obtains a feature hierarchy that captures concepts at different levels of abstraction, with no explicit modeling of composition. Recent researches on deep latent variable models (Maaløe et al., 2019; Zhao et al., 2017; Sønderby et al., 2016; Bachman, 2016) mainly focus on architectural designs and training methods that harness the full expressive power of hierarchical generative models. Although they have shown impressive generation quality and disentanglement of learned representation, the compositional hierarchy is still not captured in a modular and interpretable way. To obtain interpretable scene representation, recent work (Tieleman, 2014; Eslami et al., 2016; Crawford & Pineau, 2019; Wu et al., 2017; Yao et al., 2018; Romaszko et al., 2017; Deng et al., 2019) has introduced domain-specific decoders that take object pose and appearance information as input and render the object in a similar way to graphics engines. This forces the encoder to invert the rendering process, producing interpretable object-wise pose and appearance representation.

In this paper, we extend the interpretable object-wise representation to the hierarchical setting. We propose a deep generative model, called RICH (Representation of Interpretable Compositional Hierarchies), that can use its hierarchy to represent the compositional relationships among interpretable symbolic entities like parts, objects, and scenes. To this end, taking inspiration from capsule networks (Sabour et al., 2017; Hinton et al., 2018) and the rendering process of computer graphics, we propose a probabilistic scene graph representation that describes the compositional hierarchy as a latent tree. The nodes in the tree correspond to entities in the scene, while the edges indicate the compositional relationships among these entities. We associate an appearance latent with each node to summarize all lower-level composition, and a pose latent with each edge to specify the transformation from the current level to the upper level. To enforce interpretability, the probabilistic scene graph is then paired with a decoder that renders the scene graph by recursively applying the specified transformations. We also introduce learnable templates for the primitive entities. Once learned, RICH is able to generate all lower-level latents and render a partial scene given the latent at a specific level.

To infer the scene graph is, however, challenging, since both the tree structure and the latent variables need to be simultaneously inferred. Capsule networks have provided a bottom-up solution to learning the tree structure, but it faces the difficult routing problem caused by the exponentially many possible compositions. Instead, RICH takes a top-down approach that avoids the routing problem. The intuition is that for a given scene, it is natural to first decompose it into high-level objects. If we devote our attention to one of the objects, we can then figure out its constituent parts. In cases where parts are close or have occlusion, we expect the appearance latent of the higher-level object to guide lower-level decomposition, since it summarizes the typical composition for that object.

The contributions of this paper are as follows. We propose RICH, the first interpretable representation learning model for compositional hierarchies through probabilistic latent variable modeling. We then implement a three-level prototype of RICH and demonstrate its effectiveness in extensive experiments. RICH is able to learn the hierarchical scene graph representation from images containing multiple compositional objects. Further, it shows decent generation quality and generalization ability to unseen number of objects.

2. RELATED WORK:

Interpretable object-wise representation. AIR (Eslami et al., 2016) is the first generative model that learns interpretable object-wise scene representation. It is able to assign a latent vector (z pres , z where , z what ) to each object in the scene, describing the presence, size, center position, and appearance of the object. SPAIR (Crawford & Pineau, 2019) improves the scalability of AIR to images containing a large number of objects. It divides the image into spatially distributed cells, and auto-regressively infers the latent vector for each cell. This crucially reduces the search space for individual cells, since they are each responsible only for explaining objects near themselves. RICH builds upon SPAIR to infer the structure of the probabilistic scene graph. To enable efficient hierarchical inference, we use mean-field approximation for the posterior, allowing inference of all cells to be done in parallel.

Hierarchical scene representation. Modeling the part-whole relationship in scenes has attracted growing interest, and it has been utilized for improving image classification, parsing, and segmentation. Two representative models that have inspired our work are hierarchical compositional models (HCMs) and capsule networks. In HCMs (Zhu et al., 2008) , the hierarchical structure is represented as a graph, where leaf nodes interact with image segments, and upper-level nodes store the average position and orientation of lower-level nodes (with respect to the image coordinates). In capsule networks (Sabour et al., 2017; Hinton et al., 2018) , the part-whole relationship is used for achieving viewpoint invariance. The key insight is that the relative pose of parts with respect to objects is viewpoint invariant, and is thus suitable to be learned as network weights. However, neither of these two approaches uses generative modeling, and they have been applied only to scenes with one dominant object. More recently, the part-whole relationship has been explored in modeling 3D shapes (Tulsiani et al., 2017; Li et al., 2017; Zhu et al., 2018) and motion decomposition (Xu et al., 2019) . Although they have employed generative modeling, the latent space is not hierarchically structured, and typically only contains the top-level representation. In contrast, RICH represents the entire scene graph in latent space, modeling both the hierarchical structure and the object pose and appearance at each level as latent variables. This representation is arguably richer, and enables simultaneous learning of a collection of generative models for parts, objects, and scenes.

3 THE PROPOSED MODEL: RICH RICH (Representation of Interpretable Compositional Hierarchies) is a generative model that captures the recursive compositional structure inherent in natural scenes. It builds a tree-structured representation similar to scene graphs in computer graphics (Foley et al., 1996) . The nodes in the tree describe entities at various levels of abstraction in the scene, and the edges indicate the compo- sitional relationships among these entities. Specifically, each leaf node represents a primitive entity that is not further decomposed. Each internal node represents an abstract entity that is composed from its children nodes. The composition is specified by the relative pose of each child node with respect to the parent node, and this pose information is stored on the corresponding edges.

3.1. GENERATIVE PROCESS:

To make a generative model, we associate an appearance vector z appr v with each node v, and a pose vector z pose v with the edge between node v and its parent pa(v), as shown in Figure 1A . The intuition is that z appr pa(v) represents the entity at pa(v) in its canonical pose, summarizing all lower-level composition in the subtree rooted at pa(v). Conditioning on z appr pa(v) , we can then sample z appr v and z pose v , the relative pose of v with respect to pa(v). Thus, the latent vectors in any subtree can be recursively generated. Let V be the set of all nodes, r ∈ V be the root node, and L ⊆ V be the set of leaf nodes. The generative model for the entire scene x can be written as follows:

EQUATION

where we assume conditional independence among all latents z pose v and z appr v that have the same pa(v). This gives disentangled and interpretable scene representation.

We design the decoder p(x|z pose V \{r} , z appr L ) to closely follow the rendering process from a given scene graph. First, for each leaf node v ∈ L, we use a neural network to decode its appearance vector into a small image patch xv and a (close to) binary mask mv the same size as xv . Here we assume that xv has already been masked by mv , meaning xv (i, j) = 0 for all pixel locations (i, j) where mv (i, j) = 0. We then recursively compose these primitive patches into the entire scene by applying affine transformations level by level. Specifically, let u be an internal node, and ch(u) be the set of its children. We compose the higher-level image patch xu and mask mu as follows:

EQUATION

where a spatial transformer ST (Jaderberg et al., 2015) is used to properly place xv and mv into the coordinate frame of the parent node u, according to the scaling, rotation and translation parameters given by z pose v . In addition, z pose v also provides relative depth information that helps deal with occlusion. Entities with smaller depth will appear in front of entities with larger depth. This is enforced by a transparency map α v that assigns pixel-wise weights to each transformed patch according to its relative depth. See Figure 1C for an illustration. To ensure that unoccluded part of entities will remain visible, we normalize α v after applying the transformed mask mv = ST -1 ( mv , z pose v ), namely for all pixel locations (i, j),

α v (i, j) = 0 if mv (i, j) = 0, v∈ch(u) α v (i, j) = 1 if v∈ch(u) mv (i, j) > 0.

(3)

The final decoder output p(x|z pose V \{r} , z appr L ) = N (x r , σ 2 I), where σ is a hyperparameter.

3.2. INFERENCE AND LEARNING:

Since computing p(x) in Equation 1is intractable, we train RICH with variational inference. The approximate posterior is designed to factorize z in the top-down fashion similar to the generative process, such that a higher-level appearance representation guides lower-level decomposition:

p(z | x) ≈ q(z | x) = q(z appr r | x) v∈V \{r} q(z pose v | z appr pa(v) , x pa(v) ) q(z appr v | z appr pa(v) , x v ). (4)

Here x v is the region of input image x that corresponds to the entity that node v represents. This region is specified by all the predicted pose vectors along the path from root r to node v. More precisely, we define x r = x, and recursively extract x v = ST (x pa(v) , z pose v ), as shown in Figure 1B . Notice that the relative pose z pose v of v with respect to pa(v) needs to be inferred from x pa(v) . After applying spatial transformer ST , we assume the captured x v is in its canonical pose. This top-down inference process avoids the challenging routing problem in capsule networks (Sabour et al., 2017; Hinton et al., 2018) , leading to more efficient inference. In cases where entities are close or have occlusion, the higher-level appearance vector z appr pa(v) could provide some guidance on separating these entities.

In general, all latents are assumed to be continuous, with both prior and posterior being Gaussian distributions. However, it may bring additional flexibility and interpretability to introduce some discrete latents, as we explain in Section 3.3. For continuous latents, we compute posterior via precision-weighted combination similar to Ladder-VAE (Sønderby et al., 2016) , and use reparameterization trick (Kingma & Welling, 2013) to sample from the posterior. For discrete latents, we use Gumbel-Softmax trick (Jang et al., 2016; Maddison et al., 2016) . Thus, the entire model can be trained end-to-end via backpropagation to maximize the following evidence lower bound (ELBO):

EQUATION

-

v∈V \{r} E q(z|x) [D KL [q(z pose v | z appr pa(v) , x pa(v) ) p(z pose v | z appr pa(v) )]] - v∈V \{r} E q(z|x) [D KL [q(z appr v | z appr pa(v) , x v ) p(z appr v | z appr pa(v) )]].

3.3. IMPLEMENTATION DETAILS:

Structural inference. In our description above, we have assumed that the tree structure is already known. We now relax this assumption and introduce structural inference. First, we set a maximum out-degree for each node so that the number of all possible structures is bounded. For simplicity, in our implementation nodes within one level share the same maximum out-degree. To determine the structure, it then suffices to specify the presence of each possible edge. Hence, for an arbitrary edge between node v and its parent, we introduce a Bernoulli variable z pres v to indicate its presence. If z pres v = 0, meaning the edge is not present, then z pose v along with all latents in the subtree rooted at v are excluded from the representation. To encourage sparse structures, we initialize the prior p(z pres v | z appr pa(v) ) and the posterior q(z pres v | z appr pa(v) , x pa(v) ) to have small Bernoulli parameters. Node grounding. Due to the symmetric tree structure, there are numerous equivalent entity-tonode assignments for a given scene, each yielding a different permutation of the pose vectors. This can cause difficulties in the learning process. In particular, the model has to learn a consistent assignment strategy such that the pose vector at each edge can be well captured by a unimodal Gaussian distribution. To alleviate this problem, we impose some inductive bias on the assignment strategy. Inspired by SPAIR (Crawford & Pineau, 2019) , for each internal node u, we divide x u into a grid of N u cells, where N u is the maximum out-degree of u. Each child of u is assigned to one of these cells, and is responsible for explaining only the entity whose center position is within that cell. Assuming that x u captures the entity u in its canonical pose, this assignment strategy ensures that each child of node u is almost always associated with the same component of entity u. To deal with occlusion, we let neighboring cells have slight overlap.

Primitive templates. It is often reasonable to assume that the vast number of complex entities can be composed from only a modest number of primitive entities. Identifying such primitive entities through discrete latent variables would bring additional interpretability. Hence, we introduce an external memory M with variational addressing (Bornschein et al., 2017) to learn a set of primitive templates. For each leaf node v ∈ L, we decompose its appearance vector into

z appr v = (z addr v , z what v ).

Here, z addr v is a one-hot vector that points one of the templates in M, and z what v is a continuous vector that explains the remaining variability. We assume that z appr pa(v) captures the identity but not the exact appearance of entity v, since z appr pa(v) is intended for summarization. Therefore, we factorize the prior and the posterior as follows:

EQUATION

EQUATION

where M is considered as model parameter, and M[z addr v ] is the deterministically retrieved memory content. We implement M to be a stack of low-dimensional embeddings of templates. To decode from z appr v , we first retrieve the embedding indexed by z addr v , and decode it into a single-channel image patch. This serves as both the template and the mask, namely mv = g(M[z addr v ]). We then apply multiplicative modification controlled by z what v and obtain xv = mv h(z what v ). Here, xv has the same number of channels as the input x, and both g(•) and h(•) are implemented as spatial broadcast decoders (Watters et al., 2019) .

Canonical size. To avoid undesired effects in cascaded affine transformations, we constrain the spatial transformer to always preserve aspect ratio. Thus, for a square input image, each entity is assumed to occupy a square image region. Considering the various possible compositions, this region may not capture the entity's canonical size well. Hence, we introduce a latent variable z ratio and their relative position, scale, and orientation. Among these ten types, three contain a single part, another three contain two parts, and the remaining four contain three parts. To construct a scene, we first randomly sample the number of objects (between one and four) and their types, and then instantiate these objects. This means for each object, we choose a random color for each of its parts, apply random scaling (within 10% of object size), and draw it at a random position in the scene. In 2D case, the instantiation process also includes random perturbation of parts and random rotation of the object as a whole. We ensure that different objects have minimal overlap. In 3D case, we use MuJoCo (Todorov et al., 2012) to place the objects on a plane, and then take observations from ten different viewpoints, some of which can lead to severe occlusion.

4.2. SCENE DECOMPOSITION:

RICH is able to give interpretable, tree-structured decomposition of scenes into objects and parts. We visualize such decomposition in Figure 2 and Figure 3 for 2D and 3D scenes respectively, where we also show the learned memory templates for parts. Notice that the templates should be in gray scale, but for visualization purposes we have assigned a color to each template. The bounding boxes are drawn on top of the input images, according to the inferred pose of objects and parts with z pres = 1. Object bounding boxes are drawn in white, while part bounding boxes are drawn in color to indicate the template chosen for each part.

We find that the templates have learned the appearance of parts at several canonical poses (rotation in 2D and viewpoint in 3D), and RICH predicts the pose of parts with respect to these canonical poses. This makes the decomposition even more interpretable. Moreover, equipped with templates, RICH is able to correctly identify the parts even when they have severe occlusion. See Figure 3A third row where a ball occludes an equally sized cube. This example (and many others) also demonstrate that RICH can successfully deal with objects composed of multiple parts that are of the same type.

In addition to part-level templates, we believe that the learned object-level z appr O also helps scene decomposition, especially when there is ambiguity in part assignment and occlusion between objects. For example, in Figure 2A first column, the triangle and circle near the center are close to each other and may well constitute an object. However, because this pose configuration is relatively rare in the training set (compare second column), RICH has correctly rejected this composition and instead assigned these two parts to separate objects, which better agrees with the training distribution. In Figure 3A fourth row, object 1 is occluded by object 3. RICH has successfully detected object 1 and added in the reconstruction a ball of the same color as the occluded part. This is quite reasonable since the augmented object is one of our predefined types and appears frequently in the dataset.

To quantify RICH's ability of scene decomposition and representation learning, we report absolute counting error, precision, and recall for detection of objects and parts in Table 1 , and compare the negative log-likelihood of RICH with a VAE (Kingma & Welling, 2013) baseline in Table 2 . Here the counting error measures the absolute difference between the predicted and true number of objects and parts. To obtain precision and recall, we need to match the predictions with the groundtruth. We set the matching priority as the distance between the predicted and true center positions, namely closer pairs of prediction and groundtruth will be matched first. We only match the pair if their distance is less than 10 pixels (less than half of the size of large parts). This ensures that the matched predictions will have approximately correct center positions. The VAE baseline shares the same scene-level encoder with RICH, and uses sub-pixel convolution (Shi et al., 2016) for the decoder. We approximate the negative log-likelihood using 50 importance-weighted samples. The counting error, precision, and recall are also averaged over 50 samples from the posterior. As can be seen from Table 1 , RICH gives almost perfect detection of objects and parts on 2D dataset, and still performs reasonably well on the challenging 3D dataset. We observe that RICH tends to split a long cylinder into two parts, leading to the drop in precision for parts. Apart from learning the part-level templates, RICH also has the ability to generate objects and scenes by recursively composing the learned templates. We show generation results in Figure 4 . To generate the scenes, we first sample z appr S ∼ N (0, I), and then sample other latents following the learned conditional prior distributions, and finally use the decoder to render the image. The objects are generated similarly, except that we decode up to the object level and ignore z pres O and z pose O . We find that RICH has captured many predefined object types in the dataset, and also managed to come up with novel compositions. The generated scenes are also reasonable, with moderate distance and occlusion between objects.

4.4. GENERALIZATION PERFORMANCE:

RICH represents the scene as composition of objects and parts. This naturally enables generalization to novel scenes. Here we evaluate RICH's capacity to generalize to scenes with novel number of objects. The training and validation sets of this task contain scenes of one and three objects only. We trained RICH and the VAE baseline again, and report the metrics in Table 1 and Table 2 on two test sets, one having two-object scenes only, and the other having four-object scenes only. We also show qualitative results in Figure 5 and Figure 6 . As can be seen, RICH demonstrates quite decent generalization performance in both 2D and 3D scenes. We notice that in 3D case, there is a drop in recall when RICH is tested on four-object scenes. One reason is that four-object scenes exhibit more severe occlusion than the training set, and we have observed that when two objects are close and have occlusion, RICH would sometimes merge them into one object. Another reason is that in four-object scenes, objects are more likely to be partially outside the scene. In this case, RICH has difficulty predicting the precise object position, leading to unmatched predictions when we compute the recall.

4.5. DATA EFFICIENCY IN DOWNSTREAM TASKS:

The compositional hierarchy learned by RICH can be useful in downstream tasks that require reasoning of part-object relationships. Here we consider a classification task. The input images are generated from the same distribution as described in Section 4.1 but with different random seeds. The label for each image is obtained by first counting the number of distinct parts within each object, and then summing the count over all objects. We expect the representation learned by RICH to bring better data efficiency compared to non-hierarchical baselines like SPAIR (Crawford & Pineau, 2019) . To verify this, we use pretrained RICH and SPAIR to obtain the latent representation for each image, and then train a classifier on top of the to predict the label. Specifically, the unnormalized class probabilities y RICH for RICH are computed as follows:

EQUATION

where u and v are indices of objects and parts respectively, w u and w v are attention weights also computed by MLPs. Because RICH provides the compositional hierarchy, the classifier can explicitly merge information from parts that belong to the same object. For SPAIR that detects parts with no notion of objects, we include pose vectors as additional input for fair comparison. This allows the classifier to group parts into objects based on their positions. The unnormalized class probabilities y SPAIR for SPAIR are computed as follows: The difference here is that we have multiple sets of attention weights w (u) , each should learn to select the parts that belong to one specific object.

EQUATION

We train the two classifiers using varying number of training samples. We ensure that the classifiers have comparable number of parameters. We use a parallel implementation of SPAIR that, as suggested by Anonymous (2020) , has similar detection performance but faster training speed. We choose the best learning rate for both classifiers using a fixed validation set of size 12800. We report classification accuracy on a fixed test set also of size 12800. As shown in Figure 7 , RICH representation approximately doubles the data efficiency on this downstream task compared to SPAIR representation.

A DEALING WITH DEFORMABLE PRIMITIVES:

In Section 4, we have demonstrated the effectiveness of RICH on two datasets of 2D and 3D scenes. However, these datasets only contain non-deformable primitives, meaning each primitive has only one possible shape. Here, we introduce a compositional MNIST dataset where the primitives are handwritten digits with considerable shape variation. Through the same set of experiments as in Section 4, we show that with slight modification, RICH can successfully deal with such deformable primitives.

A.1 COMPOSITIONAL MNIST DATASET:

We define the primitive parts to be individual digits from the MNIST database (LeCun et al., 1998) . We have excluded the digit 1, since it can be used as sub-parts in other digits like 4 and 7, and thus may interfere with our definition of primitives. We then define nineteen types of objects, of which nine contain a single digit, six contain two digits, and the remaining four contain three digits. Here, the object definition specifies the class of each digit that an object should contain, and the relative position and orientation of these digits. We allow overlap among digits that constitute one object.

The dataset contains 128×128 color images, split into 64000 for training, 12800 for validation, and 12800 for testing. Each image describes a scene that contains one to four objects. To instantiate an object from its definition, we first sample the digits from the corresponding classes and resize them to 36×36. Next, we assign a random color to each digit. The colors are guaranteed to be distinct. Finally, we apply random scaling (within 10% of object size) and random rotation (within ±30 degrees) to the object as a whole, and draw it at a random position in the scene. We ensure that different objects have minimal overlap, and that disjoint sets of digit samples are used for the training, validation, and test sets. Although in principle, such element-wise multiplication has the ability to model deformation, we empirically find this to be hard. In fact, h(z what v ) tends to produce an image patch filled with a single color, and is thus unable to distort the shape of template given by mv .

To deal with deformable primitives, we add more inductive bias to the decoder. In particular, z what v is further split into z shape v and z color v during the decoding process. z shape v is designated to explain the shape variation, and is concatenated with the template embedding M[z addr v ] to modify the shape of template as mv = g(concat[M[z addr v ], z shape v ]). As mentioned in Section 3.3, mv is in gray scale, so we then use z color v to colorize the modified template mv and produce xv = mv h(z color v ).

One challenge here is to disentangle deformation from pose changes. Ideally, z shape v should capture only the shape variation of primitive v in its canonical pose, so that z shape v and z pose v do not interfere with each other. This can be enforced by limiting the expressiveness of z shape v . In experiments, we find that restricting z shape v to a one-dimensional scalar works reasonably well.

Another challenge arises during training. We have observed that RICH tends to split the digits into sub-parts at an early stage. Consequently, the strokes instead of the digits are learned as primitives, and the objects become composition of strokes, leading to an incorrect compositional hierarchy. To alleviate this problem, we take inspiration from SPACE (Anonymous, 2020) and introduce a colorfiltered boundary loss for each glimpse x v , where v is a primitive. The key observation is that if x v captures only part of a digit, then there must be some pixels on the boundary of x v that have the same color as the digit. Here, the thickness of boundary is a hyperparameter. We use h(z color v ) as a color filter to find such pixels. The boundary loss then penalizes the total number of those pixels. This drives z pose v to produce a larger glimpse region that reduces splitting. We anneal the weight of the boundary loss as training proceeds. 

A.3 EXPERIMENTAL RESULTS:

Similar to Section 4, here we show both qualitative and quantitative results on the compositional MNIST dataset. Figure 8A shows qualitative results of scene decomposition. Again, the bounding boxes are fairly tight, demonstrating that the nodes in the probabilistic scene graph representation have been correctly associated with objects and parts in the images. We also visualize the learned part-level templates in Figure 8B . Here each row shows the templates decoded from one slot of the memory with varying degree of distortion. As can be seen, each slot captures visually similar digits, and all nine digits are captured. It is worth noting that the main purpose of memory is not to perfectly separate the different classes of digits, but to obtain the canonical pose for the digits. This is essential for the scene graph representation to infer consistent orientation for the digits. Figure 8B shows that this purpose is indeed achieved, since the digits have almost the same pose within each memory slot.

Figure 9 shows the generated objects and scenes, which resemble the training images. Figure 10 shows qualitative generalization results. The learned compositional hierarchy generalizes well to unseen number of objects. We report quantitative results in Table 3 and Table 4 . The counting error, precision, and recall are mainly to show that the representation is learned properly. We compare negative log-likelihood with a VAE baseline to demonstrate that the probabilistic scene graph representation can be obtained without impairing generation quality.

Finally, we consider a downstream task that requires reasoning of part-object relationships, and demonstrate the transferability of RICH representation. The task setup, model architecture, and training procedure are similar to those described in Section 4.5. The difference here is that we seek to predict the sum of max digit within each object, and we treat it as a 37-way classification task (possible output can be integers in [0, 36]). Experimental results in Figure 11 show that compared to SPAIR, the representation learned by RICH leads to approximately doubled data efficiency. 

:

CONCLUSIONWe have proposed RICH, the first hierarchical generative model for learning interpretable compositional structures. RICH takes a top-down approach to infer the probabilistic scene graph representation for a given scene. This utilizes the higher-level appearance information to guide lower-level decomposition, thus avoiding the difficult routing problem faced by bottom-up approaches. Through extensive experiments, we have demonstrated that RICH is able to learn the compositional hierarchy from images containing multiple objects. An interesting future direction is to extend RICH to the sequential setting.

Figures and Tables:

Figure 1: (A) Probabilistic scene graph representation. Each node represents an entity in the scene, and is associated with an appearance latent. Each edge is associated with a relative pose latent that specifies the coordinate transformation between the child node and the parent node. (B) Top-down inference process. Inference combines information from glimpse regions and higher-level appearance latents (not shown here). Bounding boxes indicate inferred pose latents. (C) Recursive decoding process (a single recursive step shown). The image patch xu 1 and mask mu 1 of an internal node u1 are decoded from the image patches and masks of all its children nodes.

Figure 2: Qualitative results on 2D dataset. (A) (Top) Input image. (Middle) Input image superimposed with predicted bounding boxes, drawn according to z pres O , z pose O , z ratio O , z pres P , z pose P and z addr P . (Bottom) Reconstruction. (B) Learned part-level templates. Template colors indicate identity. Part bounding box colors indicate the chosen template.

Figure 3: Qualitative results on 3D dataset. (A) Each row shows the overall reconstruction, and the predicted bounding boxes and reconstruction from each object cell for a given input image. (B) Learned part-level templates. Template colors indicate identity. Part bounding box colors indicate the chosen template.

Figure 4: (A) Generated objects on (Top) 2D dataset and (Bottom) 3D dataset. White boxes indicate aspect ratio, and are drawn according to z ratio O . (B) Generated scenes on (Top) 2D dataset and (Bottom) 3D dataset.

Figure 5: Generalization results on 2D dataset. RICH has been trained on scenes with 1 and 3 objects only, and tested on scenes with (A) 2 objects and (B) 4 objects. (Top) Input image. (Middle) Input image superimposed with predicted bounding boxes. (Bottom) Reconstruction.

Figure 6: Generalization results on 3D dataset. RICH has been trained on scenes with 1 and 3 objects only, and tested on scenes with (A) 2 objects and (B) 4 objects. Each row shows the overall reconstruction, and the predicted bounding boxes and reconstruction from each object cell for a given input image.

Figure 7: Comparison of data efficiency in downstream tasks.

MODIFICATIONS TO RICH RICH decomposes the appearance vector of primitive v into z appr v = (z addr v , z what v ), and decodes the mask mv and the image patch xv as mv = g(M[z addr v ]) and xv = mv h(z what v ).

Figure 8: Qualitative results on compositional MNIST dataset. (A) (Top) Input image. (Middle) Input image superimposed with predicted bounding boxes. (Bottom) Reconstruction. (B) Learned part-level templates. Each row is decoded from the same template embedding with distortion specified by z shape . Here for visualization purposes, we choose z shape values that are equally spaced within one standard deviation from the mean. Template colors indicate identity. Part bounding box colors indicate the chosen template.

Figure 9: (A) Generated objects on compositional MNIST dataset. (B) Generated scenes on compositional MNIST dataset.

Figure 10: Generalization results on compositional MNIST dataset. RICH has been trained on scenes with 1 and 3 objects only, and tested on scenes with (A) 2 objects and (B) 4 objects. (Top) Input image. (Middle) Input image superimposed with predicted bounding boxes. (Bottom) Reconstruction.

Quantitative results on object and part detection.

Table content: <table><tr><td>Dataset</td><td/><td>2D dataset</td><td/><td/><td>3D dataset</td><td/></tr><tr><td>Training set</td><td>1∼4 objects</td><td colspan="2">1&amp;3 objects</td><td>1∼4 objects</td><td colspan="2">1&amp;3 objects</td></tr><tr><td>Test set</td><td colspan="6">1∼4 objects 2 objects 4 objects 1∼4 objects 2 objects 4 objects</td></tr><tr><td>Object count error</td><td>0.00083</td><td>0.0014</td><td>0.00036</td><td>0.094</td><td>0.26</td><td>0.47</td></tr><tr><td>Object precision</td><td>0.9985</td><td>0.9987</td><td>0.9996</td><td>0.9639</td><td>0.9157</td><td>0.9581</td></tr><tr><td>Object recall</td><td>0.9984</td><td>0.9982</td><td>0.9995</td><td>0.9597</td><td>0.9758</td><td>0.8462</td></tr><tr><td>Part count error</td><td>0.0086</td><td>0.011</td><td>0.014</td><td>0.80</td><td>1.1</td><td>1.3</td></tr><tr><td>Part precision</td><td>0.9991</td><td>0.9988</td><td>0.9991</td><td>0.8282</td><td>0.7579</td><td>0.8100</td></tr><tr><td>Part recall</td><td>0.9989</td><td>0.9985</td><td>0.9993</td><td>0.9116</td><td>0.9258</td><td>0.8347</td></tr></table>

Comparison on negative log-likelihood.

Table content: <table><tr><td>Dataset</td><td/><td>2D dataset</td><td/><td>3D dataset</td></tr><tr><td colspan="2">Training set 1∼4 objects</td><td>1&amp;3 objects</td><td>1∼4 objects</td><td>1&amp;3 objects</td></tr><tr><td>Test set</td><td colspan="4">1∼4 objects 2 objects 4 objects 1∼4 objects 2 objects 4 objects</td></tr><tr><td>VAE</td><td>-13761.9</td><td>-13801.4 -13590.5</td><td>-13712.0</td><td>-13788.3 -13433.2</td></tr><tr><td>RICH</td><td>-13890.3</td><td>-13908.3 -13796.6</td><td>-13818.0</td><td>-13867.3 -13539.7</td></tr><tr><td colspan="3">4.3 OBJECT AND SCENE GENERATION</td><td/><td/></tr></table>

Quantitative results on object and part detection.

Table content: <table><tr><td>Dataset</td><td colspan="3">Compositional MNIST dataset</td></tr><tr><td>Training set</td><td>1∼4 objects</td><td colspan="2">1&amp;3 objects</td></tr><tr><td>Test set</td><td colspan="3">1∼4 objects 2 objects 4 objects</td></tr><tr><td>Object count error</td><td>0.0015</td><td>0.00064</td><td>0.00027</td></tr><tr><td>Object precision</td><td>0.9963</td><td>0.9899</td><td>0.9365</td></tr><tr><td>Object recall</td><td>0.9962</td><td>0.9898</td><td>0.9364</td></tr><tr><td>Part count error</td><td>0.016</td><td>0.0086</td><td>0.023</td></tr><tr><td>Part precision</td><td>0.9981</td><td>0.9989</td><td>0.9982</td></tr><tr><td>Part recall</td><td>0.9983</td><td>0.9990</td><td>0.9989</td></tr></table>

Comparison on negative log-likelihood.

Table content: <table><tr><td>Dataset</td><td colspan="2">Compositional MNIST dataset</td></tr><tr><td colspan="2">Training set 1∼4 objects</td><td>1&amp;3 objects</td></tr><tr><td>Test set</td><td colspan="2">1∼4 objects 2 objects 4 objects</td></tr><tr><td>VAE</td><td>-13096.4</td><td>-12915.7 -10832.9</td></tr><tr><td>RICH</td><td>-13377.1</td><td>-13436.9 -12801.6</td></tr></table>

Peer review (iclr2020):
Update: I thank the auhors for the detailed response. The updated paper does look more convincing, but my main concern remains - all considered datasets and tasks are synthetic and specifically made for the method. I think experiments on more real data would be crucial to show the potential of the method. Some examples I can imagine would be part segmentation in images or 3D models, or robotic control. --- The paper proposes an unsupervised approach to learning objects and their parts from images. The method is based on the *Attend, Infer, Repeat* (AIR) line of work and adds a new hierarchy level to the approach, corresponding to object parts. The method is evaluated on two custom synthetic dataset: one composed of simple 2D geometric shapes and another one with 3D geometric shapes. On these datasets the method successfully infers the object-part structure and can parse and reconstruct provided images. While the general topic of the paper is interesting, I do not think it is fit for publication. First and foremost, the experiments are very incomplete: the method is only evaluated on two custom synthetic datasets and not compared against any baselines or ablated versions of the method. Moreover, the proposed approach seems like a relatively minor modification of SPAIR (Crawford & Pineau). Pros: 1) The topic is interesting and the method generally makes sense. 2) The method works on the tasks studied in the paper, including relatively challenging scenarios with 3D occlusions or ambiguity in assigning parts to objects. 3) The paper shows generalization to a number of objects different from that seen during training. Cons: 1) Experiments are limited: 1a) The method is evaluated on custom and relatively toy datasets. It is unclear if it would apply to more practical situations. While I agree that at the high level the question of decomposition of object into parts is interesting, it is still important to connect research in this direction to potential practical applications. Where could the proposed method be used? Perhaps in some control tasks, such as robotics? Could it be applied to more realistic data, such as for instance ShapeNet objects? 1b) There are no comparisons to baselines. One might argue that baselines do not exist since there are no methods addressing the same task. Generally, it is the job of the authors to come up with relevant baselines to show that the proposed model actually improves upon some simpler methods. One variant of obtaining baselines is via ablating the proposed model. Another is by taking prior approaches, for instance object-based ones without the part decomposition, and showing that the part decomposition allows to improve upon those in some sense. 2) The novelty is somewhat limited: the method seems like a relatively straightforward extension of SPAIR by adding another hierarchy layer. It might be sufficient if the experimental results would be strong, but given that they are not, becomes somewhat concerning. If the method does indeed include significant technical innovation, it might be helpful to better highlight it. 3) The related work overview is extremly limited. It is authors* job to provide a comprehensive ovreview of prior literature and I cannot do it for them here, but below are a few papers that come to mind. This is by no means a complete list. [1] Zhenjia Xu, Zhijian Liu, Chen Sun, Kevin Murphy, William T. Freeman, Joshua B. Tenenbaum, Jiajun Wu. Unsupervised Discovery of Parts, Structure, and Dynamics. ICLR 2019 [2] Shubham Tulsiani, Hao Su, Leonidas J. Guibas, Alexei A. Efros, Jitendra Malik. Learning Shape Abstractions by Assembling Volumetric Primitives. CVPR 2017 [3] Jun Li, Kai Xu, Siddhartha Chaudhuri, Ersin Yumer, Hao Zhang, Leonidas Guibas. GRASS: Generative Recursive Autoencoders for Shape Structures. SIGGRAPH 2017. [4] Gopal Sharma, Rishabh Goyal, Difan Liu, Evangelos Kalogerakis, Subhransu Maji. CSGNet: Neural Shape Parser for Constructive Solid Geometry. CVPR 2018. [5] Adam R. Kosiorek, Hyunjik Kim, Ingmar Posner, Yee Whye Teh. Sequential Attend, Infer, Repeat: Generative Modelling of Moving Objects. NeurIPS 2018. 4) Presentation is at times suboptimal: 4a) It would be very helpful to have more visuals and intuitions about the functioning of the method, as opposed to equations. Equations are definitely good to have, but they are not the easiest to parse, especially by those not intimately familiar with this specific line of work. 4b) It is quite unclear to me how and why is the memory used in the model. If this is described in another paper, it would be useful to point there, but still briefly summarize in this paper to make it self-contained.