Title: DEEP LEARNING WITH SETS AND POINT CLOUDS

Abstract: We introduce a simple permutation equivariant layer for deep learning with set structure. This type of layer, obtained by parameter-sharing, has a simple implementation and linear-time complexity in the size of each set. We use deep permutation-invariant networks to perform point-could classification and MNISTdigit summation, where in both cases the output is invariant to permutations of the input. In a semi-supervised setting, where the goal is make predictions for each instance within a set, we demonstrate the usefulness of this type of layer in set-outlier detection as well as semi-supervised learning with clustering sideinformation.

1. INTRODUCTION:

Recent progress in deep learning (LeCun et al., 2015) has witnessed its application to structured settings, including graphs (Bruna et al., 2013; Duvenaud et al., 2015) groups (Gens & Domingos, 2014; Christopher, 2014; Cohen & Welling, 2016) , sequences and hierarchies (Irsoy & Cardie, 2014; Socher et al., 2013) . Here, we introduce a simple permutation-equivariant layer for deep learning with set structure, where the primary dataset is a collection of sets, possibly of different sizes. Note that each instance may have a structure of its own, such as graph, image, or another set. In typical machine-learning applications, iid assumption implies that the entire data-set itself has a set structure. Therefore, our special treatment of the set structure is only necessary due to multiplicity of distinct yet homogeneous (data)sets. Here, we show that a simple parameter-sharing scheme enables a general treatment of sets within supervised and semi-supervised settings.

In the following, after introducing the set layer in Section 2, we explore several novel applications. Section 3 studies supervised learning with sets that requires "invariance" to permutation of inputs. Section 3.1 considers the task of summing multiple MNIST digits, and Section 3.2 studies an important application of sets in representing low-dimensional point-clouds. Here, we show that deep networks can successfully classify objects using their point-cloud representation.

Section 4 presents numerical study in semi-supervised setting where the output of the multi-layer network is "equivariant" to the permutation of inputs. We use permutation-equivariant layer to perform outlier detection on CelebA face dataset in Section 4.1 and improve galaxy red-shift estimates using its clustering information in Section 5.

2. PERMUTATION-EQUIVARIANT LAYER:

Let x n ∈ X denote use x = [x 1 , . . . , x N ] to denote a vector of x n instances. Here, x n , could be a feature-vector, an image or any other structured object. Our goal is to design neural network layers that are "indifferent" to permutations of instances in x. Achieving this goal amounts to treating x as a "set" rather than a vector.

The function f : X N → Y N is equivariant to the permutation of its inputs iff

f (πx) = πf (x) ∀π ∈ S N

where the symmetric group S N is the set of all permutation of indices 1, . . . , N . Similarly, the function f : N → is invariant to permutation of its inputs -i.e., a.k.a. a symmetric function (David Given two permutation equivariance function f :

X N → Y N and g : Y N → Z N , their composition is also permutation-equivariance; this is because g(f (πx)) = g(πf (x)) = πg(f (x)).

Consider the standard neural network layer

f Θ (x) . = σ(Θx) Θ ∈ N ×N (1)

where Θ is the weight vector and σ : → is a nonlinearity such as sigmoid function. σ : N → N is the point-wise application of σ to its input vector. The following theorem states the necessary and sufficient conditions for permutation-equivariance in this type of function. Theorem 2.1. The function f Θ : N → N as defined in Eq. ( 1) is permutation equivariant iff all the off-diagonal elements of Θ are tied together and all the diagonal elements are equal as well,

EQUATION

)

where I is the identity matrix.1 

This function is simply a non-linearity applied to a weighted combination of I) its input Ix and; II) the sum of input values (11 T )x. Since summation does not depend on the permutation, the layer is permutation-equivariant. Therefore we can manipulate the operations and parameters in this layer, for example to get another variation

EQUATION

where the max operation over elements of the set is (similar to summation) commutative and using -γ instead of +γ amounts to a reparametrization. In practice using this variation performs better in some applications. This may be due to the fact that for λ = γ, the input to the non-linearity is max-normalized.

For multiple input-output channels, we may speed up the operation of the layer using matrix multiplication. Suppose we have K input channels -corresponding to K features for each instance in the set-with a set of size N , and K output channels. Here, x ∈ N ×K and f Θ :

N ×K → N ×K .

The permutation-equivariant layer parameters are Λ, Γ ∈ K,K (replacing λ and γ in Eq. ( 2)). The output of this layer becomes

y = σ xΛ + 1 1 T xΓ

Similarly, the multiple input-output channel variation of the Eq. ( 3) is

EQUATION

where x max = (max n x) ∈ 1×K is a row-vector of maximum value of x ∈ N ×K over the "set" dimension. In practice, we may further reduce the number of parameters in favor of better generalization by factoring Γ and Λ and keeping a single λ ∈ where β ∈ K is a bias parameter. This final variation of permutation-equivariant layer is simply a fully connected layer where input features are max-normalized within each set.

K,K y = σ β + x -1(max n x) Γ (5)

With multiple input-output channels, the complexity of this layer for each set is O(N K K ). Subtracting the mean or max over the set also reduces the internal covariate shift (Ioffe & Szegedy, 2015) and we observe that for deep networks (even using tanh activation), batch-normalization is not required.

When applying dropout (Srivastava et al., 2014) to regularize permutation-equivariant layers with multiple output channels, it is often beneficial to simultaneously dropout the channels for all instances within a set. In particular, when set-members share similar features, independent dropout effectively does not regularize the model as the the network learns to replace the missing features from other set-members.

In the remainder of this paper, we demonstrate how this simple treatment of sets can solve novel and non-trivial problems that occasionally have no alternative working solutions within deep learning.

3. SUPERVISED LEARNING:

The permutation-equivariant layers that we introduced so far are useful for semi-supervised learning (or transductive) setting, where we intend to predict a value per each instance in every set. In supervised (or inductive) setting the task is to make a prediction for each set (rather than instances within them), and we require permutation "invariance" of f : X N → Y. A pooling operation over the set-dimension can turn any permutation equivariant function f :

X N → Y N , permutation invariant f (x) . = n f (x).

Here ⊕ is any commutative operation such as summation or maximization.

In a related work Chen et al. ( 2014) construct deep permutation invariant features by pairwise coupling of features at the previous layer, where

f i,j ([x i , x j ]) . = [|x i -x j |, x i + x j ] is invariant to transposition of i and j. 2

As we see shortly in Section 3.1, in the supervised setting, even simple application of setpooling, without max-normalization of Eq. ( 5) performs very well in practice. However, in semisupervised setting since there is no pooling operation, the permutation invariant layer requires maxnormalization in order to obtain the required information about the context of each instance.

3.1. PREDICTING THE SUM OF MNIST DIGITS:

MNIST dataset (LeCun et al., 1998) contains 70,000 instances of 28 × 28 grey-scale stamps of digits in {0, . . . , 9}. We randomly sample a subset of N images from this dataset to build 10,000 "sets" of training and 10,000 sets of validation images, where the set-label is the sum of digits in that set (i.e., individual labels per image is unavailable). (Wu et al., 2015) 30 3 voxels (using convolutional deep belief net) 77% DeepPano (Shi et al., 2015) 64 × 160 panoramic image (2D CNN + angle-pooling) 77.64% VoxNet (Maturana & Scherer, 2015) 32 3 voxels (voxels from point-cloud + 3D CNN) 83.10% MVCNN (Su et al., 2015) 164 × 164 × 12 multi-vew images (2D CNN + view-pooling) 90.1% VRN Ensemble (Brock et al., 2016) 32 3 voxels (3D CNN, variational autoencoder) 95.54% 3D GAN (Wu et al., 2016) 64 3 voxels (3D CNN, generative adversarial training) 83.3%

In our first experiment, each set contains N = 3 images, and the set label is a number between 0 ≤ y ≤ 3 * 9 = 27. We then considered four different models for predicting the sum:

I) Concatenating instances along the horizontal axis. II) Stacking images in each set as different input channels. III) Using set-pooling without max-normalization. IV) Using the permutation equivariant layer of Eq. ( 5) with set-pooling.

All models are defined to have similar number of layers and parameters; see Appendix B.1 for details. The output of all models is a (9N + 1)-way softmax, predicting the sum of N digits.

Figure 1 (left) show the prediction accuracy over the validation-set for different models for N = 3. We see that using the set-layer performs the best. However, interestingly, using set-pooling alone produces similarly good results. We also observe that concatenating the digits eventually performs well, despite its lack of invariance. This is because due to the sufficiently large size of the dataset most permutations of length three appear in the training set.

However, as we increase the size of each set to N = 6, permutation invariance becomes crucial; see Figure 1 (right). We see that using the default dropout rate of 20%, the model simply memorizes the input instances (indicated by discrepancy of training/validation error) and by increasing this dropout rate, the model simply predicts values close to the mean value. However, the permutation-invariant layer learns to predict the sum of six digits with > 80% accuracy, without having access to individual image labels. Performance using set-pooling alone is similar.

3.2. POINT CLOUD CLASSIFICATION:

A low-dimensional point-cloud is a set of low-dimensional vectors. This type of data is frequently encountered in various applications from robotics and vision to cosmology. In these applications, point-cloud data is often converted to voxel or mesh representation at a preprocessing step (e.g., Maturana & Scherer, 2015; Ravanbakhsh et al., 2016; Lin et al., 2004) . Since the output of many range sensors such as LiDAR -which are extensively used in applications such as autonomous vehicles -is in the form of point-cloud, direct application of deep learning methods to point-cloud is highly desirable. Moreover, when working with point-clouds rather than voxelized 3D objects, it is easy to apply transformations such as rotation and translation as differentiable layers at low cost.

Here, we show that treating the point-cloud data as a set, we can use the set-equivariant layer of Eq. ( 5) to classify point-cloud representation of a subset of ShapeNet objects (Chang et al., 2015) , called ModelNet40 (Wu et al., 2015) . This subset consists of 3D representation of 9,843 training and 2,468 test instances belonging to 40 classes of objects; see Fig. 2 . We produce point-clouds with 100, 1000 and 5000 particles each (x, y, z-coordinates) from the mesh representation of objects using the point-cloud-library's sampling routine (Rusu & Cousins, 2011) . Each set is normalized by the initial layer of the deep network to have zero mean (along individual axes) and unit (global)

variance. Additionally we experiment with the K-nearest neighbor graph of each point-cloud and report the results using graph-convolution; see Appendix B.3 for model details.

Table 1 compares our method against the competition.3 Note that we achieve our best accuracy using 5000×3 dimensional representation of each object, which is much smaller than most other methods. All other techniques use either voxelization or multiple view of the 3D object for classification. Interestingly, variations of view/angle-pooling (e.g., Su et al., 2015; Shi et al., 2015) can be interpreted as set-pooling where the class-label is invariant to permutation of different views. The results also shows that using fully-connected layers with set-pooling alone (without max-normalization over the set) works relatively well.

We see that reducing the number of particles to only 100, still produces comparatively good results.

Using graph-convolution is computationally more challenging and produces inferior results in this setting. The results using 5000 particles is also invariant to small changes in scale and rotation around the z-axis; see Appendix B.3 for details. Features. To visualize the features learned by the set layers, we used Adamax (Kingma & Ba, 2014) to locate 1000 particle coordinates maximizing the activation of each unit. 4 Activating the tanh units beyond the second layer proved to be difficult. Figure 3 shows the particle-cloud-features learned at the first and second layers of our deep network. We observed that the first layer learns simple localized (often cubic) point-clouds at different (x, y, z) locations, while the second layer learns more complex surfaces with different scales and orientations.

4. SEMI-SUPERVISED LEARNING:

In semi-supervised or transductive learning, some/all instances within each training set are labelled.

Our goal is to make predictions for individual instances within a test set. Therefore, the permutation equivariant layer leverages the interaction between the set-members to label individual member. Note that in this case, we do not perform any pooling operation over the set dimension of the data.

4.1. SET ANOMALY DETECTION:

The objective here is for the deep model to find the anomalous face in each set, simply by observing examples and without any access to the attribute values. CelebA dataset (Liu et al., 2015) contains 202,599 face images, each annotated with 40 boolean attributes. We use 64 × 64 stamps and using these attributes we build 18,000 sets, each containing N = 16 images (on the training set) as follows: after randomly selecting two attributes, we draw 15 images where those attributes are present and a single image where both attributes are absent. Using a similar procedure we build sets on the test images. No individual person's face appears in both train and test sets.

Our deep neural network consists of 9 2D-convolution and max-pooling layers followed by 3 permutation-equivariant layers and finally a softmax layer that assigns a probability value to each set member (Note that one could identify arbitrary number of outliers using a sigmoid activation at the output.) Our trained model successfully finds the anomalous face in 75% of test sets. Visually inspecting these instances suggests that the task is non-trivial even for humans; see Fig. As a baseline, we repeat the same experiment by using a set-pooling layer after convolution layers, and replacing the permutation-equivariant layers with fully connected layers, with the same number of hidden units/output-channels, where the final layer is a 16-way softmax. The resulting network shares the convolution filters for all instances within all sets, however the input to the softmax is not equivariant to the permutation of input images. Permutation equivariance seems to be crucial here as the baseline model achieves a training and test accuracy of ∼ 6.3%; the same as random selection.

5. IMPROVED RED-SHIFT ESTIMATION USING CLUSTERING INFORMATION:

An important regression problem in cosmology is to estimate the red-shift of galaxies, corresponding to their age as well as their distance from us (Binney & Merrifield, 1998) . Two common types of observation for distant galaxies include a) photometric and b) spectroscopic observations, where the latter can produce more accurate red-shift estimates.

One way to estimate the red-shift from photometric observations is using a regression model (Connolly et al., 1995) . We use a multi-layer Perceptron for this purpose and use the more accurate spectroscopic red-shift estimates as the ground-truth. As another baseline, we have a photometric redshift estimate that is provided by the catalogue and uses various observations (including clustering information) to estimate individual galaxy-red-shift. Our objective is to use clustering information of the galaxies to improve our red-shift prediction using the multi-layer Preceptron.

Note that the prediction for each galaxy does not change by permuting the members of the galaxy cluster. Therefore, we can treat each galaxy cluster as a "set" and use permutation-equivariant layer to estimate the individual galaxy red-shifts.

For each galaxy, we have 17 photometric features5 from the redMaPPer galaxy cluster catalog (Rozo & Rykoff, 2014) , which contains photometric readings for 26,111 red galaxy clusters. In this task in contrast to the previous ones, sets have different cardinalities; each galaxy-cluster in this catalog has between ∼ 20 -300 galaxies -i.e., x ∈ N (c)×17 , where N (c) is the cluster-size. See Fig. 5 (a) for distribution of cluster sizes. The catalog also provides accurate spectroscopic red-shift estimates for a subset of these galaxies as well as photometric estimates that uses clustering information. Fig. 5 (b) reports the distribution of available spectroscopic red-shift estimates per cluster.

We randomly split the data into 90% training and 10% test clusters, and use the following simple architecture for semi-supervised learning. We use four permutation-equivariant layers with 128, 128, 128 and 1 output channels respectively, where the output of the last layer is used as red-shift estimate. The squared loss of the prediction for available spectroscopic red-shifts is minimized.6 Fig. 5 (c) shows the agreement of our estimates with spectroscopic readings on the galaxies in the test-set with spectroscopic readings. The figure also compares the photometric estimates provided by the catalogue (see Rozo & Rykoff, 2014) , to the ground-truth. As it is customary in cosmology literature, we report the average scatter |zspec-z| 1+zspec , where z spec is the accurate spectroscopic measurement and z is a photometric estimate. The average scatter using our model is .023 compared to the scatter of .025 in the original photometric estimates for the redMaPPer catalog. Both of these values are averaged over all the galaxies with spectroscopic measurements in the test-set.

We repeat this experiment, replacing the permutation-equivariant layers with fully connected layers (with the same number of parameters) and only use the individual galaxies with available spectroscopic estimate for training. The resulting average scatter for multi-layer Perceptron is .026, demonstrating that using clustering information indeed improves photometric red-shift estimates. 5: application of permutation-equivariant layer to semi-supervised red-shift prediction using clustering information: a) distribution of cluster (set) size; b) distribution of reliable red-shift estimates per cluster; c) prediction of red-shift on test-set (versus ground-truth) using clustering information as well as RedMaPPer photometric estimates (also using clustering information).

CONCLUSION:

We introduced a simple parameter-sharing scheme to effectively achieve permutation-equivariance in deep networks and demonstrated its effectiveness in several novel supervised and semi-supervised tasks. Our treatment of set structure also generalizes various settings in multi-instance learning (Ray et al., 2011; Zhou et al., 2009) . In addition to our experimental settings, the permutation-invariant layer can be used for distribution regression and classification which have become popular recently (Szabo et al., 2016) . In our experiments with point-cloud data we observed the model to be robust to the variations in the number of particles in each cloud, suggesting the usefulness of our method in the general setting of distribution regression -where the number of samples should not qualitatively affect our representation of a distribution. We leave further investigation of this direction to future work. The probability assigned to each member by the outlier detection network is visualized using a red bar at the bottom of each image. The probabilities in each row sum to one.

set-pooling followed by another dense layer with 128 hidden units. In the model IV, the convolution layers are followed by a permutation-equivariant layer with 128 output channels, followed by setpooling and a fully connected layer with 128 hidden units. For optimization, we used a learning rate of .0003 with Adam using the default β 1 = .9 and β 2 = .999.

B.2 FACE OUTLIER DETECTION MODEL:

Our model has 9 convolution layers with 3 × 3 receptive fields. The model has convolution layers with 32, 32, 64 feature-maps followed by max-pooling followed by 2D convolution layers with 64, 64, 128 feature-maps followed by another max-pooling layer. The final set of convolution layers have 128, 128, 256 feature-maps, followed by a max-pooling layer with pool-size of 5 that reduces the output dimension to batch -size.N × 256, where the set-size N = 16. This is then forwarded to three permutation-equivariant layers with 256, 128 and 1 output channels. The output of final layer is fed to the Softmax, to identify the outlier. We use exponential linear units (Clevert et al., 2015) , drop out with 20% dropout rate at convolutional layers and 50% dropout rate at the first two set layers. When applied to set layers, the selected feature (channel) is simultaneously dropped in all the set members of that particular set. We use Adam (Kingma & Ba, 2014) for optimization and use batch-normalization only in the convolutional layers. We use mini-batches of 8 sets, for a total of 128 images per batch.

:

See the Appendix A for the proof.

Due to change in the number of features/channels in each layer this approach cannot produce permutation-"equivariant" layers. Also, this method requires a graph to guide the multi-resolution partitioning of the nodes, which is then used to define pairing of features in each layer.

The error-bar on our results is due to variations depending on the choice of particles during test time and it is estimated over three trials.

We started from uniformly distributed set of particles and used a learning rate of .01 for Adamax, with first and second order moment of .1 and .9 respectively. We optimized the input in 10

iterations. The results of Fig.3are limited to instances where tanh units were successfully activated. Since the input at the first layer of our deep network is normalized to have a zero mean and unit standard deviation, we do not need to constrain the input while maximizing unit's activation.

We have a single measurement for each u,g,r, i and z band as well as measurement error bars, location of the galaxy in the sky, as well as the probability of each galaxy being the cluster center. We do not include the information regarding the richness estimates of the clusters from the catalog, for any of the methods, so that baseline multi-layer Preceptron is blind to the clusters.

We use mini-batches of size 128, Adam(Kingma & Ba, 2014), with learning rate of .001, β1 = .9 and β2 = .999. All layers except for the last layer use Tanh units and simultaneous dropout with 50% dropout rate.

Figures and Tables:

Figure 1: Classification accuracy of different schemes in predicting the sum of a (left) N=3 and (right) N=6 MNIST digits without access to individual image labels. The training set was fixed to 10,000 sets.

Figure 2: Examples for 8 out of 40 object classes (column) in the ModelNet40. Each point-cloud is produces by sampling 1000 particles from the mesh representation of the original MeodelNet40 instances. Two pointclouds in the same column are from the same class. The projection of particles into xy, zy and xz planes are added for better visualization.

Figure 3: Each box is the particle-cloud maximizing the activation of a unit at the firs (top) and second (bottom) permutation-equivariant layers of our model. Two images of the same column are two different views of the same point-cloud.

Figure 4: Each row shows a set, constructed from CelebA dataset, such that all set members except for an outlier, share at least two attributes (on the right). The outlier is identified with a red frame. The model is trained by observing examples of sets and their anomalous members, without access to the attributes. The probability assigned to each member by the outlier detection network is visualized using a red bar at the bottom of each image. The probabilities in each row sum to one. See Appendix B.2 for more examples.

4. For details of the model, training and more identification examples see Appendix B.2.

Figure 6: Each row of the images shows a set, constructed from CelebA dataset images, such that all set members except for an outlier, share at least two attributes. The outlier is identified with a red frame. The model is trained by observing examples of sets and their anomalous members and without access to the attributes.The probability assigned to each member by the outlier detection network is visualized using a red bar at the bottom of each image. The probabilities in each row sum to one.

Classification accuracy and the (size of) representation used by different methods on the ModelNet40 dataset.

Table content: <table><tr><td>model</td><td>instance size</td><td>representation</td><td>accuracy</td></tr><tr><td>set-layer + transformation (ours)</td><td>5000 × 3</td><td>point-cloud</td><td>90 ± .3%</td></tr><tr><td>set-layer (ours)</td><td>1000 × 3</td><td>point-cloud</td><td>87 ± 1%</td></tr><tr><td>set-pooling only (ours)</td><td>1000 × 3</td><td>point-cloud</td><td>83 ± 1%</td></tr><tr><td>set-layer (ours)</td><td>100 × 3</td><td>point-cloud</td><td>82 ± 2%</td></tr><tr><td>KNN graph-convolution (ours)</td><td>1000 × (3 + 8)</td><td>directed 8-regular graph</td><td>58 ± 2%</td></tr><tr><td>3DShapeNets</td><td/><td/><td/></tr></table>

Peer review (iclr2017):
Pros : - New and clear formalism for invariance on signals with known structure - Good numerical results Cons : - The structure must be specified. - The set structure dataset is too simple - There is a gap between the large (and sometimes complex) theory introduced and the numerical experiments ; consequently a new reader could be lost since examples might be missing Besides, from a personal point of view, I think the topic of the paper and its content could be suitable for a big conference as the author improves its content. Thus, if rejected, I think you should not consider the workshop option for your paper if you wish to publish it later in a conference, because big conferences might consider the workshop papers of ICLR as publications. (that*s an issue I had to deal with at some points)