ZHANGYUXUAN-zR commited on
Commit
b65af6e
·
verified ·
1 Parent(s): 1b9d16f

Add files using upload-large-folder tool

Browse files
parse/train/6Ab68Ip4Mu/6Ab68Ip4Mu.md ADDED
@@ -0,0 +1,247 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ResT: An Efficient Transformer for Visual Recognition
2
+
3
+ Qing-Long Zhang, Yu-Bin Yang State Key Laboratory for Novel Software Technology Nanjing University, Nanjing 21023, China wofmanaf@smail.nju.edu.cn, yangyubin@nju.edu.cn
4
+
5
+ # Abstract
6
+
7
+ This paper presents an efficient multi-scale vision Transformer, called ResT, that capably served as a general-purpose backbone for image recognition. Unlike existing Transformer methods, which employ standard Transformer blocks to tackle raw images with a fixed resolution, our ResT have several advantages: (1) A memory-efficient multi-head self-attention is built, which compresses the memory by a simple depth-wise convolution, and projects the interaction across the attention-heads dimension while keeping the diversity ability of multi-heads; (2) Positional encoding is constructed as spatial attention, which is more flexible and can tackle with input images of arbitrary size without interpolation or fine-tune; (3) Instead of the straightforward tokenization at the beginning of each stage, we design the patch embedding as a stack of overlapping convolution operation with stride on the token map. We comprehensively validate ResT on image classification and downstream tasks. Experimental results show that the proposed ResT can outperform the recently state-of-the-art backbones by a large margin, demonstrating the potential of ResT as strong backbones. The code and models will be made publicly available at https://github.com/wofmanaf/ResT.
8
+
9
+ # 1 Introduction
10
+
11
+ Deep learning backbone architectures have been evolved for years and boost the performance of computer vision tasks such as classification [5, 26, 33, 11], object detection [2, 41, 18, 25], and instance segmentation [10, 24, 31], etc.
12
+
13
+ There are mainly two types of backbone architectures most commonly applied in computer vision: convolutional network (CNN) architectures [11, 38] and Transformer ones [6, 5, 33, 39]. Both of them capture feature information by stacking multiple blocks. The CNN block is generally a bottleneck structure [11], which can be defined as a stack of $1 \times 1$ , $3 \times 3$ , and $1 \times 1$ convolution layers with residual learning (shown in Figure 1a). The $1 \times 1$ layers are responsible for reducing and then increasing channel dimensions, leaving the $3 \times 3$ layer a bottleneck with smaller input/output channel dimensions. The CNN backbones are generally faster and require less inference time thanks to parameter sharing, local information aggregation, and dimension reduction. However, due to the limited and fixed receptive field, CNN blocks may be less effective in scenarios that require modeling long-range dependencies. For example, in instance segmentation, being able to collect and associate scene information from a large neighborhood can be useful in learning relationships across objects [23].
14
+
15
+ To overcome these limitations, Transformer backbones are recently explored for their ability to capture long-distance information [5, 33, 26, 19]. Unlike CNN backbones, the Transformer ones first split an image into a sequence of patches (i.e., tokens), then sum these tokens with positional encoding to represent coarse spatial information, and finally adopt a stack of Transformer blocks to capture feature information. A standard Transformer block [28] comprises a multi-head self-attention (MSA) that employs a query-key-value decomposition to model global relationships between sequence tokens, and a feed-forward network (FFN) to learn wider representations (shown in Figure 1b). As a result, Transformer blocks can dynamically adapt the receptive field according to the image content.
16
+
17
+ ![](images/ecebca4c72535a3184b584598b6840672657f74e4f42f10132664f255a460d0a.jpg)
18
+ Figure 1: Examples of backbone blocks. Left: A standard ResNet Bottleneck Block [11]. Middle: A Standard Transformer Block. Right: The proposed Efficient Transformer Block. The only difference compared with standard Transformer block is the replacement of the Multi-Head Self-Attention (MSA) with Efficient Multi-head Self-Attention (EMSA).
19
+
20
+ Despite showing great potential than CNNs, the Transformer backbones still have four major shortcomings: (1) It is difficult to extract the low-level features which form some fundamental structures in images (e.g., corners and edges) since existing Transformer backbones direct perform tokenization of patches from raw input images. (2) The memory and computation for MSA in Transformer blocks scale quadratically with spatial or embedding dimensions (i.e., the number of channels), causing vast overheads for training and inference. (3) Each head in MSA is responsible for only a subset of embedding dimensions, which may impair the performance of the network, particularly when the tokens embedding dimension (for each head) is short, making the dot product of query and key unable to constitute an informative function. (4) The input tokens and positional encoding in existing Transformer backbones are all of a fixed scale, which are unsuitable for vision tasks that require dense prediction.
21
+
22
+ In this paper, we proposed an efficient general-purpose backbone ResT (named after ResNet [11]) for computer vision, which can remedy the above issues. As illustrated in Figure 2, ResT shares exactly the same pipeline of ResNet, i.e., a stem module applied for extracting low-level information and strengthening locality, followed by four stages to construct hierarchical feature maps, and finally a head module for classification. Each stage consists of a patch embedding, a positional encoding module, and multiple Transformer blocks with specific spatial resolution and channel dimension. The patch embedding module creates a multi-scale pyramid of features by hierarchically expanding the channel capacity while reducing the spatial resolution with overlapping convolution operations. Unlike the conventional methods which can only tackle images with a fixed scale, our positional encoding module is constructed as spatial attention which is conditioned on the local neighborhood of the input token. By doing this, the proposed method is more flexible and can process input images of arbitrary size without interpolation or fine-tune. Besides, to improve the efficiency of the MSA, we build an efficient multi-head self-attention (EMSA), which significantly reduce the computation cost by a simple overlapping Depth-wise Conv2d. In addition, we compensate short-length limitations of the input token for each head by projecting the interaction across the attention-heads dimension while keeping the diversity ability of multi-heads.
23
+
24
+ We comprehensively validate the effectiveness of the proposed ResT on the commonly used benchmarks, including image classification on ImageNet-1k and downstream tasks, such as object detection, and instance segmentation on MS COCO2017. Experimental results demonstrate the effectiveness and generalization ability of the proposed ResT compared with the recently state-of-the-art Vision Transformers and CNNs. For example, with a similar model size as ResNet-18 $( 6 9 . 7 \% )$ and PVT-Tiny $( 7 5 . 1 \% )$ , our ResT-Small obtains a Top-1 accuracy of $7 9 . 6 \%$ on ImageNet-1k.
25
+
26
+ ![](images/65f7ce2f5ce3b94e45385c7067a52cb9a89e2cc7a73b9ebc0de61169161309fe.jpg)
27
+ Figure 2: The pipeline of the proposed ResT. Similar to ResNet [11], ResT build stages with stacked blocks, making it flexible to serve as the backbone of downstream tasks, such as Object detection, Person ReID, and Instance Segmentation, etc.
28
+
29
+ # 2 ResT
30
+
31
+ As illustrated in Figure 2, ResT shares exactly the same pipeline as ResNet [11], i.e., a stem module applied to extract low-level information, followed by four stages to capture multi-scale feature maps. Each stage consists of three components, one patch embedding module (or stem module), one positional encoding module, and a set of $L$ efficient Transformer blocks. Specifically, at the beginning of each stage, the patch embedding module is adopted to reduce the resolution of the input token and expanding the channel dimension. The positional encoding module is fused to restrain position information and strengthen the feature extracting ability of patch embedding. After that, the input token is fed to the efficient Transformer blocks (illustrated in Figure 1c). In the following sections, we will introduce the intuition behind ResT.
32
+
33
+ # 2.1 Rethinking of Transformer Block
34
+
35
+ The standard Transformer block consists of two sub-layers of MSA and FFN. A residual connection is employed around each sub-layer. Before MSA and FFN, layer normalization (LN [1]) is applied. For a token input $\mathbf { x } \in \mathbb { R } ^ { n \times d _ { m } }$ , where $n$ , $d _ { m }$ indicates the spatial dimension, channel dimension, respectively. The output for each Transformer block is:
36
+
37
+ $$
38
+ \mathrm { y } { = } \mathrm { x } ^ { \prime } + \mathrm { F F N } ( \mathrm { L N } ( \mathrm { x } ^ { \prime } ) ) , \mathrm { a n d } \mathrm { x } ^ { \prime } { = } \mathrm { x } + \mathrm { M S A } ( \mathrm { L N } ( \mathrm { x } ) )
39
+ $$
40
+
41
+ MSA. MSA first obtains query $\mathbf { Q }$ , key $\mathbf { K }$ , and value $\mathbf { V }$ by applying three sets of projections to the input, each consisting of $k$ linear layers (i.e., heads) that map the $d _ { m }$ dimensional input into a $d _ { k }$ dimensional space, where $d _ { k } = d _ { m } / k$ is the head dimension. For the convenience of description, we assume $k = 1$ , then MSA can be simplified to single-head self-attention (SA). The global relationship between the token sequence can be defined as
42
+
43
+ $$
44
+ \mathrm { S A } ( \mathbf { Q } , \mathbf { K } , \mathbf { V } ) = \mathrm { S o f t m a x } ( \frac { \mathbf { Q } \mathbf { K } ^ { \mathrm { T } } } { \sqrt { d _ { k } } } ) \mathbf { V }
45
+ $$
46
+
47
+ The output values of each head are then concatenated and linearly projected to form the final output. The computation costs of MSA are $\mathcal { O } ( 2 d _ { m } n ^ { 2 } + 4 d _ { m } ^ { 2 } n )$ , which scale quadratically with spatial dimension or embedding dimensions according to the input token.
48
+
49
+ FFN. The FFN is applied for feature transformation and non-linearity. It consists of two linear layers with a non-linearity activation. The first layer expands the embedding dimensions of the input from $d _ { m }$ to $d _ { f }$ and the second layer reduce the dimensions from $d _ { f }$ to $d _ { m }$ .
50
+
51
+ $$
52
+ \mathrm { F F N ( x ) } = \sigma ( \mathbf { x W } _ { 1 } + \mathbf { b } _ { 1 } ) \mathbf { W } _ { 2 } + \mathbf { b } _ { 2 }
53
+ $$
54
+
55
+ where $\mathbf { W } _ { 1 } \in \mathbb { R } ^ { d _ { m } \times d _ { f } }$ and $\mathbf { W } _ { 2 } \in \mathbb { R } ^ { d _ { f } \times d _ { m } }$ are weights of the two Linear layers respectively, $\mathbf { b } _ { 1 } \in \mathbb { R } ^ { d _ { f } }$ and $\mathbf { b } _ { 2 } \in \mathbb { R } ^ { d _ { m } }$ are the bias terms, and $\sigma ( \cdot )$ is the activation function GELU [12]. In standard Transformer block, the channel dimensions are expanded by a factor of 4, i.e., $d _ { f } = 4 d _ { m }$ . The computation costs of FFN are $8 n d _ { m } ^ { 2 }$ .
56
+
57
+ # 2.2 Efficient Transformer Block
58
+
59
+ As analyzed above, MSA has two shortcomings: (1) The computation scales quadratically with $d _ { m }$ or $n$ according to the input token, causing vast overheads for training and inference; (2) Each head in
60
+
61
+ MSA only responsible for a subset of embedding dimensions, which may impair the performance of the network, particularly when the tokens embedding dimension (for each head) is short.
62
+
63
+ ![](images/b78afb503a0c86e0027a7ef1fc7151b9522925a2052042ae657c6241bf6cf9d9.jpg)
64
+ Figure 3: Efficient Multi-Head Self-Attention.
65
+
66
+ To remedy these issues, we propose an efficient multi-head self-attention module (illustrated in Figure 3). Here, we make some explanations.
67
+
68
+ (1) Similar to MSA, EMSA first adopt a set of projections to obtain query $\mathbf { Q }$ .
69
+
70
+ (2) To compress memory, the 2D input token $\mathbf { x } \in \mathbb { R } ^ { n \times d _ { m } }$ is reshaped to 3D one along the spatial dimension (i.e., $\hat { \mathbf { x } } \in \mathbb { R } ^ { d _ { m } \times h \times w } )$ and then feed to a depth-wise convolution operation to reduce the height and width dimension by a factor $s$ . To make simple, $s$ is adaptive set by the feature map size or the stage number. The kernel size, stride and padding are $s + 1 , s$ , and $s / 2$ respectively.
71
+
72
+ (3) The new token map after spatial reduction $\hat { \mathbf { x } } \in \mathbb { R } ^ { d _ { m } \times h / s \times w / s }$ is then reshaped to 2D one, i.e., $\hat { \mathbf { x } } \in \mathbb { R } ^ { n ^ { \prime } \times d _ { m } }$ , $n ^ { \prime } = h / s \times w / s$ . Then $\hat { \bf x }$ is feed to two sets of projection to get key $\mathbf { K }$ and value $\mathbf { V }$ .
73
+
74
+ (4) After that, we adopt Eq. 4 to compute the attention function on query Q, $\mathbf { K }$ and value $\mathbf { V }$ .
75
+
76
+ $$
77
+ \operatorname { E M S A } ( \mathbf { Q } , \mathbf { K } , \mathbf { V } ) = \operatorname { I N } ( \operatorname { S o f t m a x } ( \operatorname { C o n v } ( { \frac { \mathbf { Q } \mathbf { K } ^ { \mathrm { T } } } { \sqrt { d _ { k } } } } ) ) ) \mathbf { V }
78
+ $$
79
+
80
+ Here, $\mathrm { C o n v } ( \cdot )$ is a standard $1 \times 1$ convolutional operation, which model the interactions among different heads. As a result, attention function of each head can depend on all of the keys and queries. However, this will impair the ability of MSA to jointly attend to information from different representation subsets at different positions. To restore this diversity ability, we add an Instance Normalization [27] (i.e, IN(·)) for the dot product matrix (after Softmax).
81
+
82
+ (5) Finally, the output values of each head are then concatenated and linearly projected to form the final output.
83
+
84
+ The computation costs of EMSA are O( 2dmn2s2 + 2d2mn(1 + 1s2 ) + dmn (s+1)2s2 + s2 , much lowerhigher. $s > 1$ $s$
85
+
86
+ Also, we add FFN after EMSA for feature transformation and non-linearity. The output for each efficient Transformer block is:
87
+
88
+ $$
89
+ \begin{array} { r } { \mathrm { y } { = } \mathrm { x } ^ { \prime } + \mathrm { F F N } ( \mathrm { L N } ( \mathrm { x } ^ { \prime } ) ) , \mathrm { a n d } \mathrm { x } ^ { \prime } { = } \mathrm { x } + \mathrm { E M S A } ( \mathrm { L N } ( \mathrm { x } ) ) } \end{array}
90
+ $$
91
+
92
+ # 2.3 Patch Embedding
93
+
94
+ The standard Transformer receives a sequence of token embeddings as input. Take ViT [5] as an example, the input image $\mathbf { x } \in \mathbb { R } ^ { 3 \times h \times w }$ is split with a patch size of $p \times p$ . These patches are flattened into 2D ones and then mapped to latent embeddings with a size of $c$ , i.e, $\mathbf { x } \in \mathbb { R } ^ { n \times c }$ , where $n = h w / p ^ { 2 }$ . However, this straightforward tokenization is failed to capture low-level feature information (such as edges and corners) [33]. In addition, the length of tokens in ViT are all of a fixed size in different blocks, making it unsuitable for downstream vision tasks such as object detection and instance segmentation that require multi-scale feature map representations.
95
+
96
+ Here, we build an efficient multi-scale backbone, calling ResT, for dense prediction. As introduced above, the efficient Transformer block in each stage operates on the same scale with identical resolution across the channel and spatial dimensions. Therefore, the patch embedding modules are required to progressively expand the channel dimension, while simultaneously reducing the spatial resolution throughout the network.
97
+
98
+ Similar to ResNet, the stem module (can be seen as the first patch embedding module) are adopted to shrunk both the height and width dimension with a reduction factor of 4. To effectively capture the low-feature information with few parameters, here we introduce a simple but effective way, i.e, stacking three $3 \times 3$ standard convolution layers (all with padding 1) with stride 2, stride 1, and stride 2, respectively. Batch Normalization [14] and ReLU activation [7] are applied for the first two layers. In stage 2, stage 3, and stage 4, the patch embedding module is adopted to down-sample the spatial dimension by $4 \times$ and increase the channel dimension by $2 \times$ . This can be done by a standard $3 \times 3$ convolution with stride 2 and padding 1. For example, patch embedding module in stage 2 changes resolution from $h / 4 \times w / 4 \times c$ to $h / 8 \times w / 8 \times 2 c$ (shown in Figure 2).
99
+
100
+ # 2.4 Positional Encoding
101
+
102
+ Positional encodings are crucial to exploiting the order of sequence. In ViT [5], a set of learnable parameters are added into the input tokens to encode positions. Let $\mathbf { x } \in \mathbb { R } ^ { n \times c }$ be the input, $\theta \in \mathbb { R } ^ { n \times c }$ be position parameters, then the encoded input can be represent as
103
+
104
+ $$
105
+ \hat { \mathbf { x } } = \mathbf { x } + \boldsymbol { \theta }
106
+ $$
107
+
108
+ However, the length of positions is exactly the same as the input tokens length, which limits the application scenarios.
109
+
110
+ To remedy this issue, the new positional encodings are required to have variable lengths according to input tokens. Let us look closer to Eq. 6, the summation operation is much like assigning pixel-wise weights to the input. Assume $\theta$ is related with x, i.e., $\theta = \operatorname { G L } ( { \bar { \mathbf { x } } } )$ , where $\mathrm { { G L } } \bar { ( } \cdot \bar { ) }$ is the group linear operation with the group number of $c$ . Then Eq. 6 can be modified to
111
+
112
+ $$
113
+ \hat { \mathbf { x } } = \mathbf { x } + \mathbf { G } \mathbf { L } ( \mathbf { x } )
114
+ $$
115
+
116
+ ![](images/2a1cb68bb31b2ecc0ecddcac99b1c7a749b83516085391718f916cd5bfb8182f.jpg)
117
+ Figure 4: Patch and PE in ResT.
118
+
119
+ Besides Eq. 7, $\theta$ can also be obtained by more flexible spatial attention mechanisms. Here, we propose a simple yet effective spatial attention module calling PA(pixel-attention) to encode positions. Specifically, PA applies a $3 \times 3$ depth-wise convolution (with padding 1) operation to get the pixel-wise weight and then scaled by a sigmoid function $\sigma ( \cdot )$ . The positional encoding with PA module can then be represented as
120
+
121
+ $$
122
+ \hat { \mathbf { x } } = \mathrm { P A } ( \mathrm { x } ) = \mathrm { x } * \sigma ( \mathrm { D W C o n v ( x ) } )
123
+ $$
124
+
125
+ Since the input token in each stage is also obtained by a convolution operation, we can embed the positional encoding into the patch embedding module. The whole structure of stage $i$ can be illustrated in Figure 4. Note that PA can be replaced by any spatial attention modules, making the positional encoding flexible in ResT.
126
+
127
+ # 2.5 Classification Head
128
+
129
+ The classification head is performed by a global average pooling layer on the output feature map of the last stage, followed by a linear classifier. The detailed ResT architecture for ImageNet-1k is shown
130
+
131
+ in Table 1, which contains four models, i.e., ResT-Lite, ResT-Small and ResT-Base and ResT-Large, which are bench-marked to ResNet-18, ResNet-18, ResNet-50, and ResNet-101, respectively.
132
+
133
+ Table 1: Architectures for ImageNet-1k. Here, we make some definitions. $\mathrm { \cdot C o n v } - k _ { - } c _ { - } s ^ { \prime }$ " means convolution layers with kernel size $k$ , output channel $c$ and stride $s$ . “MLP_ $. c "$ is the FFN structure with hidden channel $_ { 4 c }$ and output channel $c$ . And “EMSA_ $\boldsymbol { \it n \_ r ^ { \prime \prime } }$ is the EMSA operation with the number of heads $n$ and reduction $r$ . “ $\mathbf { C " }$ is 64 for ResT-Lite and ResT-Small, and 96 for ResT-Base and ResT-Large.“PA" is short for pixel-wise attention, which are introduced in Section 2.4.
134
+
135
+ <table><tr><td>Name</td><td>| Output |</td><td>Lite</td><td></td><td>Small</td><td></td><td>Base</td><td></td><td>Large</td><td></td></tr><tr><td>stem</td><td>[56×56|</td><td colspan="9">patch_embed: Conv-3_C/2_2,Conv-3_C/2_1,Conv-3_C_2,PA</td></tr><tr><td>stage1</td><td>56×56</td><td>EMSA_1_8 MLP_64</td><td>×2</td><td>EMSA_1_8 MLP_64</td><td>×2</td><td>EMSA_1_8 MLP_96</td><td>×2</td><td></td><td>EMSA_1_8 MLP_96</td><td>×2</td></tr><tr><td rowspan="2">stage2</td><td rowspan="2">28×28</td><td colspan="7">patch_embed: Conv-3_2C_2,PA</td><td rowspan="2"></td><td></td></tr><tr><td>EMSA_2_4 MLP_128</td><td>×2</td><td>EMSA_2_4 MLP_128</td><td>×2</td><td>EMSA_2_4 MLP_192</td><td>×2</td><td>EMSA_2_4 MLP_192</td><td>×2</td></tr><tr><td rowspan="2">stage3</td><td rowspan="2">|14× 14|</td><td colspan="8">patch_embed: Conv-3_4C_2,PA</td></tr><tr><td>EMSA_4_2 MLP_256</td><td>×2</td><td>EMSA_4_2 MLP_256</td><td></td><td>×6</td><td>EMSA_4_2 MLP_384</td><td>×6</td><td>EMSA_4_2 MLP_384</td><td>×18</td></tr><tr><td rowspan="2">stage4</td><td rowspan="2">7×7</td><td colspan="8">patch_embed: Conv-3_8C_2,PA</td></tr><tr><td>EMSA_8_1 MLP_512</td><td>×2</td><td>EMSA_8_1 MLP_512</td><td>×2</td><td>MLP_768</td><td>EMSA_8_1</td><td>×2</td><td>EMSA_8_1</td><td>×2</td></tr><tr><td>Classifier|</td><td>[1×1|</td><td colspan="8">MLP_768 average pool,100od fully-connected</td></tr><tr><td colspan="2">GFLOPs</td><td colspan="6">1.4 1.94</td><td colspan="2">7.91</td></tr></table>
136
+
137
+ # 3 Experiments
138
+
139
+ In this section, we conduct experiments on common-used benchmarks, including ImageNet-1k for classification, MS COCO2017 for object detection, and instance segmentation. In the following subsections, we first compared the proposed ResT with the previous state-of-the-arts on the three tasks. Then we adopt ablation studies to validate the important design elements of ResT.
140
+
141
+ # 3.1 Image Classification on ImageNet-1k
142
+
143
+ Settings. For image classification, we benchmark the proposed ResT on ImageNet-1k, which contains 1.28M training images and 50k validation images from 1,000 classes. The setting mostly follows [26]. Specifically, we employ the AdamW [20] optimizer for 300 epochs using a cosine decay learning rate scheduler and 5 epochs of linear warm-up. A batch size of 2048 (using 8 GPUs with 256 images per GPU), an initial learning rate of 5e-4, a weight decay of 0.05, and gradient clipping with a max norm of 5 are used. We include most of the augmentation and regularization strategies of [26] in training, including RandAugment [4], Mixup [35], Cutmix [34], Random erasing [40], and stochastic depth [13]. An increasing degree of stochastic depth augmentation is employed for larger models, i.e., 0.1, 0.1, 0.2, 0.3 for ResT-Lite, Rest-Small, ResT-Base, and ResT-Large, respectively. For the testing on the validation set, the shorter side of an input image is first resized to 256, and a center crop of $2 2 4 \times 2 2 4$ is used for evaluation.
144
+
145
+ Results. Table 2 presents comparisons to other backbones, including both Transformer-based ones and ConvNet-based ones. We can see, compared to the previous state-of-the-art Transformer-based architectures with similar model complexity, the proposed ResT achieves significant improvement by a large margin. For example, for smaller models, ResT noticeably surpass the counterpart PVT architectures with similar complexities: $+ 4 . 5 \%$ for ResT-Small $( 7 9 . 6 \% )$ over PVT-T $( 7 5 . 1 \% )$ . For larger models, ResT also significantly outperform the counterpart Swin architectures with similar complexities: $+ 0 . 3 \%$ for ResT-Base $( 8 1 . 6 \% )$ over Swin-T $( 8 1 . 3 \% )$ , and $+ 0 . 3 \%$ for ResT-Large $( 8 3 . 6 \% )$ over Swin-S $( 8 3 . 3 \% )$ using $2 2 4 \times 2 2 4$ input.
146
+
147
+ Table 2: Comparison with state-of-the-art backbones on ImageNet-1k benchmark. Throughput (images $/ s$ ) is measured on a single V100 GPU, following [26]. All models are trained and evaluated on $2 2 4 \times 2 2 4$ resolution. The best records and the improvements over bench-marked ResNets are marked in bold and blue, respectively.
148
+
149
+ <table><tr><td>Model</td><td>#Params (M)</td><td>FLOPs (G)</td><td>Throughput</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td colspan="6">ConvNet</td></tr><tr><td>ResNet-18 [11]</td><td>11.7</td><td>1.8</td><td>1852</td><td>69.7</td><td>89.1</td></tr><tr><td>ResNet-50 [11]</td><td>25.6</td><td>4.1</td><td>871</td><td>79.0</td><td>94.4</td></tr><tr><td>ResNet-101[11]</td><td>44.7</td><td>7.9</td><td>635</td><td>80.3</td><td>95.2</td></tr><tr><td>RegNetY-4G [22]</td><td>20.6</td><td>4.0</td><td>1156</td><td>79.4</td><td>94.7</td></tr><tr><td>RegNetY-8G [22]</td><td>39.2</td><td>8.0</td><td>591</td><td>79.9</td><td>94.9</td></tr><tr><td>RegNetY-16G [22]</td><td>83.6</td><td>15.9</td><td>334</td><td>80.4</td><td>95.1</td></tr><tr><td colspan="6">Transformer</td></tr><tr><td>DeiT-S [26]</td><td>22.1</td><td>4.6</td><td>940</td><td>79.8</td><td>94.9</td></tr><tr><td>DeiT-B [26]</td><td>86.6</td><td>17.6</td><td>292</td><td>81.8</td><td>95.6</td></tr><tr><td>PVT-T [29]</td><td>13.2</td><td>1.9</td><td>1038</td><td>75.1</td><td>92.4</td></tr><tr><td>PVT-S [29]</td><td>24.5</td><td>3.7</td><td>820</td><td>79.8</td><td>94.9</td></tr><tr><td>PVT-M[29]</td><td>44.2</td><td>6.4</td><td>526</td><td>81.2</td><td>95.6</td></tr><tr><td>PVT-L [29]</td><td>61.4</td><td>9.5</td><td>367</td><td>81.7</td><td>95.9</td></tr><tr><td>Swin-T[19]</td><td>28.29</td><td>4.5</td><td>755</td><td>81.3</td><td>95.5</td></tr><tr><td>Swin-S[19]</td><td>49.61</td><td>8.7</td><td>437</td><td>83.3</td><td>96.2</td></tr><tr><td>Swin-B [19]</td><td>87.77</td><td>15.4</td><td>278</td><td>83.5</td><td>96.5</td></tr><tr><td>ResT-Lite (Ours)</td><td>10.49</td><td>1.4</td><td>1246</td><td>77.2 (个 7.5)</td><td>93.7 (个 4.6)</td></tr><tr><td>ResT-Small (Ours)</td><td>13.66</td><td>1.9</td><td>1043</td><td>79.6 (个 9.9)</td><td>94.9 (个 5.8)</td></tr><tr><td>ResT-Base (Ours)</td><td>30.28</td><td>4.3</td><td>673</td><td>81.6 (个 2.6)</td><td>95.7 (个 1.3)</td></tr><tr><td>ResT-Large (Ours)</td><td>51.63</td><td>7.9</td><td>429</td><td>83.6 (↑ 3.3)</td><td>96.3 (个 1.1)</td></tr></table>
150
+
151
+ Compared with the state-of-the-art ConvNets, i.e., RegNet, the ResT with similar model complexity also achieves better performance: an average improvement of $1 . 7 \%$ in terms of Top-1 Accuracy. Note that RegNet is trained via thorough architecture search, the proposed ResT is adapted from the standard Transformer and has strong potential for further improvement.
152
+
153
+ # 3.2 Object Detection and Instance Segmentation on COCO
154
+
155
+ Settings. Object detection and instance segmentation experiments are conducted on COCO 2017, which contains $1 1 8 \mathrm { k }$ training, 5k validation, and $2 0 \mathrm { k }$ test-dev images. We evaluate the performance of ResT using two representative frameworks: RetinaNet [18] and Mask RCNN [10]. For these two frameworks, we utilize the same settings: multi-scale training (resizing the input such that the shorter side is between 480 and 800 while the longer side is at most 1333), AdamW [20] optimizer (initial learning rate of 1e-4, weight decay of 0.05, and batch size of 16), and $1 \times$ schedule (12 epochs). Unlike CNN backbones, which adopt post normalization and can directly apply to downstream tasks. ResT employs the pre-normalization strategy to accelerate network convergence, which means the output of each stage is not normalized before feeding to FPN [17]. Here, we add a layer normalization (LN [1]) for the output of each stage (before FPN [17]), similar to Swin [19]. Results are reported on the validation split.
156
+
157
+ Object Detection Results. Table 3 lists the results of RetinaNet with different backbones. From these results, it can be seen that for smaller models, ResT-Small is $+ 3 . 6$ box AP higher (40.3 vs. 36.7) than PVT-T with a similar computation cost. For larger models, our ResT-Base surpassing the PVT-S by $+ 1 . 6$ box AP.
158
+
159
+ Table 3: Object detection performance on the COCO val2017 split using the RetinaNet framework.
160
+
161
+ <table><tr><td>Backbones</td><td>AP50:95</td><td>AP50</td><td>AP75</td><td>APs</td><td>APm</td><td>AP1</td><td>Param (M)</td></tr><tr><td>R18[11]</td><td>31.8</td><td>49.6</td><td>33.6</td><td>16.3</td><td>34.3</td><td>43.2</td><td>21.3</td></tr><tr><td>PVT-T[29]</td><td>36.7</td><td>56.9</td><td>38.9</td><td>22.6</td><td>38.8</td><td>50.0</td><td>23.0</td></tr><tr><td>ResT-Smal(Ours)</td><td>40.3</td><td>61.3</td><td>42.7</td><td>25.7</td><td>43.7</td><td>51.2</td><td>23.4</td></tr><tr><td>R50 [11]</td><td>37.4</td><td>56.7</td><td>40.3</td><td>23.1</td><td>41.6</td><td>48.3</td><td>37.9</td></tr><tr><td>PVT-S [29]</td><td>40.4</td><td>61.3</td><td>43.0</td><td>25.0</td><td>42.9</td><td>55.7</td><td>34.2</td></tr><tr><td>Swin-T[19]</td><td>41.5</td><td>62.1</td><td>44.1</td><td>27.0</td><td>44.2</td><td>53.2</td><td>38.5</td></tr><tr><td>ResT-Base (Ours)</td><td>42.0</td><td>63.2</td><td>44.8</td><td>29.1</td><td>45.3</td><td>53.3</td><td>40.5</td></tr><tr><td>R101[11]</td><td>38.5</td><td>57.8</td><td>41.2</td><td>21.4</td><td>42.6</td><td>51.1</td><td>56.9</td></tr><tr><td>PVT-M[29]</td><td>41.9</td><td>63.1</td><td>44.3</td><td>25.0</td><td>44.9</td><td>57.6</td><td>53.9</td></tr><tr><td>Swin-S[19]</td><td>44.5</td><td>65.7</td><td>47.5</td><td>27.4</td><td>48.0</td><td>59.9</td><td>59.8</td></tr><tr><td>ResT-Large (Ours)</td><td>44.8</td><td>66.1</td><td>48.0</td><td>28.3</td><td>48.7</td><td>60.3</td><td>61.8</td></tr></table>
162
+
163
+ Instance Segmentation Results. Table 4 compares the results of ResT with those of previous state-of-the-art models on the Mask RCNN framework. Rest-Small exceeds PVT-T by $+ 2 . 9$ box AP and $+ 2 . 1$ mask AP on the COCO val2017 split. As for larger models, ResT-Base brings consistent $+ 1 . 2$ and $+ 0 . 9$ gains over PVT-S in terms of box AP and mask AP, with slightly larger model size.
164
+
165
+ Table 4: Object detection and instance segmentation performance on the COCO val2017 split using Mask RCNN framework.
166
+
167
+ <table><tr><td>Backbones</td><td>APbox</td><td>APbgx</td><td>APbg</td><td>Apmask</td><td>APmask</td><td>APmask</td><td>Param (M)</td></tr><tr><td>R18[11]</td><td>34.0</td><td>54.0</td><td>36.7</td><td>31.2</td><td>51.0</td><td>32.7</td><td>31.2</td></tr><tr><td>PVT-T [29]</td><td>36.7</td><td>59.2</td><td>39.3</td><td>35.1</td><td>56.7</td><td>37.3</td><td>32.9</td></tr><tr><td>ResT-Small(Ours)</td><td>39.6</td><td>62.9</td><td>42.3</td><td>37.2</td><td>59.8</td><td>39.7</td><td>33.3</td></tr><tr><td>R50[11]</td><td>38.6</td><td>59.5</td><td>42.1</td><td>35.2</td><td>56.3</td><td>37.5</td><td>44.3</td></tr><tr><td>PVT-S[29]</td><td>40.4</td><td>62.9</td><td>43.8</td><td>37.8</td><td>60.1</td><td>40.3</td><td>44.1</td></tr><tr><td>ResT-Base(Ours)</td><td>41.6</td><td>64.9</td><td>45.1</td><td>38.7</td><td>61.6</td><td>41.4</td><td>49.8</td></tr></table>
168
+
169
+ # 3.3 Ablation Study
170
+
171
+ In this section, we report the ablation studies of the proposed ResT, using ImageNet-1k image classification. To thoroughly investigate the important design elements, we only adopt the simplest data augmentation and hyper-parameters settings in [11]. Specifically, the input images are randomly cropped to $2 2 4 \times 2 2 4$ with random horizontal flipping. All the architectures of ResT-Lite are trained with SGD optimizer (with weight decay 1e-4 and momentum 0.9) for 100 epochs, starting from the initial learning rate of $0 . 1 \times$ batch_size/512 (with a linear warm-up of 5 epochs) and decreasing it by a factor of 10 every 30 epochs. Also, a batch size of 2048 (using 8 GPUs with 256 images per GPU) is used.
172
+
173
+ Different types of stem module. Here, we test three type of stem modules: (1) the first patch embedding module in PVT [29], i.e., $4 \times 4$ convolution operation with stride 4 and no padding; (2) the stem module in ResNet [11], i.e., one $7 \times 7$ convolution layer with stride 2 and padding 3, followed by one $3 \times 3$ max-pooling layer; (3) the stem module in the proposed ResT, i.e., three $3 \times 3$ convolutional layers (all with padding 1) with stride 2, stride 1, and stride 2, respectively. We report the results in Table 5. The stem module in the proposed ResT is more effective than that in PVT and ResNet: $+ 0 . 9 2 \%$ and $+ 0 . 6 4 \%$ improvements in terms of Top-1 accuracy, respectively.
174
+
175
+ Ablation study on EMSA. As shown in Figure!3, we adopt a Depth-wise Conv2d to reduce the computation of MSA. Here, we provide the comparison of more strategies with the same reduction stride $s$ . Results are shown in Table 6. As can be seen, average pooling achieves slightly worse results $( - 0 . 2 4 \% )$ compared with the original Depth-wise Conv2d, while the results of the Max Pooling strategy are the worst. Since the pooling operation introduces no extra parameters, therefore, average pooling can be an alternative to Depth-wise Conv2d in practice.
176
+
177
+ Table 5: Comparison of various stem modules on ResT-Lite. Results show that the proposed stem module is more effective than existing ones in PVT and ResNet.
178
+
179
+ <table><tr><td>Stem</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>PVT[29]</td><td>71.96</td><td>89.87</td></tr><tr><td>ResNet [11]</td><td>72.24</td><td>90.17</td></tr><tr><td>ResT (Ours)</td><td>72.88</td><td>90.62</td></tr></table>
180
+
181
+ Table 6: Comparison of different reduction strategies of EMSA on ResT-Lite. Results show that Average Pooling can be an alternative to Depthwise Conv2d to make a trade-off.
182
+
183
+ <table><tr><td>Reduction</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>DWConv</td><td>72.88</td><td>90.62</td></tr><tr><td>Avg Pooling</td><td>72.64</td><td>90.41</td></tr><tr><td>Max Pooling</td><td>72.20</td><td>89.97</td></tr></table>
184
+
185
+ Table 7: Ablation study results on the important design elements of EMSA on ResT-Lite, including the $1 \times 1$ convolution operation and Instance Normalization in Eq. 4.
186
+
187
+ <table><tr><td>Methods</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>origin</td><td>72.88</td><td>90.62</td></tr><tr><td>w/o IN</td><td>71.98</td><td>90.32</td></tr><tr><td>w/o Conv-1&amp;IN</td><td>71.72</td><td>89.93</td></tr></table>
188
+
189
+ Table 8: Comparison of various positional encoding (PE) strategies on ResT-Lite.
190
+
191
+ <table><tr><td>Encoding</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>w/o position</td><td>71.54</td><td>89.82</td></tr><tr><td>+LE</td><td>71.98</td><td>90.32</td></tr><tr><td>+ GL</td><td>72.04</td><td>90.41</td></tr><tr><td>+ PA</td><td>72.88</td><td>90.62</td></tr></table>
192
+
193
+ In addition, EMSA also adding two important elements to the standard MSA, i.e., one $1 \times 1$ convolution operation to model the interaction among different heads, and the Instance Normalization(IN) to restore diversity of different heads. Here, we validate the effectiveness of these two settings. Results are shown in Table 7. We can see, without IN, the Top-1 accuracy is degraded by $0 . 9 \%$ , we attribute it to the destroying of diversity among different heads because the $1 \times 1$ convolution operation makes all heads focus on all the tokens. In addition, the performance drops $1 . 1 6 \%$ without the convolution operation and IN. This can demonstrate that the combination of long sequence and diversity are both important for attention function.
194
+
195
+ Different types of positional encoding. In section 2.4, we introduced 3 types of positional encoding types, i.e., the original learnable parameters with fixed lengths [5] (LE), the proposed group linear mode(GL), and PA mode. These encodings are added/multiplied to the input patch token at the beginning of each stage. Here, we compared the proposed GL and PA with LE, results are shown in Table 8. We can see, the Top-1 accuracy degrades from $7 2 . 8 8 \%$ to $7 1 . 5 4 \%$ when the PA encoding is removed, this means that positional encoding is crucial for ResT. The LE and GL, achieve similar performance, which means it is possible to construct variable length of positional encoding. Moreover, the PA mode significantly surpasses the GL, achieving $0 . 8 4 \%$ Top-1 accuracy improvement, which indicates that spatial attention can also be modeled as positional encoding.
196
+
197
+ # 4 Conclusion
198
+
199
+ In this paper, we proposed ResT, a new version of multi-scale Transformer which produces hierarchical feature representations for dense prediction. We compressed the memory of standard MSA and model the interaction between multi-heads while keeping the diversity ability. To tackle input images with arbitrary, we further redesign the positional encoding as spatial attention. Experimental results demonstrate that the potential of ResT as strong backbones for dense prediction. We hope that our approach will foster further research in visual recognition.
200
+
201
+ # Acknowledgments and Disclosure of Funding
202
+
203
+ This work is funded by the Natural Science Foundation of China (No. 62176119) and the program B for Outstanding PhD candidate of Nanjing University.
204
+
205
+ # References
206
+
207
+ [1] Lei Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. CoRR, abs/1607.06450, 2016.
208
+ [2] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, Computer Vision - ECCV 2020 - 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part I, volume 12346 of Lecture Notes in Computer Science, pages 213–229. Springer, 2020.
209
+ [3] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. CoRR, abs/2012.00364, 2020.
210
+ [4] Ekin Dogus Cubuk, Barret Zoph, Jon Shlens, and Quoc Le. Randaugment: Practical automated data augmentation with a reduced search space. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
211
+ [5] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net, 2021.
212
+ [6] Peng Gao, Jiasen Lu, Hongsheng Li, Roozbeh Mottaghi, and Aniruddha Kembhavi. Container: Context aggregation network. CoRR, abs/2106.01401, 2021.
213
+ [7] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In Geoffrey J. Gordon, David B. Dunson, and Miroslav Dudík, editors, Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2011, Fort Lauderdale, USA, April 11-13, 2011, volume 15 of JMLR Proceedings, pages 315–323. JMLR.org, 2011.
214
+ [8] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. CoRR, abs/2103.00112, 2021.
215
+ [9] Karttikeya Mangalam Yanghao Li Zhicheng Yan Jitendra Malik Christoph Feichtenhofer Haoqi Fan, Bo Xiong. Multiscale vision transformers. arXiv:2104.11227, 2021.
216
+ [10] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross B. Girshick. Mask R-CNN. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2980–2988. IEEE Computer Society, 2017.
217
+ [11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 770–778. IEEE Computer Society, 2016.
218
+ [12] Dan Hendrycks and Kevin Gimpel. Bridging nonlinearities and stochastic regularizers with gaussian error linear units. CoRR, abs/1606.08415, 2016.
219
+ [13] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q. Weinberger. Deep networks with stochastic depth. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part IV, volume 9908 of Lecture Notes in Computer Science, pages 646–661. Springer, 2016.
220
+ [14] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Francis R. Bach and David M. Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, volume 37 of JMLR Workshop and Conference Proceedings, pages 448–456. JMLR.org, 2015.
221
+ [15] Md. Amirul Islam, Sen Jia, and Neil D. B. Bruce. How much position information do convolutional neural networks encode? In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
222
+ [16] Xiang Li, Wenhai Wang, Xiaolin Hu, and Jian Yang. Selective kernel networks. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 510–519. Computer Vision Foundation / IEEE, 2019.
223
+ [17] Tsung-Yi Lin, Piotr Dollár, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid networks for object detection. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 936–944, 2017.
224
+ [18] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2999–3007. IEEE Computer Society, 2017.
225
+ [19] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. CoRR, abs/2103.14030, 2021.
226
+ [20] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019.
227
+ [21] Niki Parmar, Prajit Ramachandran, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jon Shlens. Stand-alone self-attention in vision models. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 68–80, 2019.
228
+ [22] Ilija Radosavovic, Raj Prateek Kosaraju, Ross B. Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 10425–10433. IEEE, 2020.
229
+ [23] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. CoRR, abs/2101.11605, 2021.
230
+ [24] Zhi Tian, Chunhua Shen, and Hao Chen. Conditional convolutions for instance segmentation. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, 16th European Conference on Computer Vision, ECCV 2020, Glasgow, UK, August 23-28, 2020, Proceedings, Part I, volume 12346 of Lecture Notes in Computer Science, pages 282–298. Springer, 2020.
231
+ [25] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. FCOS: A simple and strong anchor-free object detector. CoRR, abs/2006.09214, 2020.
232
+ [26] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. CoRR, abs/2012.12877, 2020.
233
+ [27] Dmitry Ulyanov, Andrea Vedaldi, and Victor S. Lempitsky. Instance normalization: The missing ingredient for fast stylization. CoRR, abs/1607.08022, 2016.
234
+ [28] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5998–6008, 2017.
235
+ [29] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021.
236
+ [30] Xiaolong Wang, Ross B. Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. CoRR, abs/1711.07971, 2017.
237
+ [31] Xinlong Wang, Rufeng Zhang, Tao Kong, Lei Li, and Chunhua Shen. Solov2: Dynamic, faster and stronger. CoRR, abs/2003.10152, 2020.
238
+ [32] Saining Xie, Ross B. Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 5987–5995. IEEE Computer Society, 2017.
239
+ [33] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis E. H. Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. CoRR, abs/2101.11986, 2021.
240
+ [34] Sangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh, Youngjoon Yoo, and Junsuk Choe. Cutmix: Regularization strategy to train strong classifiers with localizable features. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 6022–6031. IEEE, 2019.
241
+ [35] Hongyi Zhang, Moustapha Cissé, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018.
242
+ [36] Hang Zhang, Chongruo Wu, Zhongyue Zhang, Yi Zhu, Zhi Zhang, Haibin Lin, Yue Sun, Tong He, Jonas Mueller, R. Manmatha, Mu Li, and Alexander J. Smola. Resnest: Split-attention networks. CoRR, abs/2004.08955, 2020.
243
+ [37] Qing-Long Zhang, Lu Rao, and Yubin Yang. Group-cam: Group score-weighted visual explanations for deep convolutional networks. CoRR, abs/2103.13859, 2021.
244
+ [38] Qing-Long Zhang and Yu-Bin Yang. Sa-net: Shuffle attention for deep convolutional neural networks. CoRR, abs/2102.00240, 2021.
245
+ [39] Zelin Zhao, Karan Samel, Binghong Chen, and Le Song. Proto: Program-guided transformer for programguided tasks. CoRR, abs/2110.00804, 2021.
246
+ [40] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 13001– 13008. AAAI Press, 2020.
247
+ [41] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable DETR: deformable transformers for end-to-end object detection. CoRR, abs/2010.04159, 2020.
parse/train/6Ab68Ip4Mu/6Ab68Ip4Mu_content_list.json ADDED
@@ -0,0 +1,1091 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ResT: An Efficient Transformer for Visual Recognition",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 122,
9
+ 821,
10
+ 147
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Qing-Long Zhang, Yu-Bin Yang State Key Laboratory for Novel Software Technology Nanjing University, Nanjing 21023, China wofmanaf@smail.nju.edu.cn, yangyubin@nju.edu.cn ",
17
+ "bbox": [
18
+ 267,
19
+ 200,
20
+ 730,
21
+ 257
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Abstract ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 462,
31
+ 292,
32
+ 535,
33
+ 309
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "This paper presents an efficient multi-scale vision Transformer, called ResT, that capably served as a general-purpose backbone for image recognition. Unlike existing Transformer methods, which employ standard Transformer blocks to tackle raw images with a fixed resolution, our ResT have several advantages: (1) A memory-efficient multi-head self-attention is built, which compresses the memory by a simple depth-wise convolution, and projects the interaction across the attention-heads dimension while keeping the diversity ability of multi-heads; (2) Positional encoding is constructed as spatial attention, which is more flexible and can tackle with input images of arbitrary size without interpolation or fine-tune; (3) Instead of the straightforward tokenization at the beginning of each stage, we design the patch embedding as a stack of overlapping convolution operation with stride on the token map. We comprehensively validate ResT on image classification and downstream tasks. Experimental results show that the proposed ResT can outperform the recently state-of-the-art backbones by a large margin, demonstrating the potential of ResT as strong backbones. The code and models will be made publicly available at https://github.com/wofmanaf/ResT. ",
40
+ "bbox": [
41
+ 232,
42
+ 323,
43
+ 766,
44
+ 544
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 Introduction ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 568,
55
+ 310,
56
+ 584
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Deep learning backbone architectures have been evolved for years and boost the performance of computer vision tasks such as classification [5, 26, 33, 11], object detection [2, 41, 18, 25], and instance segmentation [10, 24, 31], etc. ",
63
+ "bbox": [
64
+ 176,
65
+ 598,
66
+ 825,
67
+ 640
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "There are mainly two types of backbone architectures most commonly applied in computer vision: convolutional network (CNN) architectures [11, 38] and Transformer ones [6, 5, 33, 39]. Both of them capture feature information by stacking multiple blocks. The CNN block is generally a bottleneck structure [11], which can be defined as a stack of $1 \\times 1$ , $3 \\times 3$ , and $1 \\times 1$ convolution layers with residual learning (shown in Figure 1a). The $1 \\times 1$ layers are responsible for reducing and then increasing channel dimensions, leaving the $3 \\times 3$ layer a bottleneck with smaller input/output channel dimensions. The CNN backbones are generally faster and require less inference time thanks to parameter sharing, local information aggregation, and dimension reduction. However, due to the limited and fixed receptive field, CNN blocks may be less effective in scenarios that require modeling long-range dependencies. For example, in instance segmentation, being able to collect and associate scene information from a large neighborhood can be useful in learning relationships across objects [23]. ",
74
+ "bbox": [
75
+ 174,
76
+ 647,
77
+ 825,
78
+ 813
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "To overcome these limitations, Transformer backbones are recently explored for their ability to capture long-distance information [5, 33, 26, 19]. Unlike CNN backbones, the Transformer ones first split an image into a sequence of patches (i.e., tokens), then sum these tokens with positional encoding to represent coarse spatial information, and finally adopt a stack of Transformer blocks to capture feature information. A standard Transformer block [28] comprises a multi-head self-attention (MSA) that employs a query-key-value decomposition to model global relationships between sequence tokens, and a feed-forward network (FFN) to learn wider representations (shown in Figure 1b). As a result, Transformer blocks can dynamically adapt the receptive field according to the image content. ",
85
+ "bbox": [
86
+ 174,
87
+ 819,
88
+ 825,
89
+ 902
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/ecebca4c72535a3184b584598b6840672657f74e4f42f10132664f255a460d0a.jpg",
96
+ "image_caption": [
97
+ "Figure 1: Examples of backbone blocks. Left: A standard ResNet Bottleneck Block [11]. Middle: A Standard Transformer Block. Right: The proposed Efficient Transformer Block. The only difference compared with standard Transformer block is the replacement of the Multi-Head Self-Attention (MSA) with Efficient Multi-head Self-Attention (EMSA). "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 284,
102
+ 93,
103
+ 720,
104
+ 297
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 174,
113
+ 407,
114
+ 821,
115
+ 435
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "Despite showing great potential than CNNs, the Transformer backbones still have four major shortcomings: (1) It is difficult to extract the low-level features which form some fundamental structures in images (e.g., corners and edges) since existing Transformer backbones direct perform tokenization of patches from raw input images. (2) The memory and computation for MSA in Transformer blocks scale quadratically with spatial or embedding dimensions (i.e., the number of channels), causing vast overheads for training and inference. (3) Each head in MSA is responsible for only a subset of embedding dimensions, which may impair the performance of the network, particularly when the tokens embedding dimension (for each head) is short, making the dot product of query and key unable to constitute an informative function. (4) The input tokens and positional encoding in existing Transformer backbones are all of a fixed scale, which are unsuitable for vision tasks that require dense prediction. ",
122
+ "bbox": [
123
+ 174,
124
+ 441,
125
+ 825,
126
+ 594
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "In this paper, we proposed an efficient general-purpose backbone ResT (named after ResNet [11]) for computer vision, which can remedy the above issues. As illustrated in Figure 2, ResT shares exactly the same pipeline of ResNet, i.e., a stem module applied for extracting low-level information and strengthening locality, followed by four stages to construct hierarchical feature maps, and finally a head module for classification. Each stage consists of a patch embedding, a positional encoding module, and multiple Transformer blocks with specific spatial resolution and channel dimension. The patch embedding module creates a multi-scale pyramid of features by hierarchically expanding the channel capacity while reducing the spatial resolution with overlapping convolution operations. Unlike the conventional methods which can only tackle images with a fixed scale, our positional encoding module is constructed as spatial attention which is conditioned on the local neighborhood of the input token. By doing this, the proposed method is more flexible and can process input images of arbitrary size without interpolation or fine-tune. Besides, to improve the efficiency of the MSA, we build an efficient multi-head self-attention (EMSA), which significantly reduce the computation cost by a simple overlapping Depth-wise Conv2d. In addition, we compensate short-length limitations of the input token for each head by projecting the interaction across the attention-heads dimension while keeping the diversity ability of multi-heads. ",
133
+ "bbox": [
134
+ 173,
135
+ 601,
136
+ 825,
137
+ 821
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "We comprehensively validate the effectiveness of the proposed ResT on the commonly used benchmarks, including image classification on ImageNet-1k and downstream tasks, such as object detection, and instance segmentation on MS COCO2017. Experimental results demonstrate the effectiveness and generalization ability of the proposed ResT compared with the recently state-of-the-art Vision Transformers and CNNs. For example, with a similar model size as ResNet-18 $( 6 9 . 7 \\% )$ and PVT-Tiny $( 7 5 . 1 \\% )$ , our ResT-Small obtains a Top-1 accuracy of $7 9 . 6 \\%$ on ImageNet-1k. ",
144
+ "bbox": [
145
+ 174,
146
+ 828,
147
+ 825,
148
+ 911
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "image",
154
+ "img_path": "images/65f7ce2f5ce3b94e45385c7067a52cb9a89e2cc7a73b9ebc0de61169161309fe.jpg",
155
+ "image_caption": [
156
+ "Figure 2: The pipeline of the proposed ResT. Similar to ResNet [11], ResT build stages with stacked blocks, making it flexible to serve as the backbone of downstream tasks, such as Object detection, Person ReID, and Instance Segmentation, etc. "
157
+ ],
158
+ "image_footnote": [],
159
+ "bbox": [
160
+ 173,
161
+ 85,
162
+ 820,
163
+ 202
164
+ ],
165
+ "page_idx": 2
166
+ },
167
+ {
168
+ "type": "text",
169
+ "text": "2 ResT",
170
+ "text_level": 1,
171
+ "bbox": [
172
+ 173,
173
+ 277,
174
+ 248,
175
+ 295
176
+ ],
177
+ "page_idx": 2
178
+ },
179
+ {
180
+ "type": "text",
181
+ "text": "As illustrated in Figure 2, ResT shares exactly the same pipeline as ResNet [11], i.e., a stem module applied to extract low-level information, followed by four stages to capture multi-scale feature maps. Each stage consists of three components, one patch embedding module (or stem module), one positional encoding module, and a set of $L$ efficient Transformer blocks. Specifically, at the beginning of each stage, the patch embedding module is adopted to reduce the resolution of the input token and expanding the channel dimension. The positional encoding module is fused to restrain position information and strengthen the feature extracting ability of patch embedding. After that, the input token is fed to the efficient Transformer blocks (illustrated in Figure 1c). In the following sections, we will introduce the intuition behind ResT. ",
182
+ "bbox": [
183
+ 173,
184
+ 308,
185
+ 826,
186
+ 434
187
+ ],
188
+ "page_idx": 2
189
+ },
190
+ {
191
+ "type": "text",
192
+ "text": "2.1 Rethinking of Transformer Block ",
193
+ "text_level": 1,
194
+ "bbox": [
195
+ 174,
196
+ 449,
197
+ 444,
198
+ 464
199
+ ],
200
+ "page_idx": 2
201
+ },
202
+ {
203
+ "type": "text",
204
+ "text": "The standard Transformer block consists of two sub-layers of MSA and FFN. A residual connection is employed around each sub-layer. Before MSA and FFN, layer normalization (LN [1]) is applied. For a token input $\\mathbf { x } \\in \\mathbb { R } ^ { n \\times d _ { m } }$ , where $n$ , $d _ { m }$ indicates the spatial dimension, channel dimension, respectively. The output for each Transformer block is: ",
205
+ "bbox": [
206
+ 173,
207
+ 474,
208
+ 826,
209
+ 530
210
+ ],
211
+ "page_idx": 2
212
+ },
213
+ {
214
+ "type": "equation",
215
+ "img_path": "images/8ba501f77b53998cbc02f3659451d2ea78f8d43009513527e44945b4dbdbf2f9.jpg",
216
+ "text": "$$\n\\mathrm { y } { = } \\mathrm { x } ^ { \\prime } + \\mathrm { F F N } ( \\mathrm { L N } ( \\mathrm { x } ^ { \\prime } ) ) , \\mathrm { a n d } \\mathrm { x } ^ { \\prime } { = } \\mathrm { x } + \\mathrm { M S A } ( \\mathrm { L N } ( \\mathrm { x } ) )\n$$",
217
+ "text_format": "latex",
218
+ "bbox": [
219
+ 320,
220
+ 532,
221
+ 676,
222
+ 550
223
+ ],
224
+ "page_idx": 2
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "MSA. MSA first obtains query $\\mathbf { Q }$ , key $\\mathbf { K }$ , and value $\\mathbf { V }$ by applying three sets of projections to the input, each consisting of $k$ linear layers (i.e., heads) that map the $d _ { m }$ dimensional input into a $d _ { k }$ dimensional space, where $d _ { k } = d _ { m } / k$ is the head dimension. For the convenience of description, we assume $k = 1$ , then MSA can be simplified to single-head self-attention (SA). The global relationship between the token sequence can be defined as ",
229
+ "bbox": [
230
+ 173,
231
+ 559,
232
+ 825,
233
+ 630
234
+ ],
235
+ "page_idx": 2
236
+ },
237
+ {
238
+ "type": "equation",
239
+ "img_path": "images/a82817d2ca862368cfc32b13d9a14c88df651f236593654962bb65847023051a.jpg",
240
+ "text": "$$\n\\mathrm { S A } ( \\mathbf { Q } , \\mathbf { K } , \\mathbf { V } ) = \\mathrm { S o f t m a x } ( \\frac { \\mathbf { Q } \\mathbf { K } ^ { \\mathrm { T } } } { \\sqrt { d _ { k } } } ) \\mathbf { V }\n$$",
241
+ "text_format": "latex",
242
+ "bbox": [
243
+ 382,
244
+ 632,
245
+ 617,
246
+ 669
247
+ ],
248
+ "page_idx": 2
249
+ },
250
+ {
251
+ "type": "text",
252
+ "text": "The output values of each head are then concatenated and linearly projected to form the final output. The computation costs of MSA are $\\mathcal { O } ( 2 d _ { m } n ^ { 2 } + 4 d _ { m } ^ { 2 } n )$ , which scale quadratically with spatial dimension or embedding dimensions according to the input token. ",
253
+ "bbox": [
254
+ 174,
255
+ 670,
256
+ 825,
257
+ 713
258
+ ],
259
+ "page_idx": 2
260
+ },
261
+ {
262
+ "type": "text",
263
+ "text": "FFN. The FFN is applied for feature transformation and non-linearity. It consists of two linear layers with a non-linearity activation. The first layer expands the embedding dimensions of the input from $d _ { m }$ to $d _ { f }$ and the second layer reduce the dimensions from $d _ { f }$ to $d _ { m }$ . ",
264
+ "bbox": [
265
+ 173,
266
+ 718,
267
+ 825,
268
+ 761
269
+ ],
270
+ "page_idx": 2
271
+ },
272
+ {
273
+ "type": "equation",
274
+ "img_path": "images/fbb34347ad8ededc231137165606aae09eb0602c6cca155e179781ff910914fe.jpg",
275
+ "text": "$$\n\\mathrm { F F N ( x ) } = \\sigma ( \\mathbf { x W } _ { 1 } + \\mathbf { b } _ { 1 } ) \\mathbf { W } _ { 2 } + \\mathbf { b } _ { 2 }\n$$",
276
+ "text_format": "latex",
277
+ "bbox": [
278
+ 382,
279
+ 763,
280
+ 614,
281
+ 781
282
+ ],
283
+ "page_idx": 2
284
+ },
285
+ {
286
+ "type": "text",
287
+ "text": "where $\\mathbf { W } _ { 1 } \\in \\mathbb { R } ^ { d _ { m } \\times d _ { f } }$ and $\\mathbf { W } _ { 2 } \\in \\mathbb { R } ^ { d _ { f } \\times d _ { m } }$ are weights of the two Linear layers respectively, $\\mathbf { b } _ { 1 } \\in \\mathbb { R } ^ { d _ { f } }$ and $\\mathbf { b } _ { 2 } \\in \\mathbb { R } ^ { d _ { m } }$ are the bias terms, and $\\sigma ( \\cdot )$ is the activation function GELU [12]. In standard Transformer block, the channel dimensions are expanded by a factor of 4, i.e., $d _ { f } = 4 d _ { m }$ . The computation costs of FFN are $8 n d _ { m } ^ { 2 }$ . ",
288
+ "bbox": [
289
+ 174,
290
+ 784,
291
+ 825,
292
+ 843
293
+ ],
294
+ "page_idx": 2
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "2.2 Efficient Transformer Block ",
299
+ "text_level": 1,
300
+ "bbox": [
301
+ 174,
302
+ 857,
303
+ 408,
304
+ 872
305
+ ],
306
+ "page_idx": 2
307
+ },
308
+ {
309
+ "type": "text",
310
+ "text": "As analyzed above, MSA has two shortcomings: (1) The computation scales quadratically with $d _ { m }$ or $n$ according to the input token, causing vast overheads for training and inference; (2) Each head in ",
311
+ "bbox": [
312
+ 174,
313
+ 882,
314
+ 821,
315
+ 911
316
+ ],
317
+ "page_idx": 2
318
+ },
319
+ {
320
+ "type": "text",
321
+ "text": "MSA only responsible for a subset of embedding dimensions, which may impair the performance of the network, particularly when the tokens embedding dimension (for each head) is short. ",
322
+ "bbox": [
323
+ 169,
324
+ 90,
325
+ 825,
326
+ 119
327
+ ],
328
+ "page_idx": 3
329
+ },
330
+ {
331
+ "type": "image",
332
+ "img_path": "images/b78afb503a0c86e0027a7ef1fc7151b9522925a2052042ae657c6241bf6cf9d9.jpg",
333
+ "image_caption": [
334
+ "Figure 3: Efficient Multi-Head Self-Attention. "
335
+ ],
336
+ "image_footnote": [],
337
+ "bbox": [
338
+ 334,
339
+ 136,
340
+ 665,
341
+ 430
342
+ ],
343
+ "page_idx": 3
344
+ },
345
+ {
346
+ "type": "text",
347
+ "text": "To remedy these issues, we propose an efficient multi-head self-attention module (illustrated in Figure 3). Here, we make some explanations. ",
348
+ "bbox": [
349
+ 169,
350
+ 478,
351
+ 823,
352
+ 507
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "(1) Similar to MSA, EMSA first adopt a set of projections to obtain query $\\mathbf { Q }$ . ",
359
+ "bbox": [
360
+ 174,
361
+ 512,
362
+ 678,
363
+ 529
364
+ ],
365
+ "page_idx": 3
366
+ },
367
+ {
368
+ "type": "text",
369
+ "text": "(2) To compress memory, the 2D input token $\\mathbf { x } \\in \\mathbb { R } ^ { n \\times d _ { m } }$ is reshaped to 3D one along the spatial dimension (i.e., $\\hat { \\mathbf { x } } \\in \\mathbb { R } ^ { d _ { m } \\times h \\times w } )$ and then feed to a depth-wise convolution operation to reduce the height and width dimension by a factor $s$ . To make simple, $s$ is adaptive set by the feature map size or the stage number. The kernel size, stride and padding are $s + 1 , s$ , and $s / 2$ respectively. ",
370
+ "bbox": [
371
+ 173,
372
+ 534,
373
+ 826,
374
+ 590
375
+ ],
376
+ "page_idx": 3
377
+ },
378
+ {
379
+ "type": "text",
380
+ "text": "(3) The new token map after spatial reduction $\\hat { \\mathbf { x } } \\in \\mathbb { R } ^ { d _ { m } \\times h / s \\times w / s }$ is then reshaped to 2D one, i.e., $\\hat { \\mathbf { x } } \\in \\mathbb { R } ^ { n ^ { \\prime } \\times d _ { m } }$ , $n ^ { \\prime } = h / s \\times w / s$ . Then $\\hat { \\bf x }$ is feed to two sets of projection to get key $\\mathbf { K }$ and value $\\mathbf { V }$ . ",
381
+ "bbox": [
382
+ 173,
383
+ 595,
384
+ 826,
385
+ 628
386
+ ],
387
+ "page_idx": 3
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "(4) After that, we adopt Eq. 4 to compute the attention function on query Q, $\\mathbf { K }$ and value $\\mathbf { V }$ . ",
392
+ "bbox": [
393
+ 169,
394
+ 633,
395
+ 772,
396
+ 650
397
+ ],
398
+ "page_idx": 3
399
+ },
400
+ {
401
+ "type": "equation",
402
+ "img_path": "images/c2309ce9eebc28b5ccdaa9475a0d15c54b6019b182937705c41ed183fef2fce4.jpg",
403
+ "text": "$$\n\\operatorname { E M S A } ( \\mathbf { Q } , \\mathbf { K } , \\mathbf { V } ) = \\operatorname { I N } ( \\operatorname { S o f t m a x } ( \\operatorname { C o n v } ( { \\frac { \\mathbf { Q } \\mathbf { K } ^ { \\mathrm { T } } } { \\sqrt { d _ { k } } } } ) ) ) \\mathbf { V }\n$$",
404
+ "text_format": "latex",
405
+ "bbox": [
406
+ 326,
407
+ 659,
408
+ 671,
409
+ 695
410
+ ],
411
+ "page_idx": 3
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "Here, $\\mathrm { C o n v } ( \\cdot )$ is a standard $1 \\times 1$ convolutional operation, which model the interactions among different heads. As a result, attention function of each head can depend on all of the keys and queries. However, this will impair the ability of MSA to jointly attend to information from different representation subsets at different positions. To restore this diversity ability, we add an Instance Normalization [27] (i.e, IN(·)) for the dot product matrix (after Softmax). ",
416
+ "bbox": [
417
+ 173,
418
+ 707,
419
+ 825,
420
+ 777
421
+ ],
422
+ "page_idx": 3
423
+ },
424
+ {
425
+ "type": "text",
426
+ "text": "(5) Finally, the output values of each head are then concatenated and linearly projected to form the final output. ",
427
+ "bbox": [
428
+ 173,
429
+ 782,
430
+ 823,
431
+ 811
432
+ ],
433
+ "page_idx": 3
434
+ },
435
+ {
436
+ "type": "text",
437
+ "text": "The computation costs of EMSA are O( 2dmn2s2 + 2d2mn(1 + 1s2 ) + dmn (s+1)2s2 + s2 , much lowerhigher. $s > 1$ $s$ ",
438
+ "bbox": [
439
+ 174,
440
+ 818,
441
+ 821,
442
+ 851
443
+ ],
444
+ "page_idx": 3
445
+ },
446
+ {
447
+ "type": "text",
448
+ "text": "Also, we add FFN after EMSA for feature transformation and non-linearity. The output for each efficient Transformer block is: ",
449
+ "bbox": [
450
+ 169,
451
+ 856,
452
+ 823,
453
+ 885
454
+ ],
455
+ "page_idx": 3
456
+ },
457
+ {
458
+ "type": "equation",
459
+ "img_path": "images/dcd1399466a82f1ec9c06c94b7bed8bf75b6846f0b4792577f916a195aad9953.jpg",
460
+ "text": "$$\n\\begin{array} { r } { \\mathrm { y } { = } \\mathrm { x } ^ { \\prime } + \\mathrm { F F N } ( \\mathrm { L N } ( \\mathrm { x } ^ { \\prime } ) ) , \\mathrm { a n d } \\mathrm { x } ^ { \\prime } { = } \\mathrm { x } + \\mathrm { E M S A } ( \\mathrm { L N } ( \\mathrm { x } ) ) } \\end{array}\n$$",
461
+ "text_format": "latex",
462
+ "bbox": [
463
+ 313,
464
+ 895,
465
+ 681,
466
+ 912
467
+ ],
468
+ "page_idx": 3
469
+ },
470
+ {
471
+ "type": "text",
472
+ "text": "2.3 Patch Embedding ",
473
+ "text_level": 1,
474
+ "bbox": [
475
+ 174,
476
+ 90,
477
+ 338,
478
+ 106
479
+ ],
480
+ "page_idx": 4
481
+ },
482
+ {
483
+ "type": "text",
484
+ "text": "The standard Transformer receives a sequence of token embeddings as input. Take ViT [5] as an example, the input image $\\mathbf { x } \\in \\mathbb { R } ^ { 3 \\times h \\times w }$ is split with a patch size of $p \\times p$ . These patches are flattened into 2D ones and then mapped to latent embeddings with a size of $c$ , i.e, $\\mathbf { x } \\in \\mathbb { R } ^ { n \\times c }$ , where $n = h w / p ^ { 2 }$ . However, this straightforward tokenization is failed to capture low-level feature information (such as edges and corners) [33]. In addition, the length of tokens in ViT are all of a fixed size in different blocks, making it unsuitable for downstream vision tasks such as object detection and instance segmentation that require multi-scale feature map representations. ",
485
+ "bbox": [
486
+ 173,
487
+ 116,
488
+ 825,
489
+ 214
490
+ ],
491
+ "page_idx": 4
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "Here, we build an efficient multi-scale backbone, calling ResT, for dense prediction. As introduced above, the efficient Transformer block in each stage operates on the same scale with identical resolution across the channel and spatial dimensions. Therefore, the patch embedding modules are required to progressively expand the channel dimension, while simultaneously reducing the spatial resolution throughout the network. ",
496
+ "bbox": [
497
+ 174,
498
+ 219,
499
+ 825,
500
+ 290
501
+ ],
502
+ "page_idx": 4
503
+ },
504
+ {
505
+ "type": "text",
506
+ "text": "Similar to ResNet, the stem module (can be seen as the first patch embedding module) are adopted to shrunk both the height and width dimension with a reduction factor of 4. To effectively capture the low-feature information with few parameters, here we introduce a simple but effective way, i.e, stacking three $3 \\times 3$ standard convolution layers (all with padding 1) with stride 2, stride 1, and stride 2, respectively. Batch Normalization [14] and ReLU activation [7] are applied for the first two layers. In stage 2, stage 3, and stage 4, the patch embedding module is adopted to down-sample the spatial dimension by $4 \\times$ and increase the channel dimension by $2 \\times$ . This can be done by a standard $3 \\times 3$ convolution with stride 2 and padding 1. For example, patch embedding module in stage 2 changes resolution from $h / 4 \\times w / 4 \\times c$ to $h / 8 \\times w / 8 \\times 2 c$ (shown in Figure 2). ",
507
+ "bbox": [
508
+ 173,
509
+ 295,
510
+ 826,
511
+ 421
512
+ ],
513
+ "page_idx": 4
514
+ },
515
+ {
516
+ "type": "text",
517
+ "text": "2.4 Positional Encoding ",
518
+ "text_level": 1,
519
+ "bbox": [
520
+ 174,
521
+ 435,
522
+ 352,
523
+ 450
524
+ ],
525
+ "page_idx": 4
526
+ },
527
+ {
528
+ "type": "text",
529
+ "text": "Positional encodings are crucial to exploiting the order of sequence. In ViT [5], a set of learnable parameters are added into the input tokens to encode positions. Let $\\mathbf { x } \\in \\mathbb { R } ^ { n \\times c }$ be the input, $\\theta \\in \\mathbb { R } ^ { n \\times c }$ be position parameters, then the encoded input can be represent as ",
530
+ "bbox": [
531
+ 174,
532
+ 460,
533
+ 825,
534
+ 503
535
+ ],
536
+ "page_idx": 4
537
+ },
538
+ {
539
+ "type": "equation",
540
+ "img_path": "images/1d13c4c0f2a36706e33d56c228826f8c2377d8b2c9e942cacb16a6a82eb1e65e.jpg",
541
+ "text": "$$\n\\hat { \\mathbf { x } } = \\mathbf { x } + \\boldsymbol { \\theta }\n$$",
542
+ "text_format": "latex",
543
+ "bbox": [
544
+ 462,
545
+ 506,
546
+ 534,
547
+ 521
548
+ ],
549
+ "page_idx": 4
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "However, the length of positions is exactly the same as the input tokens length, which limits the application scenarios. ",
554
+ "bbox": [
555
+ 171,
556
+ 526,
557
+ 823,
558
+ 554
559
+ ],
560
+ "page_idx": 4
561
+ },
562
+ {
563
+ "type": "text",
564
+ "text": "To remedy this issue, the new positional encodings are required to have variable lengths according to input tokens. Let us look closer to Eq. 6, the summation operation is much like assigning pixel-wise weights to the input. Assume $\\theta$ is related with x, i.e., $\\theta = \\operatorname { G L } ( { \\bar { \\mathbf { x } } } )$ , where $\\mathrm { { G L } } \\bar { ( } \\cdot \\bar { ) }$ is the group linear operation with the group number of $c$ . Then Eq. 6 can be modified to ",
565
+ "bbox": [
566
+ 174,
567
+ 560,
568
+ 575,
569
+ 643
570
+ ],
571
+ "page_idx": 4
572
+ },
573
+ {
574
+ "type": "equation",
575
+ "img_path": "images/5f8475a1b3894a1b0bab500014b931ed6e68f4c42e5fd2d79c3001004699fd64.jpg",
576
+ "text": "$$\n\\hat { \\mathbf { x } } = \\mathbf { x } + \\mathbf { G } \\mathbf { L } ( \\mathbf { x } )\n$$",
577
+ "text_format": "latex",
578
+ "bbox": [
579
+ 320,
580
+ 646,
581
+ 428,
582
+ 662
583
+ ],
584
+ "page_idx": 4
585
+ },
586
+ {
587
+ "type": "image",
588
+ "img_path": "images/2a1cb68bb31b2ecc0ecddcac99b1c7a749b83516085391718f916cd5bfb8182f.jpg",
589
+ "image_caption": [
590
+ "Figure 4: Patch and PE in ResT. "
591
+ ],
592
+ "image_footnote": [],
593
+ "bbox": [
594
+ 617,
595
+ 551,
596
+ 803,
597
+ 694
598
+ ],
599
+ "page_idx": 4
600
+ },
601
+ {
602
+ "type": "text",
603
+ "text": "Besides Eq. 7, $\\theta$ can also be obtained by more flexible spatial attention mechanisms. Here, we propose a simple yet effective spatial attention module calling PA(pixel-attention) to encode positions. Specifically, PA applies a $3 \\times 3$ depth-wise convolution (with padding 1) operation to get the pixel-wise weight and then scaled by a sigmoid function $\\sigma ( \\cdot )$ . The positional encoding with PA module can then be represented as ",
604
+ "bbox": [
605
+ 173,
606
+ 672,
607
+ 575,
608
+ 729
609
+ ],
610
+ "page_idx": 4
611
+ },
612
+ {
613
+ "type": "text",
614
+ "text": "",
615
+ "bbox": [
616
+ 176,
617
+ 729,
618
+ 821,
619
+ 757
620
+ ],
621
+ "page_idx": 4
622
+ },
623
+ {
624
+ "type": "equation",
625
+ "img_path": "images/18ba080fb1317fac34794c2181e21c22cbd5d353bbeb6b6345b84be449f9f3b4.jpg",
626
+ "text": "$$\n\\hat { \\mathbf { x } } = \\mathrm { P A } ( \\mathrm { x } ) = \\mathrm { x } * \\sigma ( \\mathrm { D W C o n v ( x ) } )\n$$",
627
+ "text_format": "latex",
628
+ "bbox": [
629
+ 382,
630
+ 760,
631
+ 614,
632
+ 776
633
+ ],
634
+ "page_idx": 4
635
+ },
636
+ {
637
+ "type": "text",
638
+ "text": "Since the input token in each stage is also obtained by a convolution operation, we can embed the positional encoding into the patch embedding module. The whole structure of stage $i$ can be illustrated in Figure 4. Note that PA can be replaced by any spatial attention modules, making the positional encoding flexible in ResT. ",
639
+ "bbox": [
640
+ 174,
641
+ 786,
642
+ 825,
643
+ 842
644
+ ],
645
+ "page_idx": 4
646
+ },
647
+ {
648
+ "type": "text",
649
+ "text": "2.5 Classification Head ",
650
+ "text_level": 1,
651
+ "bbox": [
652
+ 174,
653
+ 857,
654
+ 348,
655
+ 872
656
+ ],
657
+ "page_idx": 4
658
+ },
659
+ {
660
+ "type": "text",
661
+ "text": "The classification head is performed by a global average pooling layer on the output feature map of the last stage, followed by a linear classifier. The detailed ResT architecture for ImageNet-1k is shown ",
662
+ "bbox": [
663
+ 174,
664
+ 882,
665
+ 823,
666
+ 911
667
+ ],
668
+ "page_idx": 4
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "in Table 1, which contains four models, i.e., ResT-Lite, ResT-Small and ResT-Base and ResT-Large, which are bench-marked to ResNet-18, ResNet-18, ResNet-50, and ResNet-101, respectively. ",
673
+ "bbox": [
674
+ 173,
675
+ 90,
676
+ 825,
677
+ 119
678
+ ],
679
+ "page_idx": 5
680
+ },
681
+ {
682
+ "type": "table",
683
+ "img_path": "images/6cd08915f9255aec59e222306cead744ba48b91295781efa94471376ef75ccf0.jpg",
684
+ "table_caption": [
685
+ "Table 1: Architectures for ImageNet-1k. Here, we make some definitions. $\\mathrm { \\cdot C o n v } - k _ { - } c _ { - } s ^ { \\prime }$ \" means convolution layers with kernel size $k$ , output channel $c$ and stride $s$ . “MLP_ $. c \"$ is the FFN structure with hidden channel $_ { 4 c }$ and output channel $c$ . And “EMSA_ $\\boldsymbol { \\it n \\_ r ^ { \\prime \\prime } }$ is the EMSA operation with the number of heads $n$ and reduction $r$ . “ $\\mathbf { C \" }$ is 64 for ResT-Lite and ResT-Small, and 96 for ResT-Base and ResT-Large.“PA\" is short for pixel-wise attention, which are introduced in Section 2.4. "
686
+ ],
687
+ "table_footnote": [],
688
+ "table_body": "<table><tr><td>Name</td><td>| Output |</td><td>Lite</td><td></td><td>Small</td><td></td><td>Base</td><td></td><td>Large</td><td></td></tr><tr><td>stem</td><td>[56×56|</td><td colspan=\"9\">patch_embed: Conv-3_C/2_2,Conv-3_C/2_1,Conv-3_C_2,PA</td></tr><tr><td>stage1</td><td>56×56</td><td>EMSA_1_8 MLP_64</td><td>×2</td><td>EMSA_1_8 MLP_64</td><td>×2</td><td>EMSA_1_8 MLP_96</td><td>×2</td><td></td><td>EMSA_1_8 MLP_96</td><td>×2</td></tr><tr><td rowspan=\"2\">stage2</td><td rowspan=\"2\">28×28</td><td colspan=\"7\">patch_embed: Conv-3_2C_2,PA</td><td rowspan=\"2\"></td><td></td></tr><tr><td>EMSA_2_4 MLP_128</td><td>×2</td><td>EMSA_2_4 MLP_128</td><td>×2</td><td>EMSA_2_4 MLP_192</td><td>×2</td><td>EMSA_2_4 MLP_192</td><td>×2</td></tr><tr><td rowspan=\"2\">stage3</td><td rowspan=\"2\">|14× 14|</td><td colspan=\"8\">patch_embed: Conv-3_4C_2,PA</td></tr><tr><td>EMSA_4_2 MLP_256</td><td>×2</td><td>EMSA_4_2 MLP_256</td><td></td><td>×6</td><td>EMSA_4_2 MLP_384</td><td>×6</td><td>EMSA_4_2 MLP_384</td><td>×18</td></tr><tr><td rowspan=\"2\">stage4</td><td rowspan=\"2\">7×7</td><td colspan=\"8\">patch_embed: Conv-3_8C_2,PA</td></tr><tr><td>EMSA_8_1 MLP_512</td><td>×2</td><td>EMSA_8_1 MLP_512</td><td>×2</td><td>MLP_768</td><td>EMSA_8_1</td><td>×2</td><td>EMSA_8_1</td><td>×2</td></tr><tr><td>Classifier|</td><td>[1×1|</td><td colspan=\"8\">MLP_768 average pool,100od fully-connected</td></tr><tr><td colspan=\"2\">GFLOPs</td><td colspan=\"6\">1.4 1.94</td><td colspan=\"2\">7.91</td></tr></table>",
689
+ "bbox": [
690
+ 179,
691
+ 228,
692
+ 818,
693
+ 502
694
+ ],
695
+ "page_idx": 5
696
+ },
697
+ {
698
+ "type": "text",
699
+ "text": "3 Experiments ",
700
+ "text_level": 1,
701
+ "bbox": [
702
+ 173,
703
+ 537,
704
+ 312,
705
+ 555
706
+ ],
707
+ "page_idx": 5
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "In this section, we conduct experiments on common-used benchmarks, including ImageNet-1k for classification, MS COCO2017 for object detection, and instance segmentation. In the following subsections, we first compared the proposed ResT with the previous state-of-the-arts on the three tasks. Then we adopt ablation studies to validate the important design elements of ResT. ",
712
+ "bbox": [
713
+ 174,
714
+ 570,
715
+ 825,
716
+ 626
717
+ ],
718
+ "page_idx": 5
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "3.1 Image Classification on ImageNet-1k ",
723
+ "text_level": 1,
724
+ "bbox": [
725
+ 176,
726
+ 643,
727
+ 468,
728
+ 659
729
+ ],
730
+ "page_idx": 5
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "Settings. For image classification, we benchmark the proposed ResT on ImageNet-1k, which contains 1.28M training images and 50k validation images from 1,000 classes. The setting mostly follows [26]. Specifically, we employ the AdamW [20] optimizer for 300 epochs using a cosine decay learning rate scheduler and 5 epochs of linear warm-up. A batch size of 2048 (using 8 GPUs with 256 images per GPU), an initial learning rate of 5e-4, a weight decay of 0.05, and gradient clipping with a max norm of 5 are used. We include most of the augmentation and regularization strategies of [26] in training, including RandAugment [4], Mixup [35], Cutmix [34], Random erasing [40], and stochastic depth [13]. An increasing degree of stochastic depth augmentation is employed for larger models, i.e., 0.1, 0.1, 0.2, 0.3 for ResT-Lite, Rest-Small, ResT-Base, and ResT-Large, respectively. For the testing on the validation set, the shorter side of an input image is first resized to 256, and a center crop of $2 2 4 \\times 2 2 4$ is used for evaluation. ",
735
+ "bbox": [
736
+ 173,
737
+ 669,
738
+ 825,
739
+ 821
740
+ ],
741
+ "page_idx": 5
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "Results. Table 2 presents comparisons to other backbones, including both Transformer-based ones and ConvNet-based ones. We can see, compared to the previous state-of-the-art Transformer-based architectures with similar model complexity, the proposed ResT achieves significant improvement by a large margin. For example, for smaller models, ResT noticeably surpass the counterpart PVT architectures with similar complexities: $+ 4 . 5 \\%$ for ResT-Small $( 7 9 . 6 \\% )$ over PVT-T $( 7 5 . 1 \\% )$ . For larger models, ResT also significantly outperform the counterpart Swin architectures with similar complexities: $+ 0 . 3 \\%$ for ResT-Base $( 8 1 . 6 \\% )$ over Swin-T $( 8 1 . 3 \\% )$ , and $+ 0 . 3 \\%$ for ResT-Large $( 8 3 . 6 \\% )$ over Swin-S $( 8 3 . 3 \\% )$ using $2 2 4 \\times 2 2 4$ input. ",
746
+ "bbox": [
747
+ 174,
748
+ 828,
749
+ 825,
750
+ 911
751
+ ],
752
+ "page_idx": 5
753
+ },
754
+ {
755
+ "type": "table",
756
+ "img_path": "images/9459218cc931367384a13c5f9cc9e8d191a75bd229d337fadc472d484e517f6e.jpg",
757
+ "table_caption": [
758
+ "Table 2: Comparison with state-of-the-art backbones on ImageNet-1k benchmark. Throughput (images $/ s$ ) is measured on a single V100 GPU, following [26]. All models are trained and evaluated on $2 2 4 \\times 2 2 4$ resolution. The best records and the improvements over bench-marked ResNets are marked in bold and blue, respectively. "
759
+ ],
760
+ "table_footnote": [],
761
+ "table_body": "<table><tr><td>Model</td><td>#Params (M)</td><td>FLOPs (G)</td><td>Throughput</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td colspan=\"6\">ConvNet</td></tr><tr><td>ResNet-18 [11]</td><td>11.7</td><td>1.8</td><td>1852</td><td>69.7</td><td>89.1</td></tr><tr><td>ResNet-50 [11]</td><td>25.6</td><td>4.1</td><td>871</td><td>79.0</td><td>94.4</td></tr><tr><td>ResNet-101[11]</td><td>44.7</td><td>7.9</td><td>635</td><td>80.3</td><td>95.2</td></tr><tr><td>RegNetY-4G [22]</td><td>20.6</td><td>4.0</td><td>1156</td><td>79.4</td><td>94.7</td></tr><tr><td>RegNetY-8G [22]</td><td>39.2</td><td>8.0</td><td>591</td><td>79.9</td><td>94.9</td></tr><tr><td>RegNetY-16G [22]</td><td>83.6</td><td>15.9</td><td>334</td><td>80.4</td><td>95.1</td></tr><tr><td colspan=\"6\">Transformer</td></tr><tr><td>DeiT-S [26]</td><td>22.1</td><td>4.6</td><td>940</td><td>79.8</td><td>94.9</td></tr><tr><td>DeiT-B [26]</td><td>86.6</td><td>17.6</td><td>292</td><td>81.8</td><td>95.6</td></tr><tr><td>PVT-T [29]</td><td>13.2</td><td>1.9</td><td>1038</td><td>75.1</td><td>92.4</td></tr><tr><td>PVT-S [29]</td><td>24.5</td><td>3.7</td><td>820</td><td>79.8</td><td>94.9</td></tr><tr><td>PVT-M[29]</td><td>44.2</td><td>6.4</td><td>526</td><td>81.2</td><td>95.6</td></tr><tr><td>PVT-L [29]</td><td>61.4</td><td>9.5</td><td>367</td><td>81.7</td><td>95.9</td></tr><tr><td>Swin-T[19]</td><td>28.29</td><td>4.5</td><td>755</td><td>81.3</td><td>95.5</td></tr><tr><td>Swin-S[19]</td><td>49.61</td><td>8.7</td><td>437</td><td>83.3</td><td>96.2</td></tr><tr><td>Swin-B [19]</td><td>87.77</td><td>15.4</td><td>278</td><td>83.5</td><td>96.5</td></tr><tr><td>ResT-Lite (Ours)</td><td>10.49</td><td>1.4</td><td>1246</td><td>77.2 (个 7.5)</td><td>93.7 (个 4.6)</td></tr><tr><td>ResT-Small (Ours)</td><td>13.66</td><td>1.9</td><td>1043</td><td>79.6 (个 9.9)</td><td>94.9 (个 5.8)</td></tr><tr><td>ResT-Base (Ours)</td><td>30.28</td><td>4.3</td><td>673</td><td>81.6 (个 2.6)</td><td>95.7 (个 1.3)</td></tr><tr><td>ResT-Large (Ours)</td><td>51.63</td><td>7.9</td><td>429</td><td>83.6 (↑ 3.3)</td><td>96.3 (个 1.1)</td></tr></table>",
762
+ "bbox": [
763
+ 176,
764
+ 159,
765
+ 821,
766
+ 525
767
+ ],
768
+ "page_idx": 6
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "",
773
+ "bbox": [
774
+ 178,
775
+ 559,
776
+ 821,
777
+ 588
778
+ ],
779
+ "page_idx": 6
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "Compared with the state-of-the-art ConvNets, i.e., RegNet, the ResT with similar model complexity also achieves better performance: an average improvement of $1 . 7 \\%$ in terms of Top-1 Accuracy. Note that RegNet is trained via thorough architecture search, the proposed ResT is adapted from the standard Transformer and has strong potential for further improvement. ",
784
+ "bbox": [
785
+ 174,
786
+ 594,
787
+ 825,
788
+ 650
789
+ ],
790
+ "page_idx": 6
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "3.2 Object Detection and Instance Segmentation on COCO ",
795
+ "text_level": 1,
796
+ "bbox": [
797
+ 174,
798
+ 670,
799
+ 596,
800
+ 685
801
+ ],
802
+ "page_idx": 6
803
+ },
804
+ {
805
+ "type": "text",
806
+ "text": "Settings. Object detection and instance segmentation experiments are conducted on COCO 2017, which contains $1 1 8 \\mathrm { k }$ training, 5k validation, and $2 0 \\mathrm { k }$ test-dev images. We evaluate the performance of ResT using two representative frameworks: RetinaNet [18] and Mask RCNN [10]. For these two frameworks, we utilize the same settings: multi-scale training (resizing the input such that the shorter side is between 480 and 800 while the longer side is at most 1333), AdamW [20] optimizer (initial learning rate of 1e-4, weight decay of 0.05, and batch size of 16), and $1 \\times$ schedule (12 epochs). Unlike CNN backbones, which adopt post normalization and can directly apply to downstream tasks. ResT employs the pre-normalization strategy to accelerate network convergence, which means the output of each stage is not normalized before feeding to FPN [17]. Here, we add a layer normalization (LN [1]) for the output of each stage (before FPN [17]), similar to Swin [19]. Results are reported on the validation split. ",
807
+ "bbox": [
808
+ 173,
809
+ 696,
810
+ 826,
811
+ 849
812
+ ],
813
+ "page_idx": 6
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "Object Detection Results. Table 3 lists the results of RetinaNet with different backbones. From these results, it can be seen that for smaller models, ResT-Small is $+ 3 . 6$ box AP higher (40.3 vs. 36.7) than PVT-T with a similar computation cost. For larger models, our ResT-Base surpassing the PVT-S by $+ 1 . 6$ box AP. ",
818
+ "bbox": [
819
+ 174,
820
+ 856,
821
+ 823,
822
+ 911
823
+ ],
824
+ "page_idx": 6
825
+ },
826
+ {
827
+ "type": "table",
828
+ "img_path": "images/5bbc78174bf9cf69c8092a5a0f5ba0a0ef2e98093dfad58d2f51f7ab1b0433a0.jpg",
829
+ "table_caption": [
830
+ "Table 3: Object detection performance on the COCO val2017 split using the RetinaNet framework. "
831
+ ],
832
+ "table_footnote": [],
833
+ "table_body": "<table><tr><td>Backbones</td><td>AP50:95</td><td>AP50</td><td>AP75</td><td>APs</td><td>APm</td><td>AP1</td><td>Param (M)</td></tr><tr><td>R18[11]</td><td>31.8</td><td>49.6</td><td>33.6</td><td>16.3</td><td>34.3</td><td>43.2</td><td>21.3</td></tr><tr><td>PVT-T[29]</td><td>36.7</td><td>56.9</td><td>38.9</td><td>22.6</td><td>38.8</td><td>50.0</td><td>23.0</td></tr><tr><td>ResT-Smal(Ours)</td><td>40.3</td><td>61.3</td><td>42.7</td><td>25.7</td><td>43.7</td><td>51.2</td><td>23.4</td></tr><tr><td>R50 [11]</td><td>37.4</td><td>56.7</td><td>40.3</td><td>23.1</td><td>41.6</td><td>48.3</td><td>37.9</td></tr><tr><td>PVT-S [29]</td><td>40.4</td><td>61.3</td><td>43.0</td><td>25.0</td><td>42.9</td><td>55.7</td><td>34.2</td></tr><tr><td>Swin-T[19]</td><td>41.5</td><td>62.1</td><td>44.1</td><td>27.0</td><td>44.2</td><td>53.2</td><td>38.5</td></tr><tr><td>ResT-Base (Ours)</td><td>42.0</td><td>63.2</td><td>44.8</td><td>29.1</td><td>45.3</td><td>53.3</td><td>40.5</td></tr><tr><td>R101[11]</td><td>38.5</td><td>57.8</td><td>41.2</td><td>21.4</td><td>42.6</td><td>51.1</td><td>56.9</td></tr><tr><td>PVT-M[29]</td><td>41.9</td><td>63.1</td><td>44.3</td><td>25.0</td><td>44.9</td><td>57.6</td><td>53.9</td></tr><tr><td>Swin-S[19]</td><td>44.5</td><td>65.7</td><td>47.5</td><td>27.4</td><td>48.0</td><td>59.9</td><td>59.8</td></tr><tr><td>ResT-Large (Ours)</td><td>44.8</td><td>66.1</td><td>48.0</td><td>28.3</td><td>48.7</td><td>60.3</td><td>61.8</td></tr></table>",
834
+ "bbox": [
835
+ 173,
836
+ 127,
837
+ 831,
838
+ 324
839
+ ],
840
+ "page_idx": 7
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "Instance Segmentation Results. Table 4 compares the results of ResT with those of previous state-of-the-art models on the Mask RCNN framework. Rest-Small exceeds PVT-T by $+ 2 . 9$ box AP and $+ 2 . 1$ mask AP on the COCO val2017 split. As for larger models, ResT-Base brings consistent $+ 1 . 2$ and $+ 0 . 9$ gains over PVT-S in terms of box AP and mask AP, with slightly larger model size. ",
845
+ "bbox": [
846
+ 173,
847
+ 357,
848
+ 826,
849
+ 412
850
+ ],
851
+ "page_idx": 7
852
+ },
853
+ {
854
+ "type": "table",
855
+ "img_path": "images/835527b7d742de32636f660e03efce02769c34beeb0b2c4e5101ea925477ba77.jpg",
856
+ "table_caption": [
857
+ "Table 4: Object detection and instance segmentation performance on the COCO val2017 split using Mask RCNN framework. "
858
+ ],
859
+ "table_footnote": [],
860
+ "table_body": "<table><tr><td>Backbones</td><td>APbox</td><td>APbgx</td><td>APbg</td><td>Apmask</td><td>APmask</td><td>APmask</td><td>Param (M)</td></tr><tr><td>R18[11]</td><td>34.0</td><td>54.0</td><td>36.7</td><td>31.2</td><td>51.0</td><td>32.7</td><td>31.2</td></tr><tr><td>PVT-T [29]</td><td>36.7</td><td>59.2</td><td>39.3</td><td>35.1</td><td>56.7</td><td>37.3</td><td>32.9</td></tr><tr><td>ResT-Small(Ours)</td><td>39.6</td><td>62.9</td><td>42.3</td><td>37.2</td><td>59.8</td><td>39.7</td><td>33.3</td></tr><tr><td>R50[11]</td><td>38.6</td><td>59.5</td><td>42.1</td><td>35.2</td><td>56.3</td><td>37.5</td><td>44.3</td></tr><tr><td>PVT-S[29]</td><td>40.4</td><td>62.9</td><td>43.8</td><td>37.8</td><td>60.1</td><td>40.3</td><td>44.1</td></tr><tr><td>ResT-Base(Ours)</td><td>41.6</td><td>64.9</td><td>45.1</td><td>38.7</td><td>61.6</td><td>41.4</td><td>49.8</td></tr></table>",
861
+ "bbox": [
862
+ 173,
863
+ 467,
864
+ 825,
865
+ 589
866
+ ],
867
+ "page_idx": 7
868
+ },
869
+ {
870
+ "type": "text",
871
+ "text": "3.3 Ablation Study ",
872
+ "text_level": 1,
873
+ "bbox": [
874
+ 174,
875
+ 622,
876
+ 318,
877
+ 637
878
+ ],
879
+ "page_idx": 7
880
+ },
881
+ {
882
+ "type": "text",
883
+ "text": "In this section, we report the ablation studies of the proposed ResT, using ImageNet-1k image classification. To thoroughly investigate the important design elements, we only adopt the simplest data augmentation and hyper-parameters settings in [11]. Specifically, the input images are randomly cropped to $2 2 4 \\times 2 2 4$ with random horizontal flipping. All the architectures of ResT-Lite are trained with SGD optimizer (with weight decay 1e-4 and momentum 0.9) for 100 epochs, starting from the initial learning rate of $0 . 1 \\times$ batch_size/512 (with a linear warm-up of 5 epochs) and decreasing it by a factor of 10 every 30 epochs. Also, a batch size of 2048 (using 8 GPUs with 256 images per GPU) is used. ",
884
+ "bbox": [
885
+ 173,
886
+ 648,
887
+ 825,
888
+ 760
889
+ ],
890
+ "page_idx": 7
891
+ },
892
+ {
893
+ "type": "text",
894
+ "text": "Different types of stem module. Here, we test three type of stem modules: (1) the first patch embedding module in PVT [29], i.e., $4 \\times 4$ convolution operation with stride 4 and no padding; (2) the stem module in ResNet [11], i.e., one $7 \\times 7$ convolution layer with stride 2 and padding 3, followed by one $3 \\times 3$ max-pooling layer; (3) the stem module in the proposed ResT, i.e., three $3 \\times 3$ convolutional layers (all with padding 1) with stride 2, stride 1, and stride 2, respectively. We report the results in Table 5. The stem module in the proposed ResT is more effective than that in PVT and ResNet: $+ 0 . 9 2 \\%$ and $+ 0 . 6 4 \\%$ improvements in terms of Top-1 accuracy, respectively. ",
895
+ "bbox": [
896
+ 173,
897
+ 766,
898
+ 825,
899
+ 863
900
+ ],
901
+ "page_idx": 7
902
+ },
903
+ {
904
+ "type": "text",
905
+ "text": "Ablation study on EMSA. As shown in Figure!3, we adopt a Depth-wise Conv2d to reduce the computation of MSA. Here, we provide the comparison of more strategies with the same reduction stride $s$ . Results are shown in Table 6. As can be seen, average pooling achieves slightly worse results $( - 0 . 2 4 \\% )$ compared with the original Depth-wise Conv2d, while the results of the Max Pooling strategy are the worst. Since the pooling operation introduces no extra parameters, therefore, average pooling can be an alternative to Depth-wise Conv2d in practice. ",
906
+ "bbox": [
907
+ 176,
908
+ 869,
909
+ 823,
910
+ 911
911
+ ],
912
+ "page_idx": 7
913
+ },
914
+ {
915
+ "type": "table",
916
+ "img_path": "images/89eebc1e7336299fab3a378eab802ed80f097e317098f7c13f486af1ffb4081f.jpg",
917
+ "table_caption": [
918
+ "Table 5: Comparison of various stem modules on ResT-Lite. Results show that the proposed stem module is more effective than existing ones in PVT and ResNet. "
919
+ ],
920
+ "table_footnote": [],
921
+ "table_body": "<table><tr><td>Stem</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>PVT[29]</td><td>71.96</td><td>89.87</td></tr><tr><td>ResNet [11]</td><td>72.24</td><td>90.17</td></tr><tr><td>ResT (Ours)</td><td>72.88</td><td>90.62</td></tr></table>",
922
+ "bbox": [
923
+ 194,
924
+ 150,
925
+ 473,
926
+ 236
927
+ ],
928
+ "page_idx": 8
929
+ },
930
+ {
931
+ "type": "table",
932
+ "img_path": "images/177963f0644f05be43bff9a6ca3761b5fca26a84e36b0348eb0554ae4717acc9.jpg",
933
+ "table_caption": [
934
+ "Table 6: Comparison of different reduction strategies of EMSA on ResT-Lite. Results show that Average Pooling can be an alternative to Depthwise Conv2d to make a trade-off. "
935
+ ],
936
+ "table_footnote": [],
937
+ "table_body": "<table><tr><td>Reduction</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>DWConv</td><td>72.88</td><td>90.62</td></tr><tr><td>Avg Pooling</td><td>72.64</td><td>90.41</td></tr><tr><td>Max Pooling</td><td>72.20</td><td>89.97</td></tr></table>",
938
+ "bbox": [
939
+ 521,
940
+ 150,
941
+ 805,
942
+ 236
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "",
949
+ "bbox": [
950
+ 176,
951
+ 272,
952
+ 826,
953
+ 314
954
+ ],
955
+ "page_idx": 8
956
+ },
957
+ {
958
+ "type": "table",
959
+ "img_path": "images/0b0677116967f1395ee67d41e4f241c4a173fbd747b2060aa61c6bcb8eb2f094.jpg",
960
+ "table_caption": [
961
+ "Table 7: Ablation study results on the important design elements of EMSA on ResT-Lite, including the $1 \\times 1$ convolution operation and Instance Normalization in Eq. 4. "
962
+ ],
963
+ "table_footnote": [],
964
+ "table_body": "<table><tr><td>Methods</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>origin</td><td>72.88</td><td>90.62</td></tr><tr><td>w/o IN</td><td>71.98</td><td>90.32</td></tr><tr><td>w/o Conv-1&amp;IN</td><td>71.72</td><td>89.93</td></tr></table>",
965
+ "bbox": [
966
+ 181,
967
+ 402,
968
+ 486,
969
+ 489
970
+ ],
971
+ "page_idx": 8
972
+ },
973
+ {
974
+ "type": "table",
975
+ "img_path": "images/d5e1eba93f600477d87ea0311fa8ed6bddf576823e4ce94af8167c9b1c114890.jpg",
976
+ "table_caption": [
977
+ "Table 8: Comparison of various positional encoding (PE) strategies on ResT-Lite. "
978
+ ],
979
+ "table_footnote": [],
980
+ "table_body": "<table><tr><td>Encoding</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>w/o position</td><td>71.54</td><td>89.82</td></tr><tr><td>+LE</td><td>71.98</td><td>90.32</td></tr><tr><td>+ GL</td><td>72.04</td><td>90.41</td></tr><tr><td>+ PA</td><td>72.88</td><td>90.62</td></tr></table>",
981
+ "bbox": [
982
+ 524,
983
+ 380,
984
+ 803,
985
+ 486
986
+ ],
987
+ "page_idx": 8
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "In addition, EMSA also adding two important elements to the standard MSA, i.e., one $1 \\times 1$ convolution operation to model the interaction among different heads, and the Instance Normalization(IN) to restore diversity of different heads. Here, we validate the effectiveness of these two settings. Results are shown in Table 7. We can see, without IN, the Top-1 accuracy is degraded by $0 . 9 \\%$ , we attribute it to the destroying of diversity among different heads because the $1 \\times 1$ convolution operation makes all heads focus on all the tokens. In addition, the performance drops $1 . 1 6 \\%$ without the convolution operation and IN. This can demonstrate that the combination of long sequence and diversity are both important for attention function. ",
992
+ "bbox": [
993
+ 173,
994
+ 513,
995
+ 825,
996
+ 626
997
+ ],
998
+ "page_idx": 8
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "Different types of positional encoding. In section 2.4, we introduced 3 types of positional encoding types, i.e., the original learnable parameters with fixed lengths [5] (LE), the proposed group linear mode(GL), and PA mode. These encodings are added/multiplied to the input patch token at the beginning of each stage. Here, we compared the proposed GL and PA with LE, results are shown in Table 8. We can see, the Top-1 accuracy degrades from $7 2 . 8 8 \\%$ to $7 1 . 5 4 \\%$ when the PA encoding is removed, this means that positional encoding is crucial for ResT. The LE and GL, achieve similar performance, which means it is possible to construct variable length of positional encoding. Moreover, the PA mode significantly surpasses the GL, achieving $0 . 8 4 \\%$ Top-1 accuracy improvement, which indicates that spatial attention can also be modeled as positional encoding. ",
1003
+ "bbox": [
1004
+ 174,
1005
+ 631,
1006
+ 825,
1007
+ 757
1008
+ ],
1009
+ "page_idx": 8
1010
+ },
1011
+ {
1012
+ "type": "text",
1013
+ "text": "4 Conclusion ",
1014
+ "text_level": 1,
1015
+ "bbox": [
1016
+ 174,
1017
+ 789,
1018
+ 297,
1019
+ 806
1020
+ ],
1021
+ "page_idx": 8
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "In this paper, we proposed ResT, a new version of multi-scale Transformer which produces hierarchical feature representations for dense prediction. We compressed the memory of standard MSA and model the interaction between multi-heads while keeping the diversity ability. To tackle input images with arbitrary, we further redesign the positional encoding as spatial attention. Experimental results demonstrate that the potential of ResT as strong backbones for dense prediction. We hope that our approach will foster further research in visual recognition. ",
1026
+ "bbox": [
1027
+ 174,
1028
+ 827,
1029
+ 825,
1030
+ 911
1031
+ ],
1032
+ "page_idx": 8
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Acknowledgments and Disclosure of Funding ",
1037
+ "text_level": 1,
1038
+ "bbox": [
1039
+ 174,
1040
+ 88,
1041
+ 553,
1042
+ 107
1043
+ ],
1044
+ "page_idx": 9
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "This work is funded by the Natural Science Foundation of China (No. 62176119) and the program B for Outstanding PhD candidate of Nanjing University. ",
1049
+ "bbox": [
1050
+ 176,
1051
+ 121,
1052
+ 823,
1053
+ 148
1054
+ ],
1055
+ "page_idx": 9
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "References ",
1060
+ "text_level": 1,
1061
+ "bbox": [
1062
+ 174,
1063
+ 167,
1064
+ 266,
1065
+ 184
1066
+ ],
1067
+ "page_idx": 9
1068
+ },
1069
+ {
1070
+ "type": "text",
1071
+ "text": "[1] Lei Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. CoRR, abs/1607.06450, 2016. \n[2] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, Computer Vision - ECCV 2020 - 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part I, volume 12346 of Lecture Notes in Computer Science, pages 213–229. Springer, 2020. \n[3] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. CoRR, abs/2012.00364, 2020. \n[4] Ekin Dogus Cubuk, Barret Zoph, Jon Shlens, and Quoc Le. Randaugment: Practical automated data augmentation with a reduced search space. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. \n[5] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net, 2021. \n[6] Peng Gao, Jiasen Lu, Hongsheng Li, Roozbeh Mottaghi, and Aniruddha Kembhavi. Container: Context aggregation network. CoRR, abs/2106.01401, 2021. \n[7] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In Geoffrey J. Gordon, David B. Dunson, and Miroslav Dudík, editors, Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2011, Fort Lauderdale, USA, April 11-13, 2011, volume 15 of JMLR Proceedings, pages 315–323. JMLR.org, 2011. \n[8] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. CoRR, abs/2103.00112, 2021. \n[9] Karttikeya Mangalam Yanghao Li Zhicheng Yan Jitendra Malik Christoph Feichtenhofer Haoqi Fan, Bo Xiong. Multiscale vision transformers. arXiv:2104.11227, 2021. \n[10] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross B. Girshick. Mask R-CNN. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2980–2988. IEEE Computer Society, 2017. \n[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 770–778. IEEE Computer Society, 2016. \n[12] Dan Hendrycks and Kevin Gimpel. Bridging nonlinearities and stochastic regularizers with gaussian error linear units. CoRR, abs/1606.08415, 2016. \n[13] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q. Weinberger. Deep networks with stochastic depth. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part IV, volume 9908 of Lecture Notes in Computer Science, pages 646–661. Springer, 2016. \n[14] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Francis R. Bach and David M. Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, volume 37 of JMLR Workshop and Conference Proceedings, pages 448–456. JMLR.org, 2015. \n[15] Md. Amirul Islam, Sen Jia, and Neil D. B. Bruce. How much position information do convolutional neural networks encode? In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. \n[16] Xiang Li, Wenhai Wang, Xiaolin Hu, and Jian Yang. Selective kernel networks. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 510–519. Computer Vision Foundation / IEEE, 2019. \n[17] Tsung-Yi Lin, Piotr Dollár, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid networks for object detection. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 936–944, 2017. \n[18] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2999–3007. IEEE Computer Society, 2017. \n[19] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. CoRR, abs/2103.14030, 2021. \n[20] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019. \n[21] Niki Parmar, Prajit Ramachandran, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jon Shlens. Stand-alone self-attention in vision models. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 68–80, 2019. \n[22] Ilija Radosavovic, Raj Prateek Kosaraju, Ross B. Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 10425–10433. IEEE, 2020. \n[23] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. CoRR, abs/2101.11605, 2021. \n[24] Zhi Tian, Chunhua Shen, and Hao Chen. Conditional convolutions for instance segmentation. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, 16th European Conference on Computer Vision, ECCV 2020, Glasgow, UK, August 23-28, 2020, Proceedings, Part I, volume 12346 of Lecture Notes in Computer Science, pages 282–298. Springer, 2020. \n[25] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. FCOS: A simple and strong anchor-free object detector. CoRR, abs/2006.09214, 2020. \n[26] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. CoRR, abs/2012.12877, 2020. \n[27] Dmitry Ulyanov, Andrea Vedaldi, and Victor S. Lempitsky. Instance normalization: The missing ingredient for fast stylization. CoRR, abs/1607.08022, 2016. \n[28] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5998–6008, 2017. \n[29] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. \n[30] Xiaolong Wang, Ross B. Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. CoRR, abs/1711.07971, 2017. \n[31] Xinlong Wang, Rufeng Zhang, Tao Kong, Lei Li, and Chunhua Shen. Solov2: Dynamic, faster and stronger. CoRR, abs/2003.10152, 2020. \n[32] Saining Xie, Ross B. Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 5987–5995. IEEE Computer Society, 2017. \n[33] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis E. H. Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. CoRR, abs/2101.11986, 2021. \n[34] Sangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh, Youngjoon Yoo, and Junsuk Choe. Cutmix: Regularization strategy to train strong classifiers with localizable features. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 6022–6031. IEEE, 2019. \n[35] Hongyi Zhang, Moustapha Cissé, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018. \n[36] Hang Zhang, Chongruo Wu, Zhongyue Zhang, Yi Zhu, Zhi Zhang, Haibin Lin, Yue Sun, Tong He, Jonas Mueller, R. Manmatha, Mu Li, and Alexander J. Smola. Resnest: Split-attention networks. CoRR, abs/2004.08955, 2020. \n[37] Qing-Long Zhang, Lu Rao, and Yubin Yang. Group-cam: Group score-weighted visual explanations for deep convolutional networks. CoRR, abs/2103.13859, 2021. \n[38] Qing-Long Zhang and Yu-Bin Yang. Sa-net: Shuffle attention for deep convolutional neural networks. CoRR, abs/2102.00240, 2021. \n[39] Zelin Zhao, Karan Samel, Binghong Chen, and Le Song. Proto: Program-guided transformer for programguided tasks. CoRR, abs/2110.00804, 2021. \n[40] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 13001– 13008. AAAI Press, 2020. \n[41] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable DETR: deformable transformers for end-to-end object detection. CoRR, abs/2010.04159, 2020. ",
1072
+ "bbox": [
1073
+ 173,
1074
+ 193,
1075
+ 826,
1076
+ 911
1077
+ ],
1078
+ "page_idx": 9
1079
+ },
1080
+ {
1081
+ "type": "text",
1082
+ "text": "",
1083
+ "bbox": [
1084
+ 171,
1085
+ 97,
1086
+ 828,
1087
+ 875
1088
+ ],
1089
+ "page_idx": 10
1090
+ }
1091
+ ]
parse/train/6Ab68Ip4Mu/6Ab68Ip4Mu_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/6Ab68Ip4Mu/6Ab68Ip4Mu_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJ0Ee8cxx/BJ0Ee8cxx.md ADDED
@@ -0,0 +1,267 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # HIERARCHICAL MEMORY NETWORKS
2
+
3
+ Sarath Chandar∗1, Sungjin $\mathbf { A } \mathbf { h } \mathbf { n } ^ { 1 }$ , Hugo Larochelle2,4, Pascal Vincent1,4, Gerald Tesauro3, Yoshua Bengio1,4
4
+
5
+ 1 Université de Montréal, Canada.
6
+ 2 Twitter, USA.
7
+ 3 IBM Watson Research Center, USA.
8
+ 4 CIFAR, Canada.
9
+
10
+ # ABSTRACT
11
+
12
+ Memory networks are neural networks with an explicit memory component that can be both read and written to by the network. The memory is often addressed in a soft way using a softmax function, making end-to-end training with backpropagation possible. However, this is not computationally scalable for applications which require the network to read from extremely large memories. On the other hand, it is well known that hard attention mechanisms based on reinforcement learning are challenging to train successfully. In this paper, we explore a form of hierarchical memory network, which can be considered as a hybrid between hard and soft attention memory networks. The memory is organized in a hierarchical structure such that reading from it is done with less computation than soft attention over a flat memory, while also being easier to train than hard attention over a flat memory. Specifically, we propose to incorporate Maximum Inner Product Search (MIPS) in the training and inference procedures for our hierarchical memory network. We explore the use of various state-of-the art approximate MIPS techniques and report results on SimpleQuestions, a challenging large scale factoid question answering task.
13
+
14
+ # 1 INTRODUCTION
15
+
16
+ Until recently, traditional machine learning approaches for challenging tasks such as image captioning, object detection, or machine translation have consisted in complex pipelines of algorithms, each being separately tuned for better performance. With the recent success of neural networks and deep learning research, it has now become possible to train a single model end-to-end, using backpropagation. Such end-to-end systems often outperform traditional approaches, since the entire model is directly optimized with respect to the final task at hand. However, simple encode-decode style neural networks often underperform on knowledge-based reasoning tasks like question-answering or dialog systems. Indeed, in such cases it is nearly impossible for regular neural networks to store all the necessary knowledge in their parameters.
17
+
18
+ Neural networks with memory (Graves et al., 2014; Weston et al., 2015b) can deal with knowledge bases by having an external memory component which can be used to explicitly store knowledge. The memory is accessed by reader and writer functions, which are both made differentiable so that the entire architecture (neural network, reader, writer and memory components) can be trained end-to-end using backpropagation. Memory-based architectures can also be considered as generalizations of RNNs and LSTMs, where the memory is analogous to recurrent hidden states. However they are much richer in structure and can handle very long-term dependencies because once a vector (i.e., a memory) is stored, it is copied from time step to time step and can thus stay there for a very long time (and gradients correspondingly flow back time unhampered).
19
+
20
+ There exists several variants of neural networks with a memory component: Memory Networks (Weston et al., 2015b), Neural Turing Machines (NTM) (Graves et al., 2014), Dynamic Memory Networks (DMN) (Kumar et al., 2015). They all share five major components: memory, input module, reader, writer, and output module.
21
+
22
+ Memory: The memory is an array of cells, each capable of storing a vector. The memory is often initialized with external data (e.g. a database of facts), by filling in its cells with a pre-trained vector representations of that data.
23
+
24
+ Input module: The input module is to compute a representation of the input that can be used by other modules.
25
+
26
+ Writer: The writer takes the input representation and updates the memory based on it. The writer can be as simple as filling the slots in the memory with input vectors in a sequential way (as often done in memory networks). If the memory is bounded, instead of sequential writing, the writer has to decide where to write and when to rewrite cells (as often done in NTMs).
27
+
28
+ Reader: Given an input and the current state of the memory, the reader retrieves content from the memory, which will then be used by an output module. This often requires comparing the input’s representation or a function of the recurrent state with memory cells using some scoring function such as a dot product.
29
+
30
+ Output module: Given the content retrieved by the reader, the output module generates a prediction, which often takes the form of a conditional distribution over multiple labels for the output.
31
+
32
+ For the rest of the paper, we will use the name memory network to describe any model which has any form of these five components. We would like to highlight that all the components except the memory are learnable. Depending on the application, any of these components can also be fixed. In this paper, we will focus on the situation where a network does not write and only reads from the memory.
33
+
34
+ In this paper, we focus on the application of memory networks to large-scale tasks. Specifically, we focus on large scale factoid question answering. For this problem, given a large set of facts and a natural language question, the goal of the system is to answer the question by retrieving the supporting fact for that question, from which the answer can be derived. Application of memory networks to this task has been studied by Bordes et al. (2015). However, Bordes et al. (2015) depended on keyword based heuristics to filter the facts to a smaller set which is manageable for training. However heuristics are invariably dataset dependent and we are interested in a more general solution which can be used when the facts are of any structure. One can design soft attention retrieval mechanisms, where a convex combination of all the cells is retrieved or design hard attention retrieval mechanisms where one or few cells from the memory are retrieved. Soft attention is achieved by using softmax over the memory which makes the reader differentiable and hence learning can be done using gradient descent. Hard attention is achieved by using methods like REINFORCE (Williams, 1992), which provides a noisy gradient estimate when discrete stochastic decisions are made by a model.
35
+
36
+ Both soft attention and hard attention have limitations. As the size of the memory grows, soft attention using softmax weighting is not scalable. It is computationally very expensive, since its complexity is linear in the size of the memory. Also, at initialization, gradients are dispersed so much that it can reduce the effectiveness of gradient descent. These problems can be alleviated by a hard attention mechanism, for which the training method of choice is REINFORCE. However, REINFORCE can be brittle due to its high variance and existing variance reduction techniques are complex. Thus, it is rarely used in memory networks (even in cases of a small memory).
37
+
38
+ In this paper, we propose a new memory selection mechanism based on Maximum Inner Product Search (MIPS) which is both scalable and easy to train. This can be considered as a hybrid of soft and hard attention mechanisms. The key idea is to structure the memory in a hierarchical way such that it is easy to perform MIPS, hence the name Hierarchical Memory Network (HMN). HMNs are scalable at both training and inference time. The main contributions of the paper are as follows:
39
+
40
+ • We explore hierarchical memory networks, where the memory is organized in a hierarchical fashion, which allows the reader to efficiently access only a subset of the memory. • While there are several ways to decide which subset to access, we propose to pose memory access as a maximum inner product search (MIPS) problem.
41
+
42
+ • We empirically show that exact MIPS-based algorithms not only enjoy similar convergence as soft attention models, but can even improve the performance of the memory network. • Since exact MIPS is as computationally expensive as a full soft attention model, we propose to train the memory networks using approximate MIPS techniques for scalable memory access. • We empirically show that unlike exact MIPS, approximate MIPS algorithms provide a speedup and scalability of training, though at the cost of some performance.
43
+
44
+ # 2 HIERARCHICAL MEMORY NETWORKS
45
+
46
+ In this section, we describe the proposed Hierarchical Memory Network (HMN). In this paper, HMNs only differ from regular memory networks in two of its components: the memory and the reader.
47
+
48
+ Memory: Instead of a flat array of cells for the memory structure, HMNs leverages a hierarchical memory structure. Memory cells are organized into groups and the groups can further be organized into higher level groups. The choice for the memory structure is tightly coupled with the choice of reader, which is essential for fast memory access. We consider three classes of approaches for the memory’s structure: hashing-based approaches, tree-based approaches, and clustering-based approaches. This is explained in detail in the next section.
49
+
50
+ Reader: The reader in the HMN is different from the readers in flat memory networks. Flat memorybased readers use either soft attention over the entire memory or hard attention that retrieves a single cell. While these mechanisms might work with small memories, with HMNs we are more interested in achieving scalability towards very large memories. So instead, HMN readers use soft attention only over a selected subset of the memory. Selecting memory subsets is guided by a maximum inner product search algorithm, which can exploit the hierarchical structure of the organized memory to retrieve the most relevant facts in sub-linear time. The MIPS-based reader is explained in more detail in the next section.
51
+
52
+ In HMNs, the reader is thus trained to create MIPS queries such that it can retrieve a sufficient set of facts. While most of the standard applications of MIPS (Ram & Gray, 2012; Bachrach et al., 2014; Shrivastava & Li, 2014) so far have focused on settings where both query vector and database (memory) vectors are precomputed and fixed, memory readers in HMNs are learning to do MIPS by updating the input representation such that the result of MIPS retrieval contains the correct fact(s).
53
+
54
+ # 3 MEMORY READER WITH $K$ -MIPS ATTENTION
55
+
56
+ In this section, we describe how the HMN memory reader uses Maximum Inner Product Search (MIPS) during learning and inference.
57
+
58
+ We begin with a formal definition of $K$ -MIPS. Given a set of points ${ \mathcal { X } } = \{ x _ { 1 } , \ldots , x _ { n } \}$ and a query vector $q$ , our goal is to find
59
+
60
+ $$
61
+ \mathrm { a r g m a x } _ { i \in \mathcal { X } } ^ { ( K ) } \ q ^ { \top } x _ { i }
62
+ $$
63
+
64
+ where the $\mathrm { a r g m a x } ^ { ( K ) }$ returns the indices of the top- $K$ maximum values. In the case of HMNs, $\mathcal { X }$ corresponds to the memory and $q$ corresponds to the vector computed by the input module.
65
+
66
+ A simple but inefficient solution for $K$ -MIPS involves a linear search over the cells in memory by performing the dot product of $q$ with all the memory cells. While this will return the exact result for $K$ -MIPS, it is too costly to perform when we deal with a large-scale memory. However, in many practical applications, it is often sufficient to have an approximate result for $K$ -MIPS, trading speed-up at the cost of the accuracy. There exist several approximate $K$ -MIPS solutions in the literature (Shrivastava & Li, 2014; 2015; Bachrach et al., 2014; Neyshabur & Srebro, 2015).
67
+
68
+ All the approximate $K$ -MIPS solutions add a form of hierarchical structure to the memory and visit only a subset of the memory cells to find the maximum inner product for a given query. Hashingbased approaches (Shrivastava & Li, 2014; 2015; Neyshabur & Srebro, 2015) hash cells into multiple bins, and given a query they search for $K$ -MIPS cell vectors only in bins that are close to the bin associated with the query. Tree-based approaches (Ram & Gray, 2012; Bachrach et al., 2014) create search trees with cells in the leaves of the tree. Given a query, a path in the tree is followed and MIPS is performed only for the leaf for the chosen path. Clustering-based approaches (Auvolat et al., 2015) cluster cells into multiple clusters (or a hierarchy of clusters) and given a query, they perform MIPS on the centroids of the top few clusters. We refer the readers to (Auvolat et al., 2015) for an extensive comparison of various state-of-the-art approaches for approximate $K$ -MIPS.
69
+
70
+ Our proposal is to exploit this rich approximate $K$ -MIPS literature to achieve scalable training and inference in HMNs. Instead of filtering the memory with heuristics, we propose to organize the memory based on approximate $K$ -MIPS algorithms and then train the reader to learn to perform MIPS. Specifically, consider the following softmax over the memory which the reader has to perform for every reading step to retrieve a set of relevant candidates:
71
+
72
+ $$
73
+ R _ { o u t } = \operatorname { s o f t m a x } ( h ( q ) M ^ { T } )
74
+ $$
75
+
76
+ where $h ( q ) \in \mathbb { R } ^ { d }$ is the representation of the query, $M \in \mathbb { R } ^ { N \times d }$ is the memory with $N$ being the total number of cells in the memory. We propose to replace this softmax with softmax(K) which is defined as follows:
77
+
78
+ $$
79
+ C = \mathrm { a r g m a x } ^ { ( K ) } h ( q ) M ^ { T }
80
+ $$
81
+
82
+ $$
83
+ R _ { o u t } = \operatorname { s o f t m a x } ^ { ( K ) } ( h ( q ) M ^ { T } ) = \operatorname { s o f t m a x } ( h ( q ) M [ C ] ^ { T } )
84
+ $$
85
+
86
+ where $C$ is the indices of top- $K$ MIP candidate cells and $M [ C ]$ is a sub-matrix of $M$ where the rows are indexed by $C$ .
87
+
88
+ One advantage of using the softmax(K) is that it naturally focuses on cells that would normally receive the strongest gradients during learning. That is, in a full softmax, the gradients are otherwise more dispersed across cells, given the large number of cells and despite many contributing a small gradient. As our experiments will show, this results in slower training.
89
+
90
+ One problematic situation when learning with the softmax(K) is when we are at the initial stages of training and the $K$ -MIPS reader is not including the correct fact candidate. To avoid this issue, we always include the correct candidate to the top- $K$ candidates retrieved by the $K$ -MIPS algorithm, effectively performing a fully supervised form of learning.
91
+
92
+ During training, the reader is updated by backpropagation from the output module, through the subset of memory cells. Additionally, the log-likelihood of the correct fact computed using $K$ - softmax is also maximized. This second supervision helps the reader learn to modify the query such that the maximum inner product of the query with respect to the memory will yield the correct supporting fact in the top $K$ candidate set.
93
+
94
+ Until now, we described the exact $K$ -MIPS-based learning framework, which still requires a linear look-up over all memory cells and would be prohibitive for large-scale memories. In such scenarios, we can replace the exact $K$ -MIPS in the training procedure with the approximate $K$ -MIPS. This is achieved by deploying a suitable memory hierarchical structure. The same approximate $K$ -MIPSbased reader can be used during inference stage as well. Of course, approximate $K$ -MIPS algorithms might not return the exact MIPS candidates and will likely to hurt performance, but at the benefit of achieving scalability.
95
+
96
+ While the memory representation is fixed in this paper, updating the memory along with the query representation should improve the likelihood of choosing the correct fact. However, updating the memory will reduce the precision of the approximate $K$ -MIPS algorithms, since all of them assume that the vectors in the memory are static. Designing efficient dynamic $K$ -MIPS should improve the performance of HMNs even further, a challenge that we hope to address in future work.
97
+
98
+ # 3.1 READER WITH CLUSTERING-BASED APPROXIMATE $K$ -MIPS
99
+
100
+ Clustering-based approximate $K$ -MIPS was proposed in (Auvolat et al., 2015) and it has been shown to outperform various other state-of-the-art data dependent and data independent approximate $K$ - MIPS approaches for inference tasks. As we will show in the experiments section, clustering-based MIPS also performs better when used to training HMNs. Hence, we focus our presentation on the clustering-based approach and propose changes that were found to be helpful for learning HMNs.
101
+
102
+ Following most of the other approximate $K$ -MIPS algorithms, Auvolat et al. (2015) convert MIPS to Maximum Cosine Similarity Search (MCSS) problem:
103
+
104
+ $$
105
+ \operatorname { a r g m a x } _ { i \in \mathcal { X } } ^ { ( K ) } \ \frac { q ^ { T } x _ { i } } { \left. \left. q \right. \right. \left. \left. x _ { i } \right. \right. } = \operatorname { a r g m a x } _ { i \in \mathcal { X } } ^ { ( K ) } \ \frac { q ^ { T } x _ { i } } { \left. \left. x _ { i } \right. \right. }
106
+ $$
107
+
108
+ When all the data vectors $x _ { i }$ have the same norm, then MCSS is equivalent to MIPS. However, it is often restrictive to have this additional constraint. Instead, Auvolat et al. (2015) append additional dimensions to both query and data vectors to convert MIPS to MCSS. In HMN terminology, this would correspond to adding a few more dimensions to the memory cells and input representations.
109
+
110
+ The algorithm introduces two hyper-parameters, $U < 1$ and $m \in \mathbb { N } ^ { * }$ . The first step is to scale all the vectors in the memory by the same factor, such that maxi $| | x _ { i } | | _ { 2 } = U$ . We then apply two mappings, $P$ and $Q$ , on the memory cells and on the input vector, respectively. These two mappings simply concatenate $m$ new components to the vectors and make the norms of the data points all roughly the same (Shrivastava & Li, 2015). The mappings are defined as follows:
111
+
112
+ $$
113
+ \begin{array} { l c l } { P ( x ) } & { = } & { [ x , 1 / 2 - | | x | | _ { 2 } ^ { 2 } , 1 / 2 - | | x | | _ { 2 } ^ { 4 } , \dots , 1 / 2 - | | x | | _ { 2 } ^ { 2 m } ] } \\ { Q ( x ) } & { = } & { [ x , 0 , 0 , \dots , 0 ] } \end{array}
114
+ $$
115
+
116
+ We thus have the following approximation of MIPS by MCSS for any query vector $q$ :
117
+
118
+ $$
119
+ \begin{array} { r c l } { \operatorname * { a r g m a x } _ { i } ^ { ( K ) } q ^ { \top } x _ { i } } & { \simeq } & { \operatorname * { a r g m a x } _ { i } ^ { ( K ) } \frac { Q ( q ) ^ { \top } P ( x _ { i } ) } { \vert \vert Q ( q ) \vert \vert _ { 2 } \cdot \vert \vert P ( x _ { i } ) \vert \vert _ { 2 } } } \end{array}
120
+ $$
121
+
122
+ Once we convert MIPS to MCSS, we can use spherical $K$ -means (Zhong, 2005) or its hierarchical version to approximate and speedup the cosine similarity search. Once the memory is clustered, then every read operation requires only $K$ dot-products, where $K$ is the number of cluster centroids.
123
+
124
+ Since this is an approximation, it is error-prone. As we are using this approximation for the learning process, this introduces some bias in gradients, which can affect the overall performance of HMN. To alleviate this bias, we propose three simple strategies.
125
+
126
+ • Instead of using only the top- $K$ candidates for a single read query, we also add top- $K$ candidates retrieved for every other read query in the mini-batch. This serves two purposes. First, we can do efficient matrix multiplications by leveraging GPUs since all the $K$ -softmax in a minibatch are over the same set of elements. Second, this also helps to decrease the bias introduced by the approximation error.
127
+ • For every read access, instead of only using the top few clusters which has a maximum product with the read query, we also sample some clusters from the rest, based on a probability distribution log-proportional to the dot product with the cluster centroids. This also decreases the bias.
128
+ • We can also sample random blocks of memory and add it to top- $K$ candidates.
129
+
130
+ We empirically investigate the effect of these variations in Section 5.5.
131
+
132
+ # 4 RELATED WORK
133
+
134
+ Memory networks have been introduced in (Weston et al., 2015b) and have been so far applied to comprehension-based question answering (Weston et al., 2015a; Sukhbaatar et al., 2015), large scale question answering (Bordes et al., 2015) and dialogue systems (Dodge et al., 2015). While (Weston et al., 2015b) considered supervised memory networks in which the correct supporting fact is given during the training stage, (Sukhbaatar et al., 2015) introduced semi-supervised memory networks that can learn the supporting fact by itself. (Kumar et al., 2015; Xiong et al., 2016) introduced Dynamic Memory Networks (DMNs) which can be considered as a memory network with two types of memory: a regular large memory and an episodic memory. Another related class of model is the Neural Turing Machine (Graves et al., 2014), which uses softmax-based soft attention. Later (Zaremba & Sutskever, 2015) extended NTM to hard attention using reinforcement learning. (Dodge et al., 2015; Bordes et al., 2015) alleviate the problem of the scalability of soft attention by having an initial keyword based filtering stage, which reduces the number of facts being considered. Our work generalizes this filtering by using MIPS for filtering. This is desirable because MIPS can be applied for any modality of data or even when there is no overlap between the words in a question and the words in facts.
135
+
136
+ The softmax arises in various situations and most relevant to this work are scaling methods for large vocabulary neural language modeling. In neural language modeling, the final layer is a softmax distribution over the next word and there exist several approaches to achieve scalability. (Morin & Bengio, 2005) proposes a hierarchical softmax based on prior clustering of the words into a binary, or more generally $n$ -ary tree, that serves as a fixed structure for the learning process of the model. The complexity of training is reduced from $O ( n )$ to $O ( \log n )$ . Due to its clustering and tree structure, it resembles the clustering-based MIPS techniques we explore in this paper. However, the approaches differ at a fundamental level. Hierarchical softmax defines the probability of a leaf node as the product of all the probabilities computed by all the intermediate softmaxes on the way to that leaf node. By contrast, an approximate MIPS search imposes no such constraining structure on the probabilistic model, and is better thought as efficiently searching for top winners of what amounts to be a large ordinary flat softmax. Other methods such as Noice Constrastive Estimation (Mnih & Gregor, 2014) and Negative Sampling (Mikolov et al., 2013) avoid an expensive normalization constant by sampling negative samples from some marginal distribution. By contrast, our approach approximates the softmax by explicitly including in its negative samples candidates that likely would have a large softmax value. Jean et al. (2015) introduces an importance sampling approach that considers all the words in a mini-batch as the candidate set. This in general might also not include the MIPS candidates with highest softmax values.
137
+
138
+ (Spring & Shrivastava, 2016) is the only work that we know of, proposing to use MIPS during learning. It proposes hashing-based MIPS to sort the hidden layer activations and reduce the computation in every layer. However, a small scale application was considered and data-independent methods like hashing will likely suffer as dimensionality increases. Rae et al. (2016) have also independently proposed a model called SAM to use approximate search methods for memory access in NTM-like architectures. However, our motivation is different. While Rae et al. (2016) focus on architectures where the memory is written by the controller itself, we focus on handling memory access to large external knowledge bases. While both the models fix the memory access mechanism (HMN uses MIPS and SAM uses NNS), our controller works in a much more constrained setting. Moreover, our experiments suggest that the performance of SAM could be improved using a clustering-based approach as in our work, instead of tree/hash-based approaches for memory search used by SAM.
139
+
140
+ # 5 EXPERIMENTS
141
+
142
+ In this section, we report experiments on factoid question answering using hierarchical memory networks. Specifically, we use the SimpleQuestions dataset Bordes et al. (2015). The aim of these experiments is not to achieve state-of-the-art results on this dataset. Rather, we aim to propose and analyze various approaches to make memory networks more scalable and explore the achieved tradeoffs between speed and accuracy.
143
+
144
+ # 5.1 DATASET
145
+
146
+ We use SimpleQuestions (Bordes et al., 2015) which is a large scale factoid question answering dataset. SimpleQuestions consists of 108,442 natural language questions, each paired with a corresponding fact from Freebase. Each fact is a triple (subject,relation,object) and the answer to the question is always the object. The dataset is divided into training (75910), validation (10845), and test (21687) sets. Unlike Bordes et al. (2015) who additionally considered FB2M (10M facts) or FB5M (12M facts) with keyword-based heuristics for filtering most of the facts for each question, we only use SimpleQuestions, with no keyword-based heuristics. This allows us to do a direct comparison with the full softmax approach in a reasonable amount of time. Moreover, we would like to highlight that for this dataset, keyword-based filtering is a very efficient heuristic since all questions have an appropriate source entity with a matching word. Nevertheless, our goal is to design a general purpose architecture without such strong assumptions on the nature of the data.
147
+
148
+ # 5.2 MODEL
149
+
150
+ Let $V _ { q }$ be the vocabulary of all words in the natural language questions. Let $W _ { q }$ be a $| V _ { q } | * m$ matrix where each row is some $m$ dimensional embedding for a word in the question vocabulary. This matrix is initialized with random values and learned during training. Given any question, we in the question. Let represent it with a bag-of-words representation by summing the vector representation of each word $\bar { q ^ { } = } \{ w _ { i } \} _ { i = 1 } ^ { p }$ ,
151
+
152
+ $$
153
+ h ( q ) = \sum _ { i = 1 } ^ { p } W _ { q } [ w _ { i } ]
154
+ $$
155
+
156
+ Then, to find the relevant fact from the memory M, we call the $K$ -MIPS-based reader module with $h ( q )$ as the query. This uses Equation 3 and 4 to compute the output of the reader $R _ { o u t }$ . The reader is trained by minimizing the Negative Log Likelihood (NLL) of the correct fact.
157
+
158
+ $$
159
+ \mathcal { T } _ { \theta } = \sum _ { i = 1 } ^ { N } - \log ( R _ { o u t } [ f _ { i } ] )
160
+ $$
161
+
162
+ where $f _ { i }$ is the index of the correct fact in $W _ { m }$ . We are fixing the memory embeddings to the TransE (Bordes et al., 2013) embeddings and learning only the question embeddings.
163
+
164
+ This model is simpler than the one reported in (Bordes et al., 2015) so that it is esay to analyze the effect of various memory reading strategies.
165
+
166
+ # 5.3 TRAINING DETAILS
167
+
168
+ We trained the model with the Adam optimizer (Kingma & Ba, 2014), with a fixed learning rate of 0.001. We used mini-batches of size 128. We used 200 dimensional embeddings for the TransE entities, yielding 600 dimensional embeddings for facts by concatenating the embeddings of the subject, relation and object. We also experimented with summing the entities in the triple instead of concatenating, but we found that it was difficult for the model to differentiate facts this way. The only learnable parameters by the HMN model are the question word embeddings. The entity distribution in SimpleQuestions is extremely sparse and hence, following Bordes et al. (2015), we also add artificial questions for all the facts for which we do not have natural language questions. Unlike Bordes et al. (2015), we do not add any other additional tasks like paraphrase detection to the model, mainly to study the effect of the reader. We stopped training for all the models when the validation accuracy consistently decreased for 3 epochs.
169
+
170
+ # 5.4 EXACT $K$ -MIPS IMPROVES ACCURACY
171
+
172
+ In this section, we compare the performance of the full soft attention reader and exact $K$ -MIPS attention readers. Our goal is to verify that $K$ -MIPS attention is in fact a valid and useful attention mechanism and see how it fares when compared to full soft attention. For $K$ -MIPS attention, we tried $K \in \ 1 0 , 5 0 , 1 0 0 , 1 0 0 0$ . We would like to emphasize that, at training time, along with $K$ candidates for a particular question, we also add the $K$ -candidates for each question in the minibatch. So the exact size of the softmax layer would be higer than $K$ during training. In Table 1, we report the test performance of memory networks using the soft attention reader and $K$ -MIPS attention reader. We also report the average softmax size during training. From the table, it is clear that the $K$ -MIPS attention readers improve the performance of the network compared to soft attention reader. In fact, smaller the value of $K$ is, better the performance. This result suggests that it is better to use a $K$ -MIPS layer instead of softmax layer whenever possible. It is interesting to see that the convergence of the model is not slowed down due to this change in softmax computation (as shown in Figure 1).
173
+
174
+ This experiment confirms the usefulness of $K$ -MIPS attention. However, exact $K$ -MIPS has the same complexity as a full softmax. Hence, to scale up the training, we need more efficient forms of $K$ -MIPS attention, which is the focus of next experiment.
175
+
176
+ Table 1: Accuracy in SQ test-set and average size of memory used. 10-softmax has high performance while using only smaller amount of memory.
177
+
178
+ <table><tr><td>Model</td><td>Test Acc.</td><td>Avg.S Softmax Size</td></tr><tr><td>Full-softmax</td><td>59.5</td><td>108442</td></tr><tr><td>10-MIPS</td><td>62.2</td><td>1290</td></tr><tr><td>50-MIPS</td><td>61.2</td><td>6180</td></tr><tr><td>100-MIPS</td><td>60.6</td><td>11928</td></tr><tr><td>1000-MIPS</td><td>59.6</td><td>70941</td></tr><tr><td>Clustering</td><td>51.5</td><td>20006</td></tr><tr><td>PCA-Tree</td><td>32.4</td><td>21108</td></tr><tr><td>WTA-Hash</td><td>40.2</td><td>20008</td></tr></table>
179
+
180
+ ![](images/b66b6199342919484c2188a6fa67d80764976502f29b495ffa56e562b32f49e6.jpg)
181
+ Figure 1: Validation curve for various models. Convergence is not slowed down by $\mathbf { k }$ -softmax.
182
+
183
+ # 5.5 APPROXIMATE $K$ -MIPS BASED LEARNING
184
+
185
+ As mentioned previously, designing faster algorithms for $K$ -MIPS is an active area of research. Auvolat et al. (2015) compared several state-of-the-art data-dependent and data-independent methods for faster approximate $K$ -MIPS and it was found that clustering-based MIPS performs significantly better than other approaches. However the focus of the comparison was on performance during the inference stage. In HMNs, $K$ -MIPS must be used at both training stage and inference stages. To verify if the same trend can been seen during learning stage as well, we compared three different approaches:
186
+
187
+ Clustering: This was explained in detail in section 3.
188
+
189
+ WTA-Hash: Winner Takes All hashing (Vijayanarasimhan et al., 2014) is a hashing-based $K$ -MIPS algorithm which also converts MIPS to MCSS by augmenting additional dimensions to the vectors. This method used $n$ hash functions and each hash function does $p$ different random permutations of the vector. Then the prefix constituted by the first $k$ elements of each permuted vector is used to construct the hash for the vector.
190
+
191
+ PCA-Tree: PCA-Tree (Bachrach et al., 2014) is the state-of-the-art tree-based method, which converts MIPS to NNS by vector augmentation. It uses the principal components of the data to construct a balanced binary tree with data residing in the leaves.
192
+
193
+ For a fair comparison, we varied the hyper-parameters of each algorithm in such a way that the average speedup is approximately the same. Table 1 shows the performance of all three methods, compared to a full softmax. From the table, it is clear that the clustering-based method performs significantly better than the other two methods. However, performances are lower when compared to the performance of the full softmax.
194
+
195
+ As a next experiment, we analyze various the strategies proposed in Section 3.1 to reduce the approximation bias of clustering-based $K$ -MIPS:
196
+
197
+ Top-K: This strategy picks the vectors in the top $K$ clusters as candidates.
198
+
199
+ Sample-K: This strategy samples $K$ clusters, without replacement, based on a probability distribution based on the dot product of the query with the cluster centroids. When combined with the Top- $K$ strategy, we ignore clusters selected by the Top- $k$ strategy for sampling.
200
+
201
+ Rand-block: This strategy divides the memory into several blocks and uniformly samples a random block as candidate.
202
+
203
+ We experimented with 1000 clusters and 2000 clusters. While comparing various training strategies, we made sure that the effective speedup is approximately the same. Memory access to facts per query for all the models is approximately 20,000, hence yielding a 5X speedup.
204
+
205
+ Results are given in Table 2. We observe that the best approach is to combine the Top-K and SampleK strategies, with Rand-block not being beneficial. Interestingly, the worst performances correspond to cases where the Sample-K strategy is ignored.
206
+
207
+ Table 2: Accuracy in SQ test set and number of epochs for convergence.
208
+
209
+ <table><tr><td></td><td>Sample-K</td><td>rand-block</td><td>1000 clusters Test Acc.</td><td>epochs</td><td>2000 clusters Test Acc.</td><td>epochs</td></tr><tr><td>Top-K Yes</td><td>No</td><td>No</td><td>50.2</td><td>16</td><td>51.5</td><td>22</td></tr><tr><td>No</td><td>Yes</td><td>No</td><td>52.5</td><td>68</td><td>52.8</td><td>63</td></tr><tr><td>Yes</td><td>Yes</td><td>No</td><td>52.8</td><td>31</td><td>53.1</td><td>26</td></tr><tr><td>Yes</td><td>No</td><td>Yes</td><td>51.8</td><td>32</td><td>52.3</td><td>26</td></tr><tr><td>Yes</td><td>Yes</td><td>Yes</td><td>52.5</td><td>38</td><td>52.7</td><td>19</td></tr></table>
210
+
211
+ # 6 CONCLUSION
212
+
213
+ In this paper, we proposed a hierarchical memory network that exploits $K$ -MIPS for its attentionbased reader. Unlike soft attention readers, $K$ -MIPS attention reader is easily scalable to larger memories. This is achieved by organizing the memory in a hierarchical way. Experiments on the SimpleQuestions dataset demonstrate that exact $K$ -MIPS attention is better than soft attention. However, existing state-of-the-art approximate $K$ -MIPS techniques provide a speedup at the cost of some accuracy. Future research will investigate designing efficient dynamic $K$ -MIPS algorithms, where the memory can be dynamically updated during training. This should reduce the approximation bias and hence improve the overall performance.
214
+
215
+ # REFERENCES
216
+
217
+ Alex Auvolat, Sarath Chandar, Pascal Vincent, Hugo Larochelle, and Yoshua Bengio. Clustering is efficient for approximate maximum inner product search. arXiv preprint arXiv:1507.05910, 2015.
218
+
219
+ Yoram Bachrach et al. Speeding up the xbox recommender system using a euclidean transformation for inner-product spaces. RecSys ’14, pp. 257–264, 2014.
220
+
221
+ Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In Advances in NIPS, pp. 2787–2795. 2013.
222
+
223
+ Antoine Bordes, Nicolas Usunier, Sumit Chopra, and Jason Weston. Large-scale simple question answering with memory networks. arXiv preprint arXiv:1506.02075, 2015.
224
+
225
+ Jesse Dodge, Andreea Gane, Xiang Zhang, Antoine Bordes, Sumit Chopra, Alexander Miller, Arthur Szlam, and Jason Weston. Evaluating prerequisite qualities for learning end-to-end dialog systems. CoRR, abs/1511.06931, 2015.
226
+
227
+ Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014.
228
+
229
+ Sébastien Jean, KyungHyun Cho, Roland Memisevic, and Yoshua Bengio. On using very large target vocabulary for neural machine translation. In Proceedings of ACL,2015, pp. 1–10, 2015.
230
+
231
+ Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014.
232
+
233
+ Ankit Kumar et al. Ask me anything: Dynamic memory networks for natural language processing. CoRR, abs/1506.07285, 2015.
234
+
235
+ Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. In International Conference on Learning Representations, Workshop Track, 2013.
236
+
237
+ Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. arXiv preprint arXiv:1402.0030, 2014.
238
+
239
+ Frederic Morin and Yoshua Bengio. Hierarchical probabilistic neural network language model. In Robert G. Cowell and Zoubin Ghahramani (eds.), Proceedings of AISTATS, pp. 246–252, 2005.
240
+
241
+ Behnam Neyshabur and Nathan Srebro. On symmetric and asymmetric lshs for inner product search. In Proceedings of the 31st International Conference on Machine Learning, 2015.
242
+
243
+ Jack W Rae, Jonathan J Hunt, Tim Harley, Ivo Danihelka, Andrew Senior, Greg Wayne, Alex Graves, and Timothy P Lillicrap. Scaling memory-augmented neural networks with sparse reads and writes. In Advances in NIPS. 2016.
244
+
245
+ Parikshit Ram and Alexander G. Gray. Maximum inner-product search using cone trees. KDD ’12, pp. 931–939, 2012.
246
+
247
+ Anshumali Shrivastava and Ping Li. Asymmetric LSH (ALSH) for sublinear time maximum inner product search (MIPS). In Advances in Neural Information Processing Systems 27, pp. 2321– 2329, 2014.
248
+
249
+ Anshumali Shrivastava and Ping Li. Improved asymmetric locality sensitive hashing (alsh) for maximum inner product search (mips). In Proceedings of Conference on Uncertainty in Artificial Intelligence (UAI), 2015.
250
+
251
+ Ryan Spring and Anshumali Shrivastava. Scalable and sustainable deep learning via randomized hashing. CoRR, abs/1602.08194, 2016.
252
+
253
+ Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. arXiv preprint arXiv:1503.08895, 2015.
254
+
255
+ Sudheendra Vijayanarasimhan, Jon Shlens, Rajat Monga, and Jay Yagnik. Deep networks with large output spaces. arXiv preprint arXiv:1412.7479, 2014.
256
+
257
+ Jason Weston, Antoine Bordes, Sumit Chopra, and Tomas Mikolov. Towards ai-complete question answering: a set of prerequisite toy tasks. arXiv preprint arXiv:1502.05698, 2015a.
258
+
259
+ Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In Proceedings Of The International Conference on Representation Learning (ICLR 2015), 2015b. In Press.
260
+
261
+ Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992.
262
+
263
+ Caiming Xiong, Stephen Merity, and Richard Socher. Dynamic memory networks for visual and textual question answering. CoRR, abs/1603.01417, 2016.
264
+
265
+ Wojciech Zaremba and Ilya Sutskever. Reinforcement learning neural turing machines. CoRR, abs/1505.00521, 2015.
266
+
267
+ Shi Zhong. Efficient online spherical k-means clustering. In Neural Networks, 2005. IJCNN’05. Proceedings. 2005 IEEE International Joint Conference on, volume 5, pp. 3180–3185. IEEE, 2005.
parse/train/BJ0Ee8cxx/BJ0Ee8cxx_content_list.json ADDED
@@ -0,0 +1,1402 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "HIERARCHICAL MEMORY NETWORKS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 630,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Sarath Chandar∗1, Sungjin $\\mathbf { A } \\mathbf { h } \\mathbf { n } ^ { 1 }$ , Hugo Larochelle2,4, Pascal Vincent1,4, Gerald Tesauro3, Yoshua Bengio1,4 ",
17
+ "bbox": [
18
+ 184,
19
+ 143,
20
+ 696,
21
+ 174
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1 Université de Montréal, Canada. \n2 Twitter, USA. \n3 IBM Watson Research Center, USA. \n4 CIFAR, Canada. ",
28
+ "bbox": [
29
+ 184,
30
+ 188,
31
+ 436,
32
+ 244
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "ABSTRACT ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 454,
42
+ 281,
43
+ 544,
44
+ 296
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Memory networks are neural networks with an explicit memory component that can be both read and written to by the network. The memory is often addressed in a soft way using a softmax function, making end-to-end training with backpropagation possible. However, this is not computationally scalable for applications which require the network to read from extremely large memories. On the other hand, it is well known that hard attention mechanisms based on reinforcement learning are challenging to train successfully. In this paper, we explore a form of hierarchical memory network, which can be considered as a hybrid between hard and soft attention memory networks. The memory is organized in a hierarchical structure such that reading from it is done with less computation than soft attention over a flat memory, while also being easier to train than hard attention over a flat memory. Specifically, we propose to incorporate Maximum Inner Product Search (MIPS) in the training and inference procedures for our hierarchical memory network. We explore the use of various state-of-the art approximate MIPS techniques and report results on SimpleQuestions, a challenging large scale factoid question answering task. ",
51
+ "bbox": [
52
+ 233,
53
+ 315,
54
+ 764,
55
+ 537
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 INTRODUCTION ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 569,
66
+ 336,
67
+ 585
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Until recently, traditional machine learning approaches for challenging tasks such as image captioning, object detection, or machine translation have consisted in complex pipelines of algorithms, each being separately tuned for better performance. With the recent success of neural networks and deep learning research, it has now become possible to train a single model end-to-end, using backpropagation. Such end-to-end systems often outperform traditional approaches, since the entire model is directly optimized with respect to the final task at hand. However, simple encode-decode style neural networks often underperform on knowledge-based reasoning tasks like question-answering or dialog systems. Indeed, in such cases it is nearly impossible for regular neural networks to store all the necessary knowledge in their parameters. ",
74
+ "bbox": [
75
+ 174,
76
+ 603,
77
+ 825,
78
+ 728
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "Neural networks with memory (Graves et al., 2014; Weston et al., 2015b) can deal with knowledge bases by having an external memory component which can be used to explicitly store knowledge. The memory is accessed by reader and writer functions, which are both made differentiable so that the entire architecture (neural network, reader, writer and memory components) can be trained end-to-end using backpropagation. Memory-based architectures can also be considered as generalizations of RNNs and LSTMs, where the memory is analogous to recurrent hidden states. However they are much richer in structure and can handle very long-term dependencies because once a vector (i.e., a memory) is stored, it is copied from time step to time step and can thus stay there for a very long time (and gradients correspondingly flow back time unhampered). ",
85
+ "bbox": [
86
+ 174,
87
+ 734,
88
+ 825,
89
+ 861
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "There exists several variants of neural networks with a memory component: Memory Networks (Weston et al., 2015b), Neural Turing Machines (NTM) (Graves et al., 2014), Dynamic Memory Networks (DMN) (Kumar et al., 2015). They all share five major components: memory, input module, reader, writer, and output module. ",
96
+ "bbox": [
97
+ 176,
98
+ 867,
99
+ 821,
100
+ 895
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "",
107
+ "bbox": [
108
+ 173,
109
+ 103,
110
+ 823,
111
+ 132
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Memory: The memory is an array of cells, each capable of storing a vector. The memory is often initialized with external data (e.g. a database of facts), by filling in its cells with a pre-trained vector representations of that data. ",
118
+ "bbox": [
119
+ 174,
120
+ 138,
121
+ 823,
122
+ 180
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "Input module: The input module is to compute a representation of the input that can be used by other modules. ",
129
+ "bbox": [
130
+ 173,
131
+ 188,
132
+ 821,
133
+ 215
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Writer: The writer takes the input representation and updates the memory based on it. The writer can be as simple as filling the slots in the memory with input vectors in a sequential way (as often done in memory networks). If the memory is bounded, instead of sequential writing, the writer has to decide where to write and when to rewrite cells (as often done in NTMs). ",
140
+ "bbox": [
141
+ 174,
142
+ 223,
143
+ 825,
144
+ 279
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "Reader: Given an input and the current state of the memory, the reader retrieves content from the memory, which will then be used by an output module. This often requires comparing the input’s representation or a function of the recurrent state with memory cells using some scoring function such as a dot product. ",
151
+ "bbox": [
152
+ 174,
153
+ 286,
154
+ 825,
155
+ 342
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "Output module: Given the content retrieved by the reader, the output module generates a prediction, which often takes the form of a conditional distribution over multiple labels for the output. ",
162
+ "bbox": [
163
+ 176,
164
+ 349,
165
+ 821,
166
+ 377
167
+ ],
168
+ "page_idx": 1
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "For the rest of the paper, we will use the name memory network to describe any model which has any form of these five components. We would like to highlight that all the components except the memory are learnable. Depending on the application, any of these components can also be fixed. In this paper, we will focus on the situation where a network does not write and only reads from the memory. ",
173
+ "bbox": [
174
+ 174,
175
+ 383,
176
+ 825,
177
+ 454
178
+ ],
179
+ "page_idx": 1
180
+ },
181
+ {
182
+ "type": "text",
183
+ "text": "In this paper, we focus on the application of memory networks to large-scale tasks. Specifically, we focus on large scale factoid question answering. For this problem, given a large set of facts and a natural language question, the goal of the system is to answer the question by retrieving the supporting fact for that question, from which the answer can be derived. Application of memory networks to this task has been studied by Bordes et al. (2015). However, Bordes et al. (2015) depended on keyword based heuristics to filter the facts to a smaller set which is manageable for training. However heuristics are invariably dataset dependent and we are interested in a more general solution which can be used when the facts are of any structure. One can design soft attention retrieval mechanisms, where a convex combination of all the cells is retrieved or design hard attention retrieval mechanisms where one or few cells from the memory are retrieved. Soft attention is achieved by using softmax over the memory which makes the reader differentiable and hence learning can be done using gradient descent. Hard attention is achieved by using methods like REINFORCE (Williams, 1992), which provides a noisy gradient estimate when discrete stochastic decisions are made by a model. ",
184
+ "bbox": [
185
+ 174,
186
+ 460,
187
+ 825,
188
+ 655
189
+ ],
190
+ "page_idx": 1
191
+ },
192
+ {
193
+ "type": "text",
194
+ "text": "Both soft attention and hard attention have limitations. As the size of the memory grows, soft attention using softmax weighting is not scalable. It is computationally very expensive, since its complexity is linear in the size of the memory. Also, at initialization, gradients are dispersed so much that it can reduce the effectiveness of gradient descent. These problems can be alleviated by a hard attention mechanism, for which the training method of choice is REINFORCE. However, REINFORCE can be brittle due to its high variance and existing variance reduction techniques are complex. Thus, it is rarely used in memory networks (even in cases of a small memory). ",
195
+ "bbox": [
196
+ 174,
197
+ 662,
198
+ 825,
199
+ 760
200
+ ],
201
+ "page_idx": 1
202
+ },
203
+ {
204
+ "type": "text",
205
+ "text": "In this paper, we propose a new memory selection mechanism based on Maximum Inner Product Search (MIPS) which is both scalable and easy to train. This can be considered as a hybrid of soft and hard attention mechanisms. The key idea is to structure the memory in a hierarchical way such that it is easy to perform MIPS, hence the name Hierarchical Memory Network (HMN). HMNs are scalable at both training and inference time. The main contributions of the paper are as follows: ",
206
+ "bbox": [
207
+ 176,
208
+ 767,
209
+ 825,
210
+ 837
211
+ ],
212
+ "page_idx": 1
213
+ },
214
+ {
215
+ "type": "text",
216
+ "text": "• We explore hierarchical memory networks, where the memory is organized in a hierarchical fashion, which allows the reader to efficiently access only a subset of the memory. • While there are several ways to decide which subset to access, we propose to pose memory access as a maximum inner product search (MIPS) problem. ",
217
+ "bbox": [
218
+ 212,
219
+ 853,
220
+ 823,
221
+ 924
222
+ ],
223
+ "page_idx": 1
224
+ },
225
+ {
226
+ "type": "text",
227
+ "text": "• We empirically show that exact MIPS-based algorithms not only enjoy similar convergence as soft attention models, but can even improve the performance of the memory network. • Since exact MIPS is as computationally expensive as a full soft attention model, we propose to train the memory networks using approximate MIPS techniques for scalable memory access. • We empirically show that unlike exact MIPS, approximate MIPS algorithms provide a speedup and scalability of training, though at the cost of some performance. ",
228
+ "bbox": [
229
+ 214,
230
+ 103,
231
+ 825,
232
+ 212
233
+ ],
234
+ "page_idx": 2
235
+ },
236
+ {
237
+ "type": "text",
238
+ "text": "2 HIERARCHICAL MEMORY NETWORKS ",
239
+ "text_level": 1,
240
+ "bbox": [
241
+ 174,
242
+ 231,
243
+ 522,
244
+ 247
245
+ ],
246
+ "page_idx": 2
247
+ },
248
+ {
249
+ "type": "text",
250
+ "text": "In this section, we describe the proposed Hierarchical Memory Network (HMN). In this paper, HMNs only differ from regular memory networks in two of its components: the memory and the reader. ",
251
+ "bbox": [
252
+ 174,
253
+ 262,
254
+ 825,
255
+ 305
256
+ ],
257
+ "page_idx": 2
258
+ },
259
+ {
260
+ "type": "text",
261
+ "text": "Memory: Instead of a flat array of cells for the memory structure, HMNs leverages a hierarchical memory structure. Memory cells are organized into groups and the groups can further be organized into higher level groups. The choice for the memory structure is tightly coupled with the choice of reader, which is essential for fast memory access. We consider three classes of approaches for the memory’s structure: hashing-based approaches, tree-based approaches, and clustering-based approaches. This is explained in detail in the next section. ",
262
+ "bbox": [
263
+ 174,
264
+ 311,
265
+ 825,
266
+ 395
267
+ ],
268
+ "page_idx": 2
269
+ },
270
+ {
271
+ "type": "text",
272
+ "text": "Reader: The reader in the HMN is different from the readers in flat memory networks. Flat memorybased readers use either soft attention over the entire memory or hard attention that retrieves a single cell. While these mechanisms might work with small memories, with HMNs we are more interested in achieving scalability towards very large memories. So instead, HMN readers use soft attention only over a selected subset of the memory. Selecting memory subsets is guided by a maximum inner product search algorithm, which can exploit the hierarchical structure of the organized memory to retrieve the most relevant facts in sub-linear time. The MIPS-based reader is explained in more detail in the next section. ",
273
+ "bbox": [
274
+ 174,
275
+ 401,
276
+ 825,
277
+ 513
278
+ ],
279
+ "page_idx": 2
280
+ },
281
+ {
282
+ "type": "text",
283
+ "text": "In HMNs, the reader is thus trained to create MIPS queries such that it can retrieve a sufficient set of facts. While most of the standard applications of MIPS (Ram & Gray, 2012; Bachrach et al., 2014; Shrivastava & Li, 2014) so far have focused on settings where both query vector and database (memory) vectors are precomputed and fixed, memory readers in HMNs are learning to do MIPS by updating the input representation such that the result of MIPS retrieval contains the correct fact(s). ",
284
+ "bbox": [
285
+ 174,
286
+ 520,
287
+ 825,
288
+ 590
289
+ ],
290
+ "page_idx": 2
291
+ },
292
+ {
293
+ "type": "text",
294
+ "text": "3 MEMORY READER WITH $K$ -MIPS ATTENTION ",
295
+ "text_level": 1,
296
+ "bbox": [
297
+ 174,
298
+ 609,
299
+ 591,
300
+ 627
301
+ ],
302
+ "page_idx": 2
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "In this section, we describe how the HMN memory reader uses Maximum Inner Product Search (MIPS) during learning and inference. ",
307
+ "bbox": [
308
+ 171,
309
+ 642,
310
+ 823,
311
+ 670
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "We begin with a formal definition of $K$ -MIPS. Given a set of points ${ \\mathcal { X } } = \\{ x _ { 1 } , \\ldots , x _ { n } \\}$ and a query vector $q$ , our goal is to find ",
318
+ "bbox": [
319
+ 171,
320
+ 676,
321
+ 821,
322
+ 705
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "equation",
328
+ "img_path": "images/9e7819fca3f408b7deb1c0b99261f93ed124bc845150430dc44e3ee5749e0f64.jpg",
329
+ "text": "$$\n\\mathrm { a r g m a x } _ { i \\in \\mathcal { X } } ^ { ( K ) } \\ q ^ { \\top } x _ { i }\n$$",
330
+ "text_format": "latex",
331
+ "bbox": [
332
+ 436,
333
+ 712,
334
+ 562,
335
+ 734
336
+ ],
337
+ "page_idx": 2
338
+ },
339
+ {
340
+ "type": "text",
341
+ "text": "where the $\\mathrm { a r g m a x } ^ { ( K ) }$ returns the indices of the top- $K$ maximum values. In the case of HMNs, $\\mathcal { X }$ corresponds to the memory and $q$ corresponds to the vector computed by the input module. ",
342
+ "bbox": [
343
+ 171,
344
+ 741,
345
+ 821,
346
+ 771
347
+ ],
348
+ "page_idx": 2
349
+ },
350
+ {
351
+ "type": "text",
352
+ "text": "A simple but inefficient solution for $K$ -MIPS involves a linear search over the cells in memory by performing the dot product of $q$ with all the memory cells. While this will return the exact result for $K$ -MIPS, it is too costly to perform when we deal with a large-scale memory. However, in many practical applications, it is often sufficient to have an approximate result for $K$ -MIPS, trading speed-up at the cost of the accuracy. There exist several approximate $K$ -MIPS solutions in the literature (Shrivastava & Li, 2014; 2015; Bachrach et al., 2014; Neyshabur & Srebro, 2015). ",
353
+ "bbox": [
354
+ 174,
355
+ 776,
356
+ 823,
357
+ 861
358
+ ],
359
+ "page_idx": 2
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "All the approximate $K$ -MIPS solutions add a form of hierarchical structure to the memory and visit only a subset of the memory cells to find the maximum inner product for a given query. Hashingbased approaches (Shrivastava & Li, 2014; 2015; Neyshabur & Srebro, 2015) hash cells into multiple bins, and given a query they search for $K$ -MIPS cell vectors only in bins that are close to the bin associated with the query. Tree-based approaches (Ram & Gray, 2012; Bachrach et al., 2014) create search trees with cells in the leaves of the tree. Given a query, a path in the tree is followed and MIPS is performed only for the leaf for the chosen path. Clustering-based approaches (Auvolat et al., 2015) cluster cells into multiple clusters (or a hierarchy of clusters) and given a query, they perform MIPS on the centroids of the top few clusters. We refer the readers to (Auvolat et al., 2015) for an extensive comparison of various state-of-the-art approaches for approximate $K$ -MIPS. ",
364
+ "bbox": [
365
+ 174,
366
+ 867,
367
+ 823,
368
+ 924
369
+ ],
370
+ "page_idx": 2
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "",
375
+ "bbox": [
376
+ 174,
377
+ 103,
378
+ 825,
379
+ 188
380
+ ],
381
+ "page_idx": 3
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "Our proposal is to exploit this rich approximate $K$ -MIPS literature to achieve scalable training and inference in HMNs. Instead of filtering the memory with heuristics, we propose to organize the memory based on approximate $K$ -MIPS algorithms and then train the reader to learn to perform MIPS. Specifically, consider the following softmax over the memory which the reader has to perform for every reading step to retrieve a set of relevant candidates: ",
386
+ "bbox": [
387
+ 173,
388
+ 194,
389
+ 825,
390
+ 263
391
+ ],
392
+ "page_idx": 3
393
+ },
394
+ {
395
+ "type": "equation",
396
+ "img_path": "images/470e00b9ace11e758ff53ac60f7c0422c955291f61170ea5fb00242ebe1b3b8e.jpg",
397
+ "text": "$$\nR _ { o u t } = \\operatorname { s o f t m a x } ( h ( q ) M ^ { T } )\n$$",
398
+ "text_format": "latex",
399
+ "bbox": [
400
+ 406,
401
+ 268,
402
+ 591,
403
+ 286
404
+ ],
405
+ "page_idx": 3
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "where $h ( q ) \\in \\mathbb { R } ^ { d }$ is the representation of the query, $M \\in \\mathbb { R } ^ { N \\times d }$ is the memory with $N$ being the total number of cells in the memory. We propose to replace this softmax with softmax(K) which is defined as follows: ",
410
+ "bbox": [
411
+ 174,
412
+ 292,
413
+ 825,
414
+ 338
415
+ ],
416
+ "page_idx": 3
417
+ },
418
+ {
419
+ "type": "equation",
420
+ "img_path": "images/ac4956bb06c22564d06b9cb54eb4b2a54dd388be2d401fb6ea6b88b3a1d7b79f.jpg",
421
+ "text": "$$\nC = \\mathrm { a r g m a x } ^ { ( K ) } h ( q ) M ^ { T }\n$$",
422
+ "text_format": "latex",
423
+ "bbox": [
424
+ 408,
425
+ 340,
426
+ 589,
427
+ 361
428
+ ],
429
+ "page_idx": 3
430
+ },
431
+ {
432
+ "type": "equation",
433
+ "img_path": "images/b1704bbc039f528baface6b8feef8593ddb1d67ef4c8c5bb714d42b209876672.jpg",
434
+ "text": "$$\nR _ { o u t } = \\operatorname { s o f t m a x } ^ { ( K ) } ( h ( q ) M ^ { T } ) = \\operatorname { s o f t m a x } ( h ( q ) M [ C ] ^ { T } )\n$$",
435
+ "text_format": "latex",
436
+ "bbox": [
437
+ 310,
438
+ 369,
439
+ 689,
440
+ 390
441
+ ],
442
+ "page_idx": 3
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "where $C$ is the indices of top- $K$ MIP candidate cells and $M [ C ]$ is a sub-matrix of $M$ where the rows are indexed by $C$ . ",
447
+ "bbox": [
448
+ 176,
449
+ 393,
450
+ 823,
451
+ 424
452
+ ],
453
+ "page_idx": 3
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "One advantage of using the softmax(K) is that it naturally focuses on cells that would normally receive the strongest gradients during learning. That is, in a full softmax, the gradients are otherwise more dispersed across cells, given the large number of cells and despite many contributing a small gradient. As our experiments will show, this results in slower training. ",
458
+ "bbox": [
459
+ 174,
460
+ 429,
461
+ 825,
462
+ 488
463
+ ],
464
+ "page_idx": 3
465
+ },
466
+ {
467
+ "type": "text",
468
+ "text": "One problematic situation when learning with the softmax(K) is when we are at the initial stages of training and the $K$ -MIPS reader is not including the correct fact candidate. To avoid this issue, we always include the correct candidate to the top- $K$ candidates retrieved by the $K$ -MIPS algorithm, effectively performing a fully supervised form of learning. ",
469
+ "bbox": [
470
+ 174,
471
+ 496,
472
+ 825,
473
+ 554
474
+ ],
475
+ "page_idx": 3
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "During training, the reader is updated by backpropagation from the output module, through the subset of memory cells. Additionally, the log-likelihood of the correct fact computed using $K$ - softmax is also maximized. This second supervision helps the reader learn to modify the query such that the maximum inner product of the query with respect to the memory will yield the correct supporting fact in the top $K$ candidate set. ",
480
+ "bbox": [
481
+ 174,
482
+ 560,
483
+ 825,
484
+ 631
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "Until now, we described the exact $K$ -MIPS-based learning framework, which still requires a linear look-up over all memory cells and would be prohibitive for large-scale memories. In such scenarios, we can replace the exact $K$ -MIPS in the training procedure with the approximate $K$ -MIPS. This is achieved by deploying a suitable memory hierarchical structure. The same approximate $K$ -MIPSbased reader can be used during inference stage as well. Of course, approximate $K$ -MIPS algorithms might not return the exact MIPS candidates and will likely to hurt performance, but at the benefit of achieving scalability. ",
491
+ "bbox": [
492
+ 174,
493
+ 637,
494
+ 825,
495
+ 734
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "While the memory representation is fixed in this paper, updating the memory along with the query representation should improve the likelihood of choosing the correct fact. However, updating the memory will reduce the precision of the approximate $K$ -MIPS algorithms, since all of them assume that the vectors in the memory are static. Designing efficient dynamic $K$ -MIPS should improve the performance of HMNs even further, a challenge that we hope to address in future work. ",
502
+ "bbox": [
503
+ 174,
504
+ 741,
505
+ 825,
506
+ 811
507
+ ],
508
+ "page_idx": 3
509
+ },
510
+ {
511
+ "type": "text",
512
+ "text": "3.1 READER WITH CLUSTERING-BASED APPROXIMATE $K$ -MIPS ",
513
+ "text_level": 1,
514
+ "bbox": [
515
+ 174,
516
+ 828,
517
+ 632,
518
+ 843
519
+ ],
520
+ "page_idx": 3
521
+ },
522
+ {
523
+ "type": "text",
524
+ "text": "Clustering-based approximate $K$ -MIPS was proposed in (Auvolat et al., 2015) and it has been shown to outperform various other state-of-the-art data dependent and data independent approximate $K$ - MIPS approaches for inference tasks. As we will show in the experiments section, clustering-based MIPS also performs better when used to training HMNs. Hence, we focus our presentation on the clustering-based approach and propose changes that were found to be helpful for learning HMNs. ",
525
+ "bbox": [
526
+ 174,
527
+ 853,
528
+ 825,
529
+ 924
530
+ ],
531
+ "page_idx": 3
532
+ },
533
+ {
534
+ "type": "text",
535
+ "text": "Following most of the other approximate $K$ -MIPS algorithms, Auvolat et al. (2015) convert MIPS to Maximum Cosine Similarity Search (MCSS) problem: ",
536
+ "bbox": [
537
+ 171,
538
+ 103,
539
+ 823,
540
+ 132
541
+ ],
542
+ "page_idx": 4
543
+ },
544
+ {
545
+ "type": "equation",
546
+ "img_path": "images/8cfd211f8dff810f6a75ff497f4d6ba35eb8c6af14fc8f92165b7600d5737b5a.jpg",
547
+ "text": "$$\n\\operatorname { a r g m a x } _ { i \\in \\mathcal { X } } ^ { ( K ) } \\ \\frac { q ^ { T } x _ { i } } { \\left. \\left. q \\right. \\right. \\left. \\left. x _ { i } \\right. \\right. } = \\operatorname { a r g m a x } _ { i \\in \\mathcal { X } } ^ { ( K ) } \\ \\frac { q ^ { T } x _ { i } } { \\left. \\left. x _ { i } \\right. \\right. }\n$$",
548
+ "text_format": "latex",
549
+ "bbox": [
550
+ 346,
551
+ 137,
552
+ 651,
553
+ 174
554
+ ],
555
+ "page_idx": 4
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "When all the data vectors $x _ { i }$ have the same norm, then MCSS is equivalent to MIPS. However, it is often restrictive to have this additional constraint. Instead, Auvolat et al. (2015) append additional dimensions to both query and data vectors to convert MIPS to MCSS. In HMN terminology, this would correspond to adding a few more dimensions to the memory cells and input representations. ",
560
+ "bbox": [
561
+ 174,
562
+ 179,
563
+ 825,
564
+ 236
565
+ ],
566
+ "page_idx": 4
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "The algorithm introduces two hyper-parameters, $U < 1$ and $m \\in \\mathbb { N } ^ { * }$ . The first step is to scale all the vectors in the memory by the same factor, such that maxi $| | x _ { i } | | _ { 2 } = U$ . We then apply two mappings, $P$ and $Q$ , on the memory cells and on the input vector, respectively. These two mappings simply concatenate $m$ new components to the vectors and make the norms of the data points all roughly the same (Shrivastava & Li, 2015). The mappings are defined as follows: ",
571
+ "bbox": [
572
+ 174,
573
+ 241,
574
+ 823,
575
+ 311
576
+ ],
577
+ "page_idx": 4
578
+ },
579
+ {
580
+ "type": "equation",
581
+ "img_path": "images/1719e891e05e68e43e72d6c26b29c6723673041277d19bb4442e3085e69a0901.jpg",
582
+ "text": "$$\n\\begin{array} { l c l } { P ( x ) } & { = } & { [ x , 1 / 2 - | | x | | _ { 2 } ^ { 2 } , 1 / 2 - | | x | | _ { 2 } ^ { 4 } , \\dots , 1 / 2 - | | x | | _ { 2 } ^ { 2 m } ] } \\\\ { Q ( x ) } & { = } & { [ x , 0 , 0 , \\dots , 0 ] } \\end{array}\n$$",
583
+ "text_format": "latex",
584
+ "bbox": [
585
+ 297,
586
+ 318,
587
+ 700,
588
+ 357
589
+ ],
590
+ "page_idx": 4
591
+ },
592
+ {
593
+ "type": "text",
594
+ "text": "We thus have the following approximation of MIPS by MCSS for any query vector $q$ : ",
595
+ "bbox": [
596
+ 173,
597
+ 368,
598
+ 735,
599
+ 383
600
+ ],
601
+ "page_idx": 4
602
+ },
603
+ {
604
+ "type": "equation",
605
+ "img_path": "images/8c60f283caebc5c46d6cc4049697d2347457d5167e0a0d2531b735b2445553f3.jpg",
606
+ "text": "$$\n\\begin{array} { r c l } { \\operatorname * { a r g m a x } _ { i } ^ { ( K ) } q ^ { \\top } x _ { i } } & { \\simeq } & { \\operatorname * { a r g m a x } _ { i } ^ { ( K ) } \\frac { Q ( q ) ^ { \\top } P ( x _ { i } ) } { \\vert \\vert Q ( q ) \\vert \\vert _ { 2 } \\cdot \\vert \\vert P ( x _ { i } ) \\vert \\vert _ { 2 } } } \\end{array}\n$$",
607
+ "text_format": "latex",
608
+ "bbox": [
609
+ 310,
610
+ 390,
611
+ 687,
612
+ 426
613
+ ],
614
+ "page_idx": 4
615
+ },
616
+ {
617
+ "type": "text",
618
+ "text": "Once we convert MIPS to MCSS, we can use spherical $K$ -means (Zhong, 2005) or its hierarchical version to approximate and speedup the cosine similarity search. Once the memory is clustered, then every read operation requires only $K$ dot-products, where $K$ is the number of cluster centroids. ",
619
+ "bbox": [
620
+ 174,
621
+ 438,
622
+ 823,
623
+ 481
624
+ ],
625
+ "page_idx": 4
626
+ },
627
+ {
628
+ "type": "text",
629
+ "text": "Since this is an approximation, it is error-prone. As we are using this approximation for the learning process, this introduces some bias in gradients, which can affect the overall performance of HMN. To alleviate this bias, we propose three simple strategies. ",
630
+ "bbox": [
631
+ 176,
632
+ 487,
633
+ 825,
634
+ 530
635
+ ],
636
+ "page_idx": 4
637
+ },
638
+ {
639
+ "type": "text",
640
+ "text": "• Instead of using only the top- $K$ candidates for a single read query, we also add top- $K$ candidates retrieved for every other read query in the mini-batch. This serves two purposes. First, we can do efficient matrix multiplications by leveraging GPUs since all the $K$ -softmax in a minibatch are over the same set of elements. Second, this also helps to decrease the bias introduced by the approximation error. \n• For every read access, instead of only using the top few clusters which has a maximum product with the read query, we also sample some clusters from the rest, based on a probability distribution log-proportional to the dot product with the cluster centroids. This also decreases the bias. \n• We can also sample random blocks of memory and add it to top- $K$ candidates. ",
641
+ "bbox": [
642
+ 215,
643
+ 542,
644
+ 825,
645
+ 693
646
+ ],
647
+ "page_idx": 4
648
+ },
649
+ {
650
+ "type": "text",
651
+ "text": "We empirically investigate the effect of these variations in Section 5.5. ",
652
+ "bbox": [
653
+ 174,
654
+ 704,
655
+ 633,
656
+ 719
657
+ ],
658
+ "page_idx": 4
659
+ },
660
+ {
661
+ "type": "text",
662
+ "text": "4 RELATED WORK ",
663
+ "text_level": 1,
664
+ "bbox": [
665
+ 176,
666
+ 738,
667
+ 344,
668
+ 755
669
+ ],
670
+ "page_idx": 4
671
+ },
672
+ {
673
+ "type": "text",
674
+ "text": "Memory networks have been introduced in (Weston et al., 2015b) and have been so far applied to comprehension-based question answering (Weston et al., 2015a; Sukhbaatar et al., 2015), large scale question answering (Bordes et al., 2015) and dialogue systems (Dodge et al., 2015). While (Weston et al., 2015b) considered supervised memory networks in which the correct supporting fact is given during the training stage, (Sukhbaatar et al., 2015) introduced semi-supervised memory networks that can learn the supporting fact by itself. (Kumar et al., 2015; Xiong et al., 2016) introduced Dynamic Memory Networks (DMNs) which can be considered as a memory network with two types of memory: a regular large memory and an episodic memory. Another related class of model is the Neural Turing Machine (Graves et al., 2014), which uses softmax-based soft attention. Later (Zaremba & Sutskever, 2015) extended NTM to hard attention using reinforcement learning. (Dodge et al., 2015; Bordes et al., 2015) alleviate the problem of the scalability of soft attention by having an initial keyword based filtering stage, which reduces the number of facts being considered. Our work generalizes this filtering by using MIPS for filtering. This is desirable because MIPS can be applied for any modality of data or even when there is no overlap between the words in a question and the words in facts. ",
675
+ "bbox": [
676
+ 173,
677
+ 770,
678
+ 825,
679
+ 924
680
+ ],
681
+ "page_idx": 4
682
+ },
683
+ {
684
+ "type": "text",
685
+ "text": "",
686
+ "bbox": [
687
+ 176,
688
+ 103,
689
+ 823,
690
+ 159
691
+ ],
692
+ "page_idx": 5
693
+ },
694
+ {
695
+ "type": "text",
696
+ "text": "The softmax arises in various situations and most relevant to this work are scaling methods for large vocabulary neural language modeling. In neural language modeling, the final layer is a softmax distribution over the next word and there exist several approaches to achieve scalability. (Morin & Bengio, 2005) proposes a hierarchical softmax based on prior clustering of the words into a binary, or more generally $n$ -ary tree, that serves as a fixed structure for the learning process of the model. The complexity of training is reduced from $O ( n )$ to $O ( \\log n )$ . Due to its clustering and tree structure, it resembles the clustering-based MIPS techniques we explore in this paper. However, the approaches differ at a fundamental level. Hierarchical softmax defines the probability of a leaf node as the product of all the probabilities computed by all the intermediate softmaxes on the way to that leaf node. By contrast, an approximate MIPS search imposes no such constraining structure on the probabilistic model, and is better thought as efficiently searching for top winners of what amounts to be a large ordinary flat softmax. Other methods such as Noice Constrastive Estimation (Mnih & Gregor, 2014) and Negative Sampling (Mikolov et al., 2013) avoid an expensive normalization constant by sampling negative samples from some marginal distribution. By contrast, our approach approximates the softmax by explicitly including in its negative samples candidates that likely would have a large softmax value. Jean et al. (2015) introduces an importance sampling approach that considers all the words in a mini-batch as the candidate set. This in general might also not include the MIPS candidates with highest softmax values. ",
697
+ "bbox": [
698
+ 174,
699
+ 165,
700
+ 825,
701
+ 416
702
+ ],
703
+ "page_idx": 5
704
+ },
705
+ {
706
+ "type": "text",
707
+ "text": "(Spring & Shrivastava, 2016) is the only work that we know of, proposing to use MIPS during learning. It proposes hashing-based MIPS to sort the hidden layer activations and reduce the computation in every layer. However, a small scale application was considered and data-independent methods like hashing will likely suffer as dimensionality increases. Rae et al. (2016) have also independently proposed a model called SAM to use approximate search methods for memory access in NTM-like architectures. However, our motivation is different. While Rae et al. (2016) focus on architectures where the memory is written by the controller itself, we focus on handling memory access to large external knowledge bases. While both the models fix the memory access mechanism (HMN uses MIPS and SAM uses NNS), our controller works in a much more constrained setting. Moreover, our experiments suggest that the performance of SAM could be improved using a clustering-based approach as in our work, instead of tree/hash-based approaches for memory search used by SAM. ",
708
+ "bbox": [
709
+ 174,
710
+ 422,
711
+ 825,
712
+ 575
713
+ ],
714
+ "page_idx": 5
715
+ },
716
+ {
717
+ "type": "text",
718
+ "text": "5 EXPERIMENTS ",
719
+ "text_level": 1,
720
+ "bbox": [
721
+ 176,
722
+ 606,
723
+ 326,
724
+ 622
725
+ ],
726
+ "page_idx": 5
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "In this section, we report experiments on factoid question answering using hierarchical memory networks. Specifically, we use the SimpleQuestions dataset Bordes et al. (2015). The aim of these experiments is not to achieve state-of-the-art results on this dataset. Rather, we aim to propose and analyze various approaches to make memory networks more scalable and explore the achieved tradeoffs between speed and accuracy. ",
731
+ "bbox": [
732
+ 174,
733
+ 643,
734
+ 825,
735
+ 714
736
+ ],
737
+ "page_idx": 5
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "5.1 DATASET ",
742
+ "text_level": 1,
743
+ "bbox": [
744
+ 176,
745
+ 741,
746
+ 279,
747
+ 755
748
+ ],
749
+ "page_idx": 5
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "We use SimpleQuestions (Bordes et al., 2015) which is a large scale factoid question answering dataset. SimpleQuestions consists of 108,442 natural language questions, each paired with a corresponding fact from Freebase. Each fact is a triple (subject,relation,object) and the answer to the question is always the object. The dataset is divided into training (75910), validation (10845), and test (21687) sets. Unlike Bordes et al. (2015) who additionally considered FB2M (10M facts) or FB5M (12M facts) with keyword-based heuristics for filtering most of the facts for each question, we only use SimpleQuestions, with no keyword-based heuristics. This allows us to do a direct comparison with the full softmax approach in a reasonable amount of time. Moreover, we would like to highlight that for this dataset, keyword-based filtering is a very efficient heuristic since all questions have an appropriate source entity with a matching word. Nevertheless, our goal is to design a general purpose architecture without such strong assumptions on the nature of the data. ",
754
+ "bbox": [
755
+ 174,
756
+ 770,
757
+ 825,
758
+ 924
759
+ ],
760
+ "page_idx": 5
761
+ },
762
+ {
763
+ "type": "text",
764
+ "text": "5.2 MODEL ",
765
+ "text_level": 1,
766
+ "bbox": [
767
+ 174,
768
+ 103,
769
+ 267,
770
+ 117
771
+ ],
772
+ "page_idx": 6
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "Let $V _ { q }$ be the vocabulary of all words in the natural language questions. Let $W _ { q }$ be a $| V _ { q } | * m$ matrix where each row is some $m$ dimensional embedding for a word in the question vocabulary. This matrix is initialized with random values and learned during training. Given any question, we in the question. Let represent it with a bag-of-words representation by summing the vector representation of each word $\\bar { q ^ { } = } \\{ w _ { i } \\} _ { i = 1 } ^ { p }$ , ",
777
+ "bbox": [
778
+ 174,
779
+ 130,
780
+ 825,
781
+ 202
782
+ ],
783
+ "page_idx": 6
784
+ },
785
+ {
786
+ "type": "equation",
787
+ "img_path": "images/f0220d45363526bd9fe98c14b50ab1ff0fa23895e74ef7bd6248490996c59f29.jpg",
788
+ "text": "$$\nh ( q ) = \\sum _ { i = 1 } ^ { p } W _ { q } [ w _ { i } ]\n$$",
789
+ "text_format": "latex",
790
+ "bbox": [
791
+ 433,
792
+ 218,
793
+ 563,
794
+ 261
795
+ ],
796
+ "page_idx": 6
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "Then, to find the relevant fact from the memory M, we call the $K$ -MIPS-based reader module with $h ( q )$ as the query. This uses Equation 3 and 4 to compute the output of the reader $R _ { o u t }$ . The reader is trained by minimizing the Negative Log Likelihood (NLL) of the correct fact. ",
801
+ "bbox": [
802
+ 174,
803
+ 271,
804
+ 825,
805
+ 314
806
+ ],
807
+ "page_idx": 6
808
+ },
809
+ {
810
+ "type": "equation",
811
+ "img_path": "images/493cf335b5fdf3ef16672d3d459e89512ab8f84bbf31966cedfbea184d345c0e.jpg",
812
+ "text": "$$\n\\mathcal { T } _ { \\theta } = \\sum _ { i = 1 } ^ { N } - \\log ( R _ { o u t } [ f _ { i } ] )\n$$",
813
+ "text_format": "latex",
814
+ "bbox": [
815
+ 413,
816
+ 332,
817
+ 584,
818
+ 376
819
+ ],
820
+ "page_idx": 6
821
+ },
822
+ {
823
+ "type": "text",
824
+ "text": "where $f _ { i }$ is the index of the correct fact in $W _ { m }$ . We are fixing the memory embeddings to the TransE (Bordes et al., 2013) embeddings and learning only the question embeddings. ",
825
+ "bbox": [
826
+ 174,
827
+ 387,
828
+ 821,
829
+ 416
830
+ ],
831
+ "page_idx": 6
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "This model is simpler than the one reported in (Bordes et al., 2015) so that it is esay to analyze the effect of various memory reading strategies. ",
836
+ "bbox": [
837
+ 176,
838
+ 422,
839
+ 823,
840
+ 452
841
+ ],
842
+ "page_idx": 6
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "5.3 TRAINING DETAILS ",
847
+ "text_level": 1,
848
+ "bbox": [
849
+ 176,
850
+ 469,
851
+ 351,
852
+ 484
853
+ ],
854
+ "page_idx": 6
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "We trained the model with the Adam optimizer (Kingma & Ba, 2014), with a fixed learning rate of 0.001. We used mini-batches of size 128. We used 200 dimensional embeddings for the TransE entities, yielding 600 dimensional embeddings for facts by concatenating the embeddings of the subject, relation and object. We also experimented with summing the entities in the triple instead of concatenating, but we found that it was difficult for the model to differentiate facts this way. The only learnable parameters by the HMN model are the question word embeddings. The entity distribution in SimpleQuestions is extremely sparse and hence, following Bordes et al. (2015), we also add artificial questions for all the facts for which we do not have natural language questions. Unlike Bordes et al. (2015), we do not add any other additional tasks like paraphrase detection to the model, mainly to study the effect of the reader. We stopped training for all the models when the validation accuracy consistently decreased for 3 epochs. ",
859
+ "bbox": [
860
+ 174,
861
+ 496,
862
+ 825,
863
+ 648
864
+ ],
865
+ "page_idx": 6
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "5.4 EXACT $K$ -MIPS IMPROVES ACCURACY ",
870
+ "text_level": 1,
871
+ "bbox": [
872
+ 174,
873
+ 667,
874
+ 486,
875
+ 681
876
+ ],
877
+ "page_idx": 6
878
+ },
879
+ {
880
+ "type": "text",
881
+ "text": "In this section, we compare the performance of the full soft attention reader and exact $K$ -MIPS attention readers. Our goal is to verify that $K$ -MIPS attention is in fact a valid and useful attention mechanism and see how it fares when compared to full soft attention. For $K$ -MIPS attention, we tried $K \\in \\ 1 0 , 5 0 , 1 0 0 , 1 0 0 0$ . We would like to emphasize that, at training time, along with $K$ candidates for a particular question, we also add the $K$ -candidates for each question in the minibatch. So the exact size of the softmax layer would be higer than $K$ during training. In Table 1, we report the test performance of memory networks using the soft attention reader and $K$ -MIPS attention reader. We also report the average softmax size during training. From the table, it is clear that the $K$ -MIPS attention readers improve the performance of the network compared to soft attention reader. In fact, smaller the value of $K$ is, better the performance. This result suggests that it is better to use a $K$ -MIPS layer instead of softmax layer whenever possible. It is interesting to see that the convergence of the model is not slowed down due to this change in softmax computation (as shown in Figure 1). ",
882
+ "bbox": [
883
+ 174,
884
+ 694,
885
+ 825,
886
+ 875
887
+ ],
888
+ "page_idx": 6
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "This experiment confirms the usefulness of $K$ -MIPS attention. However, exact $K$ -MIPS has the same complexity as a full softmax. Hence, to scale up the training, we need more efficient forms of $K$ -MIPS attention, which is the focus of next experiment. ",
893
+ "bbox": [
894
+ 176,
895
+ 882,
896
+ 823,
897
+ 924
898
+ ],
899
+ "page_idx": 6
900
+ },
901
+ {
902
+ "type": "table",
903
+ "img_path": "images/ce4776af7ed0674745d9ed9a3a3da7db1681faaf38a0a71cc5637dcd9e19fff7.jpg",
904
+ "table_caption": [
905
+ "Table 1: Accuracy in SQ test-set and average size of memory used. 10-softmax has high performance while using only smaller amount of memory. "
906
+ ],
907
+ "table_footnote": [],
908
+ "table_body": "<table><tr><td>Model</td><td>Test Acc.</td><td>Avg.S Softmax Size</td></tr><tr><td>Full-softmax</td><td>59.5</td><td>108442</td></tr><tr><td>10-MIPS</td><td>62.2</td><td>1290</td></tr><tr><td>50-MIPS</td><td>61.2</td><td>6180</td></tr><tr><td>100-MIPS</td><td>60.6</td><td>11928</td></tr><tr><td>1000-MIPS</td><td>59.6</td><td>70941</td></tr><tr><td>Clustering</td><td>51.5</td><td>20006</td></tr><tr><td>PCA-Tree</td><td>32.4</td><td>21108</td></tr><tr><td>WTA-Hash</td><td>40.2</td><td>20008</td></tr></table>",
909
+ "bbox": [
910
+ 178,
911
+ 109,
912
+ 508,
913
+ 239
914
+ ],
915
+ "page_idx": 7
916
+ },
917
+ {
918
+ "type": "image",
919
+ "img_path": "images/b66b6199342919484c2188a6fa67d80764976502f29b495ffa56e562b32f49e6.jpg",
920
+ "image_caption": [
921
+ "Figure 1: Validation curve for various models. Convergence is not slowed down by $\\mathbf { k }$ -softmax. "
922
+ ],
923
+ "image_footnote": [],
924
+ "bbox": [
925
+ 573,
926
+ 112,
927
+ 784,
928
+ 239
929
+ ],
930
+ "page_idx": 7
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "5.5 APPROXIMATE $K$ -MIPS BASED LEARNING ",
935
+ "text_level": 1,
936
+ "bbox": [
937
+ 174,
938
+ 330,
939
+ 511,
940
+ 344
941
+ ],
942
+ "page_idx": 7
943
+ },
944
+ {
945
+ "type": "text",
946
+ "text": "As mentioned previously, designing faster algorithms for $K$ -MIPS is an active area of research. Auvolat et al. (2015) compared several state-of-the-art data-dependent and data-independent methods for faster approximate $K$ -MIPS and it was found that clustering-based MIPS performs significantly better than other approaches. However the focus of the comparison was on performance during the inference stage. In HMNs, $K$ -MIPS must be used at both training stage and inference stages. To verify if the same trend can been seen during learning stage as well, we compared three different approaches: ",
947
+ "bbox": [
948
+ 174,
949
+ 363,
950
+ 825,
951
+ 460
952
+ ],
953
+ "page_idx": 7
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "Clustering: This was explained in detail in section 3. ",
958
+ "bbox": [
959
+ 174,
960
+ 467,
961
+ 526,
962
+ 482
963
+ ],
964
+ "page_idx": 7
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "WTA-Hash: Winner Takes All hashing (Vijayanarasimhan et al., 2014) is a hashing-based $K$ -MIPS algorithm which also converts MIPS to MCSS by augmenting additional dimensions to the vectors. This method used $n$ hash functions and each hash function does $p$ different random permutations of the vector. Then the prefix constituted by the first $k$ elements of each permuted vector is used to construct the hash for the vector. ",
969
+ "bbox": [
970
+ 174,
971
+ 489,
972
+ 825,
973
+ 559
974
+ ],
975
+ "page_idx": 7
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "PCA-Tree: PCA-Tree (Bachrach et al., 2014) is the state-of-the-art tree-based method, which converts MIPS to NNS by vector augmentation. It uses the principal components of the data to construct a balanced binary tree with data residing in the leaves. ",
980
+ "bbox": [
981
+ 174,
982
+ 565,
983
+ 823,
984
+ 608
985
+ ],
986
+ "page_idx": 7
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "For a fair comparison, we varied the hyper-parameters of each algorithm in such a way that the average speedup is approximately the same. Table 1 shows the performance of all three methods, compared to a full softmax. From the table, it is clear that the clustering-based method performs significantly better than the other two methods. However, performances are lower when compared to the performance of the full softmax. ",
991
+ "bbox": [
992
+ 174,
993
+ 614,
994
+ 825,
995
+ 684
996
+ ],
997
+ "page_idx": 7
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "As a next experiment, we analyze various the strategies proposed in Section 3.1 to reduce the approximation bias of clustering-based $K$ -MIPS: ",
1002
+ "bbox": [
1003
+ 174,
1004
+ 691,
1005
+ 821,
1006
+ 719
1007
+ ],
1008
+ "page_idx": 7
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Top-K: This strategy picks the vectors in the top $K$ clusters as candidates. ",
1013
+ "bbox": [
1014
+ 176,
1015
+ 727,
1016
+ 661,
1017
+ 741
1018
+ ],
1019
+ "page_idx": 7
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "Sample-K: This strategy samples $K$ clusters, without replacement, based on a probability distribution based on the dot product of the query with the cluster centroids. When combined with the Top- $K$ strategy, we ignore clusters selected by the Top- $k$ strategy for sampling. ",
1024
+ "bbox": [
1025
+ 174,
1026
+ 748,
1027
+ 825,
1028
+ 790
1029
+ ],
1030
+ "page_idx": 7
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "Rand-block: This strategy divides the memory into several blocks and uniformly samples a random block as candidate. ",
1035
+ "bbox": [
1036
+ 176,
1037
+ 797,
1038
+ 823,
1039
+ 825
1040
+ ],
1041
+ "page_idx": 7
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "We experimented with 1000 clusters and 2000 clusters. While comparing various training strategies, we made sure that the effective speedup is approximately the same. Memory access to facts per query for all the models is approximately 20,000, hence yielding a 5X speedup. ",
1046
+ "bbox": [
1047
+ 176,
1048
+ 832,
1049
+ 825,
1050
+ 875
1051
+ ],
1052
+ "page_idx": 7
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Results are given in Table 2. We observe that the best approach is to combine the Top-K and SampleK strategies, with Rand-block not being beneficial. Interestingly, the worst performances correspond to cases where the Sample-K strategy is ignored. ",
1057
+ "bbox": [
1058
+ 176,
1059
+ 882,
1060
+ 823,
1061
+ 924
1062
+ ],
1063
+ "page_idx": 7
1064
+ },
1065
+ {
1066
+ "type": "table",
1067
+ "img_path": "images/2fbe9577e8933566512d520e92afa4374c9cdf32ce115cdad81033f3d0ae3466.jpg",
1068
+ "table_caption": [
1069
+ "Table 2: Accuracy in SQ test set and number of epochs for convergence. "
1070
+ ],
1071
+ "table_footnote": [],
1072
+ "table_body": "<table><tr><td></td><td>Sample-K</td><td>rand-block</td><td>1000 clusters Test Acc.</td><td>epochs</td><td>2000 clusters Test Acc.</td><td>epochs</td></tr><tr><td>Top-K Yes</td><td>No</td><td>No</td><td>50.2</td><td>16</td><td>51.5</td><td>22</td></tr><tr><td>No</td><td>Yes</td><td>No</td><td>52.5</td><td>68</td><td>52.8</td><td>63</td></tr><tr><td>Yes</td><td>Yes</td><td>No</td><td>52.8</td><td>31</td><td>53.1</td><td>26</td></tr><tr><td>Yes</td><td>No</td><td>Yes</td><td>51.8</td><td>32</td><td>52.3</td><td>26</td></tr><tr><td>Yes</td><td>Yes</td><td>Yes</td><td>52.5</td><td>38</td><td>52.7</td><td>19</td></tr></table>",
1073
+ "bbox": [
1074
+ 207,
1075
+ 101,
1076
+ 790,
1077
+ 202
1078
+ ],
1079
+ "page_idx": 8
1080
+ },
1081
+ {
1082
+ "type": "text",
1083
+ "text": "6 CONCLUSION ",
1084
+ "text_level": 1,
1085
+ "bbox": [
1086
+ 174,
1087
+ 247,
1088
+ 320,
1089
+ 263
1090
+ ],
1091
+ "page_idx": 8
1092
+ },
1093
+ {
1094
+ "type": "text",
1095
+ "text": "In this paper, we proposed a hierarchical memory network that exploits $K$ -MIPS for its attentionbased reader. Unlike soft attention readers, $K$ -MIPS attention reader is easily scalable to larger memories. This is achieved by organizing the memory in a hierarchical way. Experiments on the SimpleQuestions dataset demonstrate that exact $K$ -MIPS attention is better than soft attention. However, existing state-of-the-art approximate $K$ -MIPS techniques provide a speedup at the cost of some accuracy. Future research will investigate designing efficient dynamic $K$ -MIPS algorithms, where the memory can be dynamically updated during training. This should reduce the approximation bias and hence improve the overall performance. ",
1096
+ "bbox": [
1097
+ 173,
1098
+ 279,
1099
+ 825,
1100
+ 390
1101
+ ],
1102
+ "page_idx": 8
1103
+ },
1104
+ {
1105
+ "type": "text",
1106
+ "text": "REFERENCES ",
1107
+ "text_level": 1,
1108
+ "bbox": [
1109
+ 174,
1110
+ 411,
1111
+ 285,
1112
+ 426
1113
+ ],
1114
+ "page_idx": 8
1115
+ },
1116
+ {
1117
+ "type": "text",
1118
+ "text": "Alex Auvolat, Sarath Chandar, Pascal Vincent, Hugo Larochelle, and Yoshua Bengio. Clustering is efficient for approximate maximum inner product search. arXiv preprint arXiv:1507.05910, 2015. ",
1119
+ "bbox": [
1120
+ 174,
1121
+ 434,
1122
+ 826,
1123
+ 476
1124
+ ],
1125
+ "page_idx": 8
1126
+ },
1127
+ {
1128
+ "type": "text",
1129
+ "text": "Yoram Bachrach et al. Speeding up the xbox recommender system using a euclidean transformation for inner-product spaces. RecSys ’14, pp. 257–264, 2014. ",
1130
+ "bbox": [
1131
+ 174,
1132
+ 484,
1133
+ 821,
1134
+ 513
1135
+ ],
1136
+ "page_idx": 8
1137
+ },
1138
+ {
1139
+ "type": "text",
1140
+ "text": "Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In Advances in NIPS, pp. 2787–2795. 2013. ",
1141
+ "bbox": [
1142
+ 176,
1143
+ 521,
1144
+ 823,
1145
+ 564
1146
+ ],
1147
+ "page_idx": 8
1148
+ },
1149
+ {
1150
+ "type": "text",
1151
+ "text": "Antoine Bordes, Nicolas Usunier, Sumit Chopra, and Jason Weston. Large-scale simple question answering with memory networks. arXiv preprint arXiv:1506.02075, 2015. ",
1152
+ "bbox": [
1153
+ 173,
1154
+ 571,
1155
+ 823,
1156
+ 602
1157
+ ],
1158
+ "page_idx": 8
1159
+ },
1160
+ {
1161
+ "type": "text",
1162
+ "text": "Jesse Dodge, Andreea Gane, Xiang Zhang, Antoine Bordes, Sumit Chopra, Alexander Miller, Arthur Szlam, and Jason Weston. Evaluating prerequisite qualities for learning end-to-end dialog systems. CoRR, abs/1511.06931, 2015. ",
1163
+ "bbox": [
1164
+ 174,
1165
+ 608,
1166
+ 823,
1167
+ 651
1168
+ ],
1169
+ "page_idx": 8
1170
+ },
1171
+ {
1172
+ "type": "text",
1173
+ "text": "Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. ",
1174
+ "bbox": [
1175
+ 173,
1176
+ 660,
1177
+ 825,
1178
+ 689
1179
+ ],
1180
+ "page_idx": 8
1181
+ },
1182
+ {
1183
+ "type": "text",
1184
+ "text": "Sébastien Jean, KyungHyun Cho, Roland Memisevic, and Yoshua Bengio. On using very large target vocabulary for neural machine translation. In Proceedings of ACL,2015, pp. 1–10, 2015. ",
1185
+ "bbox": [
1186
+ 171,
1187
+ 695,
1188
+ 821,
1189
+ 726
1190
+ ],
1191
+ "page_idx": 8
1192
+ },
1193
+ {
1194
+ "type": "text",
1195
+ "text": "Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. ",
1196
+ "bbox": [
1197
+ 173,
1198
+ 733,
1199
+ 821,
1200
+ 762
1201
+ ],
1202
+ "page_idx": 8
1203
+ },
1204
+ {
1205
+ "type": "text",
1206
+ "text": "Ankit Kumar et al. Ask me anything: Dynamic memory networks for natural language processing. CoRR, abs/1506.07285, 2015. ",
1207
+ "bbox": [
1208
+ 173,
1209
+ 770,
1210
+ 821,
1211
+ 799
1212
+ ],
1213
+ "page_idx": 8
1214
+ },
1215
+ {
1216
+ "type": "text",
1217
+ "text": "Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. In International Conference on Learning Representations, Workshop Track, 2013. ",
1218
+ "bbox": [
1219
+ 173,
1220
+ 808,
1221
+ 823,
1222
+ 849
1223
+ ],
1224
+ "page_idx": 8
1225
+ },
1226
+ {
1227
+ "type": "text",
1228
+ "text": "Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. arXiv preprint arXiv:1402.0030, 2014. ",
1229
+ "bbox": [
1230
+ 173,
1231
+ 858,
1232
+ 821,
1233
+ 887
1234
+ ],
1235
+ "page_idx": 8
1236
+ },
1237
+ {
1238
+ "type": "text",
1239
+ "text": "Frederic Morin and Yoshua Bengio. Hierarchical probabilistic neural network language model. In Robert G. Cowell and Zoubin Ghahramani (eds.), Proceedings of AISTATS, pp. 246–252, 2005. ",
1240
+ "bbox": [
1241
+ 176,
1242
+ 895,
1243
+ 820,
1244
+ 924
1245
+ ],
1246
+ "page_idx": 8
1247
+ },
1248
+ {
1249
+ "type": "text",
1250
+ "text": "Behnam Neyshabur and Nathan Srebro. On symmetric and asymmetric lshs for inner product search. In Proceedings of the 31st International Conference on Machine Learning, 2015. ",
1251
+ "bbox": [
1252
+ 171,
1253
+ 103,
1254
+ 821,
1255
+ 132
1256
+ ],
1257
+ "page_idx": 9
1258
+ },
1259
+ {
1260
+ "type": "text",
1261
+ "text": "Jack W Rae, Jonathan J Hunt, Tim Harley, Ivo Danihelka, Andrew Senior, Greg Wayne, Alex Graves, and Timothy P Lillicrap. Scaling memory-augmented neural networks with sparse reads and writes. In Advances in NIPS. 2016. ",
1262
+ "bbox": [
1263
+ 176,
1264
+ 140,
1265
+ 821,
1266
+ 184
1267
+ ],
1268
+ "page_idx": 9
1269
+ },
1270
+ {
1271
+ "type": "text",
1272
+ "text": "Parikshit Ram and Alexander G. Gray. Maximum inner-product search using cone trees. KDD ’12, pp. 931–939, 2012. ",
1273
+ "bbox": [
1274
+ 169,
1275
+ 193,
1276
+ 823,
1277
+ 222
1278
+ ],
1279
+ "page_idx": 9
1280
+ },
1281
+ {
1282
+ "type": "text",
1283
+ "text": "Anshumali Shrivastava and Ping Li. Asymmetric LSH (ALSH) for sublinear time maximum inner product search (MIPS). In Advances in Neural Information Processing Systems 27, pp. 2321– 2329, 2014. ",
1284
+ "bbox": [
1285
+ 174,
1286
+ 229,
1287
+ 823,
1288
+ 272
1289
+ ],
1290
+ "page_idx": 9
1291
+ },
1292
+ {
1293
+ "type": "text",
1294
+ "text": "Anshumali Shrivastava and Ping Li. Improved asymmetric locality sensitive hashing (alsh) for maximum inner product search (mips). In Proceedings of Conference on Uncertainty in Artificial Intelligence (UAI), 2015. ",
1295
+ "bbox": [
1296
+ 171,
1297
+ 281,
1298
+ 823,
1299
+ 325
1300
+ ],
1301
+ "page_idx": 9
1302
+ },
1303
+ {
1304
+ "type": "text",
1305
+ "text": "Ryan Spring and Anshumali Shrivastava. Scalable and sustainable deep learning via randomized hashing. CoRR, abs/1602.08194, 2016. ",
1306
+ "bbox": [
1307
+ 173,
1308
+ 333,
1309
+ 823,
1310
+ 363
1311
+ ],
1312
+ "page_idx": 9
1313
+ },
1314
+ {
1315
+ "type": "text",
1316
+ "text": "Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. arXiv preprint arXiv:1503.08895, 2015. ",
1317
+ "bbox": [
1318
+ 173,
1319
+ 371,
1320
+ 821,
1321
+ 400
1322
+ ],
1323
+ "page_idx": 9
1324
+ },
1325
+ {
1326
+ "type": "text",
1327
+ "text": "Sudheendra Vijayanarasimhan, Jon Shlens, Rajat Monga, and Jay Yagnik. Deep networks with large output spaces. arXiv preprint arXiv:1412.7479, 2014. ",
1328
+ "bbox": [
1329
+ 173,
1330
+ 409,
1331
+ 821,
1332
+ 439
1333
+ ],
1334
+ "page_idx": 9
1335
+ },
1336
+ {
1337
+ "type": "text",
1338
+ "text": "Jason Weston, Antoine Bordes, Sumit Chopra, and Tomas Mikolov. Towards ai-complete question answering: a set of prerequisite toy tasks. arXiv preprint arXiv:1502.05698, 2015a. ",
1339
+ "bbox": [
1340
+ 171,
1341
+ 446,
1342
+ 823,
1343
+ 477
1344
+ ],
1345
+ "page_idx": 9
1346
+ },
1347
+ {
1348
+ "type": "text",
1349
+ "text": "Jason Weston, Sumit Chopra, and Antoine Bordes. Memory networks. In Proceedings Of The International Conference on Representation Learning (ICLR 2015), 2015b. In Press. ",
1350
+ "bbox": [
1351
+ 173,
1352
+ 484,
1353
+ 823,
1354
+ 513
1355
+ ],
1356
+ "page_idx": 9
1357
+ },
1358
+ {
1359
+ "type": "text",
1360
+ "text": "Ronald J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine Learning, 8:229–256, 1992. ",
1361
+ "bbox": [
1362
+ 173,
1363
+ 522,
1364
+ 823,
1365
+ 551
1366
+ ],
1367
+ "page_idx": 9
1368
+ },
1369
+ {
1370
+ "type": "text",
1371
+ "text": "Caiming Xiong, Stephen Merity, and Richard Socher. Dynamic memory networks for visual and textual question answering. CoRR, abs/1603.01417, 2016. ",
1372
+ "bbox": [
1373
+ 173,
1374
+ 560,
1375
+ 823,
1376
+ 589
1377
+ ],
1378
+ "page_idx": 9
1379
+ },
1380
+ {
1381
+ "type": "text",
1382
+ "text": "Wojciech Zaremba and Ilya Sutskever. Reinforcement learning neural turing machines. CoRR, abs/1505.00521, 2015. ",
1383
+ "bbox": [
1384
+ 173,
1385
+ 598,
1386
+ 825,
1387
+ 627
1388
+ ],
1389
+ "page_idx": 9
1390
+ },
1391
+ {
1392
+ "type": "text",
1393
+ "text": "Shi Zhong. Efficient online spherical k-means clustering. In Neural Networks, 2005. IJCNN’05. Proceedings. 2005 IEEE International Joint Conference on, volume 5, pp. 3180–3185. IEEE, 2005. ",
1394
+ "bbox": [
1395
+ 174,
1396
+ 636,
1397
+ 825,
1398
+ 678
1399
+ ],
1400
+ "page_idx": 9
1401
+ }
1402
+ ]
parse/train/BJ0Ee8cxx/BJ0Ee8cxx_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJ0Ee8cxx/BJ0Ee8cxx_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJ46w6Ule/BJ46w6Ule.md ADDED
@@ -0,0 +1,344 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DYNAMIC PARTITION MODELS
2
+
3
+ # Marc Goessling
4
+
5
+ # Yali Amit
6
+
7
+ Department of Statistics
8
+ University of Chicago
9
+ Chicago, IL 60637, USA
10
+ goessling@galton.uchicago.edu
11
+ Departments of Statistics and Computer Science
12
+ University of Chicago
13
+ Chicago, IL 60637, USA
14
+ amit@galton.uchicago.edu
15
+
16
+ # ABSTRACT
17
+
18
+ We present a new approach for learning compact and intuitive distributed representations with binary encoding. Rather than summing up expert votes as in products of experts, we employ for each variable the opinion of the most reliable expert. Data points are hence explained through a partitioning of the variables into expert supports. The partitions are dynamically adapted based on which experts are active. During the learning phase we adopt a smoothed version of this model that uses separate mixtures for each data dimension. In our experiments we achieve accurate reconstructions of high-dimensional data points with at most a dozen experts.
19
+
20
+ # 1 INTRODUCTION
21
+
22
+ We consider the task of learning a compact binary representation (e.g. Goessling & Amit, 2015). That means we are seeking a parsimonious set of experts, which can explain a given collection of multivariate data points. In contrast to most existing approaches the emphasis here is on finding experts that are individually meaningful and that have disjoint responsibilities. Ideally, each expert explains only one factor of variation in the data and for each factor of variation there is exactly one expert that focuses on it.
23
+
24
+ Formally, the experts $\mathbb { P } _ { k }$ , $k = 1 , \ldots , K$ , are probability distributions that depend on binary latent variables $\pmb { h } ( k )$ . The latent state $^ { h }$ specifies which experts are active and has to be inferred for each $D$ -dimensional data point $_ { \textbf { \em x } }$ . The active experts then define a probability distribution $\mathbb { P }$ . The goal of representation learning is to train experts such that the conditional likelihood $\mathbb { P } ( \pmb { x } | \pmb { h } )$ of the data given the latent activations is maximized.
25
+
26
+ We start by describing a simple model family, which forms the basis of our work. A partition model (Hartigan, 1990) makes use of a manually specified partitioning of the $D$ variables into subsets
27
+
28
+ $$
29
+ \{ 1 , \ldots , D \} = \bigcup _ { \ell = 1 } ^ { L } S _ { \ell } .
30
+ $$
31
+
32
+ For each subset of variables ${ \pmb x } ( S _ { \ell } ) = ( { \pmb x } ( d ) ) _ { d \in S _ { \ell } }$ there exists a separate model $\mathbb { P } _ { \ell }$ . It is then typically assumed that variables in different subsets are conditionally independent, i.e.,
33
+
34
+ $$
35
+ \mathbb { P } ( \pmb { x } | \pmb { h } ) = \prod _ { \ell = 1 } ^ { L } \mathbb { P } _ { \ell } \pmb { ( x ( S _ { \ell } ) } | \pmb { h ( \ell ) } ) .
36
+ $$
37
+
38
+ The model is completed by specifying a prior distribution $\mathbb { P } ( h )$ for the latent state $^ { h }$ . One advantage of partition models is that estimating $\mathbb { P } _ { \ell }$ from observations is straightforward, while learning expert models in general requires computationally involved procedures (Bengio et al., 2013). However, in order to be able to define a satisfactory partitioning of the variables some prior knowledge about the dependence structure is needed. For image data a common choice is to use a regular grid that divides the image into patches (e.g. Pal et al., 2002). In general, a good partitioning is characterized by providing weakly dependent subsets of variables so that the conditional independence assumption (1) is reasonable and the distribution of the latent variables is easy to model. Unfortunately, often there simply is no single fixed partitioning that works well for the whole dataset because the set of variables, which are affected by different factors of variation, might overlap. This restricts the scenarios in which partition models are useful.
39
+
40
+ In this paper we extend partition models to allow for dynamically adapting partitionings. In Section 2 we introduce the model and present an appropriate learning procedure. Related work is discussed in Section 3. Special emphasis is given to the comparison with products of experts (Hinton, 2002). Experiments on binary and real-valued data are performed in Section 4. While it is important to explain high-dimensional data points through multiple experts, our work shows that it is possible to assign the responsibility for individual variables to a single expert (rather than having all active experts speak for every variable).
41
+
42
+ # 2 DYNAMIC PARTITION MODELS
43
+
44
+ Our main proposal is to define for each expert $\mathbb { P } _ { k }$ its level of expertise $e _ { k } \in \mathbb { R } _ { + } ^ { D }$ for all variables. We can then dynamically partition the variables based on the active experts. Specifically, for each variable we employ the most reliable (active) expert
45
+
46
+ $$
47
+ \mathbb { P } ( \pmb { x } | h ) = \prod _ { d = 1 } ^ { D } \mathbb { P } _ { k ^ { \star } ( d ) } ( \pmb { x } ( d ) ) , \qquad k ^ { \star } ( d ) = \operatorname * { a r g m a x } _ { k : h ( k ) = 1 } e _ { k } ( d ) .
48
+ $$
49
+
50
+ That means, each variable ${ \pmb x } ( d )$ is explained by only a single expert $k ^ { \star } ( d )$ . The partitioning into expert supports $S _ { k } ( \pmb { h } ) = \{ d \in \{ 1 , \dots , D \} : k ^ { \star } ( d ) = k \}$ is determined dynamically based on the latent configuration $^ { h }$ . We hence call our model a dynamic partition model.
51
+
52
+ # 2.1 INFERENCE
53
+
54
+ In the inference step we try to find for each data point ${ \mathbf { } } x _ { n }$ the subset of experts $\{ k : h _ { n } ( k ) = 1 \}$ that maximizes $P ( x _ { n } \mid h _ { n } )$ . To do this, we suggest to sequentially activate the expert that most improves the likelihood, until the likelihood cannot be improved anymore. This approach is called likelihood matching pursuit (Goessling & Amit, 2015). The greedy search works well for our model because we are working with a small set of experts and each expert focuses on a rather different structure in the data. Consequently, the posterior distribution on the latent variables given ${ \pmb x } _ { n }$ is often highly peaked at a state $h _ { n }$ (note that for high-dimensional data the effect of the prior $\mathbb { P } ( h )$ is typically negligible).
55
+
56
+ # 2.2 LEARNING
57
+
58
+ In contrast to traditional approaches, which combine multiple experts for individual variables, training the experts in a dynamic partition model is trivial. Indeed, the maximum-likelihood estimates are simply the empirical averages over all observations for which the expert was responsible. For example, the expert means can be estimated from training data ${ \mathbf { } } x _ { n }$ , $n = 1 , \ldots , N$ , as
59
+
60
+ $$
61
+ \mathring { \mu } _ { k } ( d ) = \frac { \displaystyle \sum _ { n = 1 } ^ { N } \mathbb { 1 } \big \{ k _ { n } ^ { \star } ( d ) = k \big \} \pmb { x } _ { n } ( d ) } { \displaystyle \sum _ { n = 1 } ^ { N } \mathbb { 1 } \big \{ k _ { n } ^ { \star } ( d ) = k \big \} } .
62
+ $$
63
+
64
+ Here, $k _ { n } ^ { \star } ( d )$ denotes the expert with the highest level of expertise $e _ { k } ( d )$ among all experts $k$ with $h _ { n } ( k ) \ddot { = 1 }$ .
65
+
66
+ # 2.2.1 EXPERTISE-WEIGHTED COMPOSITION
67
+
68
+ In order to compute the estimator in (3) the levels of expertise $_ { e _ { k } }$ have to be known. Since in this paper we are trying to train the experts as well as the associated levels of expertise we consider a smoothing of the maximum-expertise composition (2) to motivate our learning procedure. Rather than using the expert with the highest level of expertise, we form a mixture of the active experts, where the mixture weight is proportional to the level of expertise. Thus, the smoothed composition
69
+
70
+ rule is
71
+
72
+ $$
73
+ \widetilde { \mathbb { P } } ( { \pmb x } | h ) = \prod _ { d = 1 } ^ { D } \sum _ { k = 1 } ^ { K } r _ { k } ( d ) \mathbb { P } _ { k } ( { \pmb x } ( d ) ) , \qquad { \pmb r } _ { k } ( d ) = \left\{ \begin{array} { l l } { \frac { e _ { k } ( d ) } { \sum _ { k ^ { \prime } : h ( k ^ { \prime } ) = 1 } e _ { k ^ { \prime } } ( d ) } } & { \mathrm { i f ~ } h ( k ) = 1 } \\ { 0 } & { \mathrm { i f ~ } h ( k ) = 0 } \end{array} \right. .
74
+ $$
75
+
76
+ In contrast to classical mixture models (e.g. McLachlan & Peel, 2004) we use different mixture weights for each dimension $d \in \{ 1 , \ldots , D \}$ . The mixture weight $\pmb { r } _ { k } ( d )$ is the degree of responsibility of $k$ -th expert for the $d$ -th dimension and depends on the latent state $^ { h }$ . An expert with a medium level of expertise assumes full responsibility if no other reliable expert is present and takes on a low degree of responsibility if experts with a higher level of expertise are present.
77
+
78
+ According to the total variance formula
79
+
80
+ $$
81
+ \mathbb { V } [ \mathbb { P } ] = \mathbb { E } _ { \pmb { r } _ { k } } [ \mathbb { V } [ \mathbb { P } _ { k } ] ] + \mathbb { V } _ { \pmb { r } _ { k } } [ \mathbb { E } [ \mathbb { P } _ { k } ] ]
82
+ $$
83
+
84
+ the variance of a mixture is always larger than the smallest variance of its components. In other words, the precision of the smoothed model is maximized when all the mixture weight (individually for each dimension) is concentrated on the most precise expert. We can thus learn a dynamic partition model in an EM manner (Dempster et al., 1977) by interleaving inference steps with updates of the experts and levels of expertise in the smoothed model.
85
+
86
+ # 2.2.2 EXPERT UPDATE
87
+
88
+ The sequential inference procedure (from Section 2.1) provides for each data point ${ \mathbf { } } x _ { n }$ the latent representation $h _ { n }$ . We denote the corresponding expert responsibilities (using the current estimates for the level of expertise) by ${ \bf \nabla } r _ { n k }$ . The smooth analog to the hard update equation (3) is a responsibilityweighted average of the training samples
89
+
90
+ $$
91
+ \mu _ { k } ( d ) = \frac { \displaystyle \sum _ { n = 1 } ^ { N } r _ { n k } ( d ) \pmb { x _ { n } } ( d ) + \epsilon \pmb { \mu _ { 0 } } } { \displaystyle \sum _ { n = 1 } ^ { N } r _ { n k } ( d ) + \epsilon } .
92
+ $$
93
+
94
+ For stability we added a term that shrinks the updated templates towards some target $\pmb { \mu _ { 0 } }$ if the total responsibility of the expert is small. In our experiments we set ${ \boldsymbol { \mu } } _ { \mathbf { 0 } }$ to the average of all training examples. The update rule implies that the experts have local supports, in the sense that they are uninformative about variables for which they are not responsible.
95
+
96
+ For binary data the mean templates $\mu _ { k }$ are all we need. Continuous data $\pmb { x } \in \mathbb { R } ^ { D }$ is modeled through Gaussians and hence we also have to specify the variance ${ \boldsymbol { v } } _ { k }$ of the experts. We again use a responsibility-weighted average
97
+
98
+ $$
99
+ { v _ { k } } ( d ) = \frac { \displaystyle \sum _ { n = 1 } ^ { N } r _ { n k } ( d ) ( { \pmb x } _ { n } ( d ) - { \pmb \mu } _ { k } ( d ) ) ^ { 2 } + \epsilon { \pmb v } _ { 0 } } { \displaystyle \sum _ { n = 1 } ^ { N } r _ { n k } ( d ) + \epsilon } ,
100
+ $$
101
+
102
+ where ${ \pmb v _ { 0 } }$ is the empirical variance of all training samples.
103
+
104
+ # 2.2.3 EXPERTISE UPDATE
105
+
106
+ We now turn to the updates of the levels of expertise. The log-likelihood of the smoothed model (4) as a function of $e _ { k }$ is rather complex. Using gradient descent is thus problematic because the derivatives with respect to $e _ { k }$ can have very different scales, which makes it difficult to choose an appropriate learning rate and hence the convergence could be slow. However, exact optimization is not necessary because in the end only the order of the levels of expertise matters. Consequently, we propose to adjust $e _ { k } ( d )$ only based on the sign of the gradient. We simply multiply or divide the current value by a constant $C$ . If the gradient is very close to 0 we leave $e _ { k } ( d )$ unchanged. For all our experiments we used $C = 2$ . Larger values can speed up the convergence but sometimes lead to a worse solution. Using an exponential decay is common practice when learning levels of expertise (e.g. Herbster & Warmuth, 1998).
107
+
108
+ In the learning procedure we perform the expertise update first. We then recompute the responsibilities using these new levels of expertise and update the experts. Our algorithm typically converges after about 10 iterations.
109
+
110
+ # 3 RELATED WORK
111
+
112
+ Herbster & Warmuth (1998) proposed an algorithm for tracking the best expert in a sequential prediction task. In their work it is assumed that a linear ordering of the variables is known such that the expert with the highest level of expertise is constant on certain segments. In contrast to that, our approach can be applied to an arbitrary permutation of the variables. Moreover, they consider a single sequence of variables with a fixed partitioning into experts supports. In our setup the partitioning changes dynamically depending on the observed sample. However, the greatest difference to our work is that Herbster & Warmuth (1998) do not learn the individual experts but only focus on training the levels of expertise.
113
+
114
+ Lucke & Sahani ¨ (2008) studied a composition rule that also partitions the variables into expert supports. In their model the composed template is simply the maximum of the experts templates $\mu _ { k }$ . This rule is only useful in special cases. A generalization, in which the composition depends on the maximum and the minimum of the expert templates $\mu _ { k } ( d )$ , was considered by Goessling & Amit (2015). While the motivation for that rule was similar, the maximum-expertise rule in this paper is more principled and can be applied to continuous data.
115
+
116
+ In the work by Amit & Trouve´ (2007) a simple average (i.e., an equal mixture) of the individual templates was used. With such a composition rule, all experts are equally responsible for each of the variables and hence specialization on local structures is not possible. To circumvent this problem, in their work $e _ { k } ( d )$ was manually set to 1 for some subset of the dimensions (depending on a latent shift variable) and to 0 elsewhere.
117
+
118
+ A popular model family with latent binary representation are products of experts (Hinton, 2002). In such a model the individual distributions $\mathbb { P } _ { k }$ are multiplied together and renormalized. Computation of the normalizing constant is in general intractable though. A special case, in which an explicit normalization is possible, are restricted Boltzmann machines (Hinton, 2002). In these models the experts are product Bernoulli distributions with templates $\mu _ { k } \in [ 0 , 1 ] ^ { D }$ . The composed distribution is then also a product Bernoulli distribution with composed template
119
+
120
+ $$
121
+ \begin{array} { r } { \pmb { \mu } _ { \mathrm { R B M } } ( d ) = \sigma \left( \sum _ { k : h ( k ) = 1 } \pmb { w } _ { k } ( d ) \right) , } \end{array}
122
+ $$
123
+
124
+ where the weights ${ \pmb w } _ { \pmb k } ( d ) = \log ( { \pmb \mu } _ { \pmb k } ( d ) / ( 1 - { \pmb \mu } _ { \pmb k } ( d ) ) \in \mathbb { R }$ are the log-odds of the experts and $\sigma ( t ) = ( 1 + \exp ( - t ) ) ^ { - 1 }$ is the logistic function. This sum-of-log-odds composition rule arises naturally from generalized linear models for binary data because the log-odds are the canonical parameter of the Bernoulli family. In a product of experts, the variance of the composition is usually smaller than the smallest variance of the experts. As a consequence, products of experts tend to employ many experts for each dimension (for more details on this issue see Goessling & Amit (2015)). Even with an L1-penalty on the votes ${ \pmb w } _ { { \pmb k } } ( d )$ the responsibility for individual variables ${ \pmb x } ( d )$ is typically still shared among many experts. The reason for this is that under the constraint $\begin{array} { r } { \sum _ { k } { \boldsymbol { w } } _ { \boldsymbol { k } } ( d ) = { \boldsymbol { w } } ( d ) } \end{array}$ the quantity $\textstyle \sum _ { k } | w _ { k } ( d ) |$ is minimized whenever ${ \pmb w } _ { \pmb k } ( d )$ has the same sign for all $k$ . The usual inference procedure for products of experts independently activates experts based on their inner product with the data point. In particular, not just the most probable expert configuration is determined but the whole posterior distribution on latent states given the data is explored through Monte Carlo methods. For learning in products of experts, simple update rules like (5) and (6) cannot be used because for each expert the effects of all other experts have to be factored out. Dynamic partition models essentially decompose the expert votes $\pmb { w } _ { k }$ into expert opinions $\mu _ { k }$ and levels of expertise $e _ { k }$ . Apart from the computational advantages for learning, this introduces an additional degree of flexibility because the expert supports are adjusted depending on which other experts are present (cf. Figure 5). Moreover, the decomposition into opinions and levels of expertise avoids ambiguities. For example, a vote ${ \pmb w } _ { \pmb k } ( d ) \approx 0$ could mean that $\mu _ { k } ( d ) \approx 1 / 2$ or that $\bar { e _ { k } ( d ) } \approx 0$ .
125
+
126
+ Another common model for representation learning are autoencoders (Vincent et al., 2008), which can be considered as mean-field approximations of restricted Boltzmann machines that use latent variables $\displaystyle h ( k )$ with values in $[ 0 , 1 ]$ . To obtain a sparse representation a penalty on the number of active experts can be added $( \mathrm { N g } , 2 0 1 1 )$ ). Such approaches are also known as sparse dictionaries (e.g., Elad, 2010) and are based on opinion pools of the form $\begin{array} { r } { \sum _ { k } h ( k ) w _ { k } ( d ) } \end{array}$ . The strength of the sparsity penalty is an additional tuning parameter which has to be tuned. In dynamic partition models sparse activations are inherent. In the next section, we experimentally compare products of experts, autoencoders and sparse dictionaries to our proposed model.
127
+
128
+ ![](images/f59e7097b4924e3f977d4d06826d4e2856d7b4228ca0a4275485a982bdc0af51.jpg)
129
+ Figure 1: Expert training for the synthetic dataset. Each panel shows the probabilities (white/black corresponds to $\mu _ { k } ( d ) = 0 / 1 \rangle$ of the 10 experts (rows) for the 10 dimensions (columns). 1st panel: Random initialization. 2nd-4th panel: Our learning procedure after 3/5/15 iterations.
130
+
131
+ ![](images/02d6de2310bf0a201411bf6152906617d129961005914ac13f034c1d48d8cf62.jpg)
132
+ Figure 2: Trained experts for the synthetic data after 1,000 iterations using an autoencoder (1st panel), a sparse dictionary (2nd panel) and a restricted Boltzmann machine (3rd panel).
133
+
134
+ # 4 EXPERIMENTS
135
+
136
+ # 4.1 SYNTHETIC DATA
137
+
138
+ We consider a synthetic example and try to learn the underlying factors of variation. The dataset consists of the 32-element subset $\{ ( 0 , \bar { 1 } ) , ( 1 , 0 ) \} ^ { 5 } \subset \{ 0 , 1 \bar \} ^ { 1 0 }$ . Note that there are 5 factors of variation corresponding to the state of the pairs $( { \pmb x } ( 2 \ell { - } 1 ) , { \pmb x } ( 2 \ell ) )$ for $\ell = 1 , \ldots , 5$ with the two factor levels $( 0 , 1 )$ and $( 1 , 0 )$ . Indeed, the distribution can be easily expressed through a partition model with partitioning
139
+
140
+ $$
141
+ \{ 1 , 2 \} \cup \{ 3 , 4 \} \cup \{ 5 , 6 \} \cup \{ 7 , 8 \} \cup \{ 9 , 1 0 \}
142
+ $$
143
+
144
+ and corresponding models
145
+
146
+ $$
147
+ \begin{array} { r } { \mathbb { P } _ { \ell } ( \pmb { x } ( 2 \ell - 1 ) , \pmb { x } ( 2 \ell ) ) = \frac { 1 } { 2 } \cdot \mathbb { 1 } \{ \pmb { x } ( 2 \ell - 1 ) = 0 , \pmb { x } ( 2 \ell ) = 1 \} + \frac { 1 } { 2 } \cdot \mathbb { 1 } \{ \pmb { x } ( 2 \ell - 1 ) = 1 , \pmb { x } ( 2 \ell ) = 0 \} . } \end{array}
148
+ $$
149
+
150
+ We show that our dynamic partition model is able to learn these factors of variation without requiring a manual specification of the partitioning. Here, the total number of experts we need to accurately reconstruct all data points happens to be equal to the number of dimensions. However, in other cases the number of required experts could be smaller or larger than $D$ . We ran our learning algorithm for 15 iterations starting from a random initialization of the experts. The resulting templates after 3, 5 and 15 iterations are shown in Figure 1. We see that each of the final experts specializes in exactly two dimensions $d$ and $d + 1$ . Its opinion for these variables are close to 0 and 1, respectively, while the opinions for the remaining variables are about $1 / 2$ . Every data point can now be (almost) perfectly reconstructed by using exactly 5 of these experts.
151
+
152
+ For comparison we trained various other models with 10 experts, which use a sum-of-log-odds composition. We first tried an autoencoder (Vincent et al., 2008), which in principle could adopt the identity map because it uses (in contrast to our model) a bias term for the observable and latent variables. However, the gradient descent learning algorithm with tuned step size yielded a different representation (Figure 2, 1st panel). While the reconstruction errors are rather low, they are clearly nonzero and the factors of variations have not been disentangled. Next, we considered a dictionary with a sparse representation (e.g., Elad, 2010). The sparsity penalty was adjusted so that the average number of active dictionary elements was around 5. The learning algorithm again yielded highly dependent experts (Figure 2, 2nd panel). Finally, we trained a restricted Boltzmann machine through batch persistent contrastive divergence (Tieleman, 2008) using a tuned learning rate. Note that a restricted Boltzmann machine in principle only requires 5 experts to model the data appropriately because it uses bias terms. However, we again learned 10 experts (Figure 2, 3rd panel). While the results look better than for the previous two models they are still far from optimal. In earlier work Goessling & Amit (2015) we performed a quantitative comparison for a similar dataset, which showed that the reconstruction performance of models with sum-of-log-odds composition is indeed suboptimal.
153
+
154
+ ![](images/5216866f4080e7fa86f1055bff378d9511869454c6d570608de2e6193fd6639e.jpg)
155
+ Figure 3: Trained experts for MNIST digits. Left: Expert probabilities (white/black corresponds to $\bar { \mu _ { k } ( d ) } = 0 / 1 \dot { . }$ ). Right: Levels of expertise (blue/red corresponds to small/large values).
156
+
157
+ ![](images/62d9a1080162f04e22a4e7ff25dfd6e533a86ae634df2772b0e8f6e566fc33c0.jpg)
158
+ Figure 4: Reconstruction of MNIST test examples using likelihood matching pursuit. Each column visualizes the composed Bernoulli templates during the sequential inference procedure (top down) for one sample. The bottom row are the original data points.
159
+
160
+ # 4.2 MNIST DIGITS
161
+
162
+ We now consider the MNIST digits dataset (LeCun et al., 1998), which consists of 60,000 training samples and 10,000 test samples of dimension $2 8 \times 2 8 = 7 8 4$ . We ran our learning algorithm for 10 iterations and trained 100 experts (Figure 3). We see that some experts specialize on local structures while others focus on more global ones. In Figure 4 we visualize the inference procedure for some test samples using these 100 learned experts. On average 12 experts were activated for each data point. For easier visualization we show at most 10 iterations of the likelihood matching pursuit algorithm. The reconstructions are overall accurate and peculiarities of the samples are smoothed out. In Figure 5 we illustrate how the expert supports change based on the latent representation. Depending on which other experts are present the supports can vary quite a bit.
163
+
164
+ ![](images/609f7098b415ad53343fbe0f35f3435a37561302fbc9257e6b8073eaad897d14.jpg)
165
+ Figure 5: Dynamic supports for 5 MNIST experts. Left column: Expert probabilities. Remaining columns: Composed Bernoulli templates for 10 latent configurations. The cast opinion of the expert is shown in shades of red (white/red corresponds to $\mu _ { k } ( d ) = 0 / 1$ ).
166
+
167
+ ![](images/e75d9a39438ef5bcf76d459068827e4ec9911ab05c98e94d81b81c08ba514359.jpg)
168
+ Figure 6: Trained experts for Weizmann horses. Left: Expert probabilities (white/black corresponds to $\mathbf { \bar { \mu } } _ { k } ( d ) = 0 / 1 ,$ ). Right: Levels of expertise (blue/red corresponds to small/large values).
169
+
170
+ # 4.3 WEIZMANN HORSES
171
+
172
+ The following experiment shows that our model is able to cope with very high-dimensional data. The Weizmann horse dataset (Borenstein & Ullman, 2008) consists of 328 binary images of size $2 0 0 \times 2 4 0$ . We used the first 300 images to train 20 experts (Figure 6) and used the remaining 28 images for testing. Some of the experts are responsible for the background and the central region of the horse while other experts focus on local structures like head posture, legs and tail. In Figure 7 we illustrate the partitioning of the test examples into expert opinions. For simplicity we used exactly 4 experts to reconstruct each sample. Not all characteristics of the samples are perfectly reconstructed but the general pose is correctly recovered. The same dataset was used to evaluate the shape Boltzmann machine (Eslami et al., 2014), where 2,000 experts were learned. For those experiments the images were downsampled to $3 2 \times 3 2$ pixels. This is a factor 50 smaller than the full resolution of 48,000 dimensions that we use.
173
+
174
+ ![](images/cb8e08d7ce07cc51fa5e5a5f318060fef614a3e17facba3b715183f0d86192c1.jpg)
175
+ Figure 7: Decomposition of the test examples from the Weizmann horse dataset. 1st column: Original data points. 2nd column: Reconstructions (shown are the composed Bernoulli templates). 3rd-6th column: Partitioning into experts opinions (white/black corresponds to $\mu _ { k } ( d ) = 0 / 1$ , gray indicates regions for which the expert is not responsible).
176
+
177
+ ![](images/85b35271a4e848799510c042732605283cc46fb75380b281457881b19cf1b3f0.jpg)
178
+ Figure 8: Reconstructions of the test examples from the Caltech motorcycle dataset. Odd rows: Original data. Even rows: Reconstructions (shown are the composed Gaussian means).
179
+
180
+ # 4.4 CALTECH MOTORCYCLES
181
+
182
+ We also experimented with real-valued data using the Caltech-101 motorcycle dataset (Fei-Fei et al., 2007), which consists of 798 images of size $1 0 0 \times 1 8 0$ . The first 750 images were used for training and the remaining 48 images for testing. We trained 50 experts by running our learning procedure for 10 iterations. In Figure 8 we visualize the reconstructed test examples. The reconstructions are a bit blurry since we use a fairly sparse binary representation. Indeed, for each data point on average only 7 experts were employed. Note that the shapes of the motorcycles are reconstructed quite accurately.
183
+
184
+ # 5 DISCUSSION
185
+
186
+ In order to improve the reconstructions for continuous image data we could use real-valued latent variables in addition to binary ones (as in Hinton et al. (1998)). This would allow us to model intensities and contrasts more accurately. The inference procedure would have to be adapted accordingly such that continuous activations can be returned.
187
+
188
+ Our work focused on product distributions. In order to apply the proposed approach to models with dependence structure one can make use of an autoregressive decomposition (e.g., Goessling & Amit, 2016). If the joint distribution is written as a product of conditional distributions then we can employ the same composition rule as before. Indeed, we can model composed the conditionals as
189
+
190
+ $$
191
+ \mathbb { P } ( \pmb { x } ( d ) | \pmb { x } ( 1 { : } d - 1 ) , \pmb { h } ) = \mathbb { P } _ { k ^ { \star } ( d ) } ( \pmb { x } ( d ) | \pmb { x } ( 1 { : } d - 1 ) ) ,
192
+ $$
193
+
194
+ where $\mathbb { P } _ { k }$ are autoregressive expert models and $k ^ { \star } ( d )$ is the active expert with the highest level of expertise for dimension $d$ .
195
+
196
+ # REFERENCES
197
+
198
+ Yali Amit and Alain Trouve. Pop: Patchwork of parts models for object recognition. ´ International Journal of Computer Vision, 75(2):267–282, 2007.
199
+
200
+ Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013.
201
+
202
+ Eran Borenstein and Shimon Ullman. Combined top-down/bottom-up segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(12):2109–2125, 2008.
203
+
204
+ Arthur P Dempster, Nan M Laird, and Donald B Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal of the Royal Statistical Society. Series B (methodological), pp. 1–38, 1977.
205
+
206
+ Michael Elad. Sparse and redundant representations. Springer, 2010.
207
+
208
+ SM Ali Eslami, Nicolas Heess, Christopher KI Williams, and John Winn. The shape boltzmann machine: a strong model of object shape. International Journal of Computer Vision, 107(2): 155–176, 2014.
209
+
210
+ Li Fei-Fei, Rob Fergus, and Pietro Perona. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. Computer Vision and Image Understanding, 106(1):59–70, 2007.
211
+
212
+ Marc Goessling and Yali Amit. Compact compositional models. In International Conference on Learning Representations (Workshop), 2015. URL http://arxiv.org/abs/1412.3708.
213
+
214
+ Marc Goessling and Yali Amit. Mixtures of sparse autoregressive networks. In International Conference on Learning Representations (Workshop), 2016. URL http://arxiv.org/abs/ 1511.04776.
215
+
216
+ John A Hartigan. Partition models. Communications in statistics-Theory and methods, 19(8):2745– 2756, 1990.
217
+
218
+ Mark Herbster and Manfred K Warmuth. Tracking the best expert. Machine Learning, 32(2):151– 178, 1998.
219
+
220
+ Geoffrey E Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002.
221
+
222
+ Geoffrey E Hinton, Brian Sallans, and Zoubin Ghahramani. A hierarchical community of experts. In Learning in graphical models, pp. 479–494. 1998.
223
+
224
+ Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
225
+
226
+ Jorg L ¨ ucke and Maneesh Sahani. Maximal causes for non-linear component extraction. ¨ The Journal of Machine Learning Research, 9:1227–1267, 2008.
227
+
228
+ Geoffrey McLachlan and David Peel. Finite mixture models. John Wiley & Sons, 2004.
229
+
230
+ Andrew Ng. Sparse autoencoder. CS294A Lecture Notes, 72:1–19, 2011.
231
+
232
+ Chris Pal, Brendan J Frey, and Nebojsa Jojic. Learning montages of transformed latent images as representations of objects that change in appearance. In Computer Vision–ECCV, pp. 715–731. 2002.
233
+
234
+ Tijmen Tieleman. Training restricted boltzmann machines using approximations to the likelihood gradient. In International Conference on Machine learning, pp. 1064–1071, 2008.
235
+
236
+ Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In International Conference on Machine Learning, pp. 1096–1103, 2008.
237
+
238
+ # 6 DERIVATIVES
239
+
240
+ We provide here the derivatives of the log-likelihood in the expertise-weighted compositional model (4) with respect to the expert parameters.
241
+
242
+ # 6.1 BERNOULLI MODEL
243
+
244
+ The Bernoulli log-likelihood is
245
+
246
+ $$
247
+ f ( \mu ) = x \log \mu + ( 1 - x ) \log ( 1 - \mu ) ,
248
+ $$
249
+
250
+ where the composition rule for the probability is
251
+
252
+ $$
253
+ \mu = \sum _ { k } r _ { k } \mu _ { k } , \quad r _ { k } = \frac { e _ { k } } { \sum _ { k ^ { \prime } } e _ { k ^ { \prime } } } .
254
+ $$
255
+
256
+ # 6.1.1 DERIVATIVES WITH RESPECT TO THE COMPOSED PROBABILITY
257
+
258
+ The first and second derivative of the log-likelihood with respect to the composed probability are
259
+
260
+ $$
261
+ { \frac { d f } { d \mu } } = { \frac { x } { \mu } } - { \frac { 1 - x } { 1 - \mu } } = { \frac { x - \mu } { \mu ( 1 - \mu ) } } ,
262
+ $$
263
+
264
+ $$
265
+ \frac { d ^ { 2 } f } { d \mu ^ { 2 } } = - \frac { x } { \mu ^ { 2 } } - \frac { 1 - x } { ( 1 - \mu ) ^ { 2 } } = - \frac { ( x - \mu ) ^ { 2 } } { \mu ^ { 2 } ( 1 - \mu ) ^ { 2 } } .
266
+ $$
267
+
268
+ 6.1.2 DERIVATIVES WITH RESPECT TO THE EXPERT PROBABILITIES
269
+
270
+ The first and second derivative of the composed probability with respect to the expert probabilities are
271
+
272
+ $$
273
+ \frac { d \mu } { d \mu _ { k } } = r _ { k } , \quad \frac { d ^ { 2 } \mu } { d \mu _ { k } ^ { 2 } } = 0 .
274
+ $$
275
+
276
+ Consequently, the derivatives of the log-likelihood with respect to the expert probabilities are
277
+
278
+ $$
279
+ { \frac { d f } { d \mu _ { k } } } = { \frac { d f } { d \mu } } \cdot { \frac { d \mu } { d \mu _ { k } } } = r _ { k } { \frac { x - \mu } { \mu ( 1 - \mu ) } } ,
280
+ $$
281
+
282
+ $$
283
+ { \frac { d ^ { 2 } f } { d \mu _ { k } ^ { 2 } } } = { \frac { d ^ { 2 } f } { d \mu ^ { 2 } } } \cdot \left( { \frac { d \mu } { d \mu _ { k } } } \right) ^ { 2 } + { \frac { d f } { d \mu } } \cdot { \frac { d ^ { 2 } \mu } { d \mu _ { k } ^ { 2 } } } = - r _ { k } ^ { 2 } { \frac { ( x - \mu ) ^ { 2 } } { \mu ^ { 2 } ( 1 - \mu ) ^ { 2 } } } .
284
+ $$
285
+
286
+ We see that $d ^ { 2 } f / d \mu _ { k } ^ { 2 } < 0$ for $\mu \in ( 0 , 1 )$ , i.e., the log-likelihood is a strictly concave function of $\mu _ { k }$
287
+
288
+ # 6.1.3 DERIVATIVE WITH RESPECT TO THE LEVELS OF EXPERTISE
289
+
290
+ The derivative of the composed probability with respect to the levels of expertise is
291
+
292
+ $$
293
+ { \frac { d \mu } { d e _ { k } } } = { \frac { \mu _ { k } E - \sum e _ { k ^ { \prime } } \mu _ { k ^ { \prime } } } { E ^ { 2 } } } = { \frac { \mu _ { k } - \mu } { E } } ,
294
+ $$
295
+
296
+ where $\begin{array} { r } { E = \sum _ { k ^ { \prime } } e _ { k ^ { \prime } } } \end{array}$ . The derivative of the log-likelihood with respect to the levels of expertise can be computed as
297
+
298
+ $$
299
+ { \frac { d f } { d e _ { k } } } = { \frac { d f } { d \mu } } \cdot { \frac { d \mu } { d e _ { k } } } .
300
+ $$
301
+
302
+ # 6.2 GAUSSIAN MODEL
303
+
304
+ The Gaussian log-likelihood is
305
+
306
+ $$
307
+ f ( \mu , v ) = - \frac { ( x - \mu ) ^ { 2 } } { 2 v } - \frac { 1 } { 2 } \log ( v ) - \frac { 1 } { 2 } \log ( 2 \pi ) ,
308
+ $$
309
+
310
+ where the composition rules for the mean and variance are
311
+
312
+ $$
313
+ \mu = \sum _ { k } r _ { k } \mu _ { k } , \quad v = \sum _ { k } r _ { k } ( v _ { k } + \mu _ { k } ^ { 2 } ) - \mu ^ { 2 } , \quad r _ { k } = \frac { e _ { k } } { \sum _ { k ^ { \prime } } e _ { k ^ { \prime } } } .
314
+ $$
315
+
316
+ # 6.2.1 DERIVATIVE WITH RESPECT TO THE COMPOSED MEAN AND VARIANCE
317
+
318
+ The derivative of the log-likelihood with respect to the composed mean and variance are
319
+
320
+ $$
321
+ { \frac { d f } { d \mu } } = { \frac { x - \mu } { v } } , \quad { \frac { d f } { d v } } = { \frac { ( x - \mu ) ^ { 2 } } { 2 v ^ { 2 } } } - { \frac { 1 } { 2 v } } = { \frac { ( x - \mu ) ^ { 2 } - v } { 2 v ^ { 2 } } } .
322
+ $$
323
+
324
+ 6.2.2 DERIVATIVE WITH RESPECT TO THE LEVELS OF EXPERTISE
325
+
326
+ The derivative of the composed mean and variance with respect to the levels of expertise are
327
+
328
+ $$
329
+ { \frac { d \mu } { d e _ { k } } } = { \frac { \mu _ { k } E - \sum e _ { k ^ { \prime } } \mu _ { k ^ { \prime } } } { E ^ { 2 } } } = { \frac { \mu _ { k } - \mu } { E } } ,
330
+ $$
331
+
332
+ $$
333
+ { \frac { d v } { d e _ { k } } } = { \frac { q _ { k } E - \sum e _ { k ^ { \prime } } q _ { k ^ { \prime } } } { E ^ { 2 } } } - 2 \mu { \frac { d \mu } { d e _ { k } } } = { \frac { q _ { k } - q } { E } } - 2 \mu { \frac { \mu _ { k } - \mu } { E } } = { \frac { v _ { k } - v + ( \mu _ { k } - \mu ) ^ { 2 } } { E } } ,
334
+ $$
335
+
336
+ where $\begin{array} { r } { E = \sum _ { k ^ { \prime } } e _ { k ^ { \prime } } } \end{array}$ and $q _ { k } = v _ { k } + \mu _ { k } ^ { 2 }$ , $q = v + \mu ^ { 2 }$ . The derivative of the log-likelihood with respect to the levels of expertise can be computed as
337
+
338
+ $$
339
+ { \frac { d f } { d e _ { k } } } = { \frac { d f } { d \mu } } \cdot { \frac { d \mu } { d e _ { k } } } + { \frac { d f } { d v } } \cdot { \frac { d v } { d e _ { k } } } .
340
+ $$
341
+
342
+ # 7 NUMERICAL OPTIMIZATION
343
+
344
+ For binary data, the log-likelihood of the smoothed model is a concave function of $\mu _ { k } ( d )$ , see Section 6.1.2. We could therefore in principal perform an optimization for the experts opinions using Newton’s method. There are a few complications though. One problem is that the second derivative is proportional to the squared responsibility and hence close to 0 if the level of expertise is small. Consequently, template updates in regions with low expertise would be unstable. To deal with that we could add a penalty on the squared log-odds for example. Another problem is that the Newton steps may lead to probability estimates outside of $[ 0 , 1 ]$ . This can be dealt with by pulling the estimates back into the unit interval. Note that working on the log-odds scale is not possible because the log-likelihood of our model is not concave in the expert log-odds. Because of these complications we use the simple, fast and robust heuristic (5) instead of Netwon’s method.
parse/train/BJ46w6Ule/BJ46w6Ule_content_list.json ADDED
@@ -0,0 +1,1676 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "DYNAMIC PARTITION MODELS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 545,
10
+ 121
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Marc Goessling ",
17
+ "text_level": 1,
18
+ "bbox": [
19
+ 184,
20
+ 146,
21
+ 295,
22
+ 159
23
+ ],
24
+ "page_idx": 0
25
+ },
26
+ {
27
+ "type": "text",
28
+ "text": "Yali Amit ",
29
+ "text_level": 1,
30
+ "bbox": [
31
+ 491,
32
+ 145,
33
+ 560,
34
+ 159
35
+ ],
36
+ "page_idx": 0
37
+ },
38
+ {
39
+ "type": "text",
40
+ "text": "Department of Statistics \nUniversity of Chicago \nChicago, IL 60637, USA \ngoessling@galton.uchicago.edu \nDepartments of Statistics and Computer Science \nUniversity of Chicago \nChicago, IL 60637, USA \namit@galton.uchicago.edu ",
41
+ "bbox": [
42
+ 184,
43
+ 160,
44
+ 467,
45
+ 214
46
+ ],
47
+ "page_idx": 0
48
+ },
49
+ {
50
+ "type": "text",
51
+ "text": "",
52
+ "bbox": [
53
+ 491,
54
+ 159,
55
+ 808,
56
+ 214
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "ABSTRACT ",
63
+ "text_level": 1,
64
+ "bbox": [
65
+ 454,
66
+ 252,
67
+ 544,
68
+ 266
69
+ ],
70
+ "page_idx": 0
71
+ },
72
+ {
73
+ "type": "text",
74
+ "text": "We present a new approach for learning compact and intuitive distributed representations with binary encoding. Rather than summing up expert votes as in products of experts, we employ for each variable the opinion of the most reliable expert. Data points are hence explained through a partitioning of the variables into expert supports. The partitions are dynamically adapted based on which experts are active. During the learning phase we adopt a smoothed version of this model that uses separate mixtures for each data dimension. In our experiments we achieve accurate reconstructions of high-dimensional data points with at most a dozen experts. ",
75
+ "bbox": [
76
+ 233,
77
+ 282,
78
+ 764,
79
+ 407
80
+ ],
81
+ "page_idx": 0
82
+ },
83
+ {
84
+ "type": "text",
85
+ "text": "1 INTRODUCTION ",
86
+ "text_level": 1,
87
+ "bbox": [
88
+ 176,
89
+ 433,
90
+ 336,
91
+ 449
92
+ ],
93
+ "page_idx": 0
94
+ },
95
+ {
96
+ "type": "text",
97
+ "text": "We consider the task of learning a compact binary representation (e.g. Goessling & Amit, 2015). That means we are seeking a parsimonious set of experts, which can explain a given collection of multivariate data points. In contrast to most existing approaches the emphasis here is on finding experts that are individually meaningful and that have disjoint responsibilities. Ideally, each expert explains only one factor of variation in the data and for each factor of variation there is exactly one expert that focuses on it. ",
98
+ "bbox": [
99
+ 174,
100
+ 464,
101
+ 825,
102
+ 547
103
+ ],
104
+ "page_idx": 0
105
+ },
106
+ {
107
+ "type": "text",
108
+ "text": "Formally, the experts $\\mathbb { P } _ { k }$ , $k = 1 , \\ldots , K$ , are probability distributions that depend on binary latent variables $\\pmb { h } ( k )$ . The latent state $^ { h }$ specifies which experts are active and has to be inferred for each $D$ -dimensional data point $_ { \\textbf { \\em x } }$ . The active experts then define a probability distribution $\\mathbb { P }$ . The goal of representation learning is to train experts such that the conditional likelihood $\\mathbb { P } ( \\pmb { x } | \\pmb { h } )$ of the data given the latent activations is maximized. ",
109
+ "bbox": [
110
+ 174,
111
+ 554,
112
+ 825,
113
+ 625
114
+ ],
115
+ "page_idx": 0
116
+ },
117
+ {
118
+ "type": "text",
119
+ "text": "We start by describing a simple model family, which forms the basis of our work. A partition model (Hartigan, 1990) makes use of a manually specified partitioning of the $D$ variables into subsets ",
120
+ "bbox": [
121
+ 174,
122
+ 631,
123
+ 821,
124
+ 661
125
+ ],
126
+ "page_idx": 0
127
+ },
128
+ {
129
+ "type": "equation",
130
+ "img_path": "images/ea26a357017b28ce40d1d687e10c65fe701263f9cfd0352ddde4a3ae23d9143f.jpg",
131
+ "text": "$$\n\\{ 1 , \\ldots , D \\} = \\bigcup _ { \\ell = 1 } ^ { L } S _ { \\ell } .\n$$",
132
+ "text_format": "latex",
133
+ "bbox": [
134
+ 426,
135
+ 666,
136
+ 573,
137
+ 709
138
+ ],
139
+ "page_idx": 0
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "For each subset of variables ${ \\pmb x } ( S _ { \\ell } ) = ( { \\pmb x } ( d ) ) _ { d \\in S _ { \\ell } }$ there exists a separate model $\\mathbb { P } _ { \\ell }$ . It is then typically assumed that variables in different subsets are conditionally independent, i.e., ",
144
+ "bbox": [
145
+ 169,
146
+ 715,
147
+ 823,
148
+ 744
149
+ ],
150
+ "page_idx": 0
151
+ },
152
+ {
153
+ "type": "equation",
154
+ "img_path": "images/c8774a47b405e347c33e89ee0397bf6e882602d71baca1deab091e34cee697b5.jpg",
155
+ "text": "$$\n\\mathbb { P } ( \\pmb { x } | \\pmb { h } ) = \\prod _ { \\ell = 1 } ^ { L } \\mathbb { P } _ { \\ell } \\pmb { ( x ( S _ { \\ell } ) } | \\pmb { h ( \\ell ) } ) .\n$$",
156
+ "text_format": "latex",
157
+ "bbox": [
158
+ 388,
159
+ 750,
160
+ 607,
161
+ 792
162
+ ],
163
+ "page_idx": 0
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "The model is completed by specifying a prior distribution $\\mathbb { P } ( h )$ for the latent state $^ { h }$ . One advantage of partition models is that estimating $\\mathbb { P } _ { \\ell }$ from observations is straightforward, while learning expert models in general requires computationally involved procedures (Bengio et al., 2013). However, in order to be able to define a satisfactory partitioning of the variables some prior knowledge about the dependence structure is needed. For image data a common choice is to use a regular grid that divides the image into patches (e.g. Pal et al., 2002). In general, a good partitioning is characterized by providing weakly dependent subsets of variables so that the conditional independence assumption (1) is reasonable and the distribution of the latent variables is easy to model. Unfortunately, often there simply is no single fixed partitioning that works well for the whole dataset because the set of variables, which are affected by different factors of variation, might overlap. This restricts the scenarios in which partition models are useful. ",
168
+ "bbox": [
169
+ 173,
170
+ 797,
171
+ 825,
172
+ 924
173
+ ],
174
+ "page_idx": 0
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "",
179
+ "bbox": [
180
+ 171,
181
+ 103,
182
+ 823,
183
+ 132
184
+ ],
185
+ "page_idx": 1
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "In this paper we extend partition models to allow for dynamically adapting partitionings. In Section 2 we introduce the model and present an appropriate learning procedure. Related work is discussed in Section 3. Special emphasis is given to the comparison with products of experts (Hinton, 2002). Experiments on binary and real-valued data are performed in Section 4. While it is important to explain high-dimensional data points through multiple experts, our work shows that it is possible to assign the responsibility for individual variables to a single expert (rather than having all active experts speak for every variable). ",
190
+ "bbox": [
191
+ 174,
192
+ 138,
193
+ 825,
194
+ 237
195
+ ],
196
+ "page_idx": 1
197
+ },
198
+ {
199
+ "type": "text",
200
+ "text": "2 DYNAMIC PARTITION MODELS ",
201
+ "text_level": 1,
202
+ "bbox": [
203
+ 176,
204
+ 258,
205
+ 457,
206
+ 275
207
+ ],
208
+ "page_idx": 1
209
+ },
210
+ {
211
+ "type": "text",
212
+ "text": "Our main proposal is to define for each expert $\\mathbb { P } _ { k }$ its level of expertise $e _ { k } \\in \\mathbb { R } _ { + } ^ { D }$ for all variables. We can then dynamically partition the variables based on the active experts. Specifically, for each variable we employ the most reliable (active) expert ",
213
+ "bbox": [
214
+ 173,
215
+ 290,
216
+ 825,
217
+ 334
218
+ ],
219
+ "page_idx": 1
220
+ },
221
+ {
222
+ "type": "equation",
223
+ "img_path": "images/cf3abd3652d5c2b17fb1cbb43ee010ef16224e7f2babec9b4d0d7f2e5a148019.jpg",
224
+ "text": "$$\n\\mathbb { P } ( \\pmb { x } | h ) = \\prod _ { d = 1 } ^ { D } \\mathbb { P } _ { k ^ { \\star } ( d ) } ( \\pmb { x } ( d ) ) , \\qquad k ^ { \\star } ( d ) = \\operatorname * { a r g m a x } _ { k : h ( k ) = 1 } e _ { k } ( d ) .\n$$",
225
+ "text_format": "latex",
226
+ "bbox": [
227
+ 302,
228
+ 342,
229
+ 696,
230
+ 386
231
+ ],
232
+ "page_idx": 1
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "That means, each variable ${ \\pmb x } ( d )$ is explained by only a single expert $k ^ { \\star } ( d )$ . The partitioning into expert supports $S _ { k } ( \\pmb { h } ) = \\{ d \\in \\{ 1 , \\dots , D \\} : k ^ { \\star } ( d ) = k \\}$ is determined dynamically based on the latent configuration $^ { h }$ . We hence call our model a dynamic partition model. ",
237
+ "bbox": [
238
+ 174,
239
+ 393,
240
+ 825,
241
+ 438
242
+ ],
243
+ "page_idx": 1
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "2.1 INFERENCE ",
248
+ "text_level": 1,
249
+ "bbox": [
250
+ 174,
251
+ 455,
252
+ 295,
253
+ 469
254
+ ],
255
+ "page_idx": 1
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "In the inference step we try to find for each data point ${ \\mathbf { } } x _ { n }$ the subset of experts $\\{ k : h _ { n } ( k ) = 1 \\}$ that maximizes $P ( x _ { n } \\mid h _ { n } )$ . To do this, we suggest to sequentially activate the expert that most improves the likelihood, until the likelihood cannot be improved anymore. This approach is called likelihood matching pursuit (Goessling & Amit, 2015). The greedy search works well for our model because we are working with a small set of experts and each expert focuses on a rather different structure in the data. Consequently, the posterior distribution on the latent variables given ${ \\pmb x } _ { n }$ is often highly peaked at a state $h _ { n }$ (note that for high-dimensional data the effect of the prior $\\mathbb { P } ( h )$ is typically negligible). ",
260
+ "bbox": [
261
+ 173,
262
+ 481,
263
+ 825,
264
+ 594
265
+ ],
266
+ "page_idx": 1
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "2.2 LEARNING ",
271
+ "text_level": 1,
272
+ "bbox": [
273
+ 174,
274
+ 612,
275
+ 290,
276
+ 626
277
+ ],
278
+ "page_idx": 1
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "In contrast to traditional approaches, which combine multiple experts for individual variables, training the experts in a dynamic partition model is trivial. Indeed, the maximum-likelihood estimates are simply the empirical averages over all observations for which the expert was responsible. For example, the expert means can be estimated from training data ${ \\mathbf { } } x _ { n }$ , $n = 1 , \\ldots , N$ , as ",
283
+ "bbox": [
284
+ 173,
285
+ 638,
286
+ 825,
287
+ 695
288
+ ],
289
+ "page_idx": 1
290
+ },
291
+ {
292
+ "type": "equation",
293
+ "img_path": "images/fc3425996e32739cd5fe5063c85c6f24008174d4190070c62b430dcf5c4ad660.jpg",
294
+ "text": "$$\n\\mathring { \\mu } _ { k } ( d ) = \\frac { \\displaystyle \\sum _ { n = 1 } ^ { N } \\mathbb { 1 } \\big \\{ k _ { n } ^ { \\star } ( d ) = k \\big \\} \\pmb { x } _ { n } ( d ) } { \\displaystyle \\sum _ { n = 1 } ^ { N } \\mathbb { 1 } \\big \\{ k _ { n } ^ { \\star } ( d ) = k \\big \\} } .\n$$",
295
+ "text_format": "latex",
296
+ "bbox": [
297
+ 382,
298
+ 703,
299
+ 616,
300
+ 775
301
+ ],
302
+ "page_idx": 1
303
+ },
304
+ {
305
+ "type": "text",
306
+ "text": "Here, $k _ { n } ^ { \\star } ( d )$ denotes the expert with the highest level of expertise $e _ { k } ( d )$ among all experts $k$ with $h _ { n } ( k ) \\ddot { = 1 }$ . ",
307
+ "bbox": [
308
+ 174,
309
+ 782,
310
+ 821,
311
+ 811
312
+ ],
313
+ "page_idx": 1
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "2.2.1 EXPERTISE-WEIGHTED COMPOSITION",
318
+ "text_level": 1,
319
+ "bbox": [
320
+ 174,
321
+ 829,
322
+ 490,
323
+ 843
324
+ ],
325
+ "page_idx": 1
326
+ },
327
+ {
328
+ "type": "text",
329
+ "text": "In order to compute the estimator in (3) the levels of expertise $_ { e _ { k } }$ have to be known. Since in this paper we are trying to train the experts as well as the associated levels of expertise we consider a smoothing of the maximum-expertise composition (2) to motivate our learning procedure. Rather than using the expert with the highest level of expertise, we form a mixture of the active experts, where the mixture weight is proportional to the level of expertise. Thus, the smoothed composition ",
330
+ "bbox": [
331
+ 174,
332
+ 853,
333
+ 825,
334
+ 924
335
+ ],
336
+ "page_idx": 1
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "rule is ",
341
+ "bbox": [
342
+ 173,
343
+ 104,
344
+ 217,
345
+ 117
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "equation",
351
+ "img_path": "images/7c40545230a2f01e2a963595b21f17dccfd432ad1cf9a8be78569405750910fa.jpg",
352
+ "text": "$$\n\\widetilde { \\mathbb { P } } ( { \\pmb x } | h ) = \\prod _ { d = 1 } ^ { D } \\sum _ { k = 1 } ^ { K } r _ { k } ( d ) \\mathbb { P } _ { k } ( { \\pmb x } ( d ) ) , \\qquad { \\pmb r } _ { k } ( d ) = \\left\\{ \\begin{array} { l l } { \\frac { e _ { k } ( d ) } { \\sum _ { k ^ { \\prime } : h ( k ^ { \\prime } ) = 1 } e _ { k ^ { \\prime } } ( d ) } } & { \\mathrm { i f ~ } h ( k ) = 1 } \\\\ { 0 } & { \\mathrm { i f ~ } h ( k ) = 0 } \\end{array} \\right. .\n$$",
353
+ "text_format": "latex",
354
+ "bbox": [
355
+ 217,
356
+ 116,
357
+ 779,
358
+ 160
359
+ ],
360
+ "page_idx": 2
361
+ },
362
+ {
363
+ "type": "text",
364
+ "text": "In contrast to classical mixture models (e.g. McLachlan & Peel, 2004) we use different mixture weights for each dimension $d \\in \\{ 1 , \\ldots , D \\}$ . The mixture weight $\\pmb { r } _ { k } ( d )$ is the degree of responsibility of $k$ -th expert for the $d$ -th dimension and depends on the latent state $^ { h }$ . An expert with a medium level of expertise assumes full responsibility if no other reliable expert is present and takes on a low degree of responsibility if experts with a higher level of expertise are present. ",
365
+ "bbox": [
366
+ 173,
367
+ 160,
368
+ 825,
369
+ 229
370
+ ],
371
+ "page_idx": 2
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "According to the total variance formula ",
376
+ "bbox": [
377
+ 176,
378
+ 236,
379
+ 434,
380
+ 251
381
+ ],
382
+ "page_idx": 2
383
+ },
384
+ {
385
+ "type": "equation",
386
+ "img_path": "images/696759b04164985387dfe595ec3daad6b5bb0e3158da66ab7f63335af223789d.jpg",
387
+ "text": "$$\n\\mathbb { V } [ \\mathbb { P } ] = \\mathbb { E } _ { \\pmb { r } _ { k } } [ \\mathbb { V } [ \\mathbb { P } _ { k } ] ] + \\mathbb { V } _ { \\pmb { r } _ { k } } [ \\mathbb { E } [ \\mathbb { P } _ { k } ] ]\n$$",
388
+ "text_format": "latex",
389
+ "bbox": [
390
+ 387,
391
+ 251,
392
+ 611,
393
+ 271
394
+ ],
395
+ "page_idx": 2
396
+ },
397
+ {
398
+ "type": "text",
399
+ "text": "the variance of a mixture is always larger than the smallest variance of its components. In other words, the precision of the smoothed model is maximized when all the mixture weight (individually for each dimension) is concentrated on the most precise expert. We can thus learn a dynamic partition model in an EM manner (Dempster et al., 1977) by interleaving inference steps with updates of the experts and levels of expertise in the smoothed model. ",
400
+ "bbox": [
401
+ 173,
402
+ 272,
403
+ 825,
404
+ 342
405
+ ],
406
+ "page_idx": 2
407
+ },
408
+ {
409
+ "type": "text",
410
+ "text": "2.2.2 EXPERT UPDATE ",
411
+ "text_level": 1,
412
+ "bbox": [
413
+ 174,
414
+ 356,
415
+ 343,
416
+ 369
417
+ ],
418
+ "page_idx": 2
419
+ },
420
+ {
421
+ "type": "text",
422
+ "text": "The sequential inference procedure (from Section 2.1) provides for each data point ${ \\mathbf { } } x _ { n }$ the latent representation $h _ { n }$ . We denote the corresponding expert responsibilities (using the current estimates for the level of expertise) by ${ \\bf \\nabla } r _ { n k }$ . The smooth analog to the hard update equation (3) is a responsibilityweighted average of the training samples ",
423
+ "bbox": [
424
+ 174,
425
+ 380,
426
+ 825,
427
+ 435
428
+ ],
429
+ "page_idx": 2
430
+ },
431
+ {
432
+ "type": "equation",
433
+ "img_path": "images/142afa619def54d1829b477515d699c45a6f773ec41282f3befdc6f97b0767a6.jpg",
434
+ "text": "$$\n\\mu _ { k } ( d ) = \\frac { \\displaystyle \\sum _ { n = 1 } ^ { N } r _ { n k } ( d ) \\pmb { x _ { n } } ( d ) + \\epsilon \\pmb { \\mu _ { 0 } } } { \\displaystyle \\sum _ { n = 1 } ^ { N } r _ { n k } ( d ) + \\epsilon } .\n$$",
435
+ "text_format": "latex",
436
+ "bbox": [
437
+ 379,
438
+ 436,
439
+ 619,
440
+ 507
441
+ ],
442
+ "page_idx": 2
443
+ },
444
+ {
445
+ "type": "text",
446
+ "text": "For stability we added a term that shrinks the updated templates towards some target $\\pmb { \\mu _ { 0 } }$ if the total responsibility of the expert is small. In our experiments we set ${ \\boldsymbol { \\mu } } _ { \\mathbf { 0 } }$ to the average of all training examples. The update rule implies that the experts have local supports, in the sense that they are uninformative about variables for which they are not responsible. ",
447
+ "bbox": [
448
+ 174,
449
+ 507,
450
+ 825,
451
+ 563
452
+ ],
453
+ "page_idx": 2
454
+ },
455
+ {
456
+ "type": "text",
457
+ "text": "For binary data the mean templates $\\mu _ { k }$ are all we need. Continuous data $\\pmb { x } \\in \\mathbb { R } ^ { D }$ is modeled through Gaussians and hence we also have to specify the variance ${ \\boldsymbol { v } } _ { k }$ of the experts. We again use a responsibility-weighted average ",
458
+ "bbox": [
459
+ 174,
460
+ 569,
461
+ 825,
462
+ 612
463
+ ],
464
+ "page_idx": 2
465
+ },
466
+ {
467
+ "type": "equation",
468
+ "img_path": "images/2973c74c8fc344c4cb8dd2576be313383bc94ac783aa7c91de2471dfd315a8ee.jpg",
469
+ "text": "$$\n{ v _ { k } } ( d ) = \\frac { \\displaystyle \\sum _ { n = 1 } ^ { N } r _ { n k } ( d ) ( { \\pmb x } _ { n } ( d ) - { \\pmb \\mu } _ { k } ( d ) ) ^ { 2 } + \\epsilon { \\pmb v } _ { 0 } } { \\displaystyle \\sum _ { n = 1 } ^ { N } r _ { n k } ( d ) + \\epsilon } ,\n$$",
470
+ "text_format": "latex",
471
+ "bbox": [
472
+ 341,
473
+ 613,
474
+ 655,
475
+ 684
476
+ ],
477
+ "page_idx": 2
478
+ },
479
+ {
480
+ "type": "text",
481
+ "text": "where ${ \\pmb v _ { 0 } }$ is the empirical variance of all training samples. ",
482
+ "bbox": [
483
+ 174,
484
+ 683,
485
+ 553,
486
+ 698
487
+ ],
488
+ "page_idx": 2
489
+ },
490
+ {
491
+ "type": "text",
492
+ "text": "2.2.3 EXPERTISE UPDATE ",
493
+ "text_level": 1,
494
+ "bbox": [
495
+ 176,
496
+ 710,
497
+ 364,
498
+ 726
499
+ ],
500
+ "page_idx": 2
501
+ },
502
+ {
503
+ "type": "text",
504
+ "text": "We now turn to the updates of the levels of expertise. The log-likelihood of the smoothed model (4) as a function of $e _ { k }$ is rather complex. Using gradient descent is thus problematic because the derivatives with respect to $e _ { k }$ can have very different scales, which makes it difficult to choose an appropriate learning rate and hence the convergence could be slow. However, exact optimization is not necessary because in the end only the order of the levels of expertise matters. Consequently, we propose to adjust $e _ { k } ( d )$ only based on the sign of the gradient. We simply multiply or divide the current value by a constant $C$ . If the gradient is very close to 0 we leave $e _ { k } ( d )$ unchanged. For all our experiments we used $C = 2$ . Larger values can speed up the convergence but sometimes lead to a worse solution. Using an exponential decay is common practice when learning levels of expertise (e.g. Herbster & Warmuth, 1998). ",
505
+ "bbox": [
506
+ 173,
507
+ 734,
508
+ 825,
509
+ 876
510
+ ],
511
+ "page_idx": 2
512
+ },
513
+ {
514
+ "type": "text",
515
+ "text": "In the learning procedure we perform the expertise update first. We then recompute the responsibilities using these new levels of expertise and update the experts. Our algorithm typically converges after about 10 iterations. ",
516
+ "bbox": [
517
+ 174,
518
+ 881,
519
+ 823,
520
+ 924
521
+ ],
522
+ "page_idx": 2
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "3 RELATED WORK ",
527
+ "text_level": 1,
528
+ "bbox": [
529
+ 176,
530
+ 102,
531
+ 339,
532
+ 117
533
+ ],
534
+ "page_idx": 3
535
+ },
536
+ {
537
+ "type": "text",
538
+ "text": "Herbster & Warmuth (1998) proposed an algorithm for tracking the best expert in a sequential prediction task. In their work it is assumed that a linear ordering of the variables is known such that the expert with the highest level of expertise is constant on certain segments. In contrast to that, our approach can be applied to an arbitrary permutation of the variables. Moreover, they consider a single sequence of variables with a fixed partitioning into experts supports. In our setup the partitioning changes dynamically depending on the observed sample. However, the greatest difference to our work is that Herbster & Warmuth (1998) do not learn the individual experts but only focus on training the levels of expertise. ",
539
+ "bbox": [
540
+ 174,
541
+ 132,
542
+ 825,
543
+ 244
544
+ ],
545
+ "page_idx": 3
546
+ },
547
+ {
548
+ "type": "text",
549
+ "text": "Lucke & Sahani ¨ (2008) studied a composition rule that also partitions the variables into expert supports. In their model the composed template is simply the maximum of the experts templates $\\mu _ { k }$ . This rule is only useful in special cases. A generalization, in which the composition depends on the maximum and the minimum of the expert templates $\\mu _ { k } ( d )$ , was considered by Goessling & Amit (2015). While the motivation for that rule was similar, the maximum-expertise rule in this paper is more principled and can be applied to continuous data. ",
550
+ "bbox": [
551
+ 173,
552
+ 251,
553
+ 825,
554
+ 335
555
+ ],
556
+ "page_idx": 3
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "In the work by Amit & Trouve´ (2007) a simple average (i.e., an equal mixture) of the individual templates was used. With such a composition rule, all experts are equally responsible for each of the variables and hence specialization on local structures is not possible. To circumvent this problem, in their work $e _ { k } ( d )$ was manually set to 1 for some subset of the dimensions (depending on a latent shift variable) and to 0 elsewhere. ",
561
+ "bbox": [
562
+ 174,
563
+ 342,
564
+ 825,
565
+ 411
566
+ ],
567
+ "page_idx": 3
568
+ },
569
+ {
570
+ "type": "text",
571
+ "text": "A popular model family with latent binary representation are products of experts (Hinton, 2002). In such a model the individual distributions $\\mathbb { P } _ { k }$ are multiplied together and renormalized. Computation of the normalizing constant is in general intractable though. A special case, in which an explicit normalization is possible, are restricted Boltzmann machines (Hinton, 2002). In these models the experts are product Bernoulli distributions with templates $\\mu _ { k } \\in [ 0 , 1 ] ^ { D }$ . The composed distribution is then also a product Bernoulli distribution with composed template ",
572
+ "bbox": [
573
+ 173,
574
+ 417,
575
+ 825,
576
+ 502
577
+ ],
578
+ "page_idx": 3
579
+ },
580
+ {
581
+ "type": "equation",
582
+ "img_path": "images/fcc142325b5dcadc4472196e8dbe2f4725d95e421a58d541f9224e4f23371ef6.jpg",
583
+ "text": "$$\n\\begin{array} { r } { \\pmb { \\mu } _ { \\mathrm { R B M } } ( d ) = \\sigma \\left( \\sum _ { k : h ( k ) = 1 } \\pmb { w } _ { k } ( d ) \\right) , } \\end{array}\n$$",
584
+ "text_format": "latex",
585
+ "bbox": [
586
+ 372,
587
+ 505,
588
+ 622,
589
+ 540
590
+ ],
591
+ "page_idx": 3
592
+ },
593
+ {
594
+ "type": "text",
595
+ "text": "where the weights ${ \\pmb w } _ { \\pmb k } ( d ) = \\log ( { \\pmb \\mu } _ { \\pmb k } ( d ) / ( 1 - { \\pmb \\mu } _ { \\pmb k } ( d ) ) \\in \\mathbb { R }$ are the log-odds of the experts and $\\sigma ( t ) = ( 1 + \\exp ( - t ) ) ^ { - 1 }$ is the logistic function. This sum-of-log-odds composition rule arises naturally from generalized linear models for binary data because the log-odds are the canonical parameter of the Bernoulli family. In a product of experts, the variance of the composition is usually smaller than the smallest variance of the experts. As a consequence, products of experts tend to employ many experts for each dimension (for more details on this issue see Goessling & Amit (2015)). Even with an L1-penalty on the votes ${ \\pmb w } _ { { \\pmb k } } ( d )$ the responsibility for individual variables ${ \\pmb x } ( d )$ is typically still shared among many experts. The reason for this is that under the constraint $\\begin{array} { r } { \\sum _ { k } { \\boldsymbol { w } } _ { \\boldsymbol { k } } ( d ) = { \\boldsymbol { w } } ( d ) } \\end{array}$ the quantity $\\textstyle \\sum _ { k } | w _ { k } ( d ) |$ is minimized whenever ${ \\pmb w } _ { \\pmb k } ( d )$ has the same sign for all $k$ . The usual inference procedure for products of experts independently activates experts based on their inner product with the data point. In particular, not just the most probable expert configuration is determined but the whole posterior distribution on latent states given the data is explored through Monte Carlo methods. For learning in products of experts, simple update rules like (5) and (6) cannot be used because for each expert the effects of all other experts have to be factored out. Dynamic partition models essentially decompose the expert votes $\\pmb { w } _ { k }$ into expert opinions $\\mu _ { k }$ and levels of expertise $e _ { k }$ . Apart from the computational advantages for learning, this introduces an additional degree of flexibility because the expert supports are adjusted depending on which other experts are present (cf. Figure 5). Moreover, the decomposition into opinions and levels of expertise avoids ambiguities. For example, a vote ${ \\pmb w } _ { \\pmb k } ( d ) \\approx 0$ could mean that $\\mu _ { k } ( d ) \\approx 1 / 2$ or that $\\bar { e _ { k } ( d ) } \\approx 0$ . ",
596
+ "bbox": [
597
+ 173,
598
+ 540,
599
+ 825,
600
+ 806
601
+ ],
602
+ "page_idx": 3
603
+ },
604
+ {
605
+ "type": "text",
606
+ "text": "Another common model for representation learning are autoencoders (Vincent et al., 2008), which can be considered as mean-field approximations of restricted Boltzmann machines that use latent variables $\\displaystyle h ( k )$ with values in $[ 0 , 1 ]$ . To obtain a sparse representation a penalty on the number of active experts can be added $( \\mathrm { N g } , 2 0 1 1 )$ ). Such approaches are also known as sparse dictionaries (e.g., Elad, 2010) and are based on opinion pools of the form $\\begin{array} { r } { \\sum _ { k } h ( k ) w _ { k } ( d ) } \\end{array}$ . The strength of the sparsity penalty is an additional tuning parameter which has to be tuned. In dynamic partition models sparse activations are inherent. In the next section, we experimentally compare products of experts, autoencoders and sparse dictionaries to our proposed model. ",
607
+ "bbox": [
608
+ 174,
609
+ 811,
610
+ 825,
611
+ 924
612
+ ],
613
+ "page_idx": 3
614
+ },
615
+ {
616
+ "type": "image",
617
+ "img_path": "images/f59e7097b4924e3f977d4d06826d4e2856d7b4228ca0a4275485a982bdc0af51.jpg",
618
+ "image_caption": [
619
+ "Figure 1: Expert training for the synthetic dataset. Each panel shows the probabilities (white/black corresponds to $\\mu _ { k } ( d ) = 0 / 1 \\rangle$ of the 10 experts (rows) for the 10 dimensions (columns). 1st panel: Random initialization. 2nd-4th panel: Our learning procedure after 3/5/15 iterations. "
620
+ ],
621
+ "image_footnote": [],
622
+ "bbox": [
623
+ 173,
624
+ 98,
625
+ 825,
626
+ 213
627
+ ],
628
+ "page_idx": 4
629
+ },
630
+ {
631
+ "type": "image",
632
+ "img_path": "images/02d6de2310bf0a201411bf6152906617d129961005914ac13f034c1d48d8cf62.jpg",
633
+ "image_caption": [
634
+ "Figure 2: Trained experts for the synthetic data after 1,000 iterations using an autoencoder (1st panel), a sparse dictionary (2nd panel) and a restricted Boltzmann machine (3rd panel). "
635
+ ],
636
+ "image_footnote": [],
637
+ "bbox": [
638
+ 209,
639
+ 280,
640
+ 790,
641
+ 392
642
+ ],
643
+ "page_idx": 4
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "4 EXPERIMENTS ",
648
+ "text_level": 1,
649
+ "bbox": [
650
+ 176,
651
+ 455,
652
+ 326,
653
+ 472
654
+ ],
655
+ "page_idx": 4
656
+ },
657
+ {
658
+ "type": "text",
659
+ "text": "4.1 SYNTHETIC DATA ",
660
+ "text_level": 1,
661
+ "bbox": [
662
+ 174,
663
+ 487,
664
+ 336,
665
+ 501
666
+ ],
667
+ "page_idx": 4
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "We consider a synthetic example and try to learn the underlying factors of variation. The dataset consists of the 32-element subset $\\{ ( 0 , \\bar { 1 } ) , ( 1 , 0 ) \\} ^ { 5 } \\subset \\{ 0 , 1 \\bar \\} ^ { 1 0 }$ . Note that there are 5 factors of variation corresponding to the state of the pairs $( { \\pmb x } ( 2 \\ell { - } 1 ) , { \\pmb x } ( 2 \\ell ) )$ for $\\ell = 1 , \\ldots , 5$ with the two factor levels $( 0 , 1 )$ and $( 1 , 0 )$ . Indeed, the distribution can be easily expressed through a partition model with partitioning ",
672
+ "bbox": [
673
+ 174,
674
+ 512,
675
+ 825,
676
+ 583
677
+ ],
678
+ "page_idx": 4
679
+ },
680
+ {
681
+ "type": "equation",
682
+ "img_path": "images/fd133ac435d5e9b1a2c2f676e289a34724724a1106d28b81136df66290e63b14.jpg",
683
+ "text": "$$\n\\{ 1 , 2 \\} \\cup \\{ 3 , 4 \\} \\cup \\{ 5 , 6 \\} \\cup \\{ 7 , 8 \\} \\cup \\{ 9 , 1 0 \\}\n$$",
684
+ "text_format": "latex",
685
+ "bbox": [
686
+ 356,
687
+ 588,
688
+ 640,
689
+ 606
690
+ ],
691
+ "page_idx": 4
692
+ },
693
+ {
694
+ "type": "text",
695
+ "text": "and corresponding models ",
696
+ "bbox": [
697
+ 174,
698
+ 611,
699
+ 349,
700
+ 626
701
+ ],
702
+ "page_idx": 4
703
+ },
704
+ {
705
+ "type": "equation",
706
+ "img_path": "images/b2201f4c21bc304f96335e808076f455cade6a7fe62580d88a4f496cd9ea49ba.jpg",
707
+ "text": "$$\n\\begin{array} { r } { \\mathbb { P } _ { \\ell } ( \\pmb { x } ( 2 \\ell - 1 ) , \\pmb { x } ( 2 \\ell ) ) = \\frac { 1 } { 2 } \\cdot \\mathbb { 1 } \\{ \\pmb { x } ( 2 \\ell - 1 ) = 0 , \\pmb { x } ( 2 \\ell ) = 1 \\} + \\frac { 1 } { 2 } \\cdot \\mathbb { 1 } \\{ \\pmb { x } ( 2 \\ell - 1 ) = 1 , \\pmb { x } ( 2 \\ell ) = 0 \\} . } \\end{array}\n$$",
708
+ "text_format": "latex",
709
+ "bbox": [
710
+ 210,
711
+ 628,
712
+ 787,
713
+ 648
714
+ ],
715
+ "page_idx": 4
716
+ },
717
+ {
718
+ "type": "text",
719
+ "text": "We show that our dynamic partition model is able to learn these factors of variation without requiring a manual specification of the partitioning. Here, the total number of experts we need to accurately reconstruct all data points happens to be equal to the number of dimensions. However, in other cases the number of required experts could be smaller or larger than $D$ . We ran our learning algorithm for 15 iterations starting from a random initialization of the experts. The resulting templates after 3, 5 and 15 iterations are shown in Figure 1. We see that each of the final experts specializes in exactly two dimensions $d$ and $d + 1$ . Its opinion for these variables are close to 0 and 1, respectively, while the opinions for the remaining variables are about $1 / 2$ . Every data point can now be (almost) perfectly reconstructed by using exactly 5 of these experts. ",
720
+ "bbox": [
721
+ 173,
722
+ 652,
723
+ 825,
724
+ 779
725
+ ],
726
+ "page_idx": 4
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "For comparison we trained various other models with 10 experts, which use a sum-of-log-odds composition. We first tried an autoencoder (Vincent et al., 2008), which in principle could adopt the identity map because it uses (in contrast to our model) a bias term for the observable and latent variables. However, the gradient descent learning algorithm with tuned step size yielded a different representation (Figure 2, 1st panel). While the reconstruction errors are rather low, they are clearly nonzero and the factors of variations have not been disentangled. Next, we considered a dictionary with a sparse representation (e.g., Elad, 2010). The sparsity penalty was adjusted so that the average number of active dictionary elements was around 5. The learning algorithm again yielded highly dependent experts (Figure 2, 2nd panel). Finally, we trained a restricted Boltzmann machine through batch persistent contrastive divergence (Tieleman, 2008) using a tuned learning rate. Note that a restricted Boltzmann machine in principle only requires 5 experts to model the data appropriately because it uses bias terms. However, we again learned 10 experts (Figure 2, 3rd panel). While the results look better than for the previous two models they are still far from optimal. In earlier work Goessling & Amit (2015) we performed a quantitative comparison for a similar dataset, which showed that the reconstruction performance of models with sum-of-log-odds composition is indeed suboptimal. ",
731
+ "bbox": [
732
+ 174,
733
+ 784,
734
+ 825,
735
+ 924
736
+ ],
737
+ "page_idx": 4
738
+ },
739
+ {
740
+ "type": "image",
741
+ "img_path": "images/5216866f4080e7fa86f1055bff378d9511869454c6d570608de2e6193fd6639e.jpg",
742
+ "image_caption": [
743
+ "Figure 3: Trained experts for MNIST digits. Left: Expert probabilities (white/black corresponds to $\\bar { \\mu _ { k } ( d ) } = 0 / 1 \\dot { . }$ ). Right: Levels of expertise (blue/red corresponds to small/large values). "
744
+ ],
745
+ "image_footnote": [],
746
+ "bbox": [
747
+ 181,
748
+ 103,
749
+ 818,
750
+ 337
751
+ ],
752
+ "page_idx": 5
753
+ },
754
+ {
755
+ "type": "image",
756
+ "img_path": "images/62d9a1080162f04e22a4e7ff25dfd6e533a86ae634df2772b0e8f6e566fc33c0.jpg",
757
+ "image_caption": [
758
+ "Figure 4: Reconstruction of MNIST test examples using likelihood matching pursuit. Each column visualizes the composed Bernoulli templates during the sequential inference procedure (top down) for one sample. The bottom row are the original data points. "
759
+ ],
760
+ "image_footnote": [],
761
+ "bbox": [
762
+ 181,
763
+ 402,
764
+ 820,
765
+ 679
766
+ ],
767
+ "page_idx": 5
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "",
772
+ "bbox": [
773
+ 174,
774
+ 765,
775
+ 825,
776
+ 848
777
+ ],
778
+ "page_idx": 5
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "4.2 MNIST DIGITS ",
783
+ "text_level": 1,
784
+ "bbox": [
785
+ 174,
786
+ 868,
787
+ 321,
788
+ 882
789
+ ],
790
+ "page_idx": 5
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "We now consider the MNIST digits dataset (LeCun et al., 1998), which consists of 60,000 training samples and 10,000 test samples of dimension $2 8 \\times 2 8 = 7 8 4$ . We ran our learning algorithm for 10 iterations and trained 100 experts (Figure 3). We see that some experts specialize on local structures while others focus on more global ones. In Figure 4 we visualize the inference procedure for some test samples using these 100 learned experts. On average 12 experts were activated for each data point. For easier visualization we show at most 10 iterations of the likelihood matching pursuit algorithm. The reconstructions are overall accurate and peculiarities of the samples are smoothed out. In Figure 5 we illustrate how the expert supports change based on the latent representation. Depending on which other experts are present the supports can vary quite a bit. ",
795
+ "bbox": [
796
+ 174,
797
+ 895,
798
+ 823,
799
+ 924
800
+ ],
801
+ "page_idx": 5
802
+ },
803
+ {
804
+ "type": "image",
805
+ "img_path": "images/609f7098b415ad53343fbe0f35f3435a37561302fbc9257e6b8073eaad897d14.jpg",
806
+ "image_caption": [
807
+ "Figure 5: Dynamic supports for 5 MNIST experts. Left column: Expert probabilities. Remaining columns: Composed Bernoulli templates for 10 latent configurations. The cast opinion of the expert is shown in shades of red (white/red corresponds to $\\mu _ { k } ( d ) = 0 / 1$ ). "
808
+ ],
809
+ "image_footnote": [],
810
+ "bbox": [
811
+ 178,
812
+ 103,
813
+ 820,
814
+ 329
815
+ ],
816
+ "page_idx": 6
817
+ },
818
+ {
819
+ "type": "image",
820
+ "img_path": "images/e75d9a39438ef5bcf76d459068827e4ec9911ab05c98e94d81b81c08ba514359.jpg",
821
+ "image_caption": [
822
+ "Figure 6: Trained experts for Weizmann horses. Left: Expert probabilities (white/black corresponds to $\\mathbf { \\bar { \\mu } } _ { k } ( d ) = 0 / 1 ,$ ). Right: Levels of expertise (blue/red corresponds to small/large values). "
823
+ ],
824
+ "image_footnote": [],
825
+ "bbox": [
826
+ 196,
827
+ 405,
828
+ 803,
829
+ 553
830
+ ],
831
+ "page_idx": 6
832
+ },
833
+ {
834
+ "type": "text",
835
+ "text": "",
836
+ "bbox": [
837
+ 174,
838
+ 626,
839
+ 825,
840
+ 724
841
+ ],
842
+ "page_idx": 6
843
+ },
844
+ {
845
+ "type": "text",
846
+ "text": "4.3 WEIZMANN HORSES ",
847
+ "text_level": 1,
848
+ "bbox": [
849
+ 176,
850
+ 744,
851
+ 354,
852
+ 757
853
+ ],
854
+ "page_idx": 6
855
+ },
856
+ {
857
+ "type": "text",
858
+ "text": "The following experiment shows that our model is able to cope with very high-dimensional data. The Weizmann horse dataset (Borenstein & Ullman, 2008) consists of 328 binary images of size $2 0 0 \\times 2 4 0$ . We used the first 300 images to train 20 experts (Figure 6) and used the remaining 28 images for testing. Some of the experts are responsible for the background and the central region of the horse while other experts focus on local structures like head posture, legs and tail. In Figure 7 we illustrate the partitioning of the test examples into expert opinions. For simplicity we used exactly 4 experts to reconstruct each sample. Not all characteristics of the samples are perfectly reconstructed but the general pose is correctly recovered. The same dataset was used to evaluate the shape Boltzmann machine (Eslami et al., 2014), where 2,000 experts were learned. For those experiments the images were downsampled to $3 2 \\times 3 2$ pixels. This is a factor 50 smaller than the full resolution of 48,000 dimensions that we use. ",
859
+ "bbox": [
860
+ 174,
861
+ 770,
862
+ 825,
863
+ 922
864
+ ],
865
+ "page_idx": 6
866
+ },
867
+ {
868
+ "type": "image",
869
+ "img_path": "images/cb8e08d7ce07cc51fa5e5a5f318060fef614a3e17facba3b715183f0d86192c1.jpg",
870
+ "image_caption": [
871
+ "Figure 7: Decomposition of the test examples from the Weizmann horse dataset. 1st column: Original data points. 2nd column: Reconstructions (shown are the composed Bernoulli templates). 3rd-6th column: Partitioning into experts opinions (white/black corresponds to $\\mu _ { k } ( d ) = 0 / 1$ , gray indicates regions for which the expert is not responsible). "
872
+ ],
873
+ "image_footnote": [],
874
+ "bbox": [
875
+ 178,
876
+ 99,
877
+ 820,
878
+ 215
879
+ ],
880
+ "page_idx": 7
881
+ },
882
+ {
883
+ "type": "image",
884
+ "img_path": "images/85b35271a4e848799510c042732605283cc46fb75380b281457881b19cf1b3f0.jpg",
885
+ "image_caption": [
886
+ "Figure 8: Reconstructions of the test examples from the Caltech motorcycle dataset. Odd rows: Original data. Even rows: Reconstructions (shown are the composed Gaussian means). "
887
+ ],
888
+ "image_footnote": [],
889
+ "bbox": [
890
+ 174,
891
+ 300,
892
+ 823,
893
+ 489
894
+ ],
895
+ "page_idx": 7
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "4.4 CALTECH MOTORCYCLES ",
900
+ "text_level": 1,
901
+ "bbox": [
902
+ 176,
903
+ 559,
904
+ 390,
905
+ 573
906
+ ],
907
+ "page_idx": 7
908
+ },
909
+ {
910
+ "type": "text",
911
+ "text": "We also experimented with real-valued data using the Caltech-101 motorcycle dataset (Fei-Fei et al., 2007), which consists of 798 images of size $1 0 0 \\times 1 8 0$ . The first 750 images were used for training and the remaining 48 images for testing. We trained 50 experts by running our learning procedure for 10 iterations. In Figure 8 we visualize the reconstructed test examples. The reconstructions are a bit blurry since we use a fairly sparse binary representation. Indeed, for each data point on average only 7 experts were employed. Note that the shapes of the motorcycles are reconstructed quite accurately. ",
912
+ "bbox": [
913
+ 173,
914
+ 585,
915
+ 825,
916
+ 684
917
+ ],
918
+ "page_idx": 7
919
+ },
920
+ {
921
+ "type": "text",
922
+ "text": "5 DISCUSSION ",
923
+ "text_level": 1,
924
+ "bbox": [
925
+ 174,
926
+ 705,
927
+ 310,
928
+ 722
929
+ ],
930
+ "page_idx": 7
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "In order to improve the reconstructions for continuous image data we could use real-valued latent variables in addition to binary ones (as in Hinton et al. (1998)). This would allow us to model intensities and contrasts more accurately. The inference procedure would have to be adapted accordingly such that continuous activations can be returned. ",
935
+ "bbox": [
936
+ 174,
937
+ 739,
938
+ 825,
939
+ 796
940
+ ],
941
+ "page_idx": 7
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "Our work focused on product distributions. In order to apply the proposed approach to models with dependence structure one can make use of an autoregressive decomposition (e.g., Goessling & Amit, 2016). If the joint distribution is written as a product of conditional distributions then we can employ the same composition rule as before. Indeed, we can model composed the conditionals as ",
946
+ "bbox": [
947
+ 174,
948
+ 803,
949
+ 825,
950
+ 859
951
+ ],
952
+ "page_idx": 7
953
+ },
954
+ {
955
+ "type": "equation",
956
+ "img_path": "images/c5c03329e9cb751783deff717bbc29b48af71cd96d6b661afdbe85c71ebf43ad.jpg",
957
+ "text": "$$\n\\mathbb { P } ( \\pmb { x } ( d ) | \\pmb { x } ( 1 { : } d - 1 ) , \\pmb { h } ) = \\mathbb { P } _ { k ^ { \\star } ( d ) } ( \\pmb { x } ( d ) | \\pmb { x } ( 1 { : } d - 1 ) ) ,\n$$",
958
+ "text_format": "latex",
959
+ "bbox": [
960
+ 328,
961
+ 867,
962
+ 666,
963
+ 886
964
+ ],
965
+ "page_idx": 7
966
+ },
967
+ {
968
+ "type": "text",
969
+ "text": "where $\\mathbb { P } _ { k }$ are autoregressive expert models and $k ^ { \\star } ( d )$ is the active expert with the highest level of expertise for dimension $d$ . ",
970
+ "bbox": [
971
+ 174,
972
+ 895,
973
+ 825,
974
+ 924
975
+ ],
976
+ "page_idx": 7
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "REFERENCES ",
981
+ "text_level": 1,
982
+ "bbox": [
983
+ 176,
984
+ 102,
985
+ 287,
986
+ 118
987
+ ],
988
+ "page_idx": 8
989
+ },
990
+ {
991
+ "type": "text",
992
+ "text": "Yali Amit and Alain Trouve. Pop: Patchwork of parts models for object recognition. ´ International Journal of Computer Vision, 75(2):267–282, 2007. ",
993
+ "bbox": [
994
+ 174,
995
+ 126,
996
+ 823,
997
+ 155
998
+ ],
999
+ "page_idx": 8
1000
+ },
1001
+ {
1002
+ "type": "text",
1003
+ "text": "Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE transactions on pattern analysis and machine intelligence, 35(8):1798–1828, 2013. ",
1004
+ "bbox": [
1005
+ 176,
1006
+ 162,
1007
+ 823,
1008
+ 205
1009
+ ],
1010
+ "page_idx": 8
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "Eran Borenstein and Shimon Ullman. Combined top-down/bottom-up segmentation. IEEE Transactions on Pattern Analysis and Machine Intelligence, 30(12):2109–2125, 2008. ",
1015
+ "bbox": [
1016
+ 171,
1017
+ 213,
1018
+ 821,
1019
+ 244
1020
+ ],
1021
+ "page_idx": 8
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "Arthur P Dempster, Nan M Laird, and Donald B Rubin. Maximum likelihood from incomplete data via the em algorithm. Journal of the Royal Statistical Society. Series B (methodological), pp. 1–38, 1977. ",
1026
+ "bbox": [
1027
+ 174,
1028
+ 251,
1029
+ 823,
1030
+ 294
1031
+ ],
1032
+ "page_idx": 8
1033
+ },
1034
+ {
1035
+ "type": "text",
1036
+ "text": "Michael Elad. Sparse and redundant representations. Springer, 2010. ",
1037
+ "bbox": [
1038
+ 171,
1039
+ 303,
1040
+ 632,
1041
+ 319
1042
+ ],
1043
+ "page_idx": 8
1044
+ },
1045
+ {
1046
+ "type": "text",
1047
+ "text": "SM Ali Eslami, Nicolas Heess, Christopher KI Williams, and John Winn. The shape boltzmann machine: a strong model of object shape. International Journal of Computer Vision, 107(2): 155–176, 2014. ",
1048
+ "bbox": [
1049
+ 173,
1050
+ 325,
1051
+ 821,
1052
+ 369
1053
+ ],
1054
+ "page_idx": 8
1055
+ },
1056
+ {
1057
+ "type": "text",
1058
+ "text": "Li Fei-Fei, Rob Fergus, and Pietro Perona. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. Computer Vision and Image Understanding, 106(1):59–70, 2007. ",
1059
+ "bbox": [
1060
+ 174,
1061
+ 377,
1062
+ 823,
1063
+ 421
1064
+ ],
1065
+ "page_idx": 8
1066
+ },
1067
+ {
1068
+ "type": "text",
1069
+ "text": "Marc Goessling and Yali Amit. Compact compositional models. In International Conference on Learning Representations (Workshop), 2015. URL http://arxiv.org/abs/1412.3708. ",
1070
+ "bbox": [
1071
+ 171,
1072
+ 429,
1073
+ 823,
1074
+ 458
1075
+ ],
1076
+ "page_idx": 8
1077
+ },
1078
+ {
1079
+ "type": "text",
1080
+ "text": "Marc Goessling and Yali Amit. Mixtures of sparse autoregressive networks. In International Conference on Learning Representations (Workshop), 2016. URL http://arxiv.org/abs/ 1511.04776. ",
1081
+ "bbox": [
1082
+ 173,
1083
+ 465,
1084
+ 825,
1085
+ 508
1086
+ ],
1087
+ "page_idx": 8
1088
+ },
1089
+ {
1090
+ "type": "text",
1091
+ "text": "John A Hartigan. Partition models. Communications in statistics-Theory and methods, 19(8):2745– 2756, 1990. ",
1092
+ "bbox": [
1093
+ 171,
1094
+ 517,
1095
+ 825,
1096
+ 547
1097
+ ],
1098
+ "page_idx": 8
1099
+ },
1100
+ {
1101
+ "type": "text",
1102
+ "text": "Mark Herbster and Manfred K Warmuth. Tracking the best expert. Machine Learning, 32(2):151– 178, 1998. ",
1103
+ "bbox": [
1104
+ 171,
1105
+ 555,
1106
+ 823,
1107
+ 584
1108
+ ],
1109
+ "page_idx": 8
1110
+ },
1111
+ {
1112
+ "type": "text",
1113
+ "text": "Geoffrey E Hinton. Training products of experts by minimizing contrastive divergence. Neural computation, 14(8):1771–1800, 2002. ",
1114
+ "bbox": [
1115
+ 173,
1116
+ 593,
1117
+ 823,
1118
+ 622
1119
+ ],
1120
+ "page_idx": 8
1121
+ },
1122
+ {
1123
+ "type": "text",
1124
+ "text": "Geoffrey E Hinton, Brian Sallans, and Zoubin Ghahramani. A hierarchical community of experts. In Learning in graphical models, pp. 479–494. 1998. ",
1125
+ "bbox": [
1126
+ 173,
1127
+ 630,
1128
+ 823,
1129
+ 660
1130
+ ],
1131
+ "page_idx": 8
1132
+ },
1133
+ {
1134
+ "type": "text",
1135
+ "text": "Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. ",
1136
+ "bbox": [
1137
+ 171,
1138
+ 667,
1139
+ 823,
1140
+ 696
1141
+ ],
1142
+ "page_idx": 8
1143
+ },
1144
+ {
1145
+ "type": "text",
1146
+ "text": "Jorg L ¨ ucke and Maneesh Sahani. Maximal causes for non-linear component extraction. ¨ The Journal of Machine Learning Research, 9:1227–1267, 2008. ",
1147
+ "bbox": [
1148
+ 171,
1149
+ 705,
1150
+ 825,
1151
+ 734
1152
+ ],
1153
+ "page_idx": 8
1154
+ },
1155
+ {
1156
+ "type": "text",
1157
+ "text": "Geoffrey McLachlan and David Peel. Finite mixture models. John Wiley & Sons, 2004. ",
1158
+ "bbox": [
1159
+ 173,
1160
+ 742,
1161
+ 746,
1162
+ 758
1163
+ ],
1164
+ "page_idx": 8
1165
+ },
1166
+ {
1167
+ "type": "text",
1168
+ "text": "Andrew Ng. Sparse autoencoder. CS294A Lecture Notes, 72:1–19, 2011. ",
1169
+ "bbox": [
1170
+ 173,
1171
+ 765,
1172
+ 653,
1173
+ 781
1174
+ ],
1175
+ "page_idx": 8
1176
+ },
1177
+ {
1178
+ "type": "text",
1179
+ "text": "Chris Pal, Brendan J Frey, and Nebojsa Jojic. Learning montages of transformed latent images as representations of objects that change in appearance. In Computer Vision–ECCV, pp. 715–731. 2002. ",
1180
+ "bbox": [
1181
+ 176,
1182
+ 790,
1183
+ 825,
1184
+ 833
1185
+ ],
1186
+ "page_idx": 8
1187
+ },
1188
+ {
1189
+ "type": "text",
1190
+ "text": "Tijmen Tieleman. Training restricted boltzmann machines using approximations to the likelihood gradient. In International Conference on Machine learning, pp. 1064–1071, 2008. ",
1191
+ "bbox": [
1192
+ 171,
1193
+ 840,
1194
+ 823,
1195
+ 871
1196
+ ],
1197
+ "page_idx": 8
1198
+ },
1199
+ {
1200
+ "type": "text",
1201
+ "text": "Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In International Conference on Machine Learning, pp. 1096–1103, 2008. ",
1202
+ "bbox": [
1203
+ 178,
1204
+ 878,
1205
+ 823,
1206
+ 921
1207
+ ],
1208
+ "page_idx": 8
1209
+ },
1210
+ {
1211
+ "type": "text",
1212
+ "text": "6 DERIVATIVES ",
1213
+ "text_level": 1,
1214
+ "bbox": [
1215
+ 174,
1216
+ 102,
1217
+ 320,
1218
+ 118
1219
+ ],
1220
+ "page_idx": 9
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "We provide here the derivatives of the log-likelihood in the expertise-weighted compositional model (4) with respect to the expert parameters. ",
1225
+ "bbox": [
1226
+ 173,
1227
+ 132,
1228
+ 825,
1229
+ 161
1230
+ ],
1231
+ "page_idx": 9
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "6.1 BERNOULLI MODEL",
1236
+ "text_level": 1,
1237
+ "bbox": [
1238
+ 174,
1239
+ 178,
1240
+ 352,
1241
+ 193
1242
+ ],
1243
+ "page_idx": 9
1244
+ },
1245
+ {
1246
+ "type": "text",
1247
+ "text": "The Bernoulli log-likelihood is ",
1248
+ "bbox": [
1249
+ 174,
1250
+ 204,
1251
+ 380,
1252
+ 218
1253
+ ],
1254
+ "page_idx": 9
1255
+ },
1256
+ {
1257
+ "type": "equation",
1258
+ "img_path": "images/a53b97113cd543462ccaa9aa7cd19d90950232c6f8a55ea1a868908a9e25c4be.jpg",
1259
+ "text": "$$\nf ( \\mu ) = x \\log \\mu + ( 1 - x ) \\log ( 1 - \\mu ) ,\n$$",
1260
+ "text_format": "latex",
1261
+ "bbox": [
1262
+ 372,
1263
+ 223,
1264
+ 622,
1265
+ 241
1266
+ ],
1267
+ "page_idx": 9
1268
+ },
1269
+ {
1270
+ "type": "text",
1271
+ "text": "where the composition rule for the probability is ",
1272
+ "bbox": [
1273
+ 174,
1274
+ 243,
1275
+ 493,
1276
+ 258
1277
+ ],
1278
+ "page_idx": 9
1279
+ },
1280
+ {
1281
+ "type": "equation",
1282
+ "img_path": "images/784fafee3eb95dd2cda31b72c3bfde905f7057ec0f9bee8e8e6cbabcfd397dce.jpg",
1283
+ "text": "$$\n\\mu = \\sum _ { k } r _ { k } \\mu _ { k } , \\quad r _ { k } = \\frac { e _ { k } } { \\sum _ { k ^ { \\prime } } e _ { k ^ { \\prime } } } .\n$$",
1284
+ "text_format": "latex",
1285
+ "bbox": [
1286
+ 390,
1287
+ 262,
1288
+ 606,
1289
+ 296
1290
+ ],
1291
+ "page_idx": 9
1292
+ },
1293
+ {
1294
+ "type": "text",
1295
+ "text": "6.1.1 DERIVATIVES WITH RESPECT TO THE COMPOSED PROBABILITY ",
1296
+ "text_level": 1,
1297
+ "bbox": [
1298
+ 176,
1299
+ 308,
1300
+ 663,
1301
+ 323
1302
+ ],
1303
+ "page_idx": 9
1304
+ },
1305
+ {
1306
+ "type": "text",
1307
+ "text": "The first and second derivative of the log-likelihood with respect to the composed probability are ",
1308
+ "bbox": [
1309
+ 174,
1310
+ 332,
1311
+ 805,
1312
+ 347
1313
+ ],
1314
+ "page_idx": 9
1315
+ },
1316
+ {
1317
+ "type": "equation",
1318
+ "img_path": "images/a31121d5377ebf690b416aef88f4a0b0a992084896e5774265aa39870ecdd683.jpg",
1319
+ "text": "$$\n{ \\frac { d f } { d \\mu } } = { \\frac { x } { \\mu } } - { \\frac { 1 - x } { 1 - \\mu } } = { \\frac { x - \\mu } { \\mu ( 1 - \\mu ) } } ,\n$$",
1320
+ "text_format": "latex",
1321
+ "bbox": [
1322
+ 392,
1323
+ 349,
1324
+ 604,
1325
+ 383
1326
+ ],
1327
+ "page_idx": 9
1328
+ },
1329
+ {
1330
+ "type": "equation",
1331
+ "img_path": "images/fe21901bd6ab7edfe85182309a732162ad9985c11fd0e815427092561f309631.jpg",
1332
+ "text": "$$\n\\frac { d ^ { 2 } f } { d \\mu ^ { 2 } } = - \\frac { x } { \\mu ^ { 2 } } - \\frac { 1 - x } { ( 1 - \\mu ) ^ { 2 } } = - \\frac { ( x - \\mu ) ^ { 2 } } { \\mu ^ { 2 } ( 1 - \\mu ) ^ { 2 } } .\n$$",
1333
+ "text_format": "latex",
1334
+ "bbox": [
1335
+ 354,
1336
+ 387,
1337
+ 642,
1338
+ 422
1339
+ ],
1340
+ "page_idx": 9
1341
+ },
1342
+ {
1343
+ "type": "text",
1344
+ "text": "6.1.2 DERIVATIVES WITH RESPECT TO THE EXPERT PROBABILITIES ",
1345
+ "bbox": [
1346
+ 174,
1347
+ 434,
1348
+ 651,
1349
+ 449
1350
+ ],
1351
+ "page_idx": 9
1352
+ },
1353
+ {
1354
+ "type": "text",
1355
+ "text": "The first and second derivative of the composed probability with respect to the expert probabilities are ",
1356
+ "bbox": [
1357
+ 173,
1358
+ 458,
1359
+ 825,
1360
+ 486
1361
+ ],
1362
+ "page_idx": 9
1363
+ },
1364
+ {
1365
+ "type": "equation",
1366
+ "img_path": "images/343e976cad753e5f8f8766c1f3d6997a80387bd1efe785752b8488cc329c9db4.jpg",
1367
+ "text": "$$\n\\frac { d \\mu } { d \\mu _ { k } } = r _ { k } , \\quad \\frac { d ^ { 2 } \\mu } { d \\mu _ { k } ^ { 2 } } = 0 .\n$$",
1368
+ "text_format": "latex",
1369
+ "bbox": [
1370
+ 419,
1371
+ 482,
1372
+ 578,
1373
+ 518
1374
+ ],
1375
+ "page_idx": 9
1376
+ },
1377
+ {
1378
+ "type": "text",
1379
+ "text": "Consequently, the derivatives of the log-likelihood with respect to the expert probabilities are ",
1380
+ "bbox": [
1381
+ 171,
1382
+ 518,
1383
+ 784,
1384
+ 534
1385
+ ],
1386
+ "page_idx": 9
1387
+ },
1388
+ {
1389
+ "type": "equation",
1390
+ "img_path": "images/58f26eb3263e856beb7e11b952982bf2e25bcc1b38294871626265ca0de940c7.jpg",
1391
+ "text": "$$\n{ \\frac { d f } { d \\mu _ { k } } } = { \\frac { d f } { d \\mu } } \\cdot { \\frac { d \\mu } { d \\mu _ { k } } } = r _ { k } { \\frac { x - \\mu } { \\mu ( 1 - \\mu ) } } ,\n$$",
1392
+ "text_format": "latex",
1393
+ "bbox": [
1394
+ 385,
1395
+ 536,
1396
+ 609,
1397
+ 570
1398
+ ],
1399
+ "page_idx": 9
1400
+ },
1401
+ {
1402
+ "type": "equation",
1403
+ "img_path": "images/c186a3b97bc5f7abf738e4e2ad77324974f154f1f493b6cc270823cbaa18e81c.jpg",
1404
+ "text": "$$\n{ \\frac { d ^ { 2 } f } { d \\mu _ { k } ^ { 2 } } } = { \\frac { d ^ { 2 } f } { d \\mu ^ { 2 } } } \\cdot \\left( { \\frac { d \\mu } { d \\mu _ { k } } } \\right) ^ { 2 } + { \\frac { d f } { d \\mu } } \\cdot { \\frac { d ^ { 2 } \\mu } { d \\mu _ { k } ^ { 2 } } } = - r _ { k } ^ { 2 } { \\frac { ( x - \\mu ) ^ { 2 } } { \\mu ^ { 2 } ( 1 - \\mu ) ^ { 2 } } } .\n$$",
1405
+ "text_format": "latex",
1406
+ "bbox": [
1407
+ 312,
1408
+ 574,
1409
+ 684,
1410
+ 611
1411
+ ],
1412
+ "page_idx": 9
1413
+ },
1414
+ {
1415
+ "type": "text",
1416
+ "text": "We see that $d ^ { 2 } f / d \\mu _ { k } ^ { 2 } < 0$ for $\\mu \\in ( 0 , 1 )$ , i.e., the log-likelihood is a strictly concave function of $\\mu _ { k }$ ",
1417
+ "bbox": [
1418
+ 174,
1419
+ 613,
1420
+ 820,
1421
+ 628
1422
+ ],
1423
+ "page_idx": 9
1424
+ },
1425
+ {
1426
+ "type": "text",
1427
+ "text": "6.1.3 DERIVATIVE WITH RESPECT TO THE LEVELS OF EXPERTISE ",
1428
+ "text_level": 1,
1429
+ "bbox": [
1430
+ 176,
1431
+ 642,
1432
+ 637,
1433
+ 657
1434
+ ],
1435
+ "page_idx": 9
1436
+ },
1437
+ {
1438
+ "type": "text",
1439
+ "text": "The derivative of the composed probability with respect to the levels of expertise is ",
1440
+ "bbox": [
1441
+ 173,
1442
+ 666,
1443
+ 717,
1444
+ 681
1445
+ ],
1446
+ "page_idx": 9
1447
+ },
1448
+ {
1449
+ "type": "equation",
1450
+ "img_path": "images/b95b07018eea69beb64750767df3490ccbaa52926676966c474e17b644deaed7.jpg",
1451
+ "text": "$$\n{ \\frac { d \\mu } { d e _ { k } } } = { \\frac { \\mu _ { k } E - \\sum e _ { k ^ { \\prime } } \\mu _ { k ^ { \\prime } } } { E ^ { 2 } } } = { \\frac { \\mu _ { k } - \\mu } { E } } ,\n$$",
1452
+ "text_format": "latex",
1453
+ "bbox": [
1454
+ 375,
1455
+ 684,
1456
+ 620,
1457
+ 718
1458
+ ],
1459
+ "page_idx": 9
1460
+ },
1461
+ {
1462
+ "type": "text",
1463
+ "text": "where $\\begin{array} { r } { E = \\sum _ { k ^ { \\prime } } e _ { k ^ { \\prime } } } \\end{array}$ . The derivative of the log-likelihood with respect to the levels of expertise can be computed as ",
1464
+ "bbox": [
1465
+ 174,
1466
+ 722,
1467
+ 820,
1468
+ 750
1469
+ ],
1470
+ "page_idx": 9
1471
+ },
1472
+ {
1473
+ "type": "equation",
1474
+ "img_path": "images/bd7ada009cd7c4c2485444bd2894160903467abeb7119756ee55153a5cb340f9.jpg",
1475
+ "text": "$$\n{ \\frac { d f } { d e _ { k } } } = { \\frac { d f } { d \\mu } } \\cdot { \\frac { d \\mu } { d e _ { k } } } .\n$$",
1476
+ "text_format": "latex",
1477
+ "bbox": [
1478
+ 437,
1479
+ 747,
1480
+ 558,
1481
+ 781
1482
+ ],
1483
+ "page_idx": 9
1484
+ },
1485
+ {
1486
+ "type": "text",
1487
+ "text": "6.2 GAUSSIAN MODEL ",
1488
+ "text_level": 1,
1489
+ "bbox": [
1490
+ 174,
1491
+ 795,
1492
+ 343,
1493
+ 810
1494
+ ],
1495
+ "page_idx": 9
1496
+ },
1497
+ {
1498
+ "type": "text",
1499
+ "text": "The Gaussian log-likelihood is ",
1500
+ "bbox": [
1501
+ 174,
1502
+ 820,
1503
+ 379,
1504
+ 835
1505
+ ],
1506
+ "page_idx": 9
1507
+ },
1508
+ {
1509
+ "type": "equation",
1510
+ "img_path": "images/70107eb36a7ab89c6ad9af43b866065de47a1b0ab0cb431ee76db00e0c155d5b.jpg",
1511
+ "text": "$$\nf ( \\mu , v ) = - \\frac { ( x - \\mu ) ^ { 2 } } { 2 v } - \\frac { 1 } { 2 } \\log ( v ) - \\frac { 1 } { 2 } \\log ( 2 \\pi ) ,\n$$",
1512
+ "text_format": "latex",
1513
+ "bbox": [
1514
+ 341,
1515
+ 839,
1516
+ 656,
1517
+ 872
1518
+ ],
1519
+ "page_idx": 9
1520
+ },
1521
+ {
1522
+ "type": "text",
1523
+ "text": "where the composition rules for the mean and variance are ",
1524
+ "bbox": [
1525
+ 176,
1526
+ 875,
1527
+ 558,
1528
+ 890
1529
+ ],
1530
+ "page_idx": 9
1531
+ },
1532
+ {
1533
+ "type": "equation",
1534
+ "img_path": "images/524e1f5613275d43edef612ce0e525fd59ae6b66731a944cdd081f26d6a9579e.jpg",
1535
+ "text": "$$\n\\mu = \\sum _ { k } r _ { k } \\mu _ { k } , \\quad v = \\sum _ { k } r _ { k } ( v _ { k } + \\mu _ { k } ^ { 2 } ) - \\mu ^ { 2 } , \\quad r _ { k } = \\frac { e _ { k } } { \\sum _ { k ^ { \\prime } } e _ { k ^ { \\prime } } } .\n$$",
1536
+ "text_format": "latex",
1537
+ "bbox": [
1538
+ 290,
1539
+ 893,
1540
+ 705,
1541
+ 928
1542
+ ],
1543
+ "page_idx": 9
1544
+ },
1545
+ {
1546
+ "type": "text",
1547
+ "text": "6.2.1 DERIVATIVE WITH RESPECT TO THE COMPOSED MEAN AND VARIANCE ",
1548
+ "text_level": 1,
1549
+ "bbox": [
1550
+ 173,
1551
+ 103,
1552
+ 715,
1553
+ 118
1554
+ ],
1555
+ "page_idx": 10
1556
+ },
1557
+ {
1558
+ "type": "text",
1559
+ "text": "The derivative of the log-likelihood with respect to the composed mean and variance are ",
1560
+ "bbox": [
1561
+ 174,
1562
+ 127,
1563
+ 753,
1564
+ 143
1565
+ ],
1566
+ "page_idx": 10
1567
+ },
1568
+ {
1569
+ "type": "equation",
1570
+ "img_path": "images/fd3d0fbccbb40b9d7216debcab80a3bbdb02fde8221edd87260de5da7f682f95.jpg",
1571
+ "text": "$$\n{ \\frac { d f } { d \\mu } } = { \\frac { x - \\mu } { v } } , \\quad { \\frac { d f } { d v } } = { \\frac { ( x - \\mu ) ^ { 2 } } { 2 v ^ { 2 } } } - { \\frac { 1 } { 2 v } } = { \\frac { ( x - \\mu ) ^ { 2 } - v } { 2 v ^ { 2 } } } .\n$$",
1572
+ "text_format": "latex",
1573
+ "bbox": [
1574
+ 310,
1575
+ 148,
1576
+ 687,
1577
+ 184
1578
+ ],
1579
+ "page_idx": 10
1580
+ },
1581
+ {
1582
+ "type": "text",
1583
+ "text": "6.2.2 DERIVATIVE WITH RESPECT TO THE LEVELS OF EXPERTISE ",
1584
+ "bbox": [
1585
+ 174,
1586
+ 196,
1587
+ 635,
1588
+ 212
1589
+ ],
1590
+ "page_idx": 10
1591
+ },
1592
+ {
1593
+ "type": "text",
1594
+ "text": "The derivative of the composed mean and variance with respect to the levels of expertise are ",
1595
+ "bbox": [
1596
+ 171,
1597
+ 220,
1598
+ 776,
1599
+ 236
1600
+ ],
1601
+ "page_idx": 10
1602
+ },
1603
+ {
1604
+ "type": "equation",
1605
+ "img_path": "images/b05082653f18deafefdb442d4bde73a9fec40ac55e19dc1644a80fa535bce683.jpg",
1606
+ "text": "$$\n{ \\frac { d \\mu } { d e _ { k } } } = { \\frac { \\mu _ { k } E - \\sum e _ { k ^ { \\prime } } \\mu _ { k ^ { \\prime } } } { E ^ { 2 } } } = { \\frac { \\mu _ { k } - \\mu } { E } } ,\n$$",
1607
+ "text_format": "latex",
1608
+ "bbox": [
1609
+ 375,
1610
+ 241,
1611
+ 620,
1612
+ 275
1613
+ ],
1614
+ "page_idx": 10
1615
+ },
1616
+ {
1617
+ "type": "equation",
1618
+ "img_path": "images/6240424f09d4860de1fa89ca71628cf68c8b1b7c63ee087fa91cef32f228cea4.jpg",
1619
+ "text": "$$\n{ \\frac { d v } { d e _ { k } } } = { \\frac { q _ { k } E - \\sum e _ { k ^ { \\prime } } q _ { k ^ { \\prime } } } { E ^ { 2 } } } - 2 \\mu { \\frac { d \\mu } { d e _ { k } } } = { \\frac { q _ { k } - q } { E } } - 2 \\mu { \\frac { \\mu _ { k } - \\mu } { E } } = { \\frac { v _ { k } - v + ( \\mu _ { k } - \\mu ) ^ { 2 } } { E } } ,\n$$",
1620
+ "text_format": "latex",
1621
+ "bbox": [
1622
+ 223,
1623
+ 280,
1624
+ 772,
1625
+ 314
1626
+ ],
1627
+ "page_idx": 10
1628
+ },
1629
+ {
1630
+ "type": "text",
1631
+ "text": "where $\\begin{array} { r } { E = \\sum _ { k ^ { \\prime } } e _ { k ^ { \\prime } } } \\end{array}$ and $q _ { k } = v _ { k } + \\mu _ { k } ^ { 2 }$ , $q = v + \\mu ^ { 2 }$ . The derivative of the log-likelihood with respect to the levels of expertise can be computed as ",
1632
+ "bbox": [
1633
+ 174,
1634
+ 318,
1635
+ 823,
1636
+ 347
1637
+ ],
1638
+ "page_idx": 10
1639
+ },
1640
+ {
1641
+ "type": "equation",
1642
+ "img_path": "images/4a171917c115f31fd0f3396608adf0d3ad2b85b3fddd34e3e14a62662cb11bf5.jpg",
1643
+ "text": "$$\n{ \\frac { d f } { d e _ { k } } } = { \\frac { d f } { d \\mu } } \\cdot { \\frac { d \\mu } { d e _ { k } } } + { \\frac { d f } { d v } } \\cdot { \\frac { d v } { d e _ { k } } } .\n$$",
1644
+ "text_format": "latex",
1645
+ "bbox": [
1646
+ 398,
1647
+ 352,
1648
+ 599,
1649
+ 386
1650
+ ],
1651
+ "page_idx": 10
1652
+ },
1653
+ {
1654
+ "type": "text",
1655
+ "text": "7 NUMERICAL OPTIMIZATION ",
1656
+ "text_level": 1,
1657
+ "bbox": [
1658
+ 176,
1659
+ 401,
1660
+ 437,
1661
+ 417
1662
+ ],
1663
+ "page_idx": 10
1664
+ },
1665
+ {
1666
+ "type": "text",
1667
+ "text": "For binary data, the log-likelihood of the smoothed model is a concave function of $\\mu _ { k } ( d )$ , see Section 6.1.2. We could therefore in principal perform an optimization for the experts opinions using Newton’s method. There are a few complications though. One problem is that the second derivative is proportional to the squared responsibility and hence close to 0 if the level of expertise is small. Consequently, template updates in regions with low expertise would be unstable. To deal with that we could add a penalty on the squared log-odds for example. Another problem is that the Newton steps may lead to probability estimates outside of $[ 0 , 1 ]$ . This can be dealt with by pulling the estimates back into the unit interval. Note that working on the log-odds scale is not possible because the log-likelihood of our model is not concave in the expert log-odds. Because of these complications we use the simple, fast and robust heuristic (5) instead of Netwon’s method. ",
1668
+ "bbox": [
1669
+ 173,
1670
+ 431,
1671
+ 825,
1672
+ 571
1673
+ ],
1674
+ "page_idx": 10
1675
+ }
1676
+ ]
parse/train/BJ46w6Ule/BJ46w6Ule_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/BJ46w6Ule/BJ46w6Ule_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1gR5iR5FX/H1gR5iR5FX.md ADDED
@@ -0,0 +1,406 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ANALYSING MATHEMATICAL REASONING ABILITIES OF NEURAL MODELS
2
+
3
+ David Saxton
4
+ DeepMind
5
+ saxton@google.com
6
+
7
+ Edward Grefenstette DeepMind egrefen@fb.com
8
+
9
+ Felix Hill
10
+ DeepMind
11
+ felixhill@google.com
12
+ Pushmeet Kohli
13
+ DeepMind
14
+ pushmeet@google.com
15
+
16
+ # ABSTRACT
17
+
18
+ Mathematical reasoning—a core ability within human intelligence—presents some unique challenges as a domain: we do not come to understand and solve mathematical problems primarily on the back of experience and evidence, but on the basis of inferring, learning, and exploiting laws, axioms, and symbol manipulation rules. In this paper, we present a new challenge for the evaluation (and eventually the design) of neural architectures and similar system, developing a task suite of mathematics problems involving sequential questions and answers in a free-form textual input/output format. The structured nature of the mathematics domain, covering arithmetic, algebra, probability and calculus, enables the construction of training and test splits designed to clearly illuminate the capabilities and failure-modes of different architectures, as well as evaluate their ability to compose and relate knowledge and learned processes. Having described the data generation process and its potential future expansions, we conduct a comprehensive analysis of models from two broad classes of the most powerful sequence-to-sequence architectures and find notable differences in their ability to resolve mathematical problems and generalize their knowledge.
19
+
20
+ # 1 INTRODUCTION
21
+
22
+ Deep learning, powered by convolutional and recurrent networks, has had remarkable success in areas involving pattern matching (such as in images (Krizhevsky et al., 2012), machine translation (Bahdanau et al., 2014; Vaswani et al., 2017), and reinforcement learning (Mnih et al., 2015; Silver et al., 2016)). However, deep models are far from achieving the robustness and flexibility exhibited by humans. They are limited in their ability to generalize beyond the environments they have experienced and are extremely brittle in the presence of adversarially constructed inputs (Szegedy et al., 2013).
23
+
24
+ One area where human intelligence still differs and excels compared to neural models is discrete compositional reasoning about objects and entities, that “algebraically generalize” (Marcus, 2003). Our ability to generalise within this domain is complex, multi-faceted, and patently different from the sorts of generalisations that permit us to, for example, translate new sentence of French into English. For example, consider the following question from mathematics, with answer " $- 7 0 x - 1 6 5 "$ .
25
+
26
+ What is $g ( h ( f ( x ) ) )$ , where $f ( x ) = 2 x + 3$ , $g ( x ) = 7 x - 4$ , and $h ( x ) = - 5 x - 8 ?$
27
+
28
+ To solve this problem, humans use a variety of cognitive skills:
29
+
30
+ • Parsing the characters into entities such as numbers, arithmetic operators, variables (which together form functions) and words (determining the question).
31
+ • Planning (for example, identifying the functions in the correct order to compose).
32
+ • Using sub-algorithms for function composition (addition, multiplication).
33
+ • Exploiting working memory to store intermediate values (such as the composition $h ( f ( x ) ) )$ .
34
+
35
+ • Generally applying acquired knowledge of rules, transformations, processes, and axioms.
36
+
37
+ In this paper, we introduce a dataset consisting of many different types of mathematics problems, with the motivation that it should be harder for a model to do well across a range of problem types (including generalization, which we detail below) without possessing at least some part of these abilities that allow for algebraic generalization.
38
+
39
+ This domain is an important one for the analysis of neural architectures in general. In addition to providing a wide range of questions, there are several other advantages: Mathematics offers a self-consistent universe; notation is the same across different problem types, which allows for an easily extendable dataset; and rules and methods learnt on one problem type often apply elsewhere. Addition of numbers (for example) obeys the same rules everywhere, and occurs as a “subroutine" in other problems (such as concretely in multiplication, and both concretely and more abstractly in addition of polynomials); models that possess the ability to transfer knowledge will do well on the dataset (and knowledge transfer may be a necessity for solving harder problems).
40
+
41
+ Mathematics is also an interesting domain in its own right; although models solving the mostly school-level problems in this dataset would not themselves have applications, they may lead on to more powerful models that can solve interesting and substantial new mathematical problems. But more generally, it is no coincidence that experiments seeking to validate new architectures which aim capture algorithmic/systematic reasoning have often been drawn from this domain (Graves et al., 2016; Kaiser & Sutskever, 2015; Joulin & Mikolov, 2015), and thus in providing a large scale training and evaluation framework for such models, we hope to provide a solid foundation upon which to continue such research into machine reasoning beyond mathematics.
42
+
43
+ Question: Solve $- 4 2 \star \Upsilon + 2 7 \star \subset = - 1 1 6 7$ and $1 3 0 \star \tt { r } + 4 \star \tt { C } = 3 7 2$ for r. Answer: 4
44
+ Question: Calculate $- 8 4 1 8 8 0 1 4 2 . 5 4 4 + 4 1 1 1 2 7 .$ .
45
+ Answer: $- 8 4 1 4 6 9 0 1 5 . 5 4 4$
46
+ Question: Let $\begin{array} { c c c c c } { { \mathrm { \bf ~ x ~ ( \mit g ) } } } & { { = } } & { { 9 \star \mathrm { \bf g } } } & { { + } } & { { 1 } } \end{array}$ . Let $\begin{array} { c c c c } { { \sf q _ { \tau } ( c ) } } & { { = } } & { { 2 \star { \sf c } } } & { { + } } & { { 1 } } \end{array}$ . Let $\begin{array} { r l r } { \pounds \left( \mathrm { ~ i ~ } \right) } & { { } = } & { 3 \star \mathrm { i } } \end{array}$ - 39. Let w( $\begin{array}{c} \begin{array} { r l r } { \dot { { \bf \Xi } } } \end{array} \mathrm { ~ ~ \cdot ~ } \dot { { \bf \Xi } } ) & { { } = \mathrm { ~ ~ q ~ } ( { \bf \Xi } { \bf x } \left( \dot { { \bf \Xi } } \right) ) } \end{array}$ . Calculate f(w(a)).
47
+ Answer: $5 4 \star \mathsf { a } \mathrm { ~ \ - ~ } \ 3 0$
48
+ Question: Let $\Theta \left( \frac { } { } 1 \right) \ = \ \begin{array} { c c c c } { { 1 } } & { { - } } & { { 6 } } & { { } } \end{array}$ . Is 2 a factor of both e(9) and 2?
49
+ Answer: False
50
+ Question: Let $u ( n ) = - n + 3 - n + \pm 2$ . Let $e ( C ) = - 2 \star C \star \star 3 + C$ . Let l(j) $= - 1 1 8 { \star } \mathsf { e }$ (j) $+ ~ 5 4 { \star } \sqcup$ (j). What is the derivative of l(a)?
51
+ Answer: $5 4 6 \star a \star \star 2 - 1 0 8 \star a - 1 1 8$
52
+ Question: Three letters picked without replacement from qqqkkklkqkkk. Give prob of sequence qql.
53
+ Answer: 1/110
54
+
55
+ # 1.1 OUR CONTRIBUTIONS
56
+
57
+ Dataset and generalization tests We release1 a sequence-to-sequence dataset consisting of many different types of mathematics questions (see Figure 1) for measuring mathematical reasoning, with the provision of both generation code and pre-generated questions. The dataset comes with two sets of tests: interpolation tests, one for each type of question occurring in the training set; and extrapolation tests, that measure generalization along various axes of difficulty to beyond that seen during training. We include extrapolation tests as an additional measure of whether models are employing abilities that allow them to algebraically generalize.
58
+
59
+ Experiments and model analysis We perform an experimental evaluation to investigate the algebraic abilities of state-of-the-art neural architectures, and show that they do well on some types of questions, but certainly not all, and furthermore have only moderate amounts of generalization. We give some insights into how they learn to answer mathematics questions, and their failure modes.
60
+
61
+ # 1.2 RELATED WORK
62
+
63
+ There are various papers with datasets with a discrete reasoning nature. Kaiser & Sutskever (2015) use an adapted convolutional architecture to solve addition and multiplication with good generalization; Allamanis et al. (2016) and Evans et al. (2018) use tree networks to predict polynomial or logical equivalence or logical entailment; Selsam et al. (2018) uses message passing networks with a bipartite graph structure to decide satisfiability in formulas in conjunctive normal form, and so on. The difference between those problems and the dataset in this paper is that the former all have a single well-defined input structure that can be easily mapped into narrow architectures suited to the problem structure, avoiding the need for general reasoning skills like parsing or generic working memory.
64
+
65
+ Zaremba & Sutskever (2014) analyze the ability of LSTMs to map short Python programs (addition or for-loops) to their output. Some mathematics problems are of a similar imperative nature (e.g. arithmetic), but we also cover many other types of problems, so our dataset subsumes learning-to-execute. There are a few other synthetically generated datasets designed to assess reasoning of some form. The bAbI dataset of Weston et al. (2015) consists of textual questions, testing the ability to extract knowledge from a story-like sequence of questions. The CLEVR dataset of Johnson et al. (2017) consists of image-question pairs, where the image is of a set of objects, and the question asks for some property of the scene; this dataset is designed to assess visual analysis. Santoro et al. (2018b) use Raven’s progressive matrix puzzles to measure abstract reasoning of networks.
66
+
67
+ There has also been a recent interest in solving algebraic word problems. These questions tend to be crowd sourced or obtained from exercise books, and existing datasets include Allen Institute for AI (2014); Kushman et al. (2014); Huang et al. (2016); Upadhyay & Chang (2016); Wang et al. (2017); Ling et al. (2017). These range in size from hundreds to up to one hundred thousand examples, with different variations and focuses; for example, containing supervised “answer rationale", or focusing on more narrow types of problems, or additionally containing geometry problems (although some of these are too small to train deep learning models without extensive prior mathematical knowledge). Our dataset differs from these in that our focus is mathematical reasoning rather than linguistic comprehension; we cover more areas of mathematics, but with less variation in problem specification, and we see mathematical reasoning as a partially orthogonal and complementary direction to linguistic understanding existing in these other datasets.
68
+
69
+ # 2 THE DATASET
70
+
71
+ # 2.1 DESIGN CHOICES
72
+
73
+ Modular structure and procedural generation There are two choices for obtaining mathematical questions: either crowd-sourced, or synthetically generated. While crowd-sourcing has the advantage of introducing linguistic diversity, as well as a diversity of problem types, it is difficult to collect and validate such data at scale. In contrast, procedural generation is sufficient for our purposes in most respects: it (1) easily provides a larger number of training examples, with (2) precise controls over difficulty levels, permitting (3) analysis of performance by question type, and (4) better guarantees on question correctness, with (5) potential for more efficient model training by varying the time spent on each module, and (6) ease of testing generalization (since one can precisely vary different axes of difficulty in different question types).
74
+
75
+ Freeform question/answers Given that we synthetically generate the data, we could of course provide the questions as parsed into some structure appropriate for each question type (e.g. a tree or graph). However, we opt for freeform—as a sequence of characters—because (1) it is a powerful and flexible format, allowing us to express many question types (whereas trees or graphs are only appropriate for some problems), (2) the ability to properly semantically parse is a non-negligible part of cognition, and (3) sequences are much simpler objects than graphs and trees, which simplifies development of the dataset and models.
76
+
77
+ Perhaps most importantly, using freeform inputs and outputs means that the input and output space for models evaluated on the benchmark tasks in this dataset is the same as required to address a variety of “real world” mathematics exams questions. While it is not plausible that models trained on our data would perform well on such actual tests due to restricted linguistic variation in how questions and answers are formulated, it is nonetheless a desirable feature of our data that future models which do attack real world tests can be “unit tested” on our benchmarks during their development.
78
+
79
+ Compositionality The questions can be seen as mappings with input and output types. For example, function evaluation maps a function and an integer to another integer, function composition maps a pair of functions to a function, and so on. We use this to generate additional composed questions by chaining modules with matching types, where intermediate values from one sub-problem are used as inputs to the next sub-problem. For example, for a single intermediate value, this composition may be phrased as Let $\mathrm { ~ ~ x ~ } = \mathrm { ~ ~ < ~ }$ description>. <question $( \mathbf { x } ) >$ . See Figure 1 for examples. This makes the dataset more interesting and challenging in several ways. Many rules in mathematics appear when different concepts are composed. For example, when differentiation is composed with function composition, the chain rule appears; when addition is composed with factorization, distributivity can emerge; and so on. Composition moves the questions away from pure perception, since intermediate results must be stored (working memory) and manipulated (reuse of sub-routines).
80
+
81
+ # 2.2 BRIEF OVERVIEW OF MODULES
82
+
83
+ What types of mathematics problems should be included in the dataset? The original content was based on a national school mathematics curriculum (up to age 16), restricted to textual questions (thus excluding geometry questions), which gave a comprehensive range of mathematics topics that worked together as part of a learning curriculum. We extended this with additional areas that offer good tests for algebraic reasoning. We cover the following areas (Appendix B contains the full list of modules). (1) Algebra, such as solving linear systems in 1 and 2 variables, finding roots of polynomials (presented in simplified or unsimplified forms), and extending sequences and finding their general form. (2) Arithmetic, such as basic addition etc, evaluating nested expressions, and simplifying expressions involving square roots. (3) Calculus and differentiating polynomials. (4) Comparisons, such as establishing which of two numbers is bigger, or sorting a list of numbers, or finding the closest number to a given one in a list. (5) Measurement, such as converting between different length scales, and calculating time intervals. (6) Numbers, such as finding divisors, rounding, place value, factorization, and primality. (7) Manipulating polynomials, such as simplification, expansion, evaluation, composition, and addition. (8) Probability, such as probability of obtaining a given sequence when sampling without replacement. Many modules participate in composition where possible. For example, one might have to compare two numbers (a composition module), one of which is the solution of a linear system, and the other is the evaluation of a function.
84
+
85
+ # 2.3 GENERATING DIVERSE QUESTIONS FOR TRAINING AND TESTING
86
+
87
+ Most questions involve evaluating one or more randomly generated mathematical objects (e.g. arithmetic expressions, linear systems, polynomials, compositions of these, etc). The biggest challenge in producing the dataset is generating diverse questions that are neither trivial nor impossibly hard. During testing we also want to generate questions that have not been seen in training.
88
+
89
+ These requirements rule-out naive unconditional sampling of such objects. For example, the product of a sequence of rationals will evaluate to zero if any of the rationals are zero; an arithmetic expression generated by randomly sampling a binary tree will often evaluate to zero or some large number; and a linear system in two variables will rarely have integer solutions. So instead for most modules we employ a different approach: we first sample the answer, and then work backwards to generate the question (including if we are doing module composition). The details of how we do this are diverse and depend on the question type, and we refer the reader to the generation code for more detail.
90
+
91
+ Training and interpolation tests Per module, we generate $2 \times 1 0 ^ { 6 }$ train questions, and $1 0 ^ { 5 }$ test (interpolation) questions. To ensure the train questions are diverse, and the test questions are distinct from the train questions, the generation code guarantees lower bounds on the probability of a given question appearing. (Post-generation hashing does not in general work, since the same question may occur with linguistic variation, although we use it in a few limited cases.) We generate test questions such that any particular question has a probability of at most $1 0 ^ { - 8 }$ , thus guaranteeing that at most $1 0 ^ { - 8 } \times 2 \times \mathrm { \dot { 1 } 0 ^ { 6 } } = 2 \%$ of the test questions to have already appeared in the training data. (To be more precise, each module generator accepts an input $\alpha$ , such that the output question has probability at most $1 0 ^ { - \alpha }$ ; train questions are generated by sampling $\alpha$ uniformly from [3, 10] (typically), and test questions are generated by taking $\alpha = 8 .$ )
92
+
93
+ The various mechanisms by which we achieve these probabilistic guarantees are again diverse and question dependent, so again we refer the reader to the generation code. But to give an example, many questions involve one or more integers (which includes rationals, a quotient of two integers). If we need to generate $n$ integers, then provided the $i$ th integer is sampled from a set of size at least $a _ { i }$ , then the probability of a given sequence of integers is at most $\bar { \Pi } _ { i } 1 / a _ { i }$ . We then simply need to choose these sets of integers appropriately (e.g. a symmetric set about zero, or the first positive integers, or integers coprime to some other integer, etc).
94
+
95
+ Extrapolation tests Mathematical generalization exists along a variety of axes (e.g. length, number of symbols, depth of composition/recursion). We therefore include, in our extrapolation test sets, a range of modules that measure extrapolation along different axes, such as to problems involving larger numbers, more numbers, more compositions, and (for probability questions) larger samplers. Full details are in Appendix B.
96
+
97
+ # 2.4 EVALUATION CRITERION
98
+
99
+ Given a model that maps an input question to an output answer, we score each question either 0 or 1 according to whether the answer matches the correct answer character-for-character. The performance on a given test module is the average of this score across all questions. Performance across the interpolation and extrapolation test sets is then the average across all modules inside the test set. This choice of criterion is appropriate given the restricted nature of the answers generated in our dataset (but see Section 5 for possible future extensions).
100
+
101
+ # 2.5 RELEASE
102
+
103
+ We will release $2 \times 1 0 ^ { 6 }$ training examples and $1 0 ^ { 4 }$ pre-generated test examples per module upon publication of this paper. In the dataset, the questions and answers use a common alphabet of size 95 (upper and lower case characters, digits, and punctuation characters). The questions are capped to 160 characters in length and answers to 30, which is sufficient for a wide range of question types. Mathematical equations are formatted according to Python/SymPy (Meurer et al., 2017) conventions (for example, $\star \star$ is used for power rather than ˆ); these rules are consistent for all modules.
104
+
105
+ # 3 MODELS EXAMINED
106
+
107
+ Due to the construction process underlying this dataset, there are a large number of existing models, which could be adapted, purpose-built, or tailored to solve the sort of problems we present here, especially with the help of symbolic solvers or computer algebra systems. Setting aside the possible brittleness or limits in scalability of traditional symbolic approaches as the complexity or linguistic diversity of questions and answers grows, we are interested here in evaluating general purpose models, rather than ones with their mathematics knowledge already inbuilt. What makes such models (which are invariably neural architectures) so ubiquitous from translation to parsing via image captioning is the lack of bias these function approximators present due to having relatively little (or no) domain-specific knowledge encoded in their design. Although there are some neural network-driven approaches with direct access to mathematical operations (such as addition or multiplication (Ling et al., 2017), or more complex mathematical templates like in (Kushman et al., 2014)), which would undoubtedly perform competitively on the tasks we present in this paper, we will limit ourselves to general sequence-processing architectures which are used in other non-mathematical tasks to present the most general baselines possible for future comparison.
108
+
109
+ We investigate two (broad classes of) models that have demonstrated themselves to be state-of-the-art on sequence-to-sequence problems: recurrent neural architectures, and the more recently introduced attentional/transformer (Vaswani et al., 2017) architecture. We also tried to use Differentiable Neural Computers (Graves et al., 2016), which is a recurrent model with an “external memory” (whose size is independent of the number of parameters in the network). In theory this could be well suited for solving mathematical questions, since it can store intermediate values for later usage. However we were unable to get decent performance out of it. (Even with hyperparameter sweeps for the number and size of memory slots, etc, we were only able to get to $10 \%$ validation performance after a day of training, whereas most models obtain this in less than an hour).
110
+
111
+ ![](images/f23d6f69a16b604b94a0a186316698e9b77ca84f4505c05b7f9b64a81f46b536.jpg)
112
+ Figure 2: The attentional LSTM and Transformer architectures are both consist of an encoder, that parses the question, and a decoder, which maps the correct answer right-shifted by 1 to a distribution of the next character in the answer at every position (thus allowing auto-regressive prediction). (a) The Attentional LSTM encodes the question to a sequence of (key, value) positions, which are then attended over by the decoder. (b) The Transformer has several stages of self- and input-attention; see (Vaswani et al., 2017) for details.
113
+
114
+ # 3.1 RECURRENT ARCHITECTURES
115
+
116
+ The LSTM (Hochreiter & Schmidhuber, 1997) is a powerful building block of sequence-to-sequence models that have achieved state of the art results in many domains, and despite its simplicity, continues to be a central building block for recurrent neural networks. We benchmark two standard recurrent architectures (described in more detail in Appendix A).
117
+
118
+ The first and simplest model we analyze (referred to in results below as “Simple LSTM”) is to simply feed the question into the LSTM, one character at a time (using a 1-hot encoding), before outputting the answer one character at a time (the output is a distribution over possible characters, and at every answer step, the previous correct answer character is fed in). In the results below, we use a hidden size of 2048 (obtained via a hyperparameter sweep).
119
+
120
+ The second model we analyze (referred to as “Attentional LSTM”) is the encoder/decoder-withattention architecture introduced in (Bahdanau et al., 2014) which has been prevalent in neural machine translation, and overcomes two problems with the simple LSTM model above, which affect both language translation and mathematical question-answering: (1) information that is presented in the input may be out-of-order for the purpose of calculations required for the output (for example, to calculate $\bar { 8 } / ( 1 + 3 )$ , the expression $1 + 3$ must be evaluated first); and (2) all information for the answer must be contained within the single vector of cell activations of the LSTM, which is a bottleneck. The attentional LSTM architecture consists of a recurrent encoder that encodes the question to a sequence of keys and values (of the same length as the question), and a recurrent decoder that has as input the correct answer right-shifted by 1, and at every time step attends to the encoded question, and outputs a distribution over the next character. We use an encoding LSTM with 512 hidden units and a decoding LSTM with 2048 hidden units. (These settings were obtained using a hyperparameter sweep.)
121
+
122
+ In both these architecture, we also employ a simple change that improves performance. The models as described must output the answer straight after parsing the question. However, it may be necessary for the models to expend several computation steps integrating information from the question. To allow for this, we add additional steps (with zero input) before outputting the answer. We also experimented with Adaptive Computation Time as introduced in (Graves, 2016), although this yielded worse results than simply having a fixed number of “thinking” steps.
123
+
124
+ Recently a recurrent architecture known as relational recurrent neural network (Santoro et al., 2018a), or relational memory core (RMC), has been developed as a replacement for the LSTM. This recurrent unit has multiple memory slots that interact via attention. This seems like a natural candidate for mathematical reasoning, for example if the model can learn to use the slots to store mathematical entities. However, a comprehensive hyperparameter sweep gave the best setting as 1 memory slot (i.e., without making full use of the RMC). We include these results below, also with 2048 total units, 16 attention heads, and 1 block.
125
+
126
+ Figure 3: Model accuracy (probability of correct answer) averaged across modules. RMC is the relational recurrent neural network model.
127
+
128
+ <table><tr><td></td><td>Parameters</td><td>Interpolation</td><td>Extrapolation</td></tr><tr><td>Simple LSTM</td><td>18M</td><td>0.57</td><td>0.41</td></tr><tr><td>Simple RMC</td><td>38M</td><td>0.53</td><td>0.38</td></tr><tr><td>Attentional LSTM,LSTM encoder</td><td>24M</td><td>0.57</td><td>0.38</td></tr><tr><td>Attentional LSTM, bidir LSTM encoder</td><td>26M</td><td>0.58</td><td>0.42</td></tr><tr><td>AttentionalRMC,bidirLSTM encoder</td><td>39M</td><td>0.54</td><td>0.43</td></tr><tr><td>Transformer</td><td>30M</td><td>0.76</td><td>0.50</td></tr></table>
129
+
130
+ # 3.2 TRANSFORMER (ATTENTION IS ALL YOU NEED)
131
+
132
+ The Transformer model (Vaswani et al., 2017) is a sequence-to-sequence model achieving stateof-the-art results in machine translation. We briefly describe it here (see Figure 2b). The model consists of an encoder, which transforms the question (represented as a sequence of vectors) to another sequence of the same length, and a decoder (which transforms the encoded question, and the answer autoregressively shifted right, into the answer prediction). Internally the input is transformed via attentional mechanisms (both self- and input-attention), and position-wise fully connected layers. We use an embedding size of $d _ { \mathrm { m o d e l } } = 5 1 2$ , with $h = 8$ attentional heads, and thus key and value sizes of $d _ { k } = d _ { v } = \bar { d } _ { \mathrm { m o d e l } } / h = 6 4$ . Each layer has an intermediate representation with dimension $d _ { \mathrm { f f } } = 2 0 4 8$ . For translation tasks, it is typically applied to sequences of embedded words; here we instead treat the question and answer as a sequence of characters, since we need to be able to embed arbitrary mathematical expressions.
133
+
134
+ # 4 ANALYSIS
135
+
136
+ # 4.1 TRAINING AND EVALUATION METHODS
137
+
138
+ As is common in sequence-to-sequence models, the models predict the answer autoregressively using a greedy decoder (output majority class at each step). We minimize the sum of log probabilities of the correct character via the Adam optimizer (Kingma & Ba, 2014) with learning rate of $6 \times 1 0 ^ { - 4 }$ , $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } = 0 . 9 9 5$ , $\epsilon = 1 0 ^ { - 9 }$ . We use a batch size of 1024 split across 8 NVIDIA P100 GPUs for 500k batches, with absolute gradient value clipping of 0.1.
139
+
140
+ # 4.2 RESULTS AND INSIGHTS
141
+
142
+ Figure 3 shows the average interpolation and extrapolation performances for the different architectures.
143
+ Full per-module performance results are in Appendix C.
144
+
145
+ LSTMs vs RMCs Using a RMC with more than one memory slot did not help performance; perhaps it is hard for the RMC to learn to use slots for manipulating mathematical entities. For a given number of hidden units, RMCs were more data efficient but trained more slowly (since they had more parameters), and LSTMs had better asymptotic performance.
146
+
147
+ Simple vs attentional LSTM The attentional LSTM and the simple LSTM have similar performance. One might suspect that the attentional LSTM does nothing, however this is not the case, since a simple LSTM model of the same size as the parsing LSTM obtains much worse performance. We speculate that the attentional model is not learning to algorithmically parse the question, and so the ability to change attention focus per-step does not count for as much.
148
+
149
+ Number of thinking steps For the attentional LSTM model, we observed that increasing the number of “thinking” steps (as defined above) from 0 up to 16 increased the performance.
150
+
151
+ Transformer vs best non-transformer model The Transformer performs the same as or significantly better than recurrent models across nearly all modules. Both architectures have a comparable number of parameters. One might a-priori expect the LSTM to perform better, since its sequential architecture is perhaps more similar to sequential reasoning steps that a human performs. However, evidence above and below suggest that neither of the networks are doing much “algorithmic reasoning”, and the Transformer has various advantages over LSTM architectures, such as (1) doing more calculations with the same number of parameters, (2) having a shallower architecture (with better gradient propagation), and (3) having an internal "memory" that is sequential, which is more pre-disposed to mathematical objects like sequences of digits.
152
+
153
+ Easiest maths for neural networks The easiest question types were finding the place value in a number, and rounding decimals and integers, which all models got nearly perfect scores on. Questions involving comparisons also tended to be quite easy, possible because such tasks are quite perceptual (e.g. comparing lengths or individual digits). This success includes questions with module composition, for example Let $\begin{array} { r c l } { \mathrm { ~ k ~ } ( \mathrm { ~ c ~ } ) } & { = } & { - 6 1 1 \star \mathrm { c ~ \ } + \ 2 1 8 8 8 5 7 } \end{array}$ . Is $\mathrm { ~ k ~ } ( - 1 0 3 )$ $\ ! = \ 2 2 5 1 7 9 0 ?$ (False) and mixtures of decimals and rationals, for example, Sort $- 1 3 9 / 4$ , 40.8, -555, 607 in increasing order. Overall it seems that magnitude is easy for neural networks to learn.
154
+
155
+ Hardest maths for neural networks Perhaps not surprisingly, some of the hardest modules include more number-theoretic questions which are also hard for humans, such as detecting primality and factorization. The Transformer model still gives plausible-looking answers, such as factoring 235232673 as 3, 11, 13, 19, 23, 1487 (the correct answer is 3, 13, 19, 317453).
156
+
157
+ The Transformer model has a performance of $90 \%$ or more on the “add or subtract several numbers" module and the “multiply or divide several numbers" module (which is just addition and subtraction in log space). However on the mixed arithmetic module (mixing all four operations together with parentheses), the performance drops to around $50 \%$ . (Note the distribution of the value of the expression is the same for all these modules, so it is not the case that difficulty increases due to different answer magnitudes.) We speculate that the difference between these modules in that the former can be computed in a relatively linear/shallow/parallel manner (so that the solution method is relatively easier to discover via gradient descent), whereas there are no shortcuts to evaluating mixed arithmetic expressions with parentheses, where intermediate values need to be calculated. This is evidence that the models do not learn to do any algebraic/algorithmic manipulation of values, and are instead learning relatively shallow tricks to obtain good answers on many of the modules. The same holds true for other modules that require intermediate value calculation, such as evaluating polynomials, and general composition.
158
+
159
+ Performance on polynomial manipulation One notable difference between the Transformer and the recurrent models was polynomial manipulation. The Transformer did significantly better on polynomial expansion, collecting terms, addition, composition, differentiation, and extracting named coefficients. Speculatively, the parallel sequential nature of the Transformer is better at manipulating polynomials where several coefficients must be kept in memory simultaneously where they can interact.
160
+
161
+ Other insights Examining the performance on adding multiple integers, we tested the models on adding $1 + 1 + \cdots + 1$ , where 1 occurs $n$ times. Both the LSTM and Transformer models gave the correct answer for $n \leq 6$ , but the incorrect answer of 6 for $n = 7$ (seemingly missing one of the 1s), and other incorrect values for $n > 7$ . (The models are trained on sequences of random integers up to length 10, and are capable of giving the correct answer on longer sequences of far bigger numbers, for example $- 3 4 ~ + ~ 5 3 ~ + ~ - 9 3 6 ~ + ~ - 2 9 7 ~ + ~ 1 6 2 ~ + ~ - 2 4 2 ~ + ~ - 1 2 8 . )$ We do not have a good explanation for this behaviour; one hypothesis is that the models calculate subsums and then combine these, but rely on different input numbers to align the subsums, and fail when the input is “camouflaged” by consisting of the same number repeated multiple times.
162
+
163
+ Robustness to question phrasing Although we do not train for linguistic variation and do not expect models to be robust to it, the failure modes are still interesting. For example, on one trained Transformer, the question “Calculate $ { { } ^ { 1 7 } } \star 4$ .” gave the correct answer 68, but the same question without the final full stop gave 69.
164
+
165
+ Extrapolation performance Modules on which good extrapolation performance was obtained include rounding larger numbers than seen during training, comparing more numbers, and adding and subtracting larger numbers. However for example models completely failed to add together more numbers than seen during training, which agrees with the suspicion that models have learnt to add numbers in parallel rather than calculating subsums.
166
+
167
+ # 4.3 PERFORMANCE ON REAL MATHEMATICS QUESTIONS
168
+
169
+ To provide an external benchmark for the capability of neural network models trained on our dataset, we tested the trained Transformer model on a set of 40 questions selected from publicly-available maths exams for British 16 year old schoolchildren2. These questions were gathered from four exam papers after excluding those involving graphs, tables or other figures - the full set is reproduced in the supplementary materials.
170
+
171
+ On these exam questions, the Transformer model got 14/40 questions correct, which is (proportionally) equivalent to that of an E grade student3. The model showed some promise by correctly solving the simultaneous equations $5 x + 2 y = 1 1$ and $4 x - 3 y = 1 8$ , identified the correct next number in the sequence 3, 9, 15, 27. The disappointing grade also assumes that no marks were awarded for plausible but incorrect attempts, such as the factorisation $1 ( y - 2 ) ( y + 4 )$ of the expression $y ^ { 2 } - \dot { 1 0 } y + 1 6$ . Overall, this analysis suggests that, with knowledge of the exam syllabus to inform the training data generation, and the ability to receive graphical inputs, it may be possible to encode the knowledge necessary to excel at unseen exams in an out-of-the-box neural network, although the pattern of errors and ability to generalise would likely differ from typical school-age students.
172
+
173
+ # 5 CONCLUSIONS AND FUTURE WORK
174
+
175
+ We have created a dataset on which current state-of-the-art neural models obtain moderate performance. Some modules are largely unsolved (for example those requiring several intermediate calculations), for which a human would find easy, and extrapolation performance is low. We hope this dataset will become a robust analyzable benchmark for developing models with more algebraic/symbolic reasoning abilities.
176
+
177
+ The dataset is easily extendable, since it is modular, with all modules using a common input/output format and the common language of mathematics. The main restriction is that the answers must be well-determined (i.e. unique), but this still allows for covering a lot of mathematics up to university level. At some point it becomes harder to cover more of mathematics (for example, proofs) while maintaining the sequence-to-sequence format, but hopefully by this point the dataset in its current format will have served its purpose in developing models that can reason mathematically. Alternatively, we could consider methods for assessing answers where there is not a single unique answer; for now the full scope of possibilities is too large to include in this paper, but a few possibilities include metrics such as BLEU (Papineni et al., 2002), by extending the data generation process to provide several reference answers, or by obtaining human paraphrases following the data augmentation process proposed by Wang et al. (2015).
178
+
179
+ We have not addressed linguistic variation or complexity in this dataset. Although to some extent linguistic complexity is orthogonal to the difficulty of the maths problems involved, the two cannot be entirely separated. The most obvious example of this for school-level mathematics is in algebraic word problems, where much of the difficulty lies in translating the description of the problem into an algebraic problem. Thus it would be useful to extend the dataset with “linguistic complexity”, where the same underlying mathematical problem is phrased in quite distinct, and not-at-first-obvious, translations. One option may be to do joint training on this dataset, and that of (Ling et al., 2017);
180
+
181
+ another would be to obtain more question templates via mechanical turking, as proposed by Wang et al. (2015).
182
+
183
+ Finally one completely distinct direction the dataset could be extended is to include visual (e.g. geometry) problems as well. For humans, visual reasoning is an important part of mathematical reasoning, even concerning problems that are not specified in a visual format. Therefore we want to develop questions along these lines, including those that require “intermediate visual representations” (in a similar way to how the textual module composition requires intermediate digital representations) and visual working memory. Note that reasoning with intermediate visual representations or ideas is richer than simply analyzing a visual domain (such as is typical in visual question-answering datasets).
184
+
185
+ # REFERENCES
186
+
187
+ Miltiadis Allamanis, Pankajan Chanthirasegaran, Pushmeet Kohli, and Charles Sutton. Learning continuous semantic representations of symbolic expressions. arXiv preprint arXiv:1611.01423, 2016.
188
+
189
+ Allen Institute for AI. Project Euclid. http://allenai.org/euclid/, 2014.
190
+
191
+ Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014.
192
+
193
+ Richard Evans, David Saxton, David Amos, Pushmeet Kohli, and Edward Grefenstette. Can neural networks understand logical entailment? arXiv preprint arXiv:1802.08535, 2018.
194
+
195
+ Alex Graves. Adaptive computation time for recurrent neural networks. arXiv preprint arXiv:1603.08983, 2016.
196
+
197
+ Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio Gómez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, et al. ´ Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471, 2016.
198
+
199
+ Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997.
200
+
201
+ Danqing Huang, Shuming Shi, Chin-Yew Lin, Jian Yin, and Wei-Ying Ma. How well do computers solve math word problems? large-scale dataset construction and evaluation. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 887–896, 2016.
202
+
203
+ Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. In Computer Vision and Pattern Recognition (CVPR), 2017 IEEE Conference on, pp. 1988–1997. IEEE, 2017.
204
+
205
+ Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in neural information processing systems, pp. 190–198, 2015.
206
+
207
+ Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint arXiv:1511.08228, 2015.
208
+
209
+ Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
210
+
211
+ Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
212
+
213
+ Nate Kushman, Yoav Artzi, Luke Zettlemoyer, and Regina Barzilay. Learning to automatically solve algebra word problems. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 271–281, 2014.
214
+
215
+ Wang Ling, Dani Yogatama, Chris Dyer, and Phil Blunsom. Program induction by rationale generation: Learning to solve and explain algebraic word problems. arXiv preprint arXiv:1705.04146, 2017.
216
+
217
+ Gary F Marcus. The algebraic mind: Integrating connectionism and cognitive science. MIT press, 2003.
218
+
219
+ Aaron Meurer, Christopher P Smith, Mateusz Paprocki, Ondˇrej Certík, Sergey B Kirpichev, Matthew ˇ Rocklin, AMiT Kumar, Sergiu Ivanov, Jason K Moore, Sartaj Singh, et al. Sympy: symbolic computing in python. PeerJ Computer Science, 3:e103, 2017.
220
+
221
+ Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015.
222
+
223
+ Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pp. 311–318. Association for Computational Linguistics, 2002.
224
+
225
+ Adam Santoro, Ryan Faulkner, David Raposo, Jack Rae, Mike Chrzanowski, Theophane Weber, Daan Wierstra, Oriol Vinyals, Razvan Pascanu, and Timothy Lillicrap. Relational recurrent neural networks. arXiv preprint arXiv:1806.01822, 2018a.
226
+
227
+ Adam Santoro, Felix Hill, David Barrett, Ari Morcos, and Timothy Lillicrap. Measuring abstract reasoning in neural networks. In International Conference on Machine Learning, pp. 4477–4486, 2018b.
228
+
229
+ Daniel Selsam, Matthew Lamm, Benedikt Bunz, Percy Liang, Leonardo de Moura, and David L Dill. Learning a sat solver from single-bit supervision. arXiv preprint arXiv:1802.03685, 2018.
230
+
231
+ David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484–489, 2016.
232
+
233
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.
234
+
235
+ Shyam Upadhyay and Ming-Wei Chang. Annotating derivations: A new evaluation strategy and dataset for algebra word problems. arXiv preprint arXiv:1609.07197, 2016.
236
+
237
+ Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pp. 6000–6010, 2017.
238
+
239
+ Yan Wang, Xiaojiang Liu, and Shuming Shi. Deep neural solver for math word problems. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 845–854, 2017.
240
+
241
+ Yushi Wang, Jonathan Berant, and Percy Liang. Building a semantic parser overnight. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), volume 1, pp. 1332–1342, 2015.
242
+
243
+ Jason Weston, Antoine Bordes, Sumit Chopra, Alexander M Rush, Bart van Merriënboer, Armand Joulin, and Tomas Mikolov. Towards AI-complete question answering: A set of prerequisite toy tasks. arXiv preprint arXiv:1502.05698, 2015.
244
+
245
+ Wojciech Zaremba and Ilya Sutskever. Learning to execute. arXiv preprint arXiv:1410.4615, 2014.
246
+
247
+ # A RECURRENT ENCODER AND DECODER WITH ATTENTION
248
+
249
+ This model consists of an encoder and a decoder (see Figure 2a). The encoder maps the question (as a sequence of characters represented as 1-hot vectors) to a sequence of pairs of keys and values, where each key is a vector of length $k$ and each value is a vector of length $v$ . We take $k = v = 2 5 6$ .
250
+
251
+ We experiment with two different encoder cores. (1) An LSTM with hidden size $k + v$ . The hidden state is split to obtain the keys and values. (2) A bidirectional LSTM, i.e. two LSTMs both with hidden size $k + v$ , one operating in reverse. The keys and values are generated by concatenating the hidden states and mapping through a linear transformation.
252
+
253
+ The decoder LSTM has hidden size 2048. At each step, the output of the decoder is passed through a linear transformation to obtain (1) $h$ query vectors each of length $k$ , where $h$ is the number of attention heads, and (2) a logits vector of length 96 (the number of possible answer characters, plus a special ignored character). The query vectors are dot-producted with the keys to obtain a softmax weighting over the encoded question values (the standard attention mechanism, as done by e.g. Vaswani et al. (2017)). At every time step, the input to the decoder LSTM is the result of this attention mechanism (the soft-weighted values), concatenated with the 1-hot embedding of the current answer character. (The answer is right-shifted by 1, so that the LSTM does not get to see the character it is attempting to predict.) In addition we have 15 initial steps where no answer character is fed in to allow the LSTM to integrate information from the question, and the output predictions are ignored. The model is trained using a cross-entropy loss on the output logits for predicting the correct answer.
254
+
255
+ # B AREAS OF MATHEMATICS
256
+
257
+ # B.1 ALGEBRA
258
+
259
+ Some of the algebra modules participate in module composition.
260
+
261
+ • linear_1d Solve linear equations in one variable, e.g. solve $2 ( x - 1 0 ) + 3 = 1 7 x + 1 0$ for $x$ .
262
+ linear_2d Solve simultaneous linear equations in two variables.
263
+ • polynomial_roots Find roots of polynomials or factorize them, e.g. factorize $2 x ^ { 2 } + 5 x + 3$ .
264
+ • sequence_next_term Find continuations of a sequence given the first few terms. E.g. what comes next in the sequence 2, 6, 12, 20?
265
+ • sequence_nth_term Find an expression for the nth term in a sequence, given the first few terms.
266
+
267
+ For extrapolation tests, we include:
268
+
269
+ • polynomial_roots_big Same as polynomial_roots, but with polynomials larger than those seen during training.
270
+
271
+ # B.2 ARITHMETIC
272
+
273
+ Many of the arithmetic modules participate in module composition.
274
+
275
+ • add_or_sub Add or subtract a pair of integers or decimals.
276
+ • add_or_sub_in_base Add or subtract a pair of integers given in a different base (between 2 and 16).
277
+ • add_sub_multiple Add and subtract multiple integers.
278
+ • div Divide one integer by another, with the answer a simplified fraction.
279
+ • mixed Arithmetic involving addition, subtraction, multiplication, division, and brackets.
280
+ • mul Multiply pair of integers or decimals.
281
+ • mul_div_multiple Find simplest fraction of expression involving integers, multiplication, division, and brackets.
282
+
283
+ • nearest_integer_root Calculate the nearest integer to an nth root of another integer. • simplify_surd Simplify an expression involving square-roots, e.g. simplify √ $\sqrt { 1 0 } \times$ $- 9 ) ^ { - } / ( \sqrt { 2 } \times 1 2 ) \times - 8$ .
284
+
285
+ For extrapolation tests, we include:
286
+
287
+ • add_or_sub_big Add or subtract a pair of integers bigger than seen during training.
288
+ • add_sub_multiple Like add_sub_multiple but with more terms than seen during training.
289
+ • div_big Divide one integer by another, with bigger integers than seen during training.
290
+ • mixed_longer Like mixed but with more terms.
291
+ • mul_big Multiply pair of integers bigger than seen during training.
292
+ • mul_div_multiple_longer Like mul_div_multiple but with more terms.
293
+
294
+ # B.3 CALCULUS
295
+
296
+ The differentiate module fully participates in module composition, accepting inputs from and passing outputs to other modules.
297
+
298
+ • differentiate First and higher order derivatives of multivariate polynomials, either specified directly or as a result of module composition. E.g. let $f ( x ) = 2 \bar { * } x \bar { + } 3$ , let $g ( x ) = x * * 2 - 1 7$ ; what is the derivative of $f ( g ( x ) ) \smash { \vdots }$
299
+
300
+ # B.4 COMPARISON
301
+
302
+ All comparison modules accept numbers from other modules as inputs.
303
+
304
+ • closest Finding the closest to a given number in a list.
305
+ • kth_biggest Finding the $k$ th biggest or smallest number in a list.
306
+ • pair Pairwise comparison between pairs of numbers. E.g. which is bigger: 4/37 or 7/65? • sort Sorting lists of numbers into ascending or descending order.
307
+
308
+ For extrapolation tests, we include:
309
+
310
+ • closest_more Like closest but with larger lists than seen during training.
311
+ • kth_biggest_more Like kth_biggest but with larger list.
312
+ • sort_more Sorting longer lists of numbers than seen during training.
313
+
314
+ # B.5 MEASUREMENT
315
+
316
+ • conversion Conversion between different units of length, time, mass, and volume. E.g. how many millilitres are there in $1 3 / 8$ of a litre?
317
+ • time Working with clock times: time differences, and time before or after. E.g. how many minutes are there between 8:05 PM and 9:12 PM?
318
+
319
+ For extrapolation tests, we include:
320
+
321
+ • conversion With larger values than seen during training.
322
+
323
+ # B.6 NUMBERS
324
+
325
+ All number modules accept numbers from other modules as inputs.
326
+
327
+ • base_conversion Conversion between bases (e.g. give 1011001 (base 2) in base 16).
328
+ • div_remainder Calculate remainders under division. • gcd Calculating greatest common divisors.
329
+ • is_factor Recognizing factors, e.g. is 15 a factor of 60?
330
+ • is_prime Testing for primality.
331
+ • lcm Calculating least common multiples.
332
+ • list_prime_factors Factoring numbers into primes. E.g. give the prime factors of 64372. • place_value Give the place value of a number, e.g. what is the tens digit of 3585792? • round_number Rounding integers and decimals. E.g. give 432.1058 to three decimal places.
333
+
334
+ For extrapolation tests, we include:
335
+
336
+ • round_number_big Like round_number but with larger numbers than seen during training.
337
+ • place_value_big Like place_value but with larger numbers than seen during training.
338
+
339
+ # B.7 POLYNOMIALS
340
+
341
+ All function modules are fully compositional: they accept functions specified by other questions as inputs, and define functions for use in other modules.
342
+
343
+ • add Adding functions. E.g. calculating $2 f ( x ) + 1 7 g ( x )$ given $f$ and $g$ .
344
+ • collect Simplify polynomial expressions by collecting terms.
345
+ • compose Calculating the composition of functions.
346
+ • coefficient_named E.g. rearrange $( x + 1 ) ( 2 x + 3 )$ to $a x ^ { 2 } + b x + c$ and give $b$ .
347
+ • evaluate E.g. value of $x ^ { 2 } y ^ { 2 } + 2 x y$ when $x = 2 , y = 3$ .
348
+ • expand Expand and simplify polynomials, e.g. expand $( x + 1 ) ( 2 x + 3 )$ .
349
+ • simplify_power Simplify powers, testing rules of power indices. E.g. simplify $x ^ { 3 } / x ^ { 2 }$ .
350
+
351
+ # B.8 PROBABILITY
352
+
353
+ There are two modules here, both based on sampling without replacement from a bag of repeated letters, specified using either: (1) counts (e.g. {a: 1, b: 7}), or (2) an unsorted list of letters that require counting, e.g. ecggccdcdceeeeg.
354
+
355
+ • swr_p_level_set Calculating probability of obtaining certain counts of different letters.
356
+ • swr_p_sequence Calculating probability of obtaining a given sequence of letters.
357
+
358
+ For extrapolation tests, we include the same modules, but with more letters sampled from the bag than seen during training:
359
+
360
+ • swr_p_level_set_more_samples • swr_p_sequence_more_samples
361
+
362
+ C PER-MODULE PERFORMANCE
363
+
364
+ Interpolation test performance is shown in Figure 4 and extrapolation test performance is shown in Figure 5. Of the different encoders for the recurrent attention architecture, we show the per-module performance of the bidirectional LSTM encoder which has the greatest performance.
365
+
366
+ ![](images/3fd7e21bb9a3f772ed9a7424d7977010983475c976c26537a2d09c5762117214.jpg)
367
+ Figure 4: Interpolation test performance on the different modules.
368
+
369
+ ![](images/285ec570401c1eed8ddf8c0e002cffa9488fc6fa3782ad35dc723eeb3680103f.jpg)
370
+ Figure 5: Extrapolation test performance on the different modules.
371
+
372
+ # D HIGH-SCHOOL MATHEMATICS QUESTIONS
373
+
374
+ 1. Factorise $x ^ { 2 } + 7 x$ 2. Factorise $y ^ { 2 } - 1 0 y + 1 6$ 3. Factorise $2 t ^ { 2 } + 5 t + 2$ 4. Simplify ${ \frac { ( x + 1 ) } { 2 } } + { \frac { ( x + 3 ) } { 3 } }$ 5. Solve $2 x ^ { 2 } + 9 x + 7$ 6. Solve $\begin{array} { r } { \frac { 2 } { y ^ { 2 } } + \frac { 9 } { y } - 7 = 0 } \end{array}$ 7. Expand $3 ( x + 4 ) + 2 ( 5 x - 1 )$ 8. Expand $( 2 x + 1 ) ( x - 4 )$ 9. Factor $6 y ^ { 2 } - 9 x y$
375
+ 10. Solve $3 p - 7 > 1 1$
376
+ 11. $A = 4 b c , A = 1 0 0 , b = 2 .$ calculate $c$
377
+ 12. Make $k$ the subject of $m = \sqrt { ( \frac { k + 1 } { 4 } ) }$
378
+ 13. Expand $( p + 9 ) ( p - 4 )$
379
+ 14. Solve $\frac { ( 5 w - 8 ) } { 3 } = 4 w + 2$
380
+ 15. Factorise $x ^ { 2 } - 4 9$
381
+ 16. Expand $( x - 7 ) ( x + 1 )$
382
+ 17. Simplify $\sqrt { 9 x ^ { 8 } y ^ { 3 } }$ assuming $\mathbf { X }$ is positive.
383
+ 18. $\begin{array} { r } { p ^ { 2 } = \frac { ( x - y ) } { x y } } \end{array}$ , $x = 8 . 5$ , $y = 4$ , find p
384
+ 19. Make $t$ the subject of $2 ( d - t ) = 4 t + 7$
385
+ 20. Solve $3 x ^ { 2 } - 4 x - 2 = 0$
386
+ 21. Expand $3 ( 2 y - 5 )$
387
+ 22. Factorise $8 x ^ { 2 } + 4 x y$
388
+ 23. Make $h$ the subject of $\begin{array} { r } { t = \frac { g h } { 1 0 } } \end{array}$
389
+ 24. Simplify $( m ^ { - 2 } ) ^ { ! }$ 5
390
+ 25. Factorise $x ^ { 2 } + 3 x - 1 0$
391
+ 26. Solve $5 x + 2 y = 1 1$ and $4 x - 3 y = 1 8$ for
392
+
393
+ 27. Simplify $\frac { ( x ^ { 2 } + 3 x - 4 ) } { ( 2 x ^ { 2 } - 5 x + 3 ) }$
394
+ 28. Simplify $\textstyle { \frac { 4 } { ( x + 2 ) } } + { \frac { 3 } { ( x - 2 ) } }$
395
+ 29. Expand $4 ( 3 x + 5 )$
396
+ 30. Expand $2 ( x - 4 ) + 3 ( x + 5 )$
397
+ 31. Expand $( x + 4 ) ( x + 6 )$
398
+ 32. Simplify $\textstyle { \frac { m ^ { 5 } } { m ^ { 3 } } }$
399
+ 33. Simplify $( 5 x ^ { 4 } y ^ { 3 } ) ( x ^ { 2 } y )$
400
+ 34. Solve $3 x + 2 y = 4$ and $4 x + 5 y = 1 7$ for $\mathbf { X }$
401
+ 35. Complete the sequence: 3, 9, 15, 21, 27
402
+ 36. Simplify $5 x + 4 y + x - 7 y$
403
+ 37. Complete the sequence: 3, 10, 17, 24
404
+ 38. Simplify $x ^ { 1 0 } x ^ { 3 }$
405
+ 39. Solve $7 * ( x + 2 ) = 7$
406
+ 40. Factorise $x ^ { 2 } - 1 2 x + 2 7$
parse/train/H1gR5iR5FX/H1gR5iR5FX_content_list.json ADDED
@@ -0,0 +1,1865 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ANALYSING MATHEMATICAL REASONING ABILITIES OF NEURAL MODELS ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 174,
8
+ 99,
9
+ 823,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "David Saxton \nDeepMind \nsaxton@google.com ",
17
+ "bbox": [
18
+ 183,
19
+ 170,
20
+ 352,
21
+ 212
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Edward Grefenstette DeepMind egrefen@fb.com ",
28
+ "bbox": [
29
+ 408,
30
+ 170,
31
+ 558,
32
+ 212
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Felix Hill \nDeepMind \nfelixhill@google.com \nPushmeet Kohli \nDeepMind \npushmeet@google.com ",
39
+ "bbox": [
40
+ 614,
41
+ 170,
42
+ 813,
43
+ 212
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "",
50
+ "bbox": [
51
+ 183,
52
+ 233,
53
+ 372,
54
+ 275
55
+ ],
56
+ "page_idx": 0
57
+ },
58
+ {
59
+ "type": "text",
60
+ "text": "ABSTRACT ",
61
+ "text_level": 1,
62
+ "bbox": [
63
+ 454,
64
+ 311,
65
+ 544,
66
+ 327
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "Mathematical reasoning—a core ability within human intelligence—presents some unique challenges as a domain: we do not come to understand and solve mathematical problems primarily on the back of experience and evidence, but on the basis of inferring, learning, and exploiting laws, axioms, and symbol manipulation rules. In this paper, we present a new challenge for the evaluation (and eventually the design) of neural architectures and similar system, developing a task suite of mathematics problems involving sequential questions and answers in a free-form textual input/output format. The structured nature of the mathematics domain, covering arithmetic, algebra, probability and calculus, enables the construction of training and test splits designed to clearly illuminate the capabilities and failure-modes of different architectures, as well as evaluate their ability to compose and relate knowledge and learned processes. Having described the data generation process and its potential future expansions, we conduct a comprehensive analysis of models from two broad classes of the most powerful sequence-to-sequence architectures and find notable differences in their ability to resolve mathematical problems and generalize their knowledge. ",
73
+ "bbox": [
74
+ 233,
75
+ 342,
76
+ 766,
77
+ 564
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 INTRODUCTION ",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 176,
87
+ 588,
88
+ 336,
89
+ 604
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Deep learning, powered by convolutional and recurrent networks, has had remarkable success in areas involving pattern matching (such as in images (Krizhevsky et al., 2012), machine translation (Bahdanau et al., 2014; Vaswani et al., 2017), and reinforcement learning (Mnih et al., 2015; Silver et al., 2016)). However, deep models are far from achieving the robustness and flexibility exhibited by humans. They are limited in their ability to generalize beyond the environments they have experienced and are extremely brittle in the presence of adversarially constructed inputs (Szegedy et al., 2013). ",
96
+ "bbox": [
97
+ 173,
98
+ 619,
99
+ 825,
100
+ 703
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "One area where human intelligence still differs and excels compared to neural models is discrete compositional reasoning about objects and entities, that “algebraically generalize” (Marcus, 2003). Our ability to generalise within this domain is complex, multi-faceted, and patently different from the sorts of generalisations that permit us to, for example, translate new sentence of French into English. For example, consider the following question from mathematics, with answer \" $- 7 0 x - 1 6 5 \"$ . ",
107
+ "bbox": [
108
+ 174,
109
+ 709,
110
+ 826,
111
+ 780
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "What is $g ( h ( f ( x ) ) )$ , where $f ( x ) = 2 x + 3$ , $g ( x ) = 7 x - 4$ , and $h ( x ) = - 5 x - 8 ?$ ",
118
+ "bbox": [
119
+ 214,
120
+ 789,
121
+ 767,
122
+ 806
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "To solve this problem, humans use a variety of cognitive skills: ",
129
+ "bbox": [
130
+ 174,
131
+ 815,
132
+ 586,
133
+ 830
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "• Parsing the characters into entities such as numbers, arithmetic operators, variables (which together form functions) and words (determining the question). \n• Planning (for example, identifying the functions in the correct order to compose). \n• Using sub-algorithms for function composition (addition, multiplication). \n• Exploiting working memory to store intermediate values (such as the composition $h ( f ( x ) ) )$ . ",
140
+ "bbox": [
141
+ 215,
142
+ 840,
143
+ 826,
144
+ 924
145
+ ],
146
+ "page_idx": 0
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "• Generally applying acquired knowledge of rules, transformations, processes, and axioms. ",
151
+ "bbox": [
152
+ 212,
153
+ 103,
154
+ 816,
155
+ 118
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "In this paper, we introduce a dataset consisting of many different types of mathematics problems, with the motivation that it should be harder for a model to do well across a range of problem types (including generalization, which we detail below) without possessing at least some part of these abilities that allow for algebraic generalization. ",
162
+ "bbox": [
163
+ 174,
164
+ 131,
165
+ 825,
166
+ 186
167
+ ],
168
+ "page_idx": 1
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "This domain is an important one for the analysis of neural architectures in general. In addition to providing a wide range of questions, there are several other advantages: Mathematics offers a self-consistent universe; notation is the same across different problem types, which allows for an easily extendable dataset; and rules and methods learnt on one problem type often apply elsewhere. Addition of numbers (for example) obeys the same rules everywhere, and occurs as a “subroutine\" in other problems (such as concretely in multiplication, and both concretely and more abstractly in addition of polynomials); models that possess the ability to transfer knowledge will do well on the dataset (and knowledge transfer may be a necessity for solving harder problems). ",
173
+ "bbox": [
174
+ 174,
175
+ 194,
176
+ 825,
177
+ 305
178
+ ],
179
+ "page_idx": 1
180
+ },
181
+ {
182
+ "type": "text",
183
+ "text": "Mathematics is also an interesting domain in its own right; although models solving the mostly school-level problems in this dataset would not themselves have applications, they may lead on to more powerful models that can solve interesting and substantial new mathematical problems. But more generally, it is no coincidence that experiments seeking to validate new architectures which aim capture algorithmic/systematic reasoning have often been drawn from this domain (Graves et al., 2016; Kaiser & Sutskever, 2015; Joulin & Mikolov, 2015), and thus in providing a large scale training and evaluation framework for such models, we hope to provide a solid foundation upon which to continue such research into machine reasoning beyond mathematics. ",
184
+ "bbox": [
185
+ 173,
186
+ 311,
187
+ 826,
188
+ 424
189
+ ],
190
+ "page_idx": 1
191
+ },
192
+ {
193
+ "type": "text",
194
+ "text": "Question: Solve $- 4 2 \\star \\Upsilon + 2 7 \\star \\subset = - 1 1 6 7$ and $1 3 0 \\star \\tt { r } + 4 \\star \\tt { C } = 3 7 2$ for r. Answer: 4 \nQuestion: Calculate $- 8 4 1 8 8 0 1 4 2 . 5 4 4 + 4 1 1 1 2 7 .$ . \nAnswer: $- 8 4 1 4 6 9 0 1 5 . 5 4 4$ \nQuestion: Let $\\begin{array} { c c c c c } { { \\mathrm { \\bf ~ x ~ ( \\mit g ) } } } & { { = } } & { { 9 \\star \\mathrm { \\bf g } } } & { { + } } & { { 1 } } \\end{array}$ . Let $\\begin{array} { c c c c } { { \\sf q _ { \\tau } ( c ) } } & { { = } } & { { 2 \\star { \\sf c } } } & { { + } } & { { 1 } } \\end{array}$ . Let $\\begin{array} { r l r } { \\pounds \\left( \\mathrm { ~ i ~ } \\right) } & { { } = } & { 3 \\star \\mathrm { i } } \\end{array}$ - 39. Let w( $\\begin{array}{c} \\begin{array} { r l r } { \\dot { { \\bf \\Xi } } } \\end{array} \\mathrm { ~ ~ \\cdot ~ } \\dot { { \\bf \\Xi } } ) & { { } = \\mathrm { ~ ~ q ~ } ( { \\bf \\Xi } { \\bf x } \\left( \\dot { { \\bf \\Xi } } \\right) ) } \\end{array}$ . Calculate f(w(a)). \nAnswer: $5 4 \\star \\mathsf { a } \\mathrm { ~ \\ - ~ } \\ 3 0$ \nQuestion: Let $\\Theta \\left( \\frac { } { } 1 \\right) \\ = \\ \\begin{array} { c c c c } { { 1 } } & { { - } } & { { 6 } } & { { } } \\end{array}$ . Is 2 a factor of both e(9) and 2? \nAnswer: False \nQuestion: Let $u ( n ) = - n + 3 - n + \\pm 2$ . Let $e ( C ) = - 2 \\star C \\star \\star 3 + C$ . Let l(j) $= - 1 1 8 { \\star } \\mathsf { e }$ (j) $+ ~ 5 4 { \\star } \\sqcup$ (j). What is the derivative of l(a)? \nAnswer: $5 4 6 \\star a \\star \\star 2 - 1 0 8 \\star a - 1 1 8$ \nQuestion: Three letters picked without replacement from qqqkkklkqkkk. Give prob of sequence qql. \nAnswer: 1/110 ",
195
+ "bbox": [
196
+ 173,
197
+ 436,
198
+ 830,
199
+ 645
200
+ ],
201
+ "page_idx": 1
202
+ },
203
+ {
204
+ "type": "text",
205
+ "text": "1.1 OUR CONTRIBUTIONS ",
206
+ "text_level": 1,
207
+ "bbox": [
208
+ 176,
209
+ 699,
210
+ 366,
211
+ 713
212
+ ],
213
+ "page_idx": 1
214
+ },
215
+ {
216
+ "type": "text",
217
+ "text": "Dataset and generalization tests We release1 a sequence-to-sequence dataset consisting of many different types of mathematics questions (see Figure 1) for measuring mathematical reasoning, with the provision of both generation code and pre-generated questions. The dataset comes with two sets of tests: interpolation tests, one for each type of question occurring in the training set; and extrapolation tests, that measure generalization along various axes of difficulty to beyond that seen during training. We include extrapolation tests as an additional measure of whether models are employing abilities that allow them to algebraically generalize. ",
218
+ "bbox": [
219
+ 173,
220
+ 724,
221
+ 825,
222
+ 823
223
+ ],
224
+ "page_idx": 1
225
+ },
226
+ {
227
+ "type": "text",
228
+ "text": "Experiments and model analysis We perform an experimental evaluation to investigate the algebraic abilities of state-of-the-art neural architectures, and show that they do well on some types of questions, but certainly not all, and furthermore have only moderate amounts of generalization. We give some insights into how they learn to answer mathematics questions, and their failure modes. ",
229
+ "bbox": [
230
+ 174,
231
+ 840,
232
+ 825,
233
+ 896
234
+ ],
235
+ "page_idx": 1
236
+ },
237
+ {
238
+ "type": "text",
239
+ "text": "1.2 RELATED WORK ",
240
+ "text_level": 1,
241
+ "bbox": [
242
+ 176,
243
+ 103,
244
+ 326,
245
+ 117
246
+ ],
247
+ "page_idx": 2
248
+ },
249
+ {
250
+ "type": "text",
251
+ "text": "There are various papers with datasets with a discrete reasoning nature. Kaiser & Sutskever (2015) use an adapted convolutional architecture to solve addition and multiplication with good generalization; Allamanis et al. (2016) and Evans et al. (2018) use tree networks to predict polynomial or logical equivalence or logical entailment; Selsam et al. (2018) uses message passing networks with a bipartite graph structure to decide satisfiability in formulas in conjunctive normal form, and so on. The difference between those problems and the dataset in this paper is that the former all have a single well-defined input structure that can be easily mapped into narrow architectures suited to the problem structure, avoiding the need for general reasoning skills like parsing or generic working memory. ",
252
+ "bbox": [
253
+ 174,
254
+ 131,
255
+ 825,
256
+ 242
257
+ ],
258
+ "page_idx": 2
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "Zaremba & Sutskever (2014) analyze the ability of LSTMs to map short Python programs (addition or for-loops) to their output. Some mathematics problems are of a similar imperative nature (e.g. arithmetic), but we also cover many other types of problems, so our dataset subsumes learning-to-execute. There are a few other synthetically generated datasets designed to assess reasoning of some form. The bAbI dataset of Weston et al. (2015) consists of textual questions, testing the ability to extract knowledge from a story-like sequence of questions. The CLEVR dataset of Johnson et al. (2017) consists of image-question pairs, where the image is of a set of objects, and the question asks for some property of the scene; this dataset is designed to assess visual analysis. Santoro et al. (2018b) use Raven’s progressive matrix puzzles to measure abstract reasoning of networks. ",
263
+ "bbox": [
264
+ 174,
265
+ 248,
266
+ 825,
267
+ 375
268
+ ],
269
+ "page_idx": 2
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "There has also been a recent interest in solving algebraic word problems. These questions tend to be crowd sourced or obtained from exercise books, and existing datasets include Allen Institute for AI (2014); Kushman et al. (2014); Huang et al. (2016); Upadhyay & Chang (2016); Wang et al. (2017); Ling et al. (2017). These range in size from hundreds to up to one hundred thousand examples, with different variations and focuses; for example, containing supervised “answer rationale\", or focusing on more narrow types of problems, or additionally containing geometry problems (although some of these are too small to train deep learning models without extensive prior mathematical knowledge). Our dataset differs from these in that our focus is mathematical reasoning rather than linguistic comprehension; we cover more areas of mathematics, but with less variation in problem specification, and we see mathematical reasoning as a partially orthogonal and complementary direction to linguistic understanding existing in these other datasets. ",
274
+ "bbox": [
275
+ 173,
276
+ 381,
277
+ 825,
278
+ 534
279
+ ],
280
+ "page_idx": 2
281
+ },
282
+ {
283
+ "type": "text",
284
+ "text": "2 THE DATASET ",
285
+ "text_level": 1,
286
+ "bbox": [
287
+ 176,
288
+ 558,
289
+ 320,
290
+ 574
291
+ ],
292
+ "page_idx": 2
293
+ },
294
+ {
295
+ "type": "text",
296
+ "text": "2.1 DESIGN CHOICES ",
297
+ "text_level": 1,
298
+ "bbox": [
299
+ 176,
300
+ 592,
301
+ 334,
302
+ 606
303
+ ],
304
+ "page_idx": 2
305
+ },
306
+ {
307
+ "type": "text",
308
+ "text": "Modular structure and procedural generation There are two choices for obtaining mathematical questions: either crowd-sourced, or synthetically generated. While crowd-sourcing has the advantage of introducing linguistic diversity, as well as a diversity of problem types, it is difficult to collect and validate such data at scale. In contrast, procedural generation is sufficient for our purposes in most respects: it (1) easily provides a larger number of training examples, with (2) precise controls over difficulty levels, permitting (3) analysis of performance by question type, and (4) better guarantees on question correctness, with (5) potential for more efficient model training by varying the time spent on each module, and (6) ease of testing generalization (since one can precisely vary different axes of difficulty in different question types). ",
309
+ "bbox": [
310
+ 174,
311
+ 618,
312
+ 825,
313
+ 744
314
+ ],
315
+ "page_idx": 2
316
+ },
317
+ {
318
+ "type": "text",
319
+ "text": "Freeform question/answers Given that we synthetically generate the data, we could of course provide the questions as parsed into some structure appropriate for each question type (e.g. a tree or graph). However, we opt for freeform—as a sequence of characters—because (1) it is a powerful and flexible format, allowing us to express many question types (whereas trees or graphs are only appropriate for some problems), (2) the ability to properly semantically parse is a non-negligible part of cognition, and (3) sequences are much simpler objects than graphs and trees, which simplifies development of the dataset and models. ",
320
+ "bbox": [
321
+ 174,
322
+ 763,
323
+ 825,
324
+ 861
325
+ ],
326
+ "page_idx": 2
327
+ },
328
+ {
329
+ "type": "text",
330
+ "text": "Perhaps most importantly, using freeform inputs and outputs means that the input and output space for models evaluated on the benchmark tasks in this dataset is the same as required to address a variety of “real world” mathematics exams questions. While it is not plausible that models trained on our data would perform well on such actual tests due to restricted linguistic variation in how questions and answers are formulated, it is nonetheless a desirable feature of our data that future models which do attack real world tests can be “unit tested” on our benchmarks during their development. ",
331
+ "bbox": [
332
+ 174,
333
+ 867,
334
+ 823,
335
+ 924
336
+ ],
337
+ "page_idx": 2
338
+ },
339
+ {
340
+ "type": "text",
341
+ "text": "",
342
+ "bbox": [
343
+ 173,
344
+ 103,
345
+ 823,
346
+ 132
347
+ ],
348
+ "page_idx": 3
349
+ },
350
+ {
351
+ "type": "text",
352
+ "text": "Compositionality The questions can be seen as mappings with input and output types. For example, function evaluation maps a function and an integer to another integer, function composition maps a pair of functions to a function, and so on. We use this to generate additional composed questions by chaining modules with matching types, where intermediate values from one sub-problem are used as inputs to the next sub-problem. For example, for a single intermediate value, this composition may be phrased as Let $\\mathrm { ~ ~ x ~ } = \\mathrm { ~ ~ < ~ }$ description>. <question $( \\mathbf { x } ) >$ . See Figure 1 for examples. This makes the dataset more interesting and challenging in several ways. Many rules in mathematics appear when different concepts are composed. For example, when differentiation is composed with function composition, the chain rule appears; when addition is composed with factorization, distributivity can emerge; and so on. Composition moves the questions away from pure perception, since intermediate results must be stored (working memory) and manipulated (reuse of sub-routines). ",
353
+ "bbox": [
354
+ 174,
355
+ 150,
356
+ 825,
357
+ 303
358
+ ],
359
+ "page_idx": 3
360
+ },
361
+ {
362
+ "type": "text",
363
+ "text": "2.2 BRIEF OVERVIEW OF MODULES ",
364
+ "text_level": 1,
365
+ "bbox": [
366
+ 176,
367
+ 324,
368
+ 429,
369
+ 337
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "What types of mathematics problems should be included in the dataset? The original content was based on a national school mathematics curriculum (up to age 16), restricted to textual questions (thus excluding geometry questions), which gave a comprehensive range of mathematics topics that worked together as part of a learning curriculum. We extended this with additional areas that offer good tests for algebraic reasoning. We cover the following areas (Appendix B contains the full list of modules). (1) Algebra, such as solving linear systems in 1 and 2 variables, finding roots of polynomials (presented in simplified or unsimplified forms), and extending sequences and finding their general form. (2) Arithmetic, such as basic addition etc, evaluating nested expressions, and simplifying expressions involving square roots. (3) Calculus and differentiating polynomials. (4) Comparisons, such as establishing which of two numbers is bigger, or sorting a list of numbers, or finding the closest number to a given one in a list. (5) Measurement, such as converting between different length scales, and calculating time intervals. (6) Numbers, such as finding divisors, rounding, place value, factorization, and primality. (7) Manipulating polynomials, such as simplification, expansion, evaluation, composition, and addition. (8) Probability, such as probability of obtaining a given sequence when sampling without replacement. Many modules participate in composition where possible. For example, one might have to compare two numbers (a composition module), one of which is the solution of a linear system, and the other is the evaluation of a function. ",
376
+ "bbox": [
377
+ 174,
378
+ 351,
379
+ 826,
380
+ 585
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "2.3 GENERATING DIVERSE QUESTIONS FOR TRAINING AND TESTING ",
387
+ "text_level": 1,
388
+ "bbox": [
389
+ 176,
390
+ 607,
391
+ 660,
392
+ 619
393
+ ],
394
+ "page_idx": 3
395
+ },
396
+ {
397
+ "type": "text",
398
+ "text": "Most questions involve evaluating one or more randomly generated mathematical objects (e.g. arithmetic expressions, linear systems, polynomials, compositions of these, etc). The biggest challenge in producing the dataset is generating diverse questions that are neither trivial nor impossibly hard. During testing we also want to generate questions that have not been seen in training. ",
399
+ "bbox": [
400
+ 174,
401
+ 633,
402
+ 825,
403
+ 689
404
+ ],
405
+ "page_idx": 3
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "These requirements rule-out naive unconditional sampling of such objects. For example, the product of a sequence of rationals will evaluate to zero if any of the rationals are zero; an arithmetic expression generated by randomly sampling a binary tree will often evaluate to zero or some large number; and a linear system in two variables will rarely have integer solutions. So instead for most modules we employ a different approach: we first sample the answer, and then work backwards to generate the question (including if we are doing module composition). The details of how we do this are diverse and depend on the question type, and we refer the reader to the generation code for more detail. ",
410
+ "bbox": [
411
+ 174,
412
+ 696,
413
+ 825,
414
+ 794
415
+ ],
416
+ "page_idx": 3
417
+ },
418
+ {
419
+ "type": "text",
420
+ "text": "Training and interpolation tests Per module, we generate $2 \\times 1 0 ^ { 6 }$ train questions, and $1 0 ^ { 5 }$ test (interpolation) questions. To ensure the train questions are diverse, and the test questions are distinct from the train questions, the generation code guarantees lower bounds on the probability of a given question appearing. (Post-generation hashing does not in general work, since the same question may occur with linguistic variation, although we use it in a few limited cases.) We generate test questions such that any particular question has a probability of at most $1 0 ^ { - 8 }$ , thus guaranteeing that at most $1 0 ^ { - 8 } \\times 2 \\times \\mathrm { \\dot { 1 } 0 ^ { 6 } } = 2 \\%$ of the test questions to have already appeared in the training data. (To be more precise, each module generator accepts an input $\\alpha$ , such that the output question has probability at most $1 0 ^ { - \\alpha }$ ; train questions are generated by sampling $\\alpha$ uniformly from [3, 10] (typically), and test questions are generated by taking $\\alpha = 8 .$ ) ",
421
+ "bbox": [
422
+ 174,
423
+ 811,
424
+ 823,
425
+ 924
426
+ ],
427
+ "page_idx": 3
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "",
432
+ "bbox": [
433
+ 174,
434
+ 103,
435
+ 823,
436
+ 132
437
+ ],
438
+ "page_idx": 4
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "The various mechanisms by which we achieve these probabilistic guarantees are again diverse and question dependent, so again we refer the reader to the generation code. But to give an example, many questions involve one or more integers (which includes rationals, a quotient of two integers). If we need to generate $n$ integers, then provided the $i$ th integer is sampled from a set of size at least $a _ { i }$ , then the probability of a given sequence of integers is at most $\\bar { \\Pi } _ { i } 1 / a _ { i }$ . We then simply need to choose these sets of integers appropriately (e.g. a symmetric set about zero, or the first positive integers, or integers coprime to some other integer, etc). ",
443
+ "bbox": [
444
+ 174,
445
+ 138,
446
+ 825,
447
+ 236
448
+ ],
449
+ "page_idx": 4
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "Extrapolation tests Mathematical generalization exists along a variety of axes (e.g. length, number of symbols, depth of composition/recursion). We therefore include, in our extrapolation test sets, a range of modules that measure extrapolation along different axes, such as to problems involving larger numbers, more numbers, more compositions, and (for probability questions) larger samplers. Full details are in Appendix B. ",
454
+ "bbox": [
455
+ 174,
456
+ 251,
457
+ 825,
458
+ 320
459
+ ],
460
+ "page_idx": 4
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "2.4 EVALUATION CRITERION ",
465
+ "text_level": 1,
466
+ "bbox": [
467
+ 176,
468
+ 338,
469
+ 387,
470
+ 352
471
+ ],
472
+ "page_idx": 4
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "Given a model that maps an input question to an output answer, we score each question either 0 or 1 according to whether the answer matches the correct answer character-for-character. The performance on a given test module is the average of this score across all questions. Performance across the interpolation and extrapolation test sets is then the average across all modules inside the test set. This choice of criterion is appropriate given the restricted nature of the answers generated in our dataset (but see Section 5 for possible future extensions). ",
477
+ "bbox": [
478
+ 174,
479
+ 364,
480
+ 825,
481
+ 446
482
+ ],
483
+ "page_idx": 4
484
+ },
485
+ {
486
+ "type": "text",
487
+ "text": "2.5 RELEASE ",
488
+ "text_level": 1,
489
+ "bbox": [
490
+ 174,
491
+ 464,
492
+ 281,
493
+ 478
494
+ ],
495
+ "page_idx": 4
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "We will release $2 \\times 1 0 ^ { 6 }$ training examples and $1 0 ^ { 4 }$ pre-generated test examples per module upon publication of this paper. In the dataset, the questions and answers use a common alphabet of size 95 (upper and lower case characters, digits, and punctuation characters). The questions are capped to 160 characters in length and answers to 30, which is sufficient for a wide range of question types. Mathematical equations are formatted according to Python/SymPy (Meurer et al., 2017) conventions (for example, $\\star \\star$ is used for power rather than ˆ); these rules are consistent for all modules. ",
500
+ "bbox": [
501
+ 174,
502
+ 489,
503
+ 825,
504
+ 574
505
+ ],
506
+ "page_idx": 4
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "3 MODELS EXAMINED ",
511
+ "text_level": 1,
512
+ "bbox": [
513
+ 176,
514
+ 593,
515
+ 375,
516
+ 609
517
+ ],
518
+ "page_idx": 4
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "Due to the construction process underlying this dataset, there are a large number of existing models, which could be adapted, purpose-built, or tailored to solve the sort of problems we present here, especially with the help of symbolic solvers or computer algebra systems. Setting aside the possible brittleness or limits in scalability of traditional symbolic approaches as the complexity or linguistic diversity of questions and answers grows, we are interested here in evaluating general purpose models, rather than ones with their mathematics knowledge already inbuilt. What makes such models (which are invariably neural architectures) so ubiquitous from translation to parsing via image captioning is the lack of bias these function approximators present due to having relatively little (or no) domain-specific knowledge encoded in their design. Although there are some neural network-driven approaches with direct access to mathematical operations (such as addition or multiplication (Ling et al., 2017), or more complex mathematical templates like in (Kushman et al., 2014)), which would undoubtedly perform competitively on the tasks we present in this paper, we will limit ourselves to general sequence-processing architectures which are used in other non-mathematical tasks to present the most general baselines possible for future comparison. ",
523
+ "bbox": [
524
+ 174,
525
+ 625,
526
+ 825,
527
+ 819
528
+ ],
529
+ "page_idx": 4
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "We investigate two (broad classes of) models that have demonstrated themselves to be state-of-the-art on sequence-to-sequence problems: recurrent neural architectures, and the more recently introduced attentional/transformer (Vaswani et al., 2017) architecture. We also tried to use Differentiable Neural Computers (Graves et al., 2016), which is a recurrent model with an “external memory” (whose size is independent of the number of parameters in the network). In theory this could be well suited for solving mathematical questions, since it can store intermediate values for later usage. However we were unable to get decent performance out of it. (Even with hyperparameter sweeps for the number and size of memory slots, etc, we were only able to get to $10 \\%$ validation performance after a day of training, whereas most models obtain this in less than an hour). ",
534
+ "bbox": [
535
+ 174,
536
+ 827,
537
+ 825,
538
+ 924
539
+ ],
540
+ "page_idx": 4
541
+ },
542
+ {
543
+ "type": "image",
544
+ "img_path": "images/f23d6f69a16b604b94a0a186316698e9b77ca84f4505c05b7f9b64a81f46b536.jpg",
545
+ "image_caption": [
546
+ "Figure 2: The attentional LSTM and Transformer architectures are both consist of an encoder, that parses the question, and a decoder, which maps the correct answer right-shifted by 1 to a distribution of the next character in the answer at every position (thus allowing auto-regressive prediction). (a) The Attentional LSTM encodes the question to a sequence of (key, value) positions, which are then attended over by the decoder. (b) The Transformer has several stages of self- and input-attention; see (Vaswani et al., 2017) for details. "
547
+ ],
548
+ "image_footnote": [],
549
+ "bbox": [
550
+ 179,
551
+ 104,
552
+ 807,
553
+ 263
554
+ ],
555
+ "page_idx": 5
556
+ },
557
+ {
558
+ "type": "text",
559
+ "text": "",
560
+ "bbox": [
561
+ 173,
562
+ 388,
563
+ 823,
564
+ 416
565
+ ],
566
+ "page_idx": 5
567
+ },
568
+ {
569
+ "type": "text",
570
+ "text": "3.1 RECURRENT ARCHITECTURES",
571
+ "text_level": 1,
572
+ "bbox": [
573
+ 176,
574
+ 438,
575
+ 421,
576
+ 450
577
+ ],
578
+ "page_idx": 5
579
+ },
580
+ {
581
+ "type": "text",
582
+ "text": "The LSTM (Hochreiter & Schmidhuber, 1997) is a powerful building block of sequence-to-sequence models that have achieved state of the art results in many domains, and despite its simplicity, continues to be a central building block for recurrent neural networks. We benchmark two standard recurrent architectures (described in more detail in Appendix A). ",
583
+ "bbox": [
584
+ 174,
585
+ 463,
586
+ 825,
587
+ 520
588
+ ],
589
+ "page_idx": 5
590
+ },
591
+ {
592
+ "type": "text",
593
+ "text": "The first and simplest model we analyze (referred to in results below as “Simple LSTM”) is to simply feed the question into the LSTM, one character at a time (using a 1-hot encoding), before outputting the answer one character at a time (the output is a distribution over possible characters, and at every answer step, the previous correct answer character is fed in). In the results below, we use a hidden size of 2048 (obtained via a hyperparameter sweep). ",
594
+ "bbox": [
595
+ 174,
596
+ 526,
597
+ 825,
598
+ 597
599
+ ],
600
+ "page_idx": 5
601
+ },
602
+ {
603
+ "type": "text",
604
+ "text": "The second model we analyze (referred to as “Attentional LSTM”) is the encoder/decoder-withattention architecture introduced in (Bahdanau et al., 2014) which has been prevalent in neural machine translation, and overcomes two problems with the simple LSTM model above, which affect both language translation and mathematical question-answering: (1) information that is presented in the input may be out-of-order for the purpose of calculations required for the output (for example, to calculate $\\bar { 8 } / ( 1 + 3 )$ , the expression $1 + 3$ must be evaluated first); and (2) all information for the answer must be contained within the single vector of cell activations of the LSTM, which is a bottleneck. The attentional LSTM architecture consists of a recurrent encoder that encodes the question to a sequence of keys and values (of the same length as the question), and a recurrent decoder that has as input the correct answer right-shifted by 1, and at every time step attends to the encoded question, and outputs a distribution over the next character. We use an encoding LSTM with 512 hidden units and a decoding LSTM with 2048 hidden units. (These settings were obtained using a hyperparameter sweep.) ",
605
+ "bbox": [
606
+ 174,
607
+ 603,
608
+ 825,
609
+ 784
610
+ ],
611
+ "page_idx": 5
612
+ },
613
+ {
614
+ "type": "text",
615
+ "text": "In both these architecture, we also employ a simple change that improves performance. The models as described must output the answer straight after parsing the question. However, it may be necessary for the models to expend several computation steps integrating information from the question. To allow for this, we add additional steps (with zero input) before outputting the answer. We also experimented with Adaptive Computation Time as introduced in (Graves, 2016), although this yielded worse results than simply having a fixed number of “thinking” steps. ",
616
+ "bbox": [
617
+ 174,
618
+ 791,
619
+ 825,
620
+ 875
621
+ ],
622
+ "page_idx": 5
623
+ },
624
+ {
625
+ "type": "text",
626
+ "text": "Recently a recurrent architecture known as relational recurrent neural network (Santoro et al., 2018a), or relational memory core (RMC), has been developed as a replacement for the LSTM. This recurrent unit has multiple memory slots that interact via attention. This seems like a natural candidate for mathematical reasoning, for example if the model can learn to use the slots to store mathematical entities. However, a comprehensive hyperparameter sweep gave the best setting as 1 memory slot (i.e., without making full use of the RMC). We include these results below, also with 2048 total units, 16 attention heads, and 1 block. ",
627
+ "bbox": [
628
+ 176,
629
+ 882,
630
+ 825,
631
+ 924
632
+ ],
633
+ "page_idx": 5
634
+ },
635
+ {
636
+ "type": "table",
637
+ "img_path": "images/870ce7efefcfad1377d1b3658275053aefe2f09b4783ef1eef80cdaaa1043be3.jpg",
638
+ "table_caption": [
639
+ "Figure 3: Model accuracy (probability of correct answer) averaged across modules. RMC is the relational recurrent neural network model. "
640
+ ],
641
+ "table_footnote": [],
642
+ "table_body": "<table><tr><td></td><td>Parameters</td><td>Interpolation</td><td>Extrapolation</td></tr><tr><td>Simple LSTM</td><td>18M</td><td>0.57</td><td>0.41</td></tr><tr><td>Simple RMC</td><td>38M</td><td>0.53</td><td>0.38</td></tr><tr><td>Attentional LSTM,LSTM encoder</td><td>24M</td><td>0.57</td><td>0.38</td></tr><tr><td>Attentional LSTM, bidir LSTM encoder</td><td>26M</td><td>0.58</td><td>0.42</td></tr><tr><td>AttentionalRMC,bidirLSTM encoder</td><td>39M</td><td>0.54</td><td>0.43</td></tr><tr><td>Transformer</td><td>30M</td><td>0.76</td><td>0.50</td></tr></table>",
643
+ "bbox": [
644
+ 187,
645
+ 101,
646
+ 808,
647
+ 200
648
+ ],
649
+ "page_idx": 6
650
+ },
651
+ {
652
+ "type": "text",
653
+ "text": "",
654
+ "bbox": [
655
+ 174,
656
+ 270,
657
+ 825,
658
+ 327
659
+ ],
660
+ "page_idx": 6
661
+ },
662
+ {
663
+ "type": "text",
664
+ "text": "3.2 TRANSFORMER (ATTENTION IS ALL YOU NEED) ",
665
+ "text_level": 1,
666
+ "bbox": [
667
+ 174,
668
+ 347,
669
+ 553,
670
+ 362
671
+ ],
672
+ "page_idx": 6
673
+ },
674
+ {
675
+ "type": "text",
676
+ "text": "The Transformer model (Vaswani et al., 2017) is a sequence-to-sequence model achieving stateof-the-art results in machine translation. We briefly describe it here (see Figure 2b). The model consists of an encoder, which transforms the question (represented as a sequence of vectors) to another sequence of the same length, and a decoder (which transforms the encoded question, and the answer autoregressively shifted right, into the answer prediction). Internally the input is transformed via attentional mechanisms (both self- and input-attention), and position-wise fully connected layers. We use an embedding size of $d _ { \\mathrm { m o d e l } } = 5 1 2$ , with $h = 8$ attentional heads, and thus key and value sizes of $d _ { k } = d _ { v } = \\bar { d } _ { \\mathrm { m o d e l } } / h = 6 4$ . Each layer has an intermediate representation with dimension $d _ { \\mathrm { f f } } = 2 0 4 8$ . For translation tasks, it is typically applied to sequences of embedded words; here we instead treat the question and answer as a sequence of characters, since we need to be able to embed arbitrary mathematical expressions. ",
677
+ "bbox": [
678
+ 173,
679
+ 375,
680
+ 826,
681
+ 529
682
+ ],
683
+ "page_idx": 6
684
+ },
685
+ {
686
+ "type": "text",
687
+ "text": "4 ANALYSIS ",
688
+ "text_level": 1,
689
+ "bbox": [
690
+ 174,
691
+ 551,
692
+ 290,
693
+ 568
694
+ ],
695
+ "page_idx": 6
696
+ },
697
+ {
698
+ "type": "text",
699
+ "text": "4.1 TRAINING AND EVALUATION METHODS ",
700
+ "text_level": 1,
701
+ "bbox": [
702
+ 176,
703
+ 585,
704
+ 486,
705
+ 599
706
+ ],
707
+ "page_idx": 6
708
+ },
709
+ {
710
+ "type": "text",
711
+ "text": "As is common in sequence-to-sequence models, the models predict the answer autoregressively using a greedy decoder (output majority class at each step). We minimize the sum of log probabilities of the correct character via the Adam optimizer (Kingma & Ba, 2014) with learning rate of $6 \\times 1 0 ^ { - 4 }$ , $\\beta _ { 1 } = 0 . 9$ , $\\beta _ { 2 } = 0 . 9 9 5$ , $\\epsilon = 1 0 ^ { - 9 }$ . We use a batch size of 1024 split across 8 NVIDIA P100 GPUs for 500k batches, with absolute gradient value clipping of 0.1. ",
712
+ "bbox": [
713
+ 174,
714
+ 613,
715
+ 825,
716
+ 683
717
+ ],
718
+ "page_idx": 6
719
+ },
720
+ {
721
+ "type": "text",
722
+ "text": "4.2 RESULTS AND INSIGHTS",
723
+ "text_level": 1,
724
+ "bbox": [
725
+ 176,
726
+ 704,
727
+ 382,
728
+ 718
729
+ ],
730
+ "page_idx": 6
731
+ },
732
+ {
733
+ "type": "text",
734
+ "text": "Figure 3 shows the average interpolation and extrapolation performances for the different architectures. \nFull per-module performance results are in Appendix C. ",
735
+ "bbox": [
736
+ 173,
737
+ 731,
738
+ 825,
739
+ 760
740
+ ],
741
+ "page_idx": 6
742
+ },
743
+ {
744
+ "type": "text",
745
+ "text": "LSTMs vs RMCs Using a RMC with more than one memory slot did not help performance; perhaps it is hard for the RMC to learn to use slots for manipulating mathematical entities. For a given number of hidden units, RMCs were more data efficient but trained more slowly (since they had more parameters), and LSTMs had better asymptotic performance. ",
746
+ "bbox": [
747
+ 174,
748
+ 779,
749
+ 825,
750
+ 834
751
+ ],
752
+ "page_idx": 6
753
+ },
754
+ {
755
+ "type": "text",
756
+ "text": "Simple vs attentional LSTM The attentional LSTM and the simple LSTM have similar performance. One might suspect that the attentional LSTM does nothing, however this is not the case, since a simple LSTM model of the same size as the parsing LSTM obtains much worse performance. We speculate that the attentional model is not learning to algorithmically parse the question, and so the ability to change attention focus per-step does not count for as much. ",
757
+ "bbox": [
758
+ 174,
759
+ 853,
760
+ 823,
761
+ 924
762
+ ],
763
+ "page_idx": 6
764
+ },
765
+ {
766
+ "type": "text",
767
+ "text": "Number of thinking steps For the attentional LSTM model, we observed that increasing the number of “thinking” steps (as defined above) from 0 up to 16 increased the performance. ",
768
+ "bbox": [
769
+ 173,
770
+ 103,
771
+ 823,
772
+ 132
773
+ ],
774
+ "page_idx": 7
775
+ },
776
+ {
777
+ "type": "text",
778
+ "text": "Transformer vs best non-transformer model The Transformer performs the same as or significantly better than recurrent models across nearly all modules. Both architectures have a comparable number of parameters. One might a-priori expect the LSTM to perform better, since its sequential architecture is perhaps more similar to sequential reasoning steps that a human performs. However, evidence above and below suggest that neither of the networks are doing much “algorithmic reasoning”, and the Transformer has various advantages over LSTM architectures, such as (1) doing more calculations with the same number of parameters, (2) having a shallower architecture (with better gradient propagation), and (3) having an internal \"memory\" that is sequential, which is more pre-disposed to mathematical objects like sequences of digits. ",
779
+ "bbox": [
780
+ 174,
781
+ 150,
782
+ 825,
783
+ 275
784
+ ],
785
+ "page_idx": 7
786
+ },
787
+ {
788
+ "type": "text",
789
+ "text": "Easiest maths for neural networks The easiest question types were finding the place value in a number, and rounding decimals and integers, which all models got nearly perfect scores on. Questions involving comparisons also tended to be quite easy, possible because such tasks are quite perceptual (e.g. comparing lengths or individual digits). This success includes questions with module composition, for example Let $\\begin{array} { r c l } { \\mathrm { ~ k ~ } ( \\mathrm { ~ c ~ } ) } & { = } & { - 6 1 1 \\star \\mathrm { c ~ \\ } + \\ 2 1 8 8 8 5 7 } \\end{array}$ . Is $\\mathrm { ~ k ~ } ( - 1 0 3 )$ $\\ ! = \\ 2 2 5 1 7 9 0 ?$ (False) and mixtures of decimals and rationals, for example, Sort $- 1 3 9 / 4$ , 40.8, -555, 607 in increasing order. Overall it seems that magnitude is easy for neural networks to learn. ",
790
+ "bbox": [
791
+ 174,
792
+ 292,
793
+ 825,
794
+ 404
795
+ ],
796
+ "page_idx": 7
797
+ },
798
+ {
799
+ "type": "text",
800
+ "text": "Hardest maths for neural networks Perhaps not surprisingly, some of the hardest modules include more number-theoretic questions which are also hard for humans, such as detecting primality and factorization. The Transformer model still gives plausible-looking answers, such as factoring 235232673 as 3, 11, 13, 19, 23, 1487 (the correct answer is 3, 13, 19, 317453). ",
801
+ "bbox": [
802
+ 174,
803
+ 421,
804
+ 825,
805
+ 492
806
+ ],
807
+ "page_idx": 7
808
+ },
809
+ {
810
+ "type": "text",
811
+ "text": "The Transformer model has a performance of $90 \\%$ or more on the “add or subtract several numbers\" module and the “multiply or divide several numbers\" module (which is just addition and subtraction in log space). However on the mixed arithmetic module (mixing all four operations together with parentheses), the performance drops to around $50 \\%$ . (Note the distribution of the value of the expression is the same for all these modules, so it is not the case that difficulty increases due to different answer magnitudes.) We speculate that the difference between these modules in that the former can be computed in a relatively linear/shallow/parallel manner (so that the solution method is relatively easier to discover via gradient descent), whereas there are no shortcuts to evaluating mixed arithmetic expressions with parentheses, where intermediate values need to be calculated. This is evidence that the models do not learn to do any algebraic/algorithmic manipulation of values, and are instead learning relatively shallow tricks to obtain good answers on many of the modules. The same holds true for other modules that require intermediate value calculation, such as evaluating polynomials, and general composition. ",
812
+ "bbox": [
813
+ 174,
814
+ 498,
815
+ 825,
816
+ 679
817
+ ],
818
+ "page_idx": 7
819
+ },
820
+ {
821
+ "type": "text",
822
+ "text": "Performance on polynomial manipulation One notable difference between the Transformer and the recurrent models was polynomial manipulation. The Transformer did significantly better on polynomial expansion, collecting terms, addition, composition, differentiation, and extracting named coefficients. Speculatively, the parallel sequential nature of the Transformer is better at manipulating polynomials where several coefficients must be kept in memory simultaneously where they can interact. ",
823
+ "bbox": [
824
+ 174,
825
+ 696,
826
+ 825,
827
+ 780
828
+ ],
829
+ "page_idx": 7
830
+ },
831
+ {
832
+ "type": "text",
833
+ "text": "Other insights Examining the performance on adding multiple integers, we tested the models on adding $1 + 1 + \\cdots + 1$ , where 1 occurs $n$ times. Both the LSTM and Transformer models gave the correct answer for $n \\leq 6$ , but the incorrect answer of 6 for $n = 7$ (seemingly missing one of the 1s), and other incorrect values for $n > 7$ . (The models are trained on sequences of random integers up to length 10, and are capable of giving the correct answer on longer sequences of far bigger numbers, for example $- 3 4 ~ + ~ 5 3 ~ + ~ - 9 3 6 ~ + ~ - 2 9 7 ~ + ~ 1 6 2 ~ + ~ - 2 4 2 ~ + ~ - 1 2 8 . )$ We do not have a good explanation for this behaviour; one hypothesis is that the models calculate subsums and then combine these, but rely on different input numbers to align the subsums, and fail when the input is “camouflaged” by consisting of the same number repeated multiple times. ",
834
+ "bbox": [
835
+ 174,
836
+ 797,
837
+ 825,
838
+ 924
839
+ ],
840
+ "page_idx": 7
841
+ },
842
+ {
843
+ "type": "text",
844
+ "text": "Robustness to question phrasing Although we do not train for linguistic variation and do not expect models to be robust to it, the failure modes are still interesting. For example, on one trained Transformer, the question “Calculate $ { { } ^ { 1 7 } } \\star 4$ .” gave the correct answer 68, but the same question without the final full stop gave 69. ",
845
+ "bbox": [
846
+ 174,
847
+ 103,
848
+ 823,
849
+ 160
850
+ ],
851
+ "page_idx": 8
852
+ },
853
+ {
854
+ "type": "text",
855
+ "text": "Extrapolation performance Modules on which good extrapolation performance was obtained include rounding larger numbers than seen during training, comparing more numbers, and adding and subtracting larger numbers. However for example models completely failed to add together more numbers than seen during training, which agrees with the suspicion that models have learnt to add numbers in parallel rather than calculating subsums. ",
856
+ "bbox": [
857
+ 174,
858
+ 174,
859
+ 825,
860
+ 244
861
+ ],
862
+ "page_idx": 8
863
+ },
864
+ {
865
+ "type": "text",
866
+ "text": "4.3 PERFORMANCE ON REAL MATHEMATICS QUESTIONS ",
867
+ "text_level": 1,
868
+ "bbox": [
869
+ 174,
870
+ 262,
871
+ 576,
872
+ 275
873
+ ],
874
+ "page_idx": 8
875
+ },
876
+ {
877
+ "type": "text",
878
+ "text": "To provide an external benchmark for the capability of neural network models trained on our dataset, we tested the trained Transformer model on a set of 40 questions selected from publicly-available maths exams for British 16 year old schoolchildren2. These questions were gathered from four exam papers after excluding those involving graphs, tables or other figures - the full set is reproduced in the supplementary materials. ",
879
+ "bbox": [
880
+ 174,
881
+ 287,
882
+ 825,
883
+ 357
884
+ ],
885
+ "page_idx": 8
886
+ },
887
+ {
888
+ "type": "text",
889
+ "text": "On these exam questions, the Transformer model got 14/40 questions correct, which is (proportionally) equivalent to that of an E grade student3. The model showed some promise by correctly solving the simultaneous equations $5 x + 2 y = 1 1$ and $4 x - 3 y = 1 8$ , identified the correct next number in the sequence 3, 9, 15, 27. The disappointing grade also assumes that no marks were awarded for plausible but incorrect attempts, such as the factorisation $1 ( y - 2 ) ( y + 4 )$ of the expression $y ^ { 2 } - \\dot { 1 0 } y + 1 6$ . Overall, this analysis suggests that, with knowledge of the exam syllabus to inform the training data generation, and the ability to receive graphical inputs, it may be possible to encode the knowledge necessary to excel at unseen exams in an out-of-the-box neural network, although the pattern of errors and ability to generalise would likely differ from typical school-age students. ",
890
+ "bbox": [
891
+ 174,
892
+ 363,
893
+ 825,
894
+ 489
895
+ ],
896
+ "page_idx": 8
897
+ },
898
+ {
899
+ "type": "text",
900
+ "text": "5 CONCLUSIONS AND FUTURE WORK ",
901
+ "text_level": 1,
902
+ "bbox": [
903
+ 176,
904
+ 510,
905
+ 498,
906
+ 525
907
+ ],
908
+ "page_idx": 8
909
+ },
910
+ {
911
+ "type": "text",
912
+ "text": "We have created a dataset on which current state-of-the-art neural models obtain moderate performance. Some modules are largely unsolved (for example those requiring several intermediate calculations), for which a human would find easy, and extrapolation performance is low. We hope this dataset will become a robust analyzable benchmark for developing models with more algebraic/symbolic reasoning abilities. ",
913
+ "bbox": [
914
+ 174,
915
+ 540,
916
+ 825,
917
+ 609
918
+ ],
919
+ "page_idx": 8
920
+ },
921
+ {
922
+ "type": "text",
923
+ "text": "The dataset is easily extendable, since it is modular, with all modules using a common input/output format and the common language of mathematics. The main restriction is that the answers must be well-determined (i.e. unique), but this still allows for covering a lot of mathematics up to university level. At some point it becomes harder to cover more of mathematics (for example, proofs) while maintaining the sequence-to-sequence format, but hopefully by this point the dataset in its current format will have served its purpose in developing models that can reason mathematically. Alternatively, we could consider methods for assessing answers where there is not a single unique answer; for now the full scope of possibilities is too large to include in this paper, but a few possibilities include metrics such as BLEU (Papineni et al., 2002), by extending the data generation process to provide several reference answers, or by obtaining human paraphrases following the data augmentation process proposed by Wang et al. (2015). ",
924
+ "bbox": [
925
+ 174,
926
+ 616,
927
+ 825,
928
+ 770
929
+ ],
930
+ "page_idx": 8
931
+ },
932
+ {
933
+ "type": "text",
934
+ "text": "We have not addressed linguistic variation or complexity in this dataset. Although to some extent linguistic complexity is orthogonal to the difficulty of the maths problems involved, the two cannot be entirely separated. The most obvious example of this for school-level mathematics is in algebraic word problems, where much of the difficulty lies in translating the description of the problem into an algebraic problem. Thus it would be useful to extend the dataset with “linguistic complexity”, where the same underlying mathematical problem is phrased in quite distinct, and not-at-first-obvious, translations. One option may be to do joint training on this dataset, and that of (Ling et al., 2017); ",
935
+ "bbox": [
936
+ 173,
937
+ 776,
938
+ 825,
939
+ 875
940
+ ],
941
+ "page_idx": 8
942
+ },
943
+ {
944
+ "type": "text",
945
+ "text": "another would be to obtain more question templates via mechanical turking, as proposed by Wang et al. (2015). ",
946
+ "bbox": [
947
+ 171,
948
+ 103,
949
+ 823,
950
+ 132
951
+ ],
952
+ "page_idx": 9
953
+ },
954
+ {
955
+ "type": "text",
956
+ "text": "Finally one completely distinct direction the dataset could be extended is to include visual (e.g. geometry) problems as well. For humans, visual reasoning is an important part of mathematical reasoning, even concerning problems that are not specified in a visual format. Therefore we want to develop questions along these lines, including those that require “intermediate visual representations” (in a similar way to how the textual module composition requires intermediate digital representations) and visual working memory. Note that reasoning with intermediate visual representations or ideas is richer than simply analyzing a visual domain (such as is typical in visual question-answering datasets). ",
957
+ "bbox": [
958
+ 174,
959
+ 138,
960
+ 825,
961
+ 251
962
+ ],
963
+ "page_idx": 9
964
+ },
965
+ {
966
+ "type": "text",
967
+ "text": "REFERENCES ",
968
+ "text_level": 1,
969
+ "bbox": [
970
+ 176,
971
+ 271,
972
+ 285,
973
+ 286
974
+ ],
975
+ "page_idx": 9
976
+ },
977
+ {
978
+ "type": "text",
979
+ "text": "Miltiadis Allamanis, Pankajan Chanthirasegaran, Pushmeet Kohli, and Charles Sutton. Learning continuous semantic representations of symbolic expressions. arXiv preprint arXiv:1611.01423, 2016. ",
980
+ "bbox": [
981
+ 174,
982
+ 295,
983
+ 826,
984
+ 335
985
+ ],
986
+ "page_idx": 9
987
+ },
988
+ {
989
+ "type": "text",
990
+ "text": "Allen Institute for AI. Project Euclid. http://allenai.org/euclid/, 2014. ",
991
+ "bbox": [
992
+ 174,
993
+ 345,
994
+ 723,
995
+ 361
996
+ ],
997
+ "page_idx": 9
998
+ },
999
+ {
1000
+ "type": "text",
1001
+ "text": "Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. arXiv preprint arXiv:1409.0473, 2014. ",
1002
+ "bbox": [
1003
+ 173,
1004
+ 369,
1005
+ 820,
1006
+ 398
1007
+ ],
1008
+ "page_idx": 9
1009
+ },
1010
+ {
1011
+ "type": "text",
1012
+ "text": "Richard Evans, David Saxton, David Amos, Pushmeet Kohli, and Edward Grefenstette. Can neural networks understand logical entailment? arXiv preprint arXiv:1802.08535, 2018. ",
1013
+ "bbox": [
1014
+ 173,
1015
+ 407,
1016
+ 820,
1017
+ 436
1018
+ ],
1019
+ "page_idx": 9
1020
+ },
1021
+ {
1022
+ "type": "text",
1023
+ "text": "Alex Graves. Adaptive computation time for recurrent neural networks. arXiv preprint arXiv:1603.08983, 2016. ",
1024
+ "bbox": [
1025
+ 173,
1026
+ 445,
1027
+ 823,
1028
+ 473
1029
+ ],
1030
+ "page_idx": 9
1031
+ },
1032
+ {
1033
+ "type": "text",
1034
+ "text": "Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka GrabskaBarwinska, Sergio Gómez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, et al. ´ Hybrid computing using a neural network with dynamic external memory. Nature, 538(7626):471, 2016. ",
1035
+ "bbox": [
1036
+ 174,
1037
+ 482,
1038
+ 826,
1039
+ 539
1040
+ ],
1041
+ "page_idx": 9
1042
+ },
1043
+ {
1044
+ "type": "text",
1045
+ "text": "Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. ",
1046
+ "bbox": [
1047
+ 174,
1048
+ 547,
1049
+ 823,
1050
+ 577
1051
+ ],
1052
+ "page_idx": 9
1053
+ },
1054
+ {
1055
+ "type": "text",
1056
+ "text": "Danqing Huang, Shuming Shi, Chin-Yew Lin, Jian Yin, and Wei-Ying Ma. How well do computers solve math word problems? large-scale dataset construction and evaluation. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 887–896, 2016. ",
1057
+ "bbox": [
1058
+ 173,
1059
+ 585,
1060
+ 825,
1061
+ 642
1062
+ ],
1063
+ "page_idx": 9
1064
+ },
1065
+ {
1066
+ "type": "text",
1067
+ "text": "Justin Johnson, Bharath Hariharan, Laurens van der Maaten, Li Fei-Fei, C Lawrence Zitnick, and Ross Girshick. Clevr: A diagnostic dataset for compositional language and elementary visual reasoning. In Computer Vision and Pattern Recognition (CVPR), 2017 IEEE Conference on, pp. 1988–1997. IEEE, 2017. ",
1068
+ "bbox": [
1069
+ 173,
1070
+ 650,
1071
+ 825,
1072
+ 707
1073
+ ],
1074
+ "page_idx": 9
1075
+ },
1076
+ {
1077
+ "type": "text",
1078
+ "text": "Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In Advances in neural information processing systems, pp. 190–198, 2015. ",
1079
+ "bbox": [
1080
+ 171,
1081
+ 717,
1082
+ 823,
1083
+ 746
1084
+ ],
1085
+ "page_idx": 9
1086
+ },
1087
+ {
1088
+ "type": "text",
1089
+ "text": "Łukasz Kaiser and Ilya Sutskever. Neural gpus learn algorithms. arXiv preprint arXiv:1511.08228, 2015. ",
1090
+ "bbox": [
1091
+ 171,
1092
+ 753,
1093
+ 825,
1094
+ 784
1095
+ ],
1096
+ "page_idx": 9
1097
+ },
1098
+ {
1099
+ "type": "text",
1100
+ "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
1101
+ "bbox": [
1102
+ 173,
1103
+ 791,
1104
+ 825,
1105
+ 820
1106
+ ],
1107
+ "page_idx": 9
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. ",
1112
+ "bbox": [
1113
+ 174,
1114
+ 829,
1115
+ 825,
1116
+ 872
1117
+ ],
1118
+ "page_idx": 9
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "Nate Kushman, Yoav Artzi, Luke Zettlemoyer, and Regina Barzilay. Learning to automatically solve algebra word problems. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), volume 1, pp. 271–281, 2014. ",
1123
+ "bbox": [
1124
+ 176,
1125
+ 881,
1126
+ 825,
1127
+ 924
1128
+ ],
1129
+ "page_idx": 9
1130
+ },
1131
+ {
1132
+ "type": "text",
1133
+ "text": "Wang Ling, Dani Yogatama, Chris Dyer, and Phil Blunsom. Program induction by rationale generation: Learning to solve and explain algebraic word problems. arXiv preprint arXiv:1705.04146, 2017. ",
1134
+ "bbox": [
1135
+ 174,
1136
+ 103,
1137
+ 825,
1138
+ 146
1139
+ ],
1140
+ "page_idx": 10
1141
+ },
1142
+ {
1143
+ "type": "text",
1144
+ "text": "Gary F Marcus. The algebraic mind: Integrating connectionism and cognitive science. MIT press, 2003. ",
1145
+ "bbox": [
1146
+ 173,
1147
+ 155,
1148
+ 825,
1149
+ 184
1150
+ ],
1151
+ "page_idx": 10
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "Aaron Meurer, Christopher P Smith, Mateusz Paprocki, Ondˇrej Certík, Sergey B Kirpichev, Matthew ˇ Rocklin, AMiT Kumar, Sergiu Ivanov, Jason K Moore, Sartaj Singh, et al. Sympy: symbolic computing in python. PeerJ Computer Science, 3:e103, 2017. ",
1156
+ "bbox": [
1157
+ 176,
1158
+ 191,
1159
+ 823,
1160
+ 236
1161
+ ],
1162
+ "page_idx": 10
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015. ",
1167
+ "bbox": [
1168
+ 176,
1169
+ 243,
1170
+ 823,
1171
+ 287
1172
+ ],
1173
+ "page_idx": 10
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting on association for computational linguistics, pp. 311–318. Association for Computational Linguistics, 2002. ",
1178
+ "bbox": [
1179
+ 174,
1180
+ 295,
1181
+ 825,
1182
+ 339
1183
+ ],
1184
+ "page_idx": 10
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "Adam Santoro, Ryan Faulkner, David Raposo, Jack Rae, Mike Chrzanowski, Theophane Weber, Daan Wierstra, Oriol Vinyals, Razvan Pascanu, and Timothy Lillicrap. Relational recurrent neural networks. arXiv preprint arXiv:1806.01822, 2018a. ",
1189
+ "bbox": [
1190
+ 174,
1191
+ 347,
1192
+ 825,
1193
+ 390
1194
+ ],
1195
+ "page_idx": 10
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "Adam Santoro, Felix Hill, David Barrett, Ari Morcos, and Timothy Lillicrap. Measuring abstract reasoning in neural networks. In International Conference on Machine Learning, pp. 4477–4486, 2018b. ",
1200
+ "bbox": [
1201
+ 173,
1202
+ 398,
1203
+ 825,
1204
+ 441
1205
+ ],
1206
+ "page_idx": 10
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "Daniel Selsam, Matthew Lamm, Benedikt Bunz, Percy Liang, Leonardo de Moura, and David L Dill. Learning a sat solver from single-bit supervision. arXiv preprint arXiv:1802.03685, 2018. ",
1211
+ "bbox": [
1212
+ 174,
1213
+ 450,
1214
+ 825,
1215
+ 479
1216
+ ],
1217
+ "page_idx": 10
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. nature, 529(7587):484–489, 2016. ",
1222
+ "bbox": [
1223
+ 176,
1224
+ 488,
1225
+ 825,
1226
+ 531
1227
+ ],
1228
+ "page_idx": 10
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013. ",
1233
+ "bbox": [
1234
+ 171,
1235
+ 540,
1236
+ 825,
1237
+ 569
1238
+ ],
1239
+ "page_idx": 10
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "Shyam Upadhyay and Ming-Wei Chang. Annotating derivations: A new evaluation strategy and dataset for algebra word problems. arXiv preprint arXiv:1609.07197, 2016. ",
1244
+ "bbox": [
1245
+ 169,
1246
+ 577,
1247
+ 823,
1248
+ 607
1249
+ ],
1250
+ "page_idx": 10
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, pp. 6000–6010, 2017. ",
1255
+ "bbox": [
1256
+ 174,
1257
+ 614,
1258
+ 825,
1259
+ 659
1260
+ ],
1261
+ "page_idx": 10
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "Yan Wang, Xiaojiang Liu, and Shuming Shi. Deep neural solver for math word problems. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 845–854, 2017. ",
1266
+ "bbox": [
1267
+ 174,
1268
+ 666,
1269
+ 825,
1270
+ 709
1271
+ ],
1272
+ "page_idx": 10
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "Yushi Wang, Jonathan Berant, and Percy Liang. Building a semantic parser overnight. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), volume 1, pp. 1332–1342, 2015. ",
1277
+ "bbox": [
1278
+ 173,
1279
+ 718,
1280
+ 825,
1281
+ 775
1282
+ ],
1283
+ "page_idx": 10
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "Jason Weston, Antoine Bordes, Sumit Chopra, Alexander M Rush, Bart van Merriënboer, Armand Joulin, and Tomas Mikolov. Towards AI-complete question answering: A set of prerequisite toy tasks. arXiv preprint arXiv:1502.05698, 2015. ",
1288
+ "bbox": [
1289
+ 173,
1290
+ 784,
1291
+ 823,
1292
+ 827
1293
+ ],
1294
+ "page_idx": 10
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "Wojciech Zaremba and Ilya Sutskever. Learning to execute. arXiv preprint arXiv:1410.4615, 2014. ",
1299
+ "bbox": [
1300
+ 171,
1301
+ 835,
1302
+ 821,
1303
+ 852
1304
+ ],
1305
+ "page_idx": 10
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "text": "A RECURRENT ENCODER AND DECODER WITH ATTENTION",
1310
+ "text_level": 1,
1311
+ "bbox": [
1312
+ 174,
1313
+ 103,
1314
+ 678,
1315
+ 117
1316
+ ],
1317
+ "page_idx": 11
1318
+ },
1319
+ {
1320
+ "type": "text",
1321
+ "text": "This model consists of an encoder and a decoder (see Figure 2a). The encoder maps the question (as a sequence of characters represented as 1-hot vectors) to a sequence of pairs of keys and values, where each key is a vector of length $k$ and each value is a vector of length $v$ . We take $k = v = 2 5 6$ . ",
1322
+ "bbox": [
1323
+ 174,
1324
+ 132,
1325
+ 825,
1326
+ 175
1327
+ ],
1328
+ "page_idx": 11
1329
+ },
1330
+ {
1331
+ "type": "text",
1332
+ "text": "We experiment with two different encoder cores. (1) An LSTM with hidden size $k + v$ . The hidden state is split to obtain the keys and values. (2) A bidirectional LSTM, i.e. two LSTMs both with hidden size $k + v$ , one operating in reverse. The keys and values are generated by concatenating the hidden states and mapping through a linear transformation. ",
1333
+ "bbox": [
1334
+ 174,
1335
+ 181,
1336
+ 825,
1337
+ 238
1338
+ ],
1339
+ "page_idx": 11
1340
+ },
1341
+ {
1342
+ "type": "text",
1343
+ "text": "The decoder LSTM has hidden size 2048. At each step, the output of the decoder is passed through a linear transformation to obtain (1) $h$ query vectors each of length $k$ , where $h$ is the number of attention heads, and (2) a logits vector of length 96 (the number of possible answer characters, plus a special ignored character). The query vectors are dot-producted with the keys to obtain a softmax weighting over the encoded question values (the standard attention mechanism, as done by e.g. Vaswani et al. (2017)). At every time step, the input to the decoder LSTM is the result of this attention mechanism (the soft-weighted values), concatenated with the 1-hot embedding of the current answer character. (The answer is right-shifted by 1, so that the LSTM does not get to see the character it is attempting to predict.) In addition we have 15 initial steps where no answer character is fed in to allow the LSTM to integrate information from the question, and the output predictions are ignored. The model is trained using a cross-entropy loss on the output logits for predicting the correct answer. ",
1344
+ "bbox": [
1345
+ 173,
1346
+ 244,
1347
+ 826,
1348
+ 398
1349
+ ],
1350
+ "page_idx": 11
1351
+ },
1352
+ {
1353
+ "type": "text",
1354
+ "text": "B AREAS OF MATHEMATICS ",
1355
+ "text_level": 1,
1356
+ "bbox": [
1357
+ 176,
1358
+ 419,
1359
+ 421,
1360
+ 434
1361
+ ],
1362
+ "page_idx": 11
1363
+ },
1364
+ {
1365
+ "type": "text",
1366
+ "text": "B.1 ALGEBRA ",
1367
+ "text_level": 1,
1368
+ "bbox": [
1369
+ 174,
1370
+ 449,
1371
+ 287,
1372
+ 463
1373
+ ],
1374
+ "page_idx": 11
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "Some of the algebra modules participate in module composition. ",
1379
+ "bbox": [
1380
+ 174,
1381
+ 474,
1382
+ 598,
1383
+ 491
1384
+ ],
1385
+ "page_idx": 11
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "• linear_1d Solve linear equations in one variable, e.g. solve $2 ( x - 1 0 ) + 3 = 1 7 x + 1 0$ for $x$ . \nlinear_2d Solve simultaneous linear equations in two variables. \n• polynomial_roots Find roots of polynomials or factorize them, e.g. factorize $2 x ^ { 2 } + 5 x + 3$ . \n• sequence_next_term Find continuations of a sequence given the first few terms. E.g. what comes next in the sequence 2, 6, 12, 20? \n• sequence_nth_term Find an expression for the nth term in a sequence, given the first few terms. ",
1390
+ "bbox": [
1391
+ 215,
1392
+ 501,
1393
+ 826,
1394
+ 633
1395
+ ],
1396
+ "page_idx": 11
1397
+ },
1398
+ {
1399
+ "type": "text",
1400
+ "text": "For extrapolation tests, we include: ",
1401
+ "bbox": [
1402
+ 174,
1403
+ 645,
1404
+ 405,
1405
+ 660
1406
+ ],
1407
+ "page_idx": 11
1408
+ },
1409
+ {
1410
+ "type": "text",
1411
+ "text": "• polynomial_roots_big Same as polynomial_roots, but with polynomials larger than those seen during training. ",
1412
+ "bbox": [
1413
+ 215,
1414
+ 672,
1415
+ 823,
1416
+ 700
1417
+ ],
1418
+ "page_idx": 11
1419
+ },
1420
+ {
1421
+ "type": "text",
1422
+ "text": "B.2 ARITHMETIC ",
1423
+ "text_level": 1,
1424
+ "bbox": [
1425
+ 174,
1426
+ 717,
1427
+ 308,
1428
+ 732
1429
+ ],
1430
+ "page_idx": 11
1431
+ },
1432
+ {
1433
+ "type": "text",
1434
+ "text": "Many of the arithmetic modules participate in module composition. ",
1435
+ "bbox": [
1436
+ 173,
1437
+ 743,
1438
+ 616,
1439
+ 758
1440
+ ],
1441
+ "page_idx": 11
1442
+ },
1443
+ {
1444
+ "type": "text",
1445
+ "text": "• add_or_sub Add or subtract a pair of integers or decimals. \n• add_or_sub_in_base Add or subtract a pair of integers given in a different base (between 2 and 16). \n• add_sub_multiple Add and subtract multiple integers. \n• div Divide one integer by another, with the answer a simplified fraction. \n• mixed Arithmetic involving addition, subtraction, multiplication, division, and brackets. \n• mul Multiply pair of integers or decimals. \n• mul_div_multiple Find simplest fraction of expression involving integers, multiplication, division, and brackets. ",
1446
+ "bbox": [
1447
+ 215,
1448
+ 770,
1449
+ 825,
1450
+ 924
1451
+ ],
1452
+ "page_idx": 11
1453
+ },
1454
+ {
1455
+ "type": "text",
1456
+ "text": "• nearest_integer_root Calculate the nearest integer to an nth root of another integer. • simplify_surd Simplify an expression involving square-roots, e.g. simplify √ $\\sqrt { 1 0 } \\times$ $- 9 ) ^ { - } / ( \\sqrt { 2 } \\times 1 2 ) \\times - 8$ . ",
1457
+ "bbox": [
1458
+ 214,
1459
+ 103,
1460
+ 823,
1461
+ 155
1462
+ ],
1463
+ "page_idx": 12
1464
+ },
1465
+ {
1466
+ "type": "text",
1467
+ "text": "For extrapolation tests, we include: ",
1468
+ "bbox": [
1469
+ 174,
1470
+ 167,
1471
+ 405,
1472
+ 183
1473
+ ],
1474
+ "page_idx": 12
1475
+ },
1476
+ {
1477
+ "type": "text",
1478
+ "text": "• add_or_sub_big Add or subtract a pair of integers bigger than seen during training. \n• add_sub_multiple Like add_sub_multiple but with more terms than seen during training. \n• div_big Divide one integer by another, with bigger integers than seen during training. \n• mixed_longer Like mixed but with more terms. \n• mul_big Multiply pair of integers bigger than seen during training. \n• mul_div_multiple_longer Like mul_div_multiple but with more terms. ",
1479
+ "bbox": [
1480
+ 215,
1481
+ 194,
1482
+ 820,
1483
+ 304
1484
+ ],
1485
+ "page_idx": 12
1486
+ },
1487
+ {
1488
+ "type": "text",
1489
+ "text": "B.3 CALCULUS ",
1490
+ "text_level": 1,
1491
+ "bbox": [
1492
+ 174,
1493
+ 319,
1494
+ 295,
1495
+ 334
1496
+ ],
1497
+ "page_idx": 12
1498
+ },
1499
+ {
1500
+ "type": "text",
1501
+ "text": "The differentiate module fully participates in module composition, accepting inputs from and passing outputs to other modules. ",
1502
+ "bbox": [
1503
+ 174,
1504
+ 345,
1505
+ 823,
1506
+ 375
1507
+ ],
1508
+ "page_idx": 12
1509
+ },
1510
+ {
1511
+ "type": "text",
1512
+ "text": "• differentiate First and higher order derivatives of multivariate polynomials, either specified directly or as a result of module composition. E.g. let $f ( x ) = 2 \\bar { * } x \\bar { + } 3$ , let $g ( x ) = x * * 2 - 1 7$ ; what is the derivative of $f ( g ( x ) ) \\smash { \\vdots }$ ",
1513
+ "bbox": [
1514
+ 215,
1515
+ 386,
1516
+ 825,
1517
+ 430
1518
+ ],
1519
+ "page_idx": 12
1520
+ },
1521
+ {
1522
+ "type": "text",
1523
+ "text": "B.4 COMPARISON ",
1524
+ "text_level": 1,
1525
+ "bbox": [
1526
+ 174,
1527
+ 445,
1528
+ 313,
1529
+ 460
1530
+ ],
1531
+ "page_idx": 12
1532
+ },
1533
+ {
1534
+ "type": "text",
1535
+ "text": "All comparison modules accept numbers from other modules as inputs. ",
1536
+ "bbox": [
1537
+ 173,
1538
+ 472,
1539
+ 640,
1540
+ 487
1541
+ ],
1542
+ "page_idx": 12
1543
+ },
1544
+ {
1545
+ "type": "text",
1546
+ "text": "• closest Finding the closest to a given number in a list. \n• kth_biggest Finding the $k$ th biggest or smallest number in a list. \n• pair Pairwise comparison between pairs of numbers. E.g. which is bigger: 4/37 or 7/65? • sort Sorting lists of numbers into ascending or descending order. ",
1547
+ "bbox": [
1548
+ 215,
1549
+ 498,
1550
+ 821,
1551
+ 570
1552
+ ],
1553
+ "page_idx": 12
1554
+ },
1555
+ {
1556
+ "type": "text",
1557
+ "text": "For extrapolation tests, we include: ",
1558
+ "bbox": [
1559
+ 173,
1560
+ 583,
1561
+ 405,
1562
+ 598
1563
+ ],
1564
+ "page_idx": 12
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "• closest_more Like closest but with larger lists than seen during training. \n• kth_biggest_more Like kth_biggest but with larger list. \n• sort_more Sorting longer lists of numbers than seen during training. ",
1569
+ "bbox": [
1570
+ 217,
1571
+ 609,
1572
+ 707,
1573
+ 662
1574
+ ],
1575
+ "page_idx": 12
1576
+ },
1577
+ {
1578
+ "type": "text",
1579
+ "text": "B.5 MEASUREMENT ",
1580
+ "text_level": 1,
1581
+ "bbox": [
1582
+ 174,
1583
+ 678,
1584
+ 328,
1585
+ 693
1586
+ ],
1587
+ "page_idx": 12
1588
+ },
1589
+ {
1590
+ "type": "text",
1591
+ "text": "• conversion Conversion between different units of length, time, mass, and volume. E.g. how many millilitres are there in $1 3 / 8$ of a litre? \n• time Working with clock times: time differences, and time before or after. E.g. how many minutes are there between 8:05 PM and 9:12 PM? ",
1592
+ "bbox": [
1593
+ 215,
1594
+ 704,
1595
+ 825,
1596
+ 766
1597
+ ],
1598
+ "page_idx": 12
1599
+ },
1600
+ {
1601
+ "type": "text",
1602
+ "text": "For extrapolation tests, we include: ",
1603
+ "bbox": [
1604
+ 174,
1605
+ 779,
1606
+ 405,
1607
+ 792
1608
+ ],
1609
+ "page_idx": 12
1610
+ },
1611
+ {
1612
+ "type": "text",
1613
+ "text": "• conversion With larger values than seen during training. ",
1614
+ "bbox": [
1615
+ 215,
1616
+ 805,
1617
+ 602,
1618
+ 820
1619
+ ],
1620
+ "page_idx": 12
1621
+ },
1622
+ {
1623
+ "type": "text",
1624
+ "text": "B.6 NUMBERS ",
1625
+ "text_level": 1,
1626
+ "bbox": [
1627
+ 174,
1628
+ 837,
1629
+ 289,
1630
+ 852
1631
+ ],
1632
+ "page_idx": 12
1633
+ },
1634
+ {
1635
+ "type": "text",
1636
+ "text": "All number modules accept numbers from other modules as inputs. ",
1637
+ "bbox": [
1638
+ 173,
1639
+ 863,
1640
+ 612,
1641
+ 878
1642
+ ],
1643
+ "page_idx": 12
1644
+ },
1645
+ {
1646
+ "type": "text",
1647
+ "text": "• base_conversion Conversion between bases (e.g. give 1011001 (base 2) in base 16). \n• div_remainder Calculate remainders under division. • gcd Calculating greatest common divisors. \n• is_factor Recognizing factors, e.g. is 15 a factor of 60? \n• is_prime Testing for primality. \n• lcm Calculating least common multiples. \n• list_prime_factors Factoring numbers into primes. E.g. give the prime factors of 64372. • place_value Give the place value of a number, e.g. what is the tens digit of 3585792? • round_number Rounding integers and decimals. E.g. give 432.1058 to three decimal places. ",
1648
+ "bbox": [
1649
+ 215,
1650
+ 890,
1651
+ 784,
1652
+ 924
1653
+ ],
1654
+ "page_idx": 12
1655
+ },
1656
+ {
1657
+ "type": "text",
1658
+ "text": "",
1659
+ "bbox": [
1660
+ 215,
1661
+ 103,
1662
+ 820,
1663
+ 265
1664
+ ],
1665
+ "page_idx": 13
1666
+ },
1667
+ {
1668
+ "type": "text",
1669
+ "text": "For extrapolation tests, we include: ",
1670
+ "bbox": [
1671
+ 174,
1672
+ 280,
1673
+ 405,
1674
+ 295
1675
+ ],
1676
+ "page_idx": 13
1677
+ },
1678
+ {
1679
+ "type": "text",
1680
+ "text": "• round_number_big Like round_number but with larger numbers than seen during training. \n• place_value_big Like place_value but with larger numbers than seen during training. ",
1681
+ "bbox": [
1682
+ 209,
1683
+ 309,
1684
+ 826,
1685
+ 348
1686
+ ],
1687
+ "page_idx": 13
1688
+ },
1689
+ {
1690
+ "type": "text",
1691
+ "text": "B.7 POLYNOMIALS ",
1692
+ "text_level": 1,
1693
+ "bbox": [
1694
+ 174,
1695
+ 367,
1696
+ 321,
1697
+ 382
1698
+ ],
1699
+ "page_idx": 13
1700
+ },
1701
+ {
1702
+ "type": "text",
1703
+ "text": "All function modules are fully compositional: they accept functions specified by other questions as inputs, and define functions for use in other modules. ",
1704
+ "bbox": [
1705
+ 174,
1706
+ 395,
1707
+ 825,
1708
+ 424
1709
+ ],
1710
+ "page_idx": 13
1711
+ },
1712
+ {
1713
+ "type": "text",
1714
+ "text": "• add Adding functions. E.g. calculating $2 f ( x ) + 1 7 g ( x )$ given $f$ and $g$ . \n• collect Simplify polynomial expressions by collecting terms. \n• compose Calculating the composition of functions. \n• coefficient_named E.g. rearrange $( x + 1 ) ( 2 x + 3 )$ to $a x ^ { 2 } + b x + c$ and give $b$ . \n• evaluate E.g. value of $x ^ { 2 } y ^ { 2 } + 2 x y$ when $x = 2 , y = 3$ . \n• expand Expand and simplify polynomials, e.g. expand $( x + 1 ) ( 2 x + 3 )$ . \n• simplify_power Simplify powers, testing rules of power indices. E.g. simplify $x ^ { 3 } / x ^ { 2 }$ . ",
1715
+ "bbox": [
1716
+ 215,
1717
+ 438,
1718
+ 797,
1719
+ 588
1720
+ ],
1721
+ "page_idx": 13
1722
+ },
1723
+ {
1724
+ "type": "text",
1725
+ "text": "B.8 PROBABILITY ",
1726
+ "text_level": 1,
1727
+ "bbox": [
1728
+ 174,
1729
+ 606,
1730
+ 313,
1731
+ 621
1732
+ ],
1733
+ "page_idx": 13
1734
+ },
1735
+ {
1736
+ "type": "text",
1737
+ "text": "There are two modules here, both based on sampling without replacement from a bag of repeated letters, specified using either: (1) counts (e.g. {a: 1, b: 7}), or (2) an unsorted list of letters that require counting, e.g. ecggccdcdceeeeg. ",
1738
+ "bbox": [
1739
+ 176,
1740
+ 633,
1741
+ 825,
1742
+ 676
1743
+ ],
1744
+ "page_idx": 13
1745
+ },
1746
+ {
1747
+ "type": "text",
1748
+ "text": "• swr_p_level_set Calculating probability of obtaining certain counts of different letters. \n• swr_p_sequence Calculating probability of obtaining a given sequence of letters. ",
1749
+ "bbox": [
1750
+ 210,
1751
+ 690,
1752
+ 807,
1753
+ 729
1754
+ ],
1755
+ "page_idx": 13
1756
+ },
1757
+ {
1758
+ "type": "text",
1759
+ "text": "For extrapolation tests, we include the same modules, but with more letters sampled from the bag than seen during training: ",
1760
+ "bbox": [
1761
+ 171,
1762
+ 743,
1763
+ 825,
1764
+ 772
1765
+ ],
1766
+ "page_idx": 13
1767
+ },
1768
+ {
1769
+ "type": "text",
1770
+ "text": "• swr_p_level_set_more_samples • swr_p_sequence_more_samples ",
1771
+ "bbox": [
1772
+ 215,
1773
+ 787,
1774
+ 455,
1775
+ 825
1776
+ ],
1777
+ "page_idx": 13
1778
+ },
1779
+ {
1780
+ "type": "text",
1781
+ "text": "C PER-MODULE PERFORMANCE ",
1782
+ "bbox": [
1783
+ 176,
1784
+ 848,
1785
+ 454,
1786
+ 864
1787
+ ],
1788
+ "page_idx": 13
1789
+ },
1790
+ {
1791
+ "type": "text",
1792
+ "text": "Interpolation test performance is shown in Figure 4 and extrapolation test performance is shown in Figure 5. Of the different encoders for the recurrent attention architecture, we show the per-module performance of the bidirectional LSTM encoder which has the greatest performance. ",
1793
+ "bbox": [
1794
+ 174,
1795
+ 881,
1796
+ 825,
1797
+ 924
1798
+ ],
1799
+ "page_idx": 13
1800
+ },
1801
+ {
1802
+ "type": "image",
1803
+ "img_path": "images/3fd7e21bb9a3f772ed9a7424d7977010983475c976c26537a2d09c5762117214.jpg",
1804
+ "image_caption": [
1805
+ "Figure 4: Interpolation test performance on the different modules. "
1806
+ ],
1807
+ "image_footnote": [],
1808
+ "bbox": [
1809
+ 214,
1810
+ 145,
1811
+ 761,
1812
+ 849
1813
+ ],
1814
+ "page_idx": 14
1815
+ },
1816
+ {
1817
+ "type": "image",
1818
+ "img_path": "images/285ec570401c1eed8ddf8c0e002cffa9488fc6fa3782ad35dc723eeb3680103f.jpg",
1819
+ "image_caption": [
1820
+ "Figure 5: Extrapolation test performance on the different modules. "
1821
+ ],
1822
+ "image_footnote": [],
1823
+ "bbox": [
1824
+ 179,
1825
+ 103,
1826
+ 808,
1827
+ 329
1828
+ ],
1829
+ "page_idx": 15
1830
+ },
1831
+ {
1832
+ "type": "text",
1833
+ "text": "D HIGH-SCHOOL MATHEMATICS QUESTIONS ",
1834
+ "text_level": 1,
1835
+ "bbox": [
1836
+ 173,
1837
+ 382,
1838
+ 560,
1839
+ 398
1840
+ ],
1841
+ "page_idx": 15
1842
+ },
1843
+ {
1844
+ "type": "text",
1845
+ "text": "1. Factorise $x ^ { 2 } + 7 x$ 2. Factorise $y ^ { 2 } - 1 0 y + 1 6$ 3. Factorise $2 t ^ { 2 } + 5 t + 2$ 4. Simplify ${ \\frac { ( x + 1 ) } { 2 } } + { \\frac { ( x + 3 ) } { 3 } }$ 5. Solve $2 x ^ { 2 } + 9 x + 7$ 6. Solve $\\begin{array} { r } { \\frac { 2 } { y ^ { 2 } } + \\frac { 9 } { y } - 7 = 0 } \\end{array}$ 7. Expand $3 ( x + 4 ) + 2 ( 5 x - 1 )$ 8. Expand $( 2 x + 1 ) ( x - 4 )$ 9. Factor $6 y ^ { 2 } - 9 x y$ \n10. Solve $3 p - 7 > 1 1$ \n11. $A = 4 b c , A = 1 0 0 , b = 2 .$ calculate $c$ \n12. Make $k$ the subject of $m = \\sqrt { ( \\frac { k + 1 } { 4 } ) }$ \n13. Expand $( p + 9 ) ( p - 4 )$ \n14. Solve $\\frac { ( 5 w - 8 ) } { 3 } = 4 w + 2$ \n15. Factorise $x ^ { 2 } - 4 9$ \n16. Expand $( x - 7 ) ( x + 1 )$ \n17. Simplify $\\sqrt { 9 x ^ { 8 } y ^ { 3 } }$ assuming $\\mathbf { X }$ is positive. \n18. $\\begin{array} { r } { p ^ { 2 } = \\frac { ( x - y ) } { x y } } \\end{array}$ , $x = 8 . 5$ , $y = 4$ , find p \n19. Make $t$ the subject of $2 ( d - t ) = 4 t + 7$ \n20. Solve $3 x ^ { 2 } - 4 x - 2 = 0$ \n21. Expand $3 ( 2 y - 5 )$ \n22. Factorise $8 x ^ { 2 } + 4 x y$ \n23. Make $h$ the subject of $\\begin{array} { r } { t = \\frac { g h } { 1 0 } } \\end{array}$ \n24. Simplify $( m ^ { - 2 } ) ^ { ! }$ 5 \n25. Factorise $x ^ { 2 } + 3 x - 1 0$ \n26. Solve $5 x + 2 y = 1 1$ and $4 x - 3 y = 1 8$ for ",
1846
+ "bbox": [
1847
+ 202,
1848
+ 404,
1849
+ 519,
1850
+ 930
1851
+ ],
1852
+ "page_idx": 15
1853
+ },
1854
+ {
1855
+ "type": "text",
1856
+ "text": "27. Simplify $\\frac { ( x ^ { 2 } + 3 x - 4 ) } { ( 2 x ^ { 2 } - 5 x + 3 ) }$ \n28. Simplify $\\textstyle { \\frac { 4 } { ( x + 2 ) } } + { \\frac { 3 } { ( x - 2 ) } }$ \n29. Expand $4 ( 3 x + 5 )$ \n30. Expand $2 ( x - 4 ) + 3 ( x + 5 )$ \n31. Expand $( x + 4 ) ( x + 6 )$ \n32. Simplify $\\textstyle { \\frac { m ^ { 5 } } { m ^ { 3 } } }$ \n33. Simplify $( 5 x ^ { 4 } y ^ { 3 } ) ( x ^ { 2 } y )$ \n34. Solve $3 x + 2 y = 4$ and $4 x + 5 y = 1 7$ for $\\mathbf { X }$ \n35. Complete the sequence: 3, 9, 15, 21, 27 \n36. Simplify $5 x + 4 y + x - 7 y$ \n37. Complete the sequence: 3, 10, 17, 24 \n38. Simplify $x ^ { 1 0 } x ^ { 3 }$ \n39. Solve $7 * ( x + 2 ) = 7$ \n40. Factorise $x ^ { 2 } - 1 2 x + 2 7$ ",
1857
+ "bbox": [
1858
+ 202,
1859
+ 99,
1860
+ 522,
1861
+ 378
1862
+ ],
1863
+ "page_idx": 16
1864
+ }
1865
+ ]
parse/train/H1gR5iR5FX/H1gR5iR5FX_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/H1gR5iR5FX/H1gR5iR5FX_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1emOTNKvS/S1emOTNKvS.md ADDED
@@ -0,0 +1,431 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ROBUST GRAPH REPRESENTATION LEARNING VIA NEURAL SPARSIFICATION
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Graph representation learning serves as the core of many important prediction tasks, ranging from product recommendation in online marketing to fraud detection in financial domain. Real-life graphs are usually large with complex local neighborhood, where each node is described by a rich set of features and easily connects to dozens or even hundreds of neighbors. Most existing graph learning techniques rely on neighborhood aggregation, however, the complexity on reallife graphs is usually high, posing non-trivial overfitting risk during model training. In this paper, we present Neural Sparsification (NeuralSparse), a supervised graph sparsification technique that mitigates the overfitting risk by reducing the complexity of input graphs. Our method takes both structural and non-structural information as input, utilizes deep neural networks to parameterize the sparsification process, and optimizes the parameters by feedback signals from downstream tasks. Under the NeuralSparse framework, supervised graph sparsification could seamlessly connect with existing graph neural networks for more robust performance on testing data. Experimental results on both benchmark and private datasets show that, NeuralSparse can effectively improve testing accuracy and bring up to $7 . 4 \%$ improvement when working with existing graph neural networks on node classification tasks.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Representation learning has been in the center of many machine learning tasks on graphs, such as name disambiguation in citation networks (Zhang et al., 2018c), spam detection in social networks (Akoglu et al., 2015), recommendations in online marketing (Ying et al., 2018a), and many others (Hamilton et al., 2017; Li et al., 2018). As a class of models that can simultaneously utilize non-structural (e.g., node and edge features) and structural information in graphs, Graph Neural Networks (GNNs) (Kipf & Welling, 2017; Hamilton et al., 2017; Li et al., 2016) construct effective representations for downstream tasks by iteratively aggregating neighborhood information (Kipf & Welling, 2017; Hamilton et al., 2017). Such methods have demonstrated state-of-the-art performance in classification and prediction tasks on graph data (Velickovi ˇ c et al., 2018; Chen et al., 2018; ´ Xu et al., 2019; Velickovi ˇ c et al., 2019). ´
12
+
13
+ Meanwhile, graphs from real-life applications are usually large with complex local neighborhood, where each node has rich features and dozens or even hundreds of neighbors. As shown in Figure 1(a), this subgraph from Transaction dataset (detailed in Section 5.1) consists of 38 nodes (i.e., promising organizations and other organizations) with average node degree 15 and node feature dimension 120. The GNNs are expected to grasp useful patterns from neighboring nodes; however, as representative patterns are diluted by overwhelming information in local neighborhood, graph learning algorithms could be misled by neighborhood aggregation. Such complexity in input graphs poses non-trivial overfitting risk to existing GNN based learning techniques.
14
+
15
+ While it is straightforward yet expensive (sometimes even impractical) to address this overfitting problem by increasing the number of labeled samples, we investigate a cheaper alternative of reducing input graph complexity by graph sparsification in this work. Graph sparsification (Liu et al., 2018; Zhang & Patone, 2017) aims to find smaller subgraphs from input large graphs that best preserve desired properties. Existing sparsification methods could lead to suboptimal performance for downstream prediction tasks: (1) these methods are unsupervised such that the resulting sparsified graphs may not favor downstream tasks; and (2) they only consider structural information for sparsification decision, while non-structural information in graphs, such as node/edge features, could have non-trivial impact to the quality of sparsification. Recently, there have been GNN models attempting to sample subgraphs from predefined distributions (Leskovec & Faloutsos, 2006; Adhikari et al., 2018; Hamilton et al., 2017; Chen et al., 2018). As the predefined distributions could be irrelevant to subsequent tasks, the sparsified graphs may miss important information for downstream tasks, leading to suboptimal prediction performance.
16
+
17
+ ![](images/a43cf4a2a96344ec1e8fc7e7c88b613b2ff17335b46d3936823be8fdec0a8151.jpg)
18
+ Figure 1: A subgraph of 38 organizations from Transaction dataset: (a) The original subgraph sampled from the Transaction dataset, where nodes and edges represent organizations and their transactions, respectively; (b) The sparsified subgraph by NeuralSparse; (c) Testing AUC on identifying promising organizations.
19
+
20
+ Present work. We propose Neural Sparsification (NeuralSparse), a general framework that simultaneously learns graph sparsification and graph representation by feedback signals from downstream tasks. The NeuralSparse consists of two major components: sparsification network and GNN. For the sparsification network, we utilize a deep neural network to parameterize the sparsification process: how to select edges from one-hop neighborhood given a fixed budget. In the training phase, the network learns to optimize a sparsification strategy that favors downstream tasks. In the testing phase, the network sparsifies input graphs following the learned strategy, instead of sampling subgraphs from a predefined distribution. Unlike conventional sparsification techniques, our technique takes both structural and non-structural information as input and optimizes the sparsification strategy by feedback from downstream tasks, instead of using (possibly irrelevant) heuristics. For the GNN component, the NeuralSparse feeds the sparsified graphs to a GNN and learns a graph representation for subsequent prediction tasks.
21
+
22
+ Under the framework of NeuralSparse, we are able to leverage the standard stochastic gradient descent and backpropagation techniques to simultaneously optimize graph sparsification and representation. As shown in Figure 1(b), the graph sparsified by the NeuralSparse has lower complexity with average node degree around 5. As a result (illustrated in Figure 1(c)), the testing classification accuracy on the sparsified graph is improved by $15 \%$ , compared with its counterpart in the original input graph, while conventional techniques could not offer competitive sparsification for the classification task.
23
+
24
+ Experimental results on both public and private datasets show that the NeuralSparse is able to consistently provide improved performance for existing GNNs on node classification tasks, bringing up to $7 \%$ improvement.
25
+
26
+ # 2 RELATED WORK
27
+
28
+ Our work is related to two lines of research: graph sparsification and graph representation learning.
29
+
30
+ Graph sparsification. The goal of graph sparsification is to find small subgraphs from input large graphs that best preserve desired properties. Existing techniques are mainly unsupervised and deal with simple graphs without node/edge features for preserving predefined graph metrics (Hubler ¨ et al., 2008), information propagation traces (Mathioudakis et al., 2011), graph spectrum (Calandriello et al., 2018; Chakeri et al., 2016; Adhikari et al., 2018), node degree distribution (Eden et al.,
31
+
32
+ ![](images/c63dd1a64bdebd2d5ba7cb87d0882072aa533e69b171d8077663067594ddf877.jpg)
33
+ Figure 2: The overview of NeuralSparse
34
+
35
+ 2018; Voudigari et al., 2016), node distance distribution (Leskovec & Faloutsos, 2006), or clustering coefficient (Maiya & Berger-Wolf, 2010). Importance based edge sampling has also been studied in a scenario where we could predefine edge importance (Zhao, 2015; Chen et al., 2018).
36
+
37
+ Unlike existing methods that mainly work with simple graphs without node/edge features in an unsupervised manner, our method takes node/edge features as parts of input and optimizes graph sparsification by supervision signals from errors made in downstream tasks.
38
+
39
+ Graph representation learning. Graph neural networks (GNNs) are the most popular techniques that enable vector representation learning for large graphs with complex node/edge features. All existing GNNs share a common spirit: extracting local structural features by neighborhood aggregation. Scarselli et al. (2009) explore how to extract multi-hop features by iterative neighborhood aggregation. Inspired by the success of convolutional neural networks, multiple studies (Defferrard et al., 2016; Bruna et al., 2014) investigate how to learn convolutional filters in the graph spectral domain under transductive settings (Zhang et al., 2018b; Zhuang & Ma, 2018). To enable inductive learning, convolutional filters in the graph domain are proposed (Simonovsky & Komodakis, 2017; Niepert et al., 2016; Kipf & Welling, 2017; Velickovi ˇ c et al., 2018; Xu et al., 2018), and a few stud- ´ ies (Hamilton et al., 2017; Lee et al., 2018) explore how to differentiate neighborhood filtering by sequential models. In addition, multiple recent works (Ying et al., 2018b; Xu et al., 2019; Abu-ElHaija et al., 2019) investigate the expressive power of GNNs. Recently, (Franceschi et al., 2019) study how to sample high-quality subgraphs from a space of all possible graphs of a complete graph so that the sampled graphs enhance the prediction power in downstream learning tasks. In particular, the proposed method only focus on transductive tasks.
40
+
41
+ Our work contributes from a unique angle: by reducing the noise from input graphs, our technique can further boost testing performance of existing GNNs.
42
+
43
+ # 3 PROPOSED METHOD: NEURALSPARSE
44
+
45
+ In this section, we introduce the core idea of our method. We start with the notations that are frequently used in this paper. We then describe the theoretical justification behind NeuralSparse and our architecture to tackle the supervised node classification problem.
46
+
47
+ Notations. In this paper, we represent an input graph of $n$ nodes as $G = ( V , E , \pmb { \Delta } )$ : (1) $V \in \mathbb { R } ^ { n \times d _ { n } }$ includes node features with dimensionality $d _ { n }$ ; (2) $E \in \mathbb { R } ^ { n \times n }$ is a binary matrix where $E ( u , v ) = 1$ if there is an edge between node $u$ and node $v$ ; (3) $\pmb { \mathsf { A } } \in \mathbb { R } ^ { n \times n \times d _ { e } }$ encodes input edge features of dimensionality $d _ { e }$ . In addition, we use $Y$ to denote the prediction target in downstream tasks (e.g., $Y \in \mathbb { R } ^ { n \times d _ { l } }$ if we are dealing with a node classification problem with $d _ { l }$ classes).
48
+
49
+ Theoretical justification. From the perspective of statistical learning, the key of a defined prediction task is to learn $P ( Y \mid G )$ , where $Y$ is the prediction target and $G$ is an input graph. Instead of directly working with original graphs, we would like to leverage sparsified subgraphs to mitigate overfitting risks. In other words, we are interested in the following variant,
50
+
51
+ $$
52
+ P ( Y \mid G ) \approx \sum _ { g \in \mathbb { S } _ { G } } P ( Y \mid g ) P ( g \mid G ) ,
53
+ $$
54
+
55
+ where $g$ is a sparsified subgraph, and $\mathbb { S } _ { G }$ is a class of sparsified subgraphs of $G$
56
+
57
+ In general, because of the combinatorial complexity in graphs, it is intractable to enumerate all possible $g$ as well as estimate the exact values of $P ( \boldsymbol { Y } \mid g )$ and $P ( g \mid G )$ . Therefore, we approximate the distributions by tractable functions,
58
+
59
+ $$
60
+ \sum _ { g \in \mathbb { S } _ { G } } P ( Y \mid g ) P ( g \mid G ) \approx \sum _ { g \in \mathbb { S } _ { G } } Q _ { \theta } ( Y \mid g ) Q _ { \phi } ( g \mid G )
61
+ $$
62
+
63
+ where $Q _ { \theta }$ and $Q _ { \phi }$ are approximation functions for $P ( \boldsymbol { Y } \mid g )$ and $P ( g \mid G )$ parameterized by $\theta$ and $\phi$ , respectively.
64
+
65
+ Moreover, to make the above graph sparsification process differentiable, we employ reparameterization tricks (Jang et al., 2017) to make $Q _ { \phi } ( g \mid G )$ directly generate differentiable samples, such that
66
+
67
+ $$
68
+ \sum _ { g \in \mathbb { S } _ { G } } Q _ { \theta } ( Y \mid g ) Q _ { \phi } ( g \mid G ) \propto \sum _ { g ^ { \prime } \sim Q _ { \phi } ( g \mid G ) } Q _ { \theta } ( Y \mid g ^ { \prime } )
69
+ $$
70
+
71
+ where $g ^ { \prime } \sim Q _ { \phi } ( g \mid G )$ means $g ^ { \prime }$ is a random sample drawn from $Q _ { \phi } ( g \mid G )$ .
72
+
73
+ To this end, the key is how to find appropriate approximation functions $Q _ { \phi } ( g \mid G )$ and $Q _ { \theta } ( Y \mid g )$
74
+
75
+ Architecture. In this paper, we propose Neural Sparsification (NeuralSparse) to implement the theoretical framework discussed in Equation 3. As shown in Figure 2, NeuralSparse consists of two major components: sparsification network and GNNs.
76
+
77
+ • The sparsification network is a multi-layer neural network that implements $Q _ { \phi } ( g \mid G )$ : Taking $G$ as input, it generates a random sparsified subgraph of $G$ drawn from a learned distribution. • GNNs implement $Q _ { \theta } ( Y \mid g )$ that takes a sparsified subgraph as input, extracts node representations, and makes predictions for downstream tasks.
78
+
79
+ # Algorithm 1 Training algorithm for NeuralSparse
80
+
81
+ <table><tr><td colspan="3">lnput:graphG=(V,E,A),integerl,andtraininglabelsY.</td></tr><tr><td></td><td>while stop criterion is not met do Generate sparsified subgraphs {g1, g2,·., gt} by sparsification network (Section 4);</td><td></td><td></td></tr><tr><td>2: 3:</td><td>Produce prediction {Y1,Y2,··,Y𝑖} by feeding {g1, g2,·. , gt} into GNNs;</td><td></td><td></td></tr><tr><td>4:</td><td>Calculate loss function J;</td><td></td><td></td></tr><tr><td>5:</td><td></td><td></td><td></td></tr><tr><td>6: end while</td><td>Update and θ by descending J</td><td></td><td></td></tr></table>
82
+
83
+ As the sparsified subgraph samples are differentiable, the two components can be jointly trained using gradient descent based backpropagation techniques from a supervised loss function, as illustrated in Algorithm 1. While the GNNs have been widely investigated in recent works (Kipf & Welling, 2017; Hamilton et al., 2017; Velickovi ˇ c et al., 2018), we focus on the practical implementation for ´ sparsification network in the remaining of this paper.
84
+
85
+ # 4 SPARSIFICATION NETWORK
86
+
87
+ Following the theory discussed above, the goal of sparsification network is to generate sparsified subgraphs for input graphs, serving as the approximation function $Q _ { \phi } ( g \mid G )$ . Therefore, we need to answer the following three questions in sparsification network. i). What is $\mathbb { S } _ { G }$ in Equation 1, the class of subgraphs we focus on? ii). How to sample sparsified subgraphs? iii). How to make sparsified subgraph sampling process differentiable for the end-to-end training? In the following, we address the questions one by one.
88
+
89
+ $k$ -neighbor subgraphs. We focus on $k$ -neighbor subgraphs for $\mathbb { S } _ { G }$ (Sadhanala et al., 2016): Given an input graph, a $k$ -neighbor subgraph shares the same set of nodes with the input graph, and each node in the subgraph can select no more than $k$ edges from its one-hop neighborhood. Although the concept of sparsification network is not limited to a specific class of subgraphs, we choose $k$ - neighbor subgraphs for the following reasons.
90
+
91
+ • We are able to adjust the estimation on the amount of task-relevant graph data by tuning the hyper-parameter $k$ . Intuitively, when $k$ is an under-estimate, the amount of task-relevant graph data accessed by GNNs could be inadequate, leading to inferior performance. When $k$ is an overestimate, the downstream GNNs may overfit the introduced noise or irrelevant graph data, resulting in sub-optimal performance. It could be difficult to set a golden hyper-parameter that works all time, but one has the freedom to choose the $k$ that is the best fit for a specific task. • $k$ -neighbor subgraphs are friendly to parallel computation. As each node selects its edges independently from its neighborhood, we can utilize tensor operations in existing deep learning frameworks, such as tensorflow (Abadi et al., 2016), to speed up the sparsification process.
92
+
93
+ Sampling $k$ -neighbor subgraphs. Given $k$ and an input graph $G = ( V , E , \mathbf { A } )$ , we obtain a $k$ - neighbor subgraph by repeatedly sampling edges for each node in the original graph. Without loss of generality, we sketch this sampling process by focusing on a specific node $u$ in graph $G$ . Let $\mathbb { N } _ { u }$ be the set of one-hop neighbors of node $u$ .
94
+
95
+ 1. $v \sim f _ { \phi } ( V ( u ) , V ( \mathbb { N } _ { u } ) , \pmb { \mathsf { A } } ( u ) )$ , where $f _ { \phi } ( \cdot )$ is a function that generates a one-hop neighbor $v$ from the learned distribution based on node $u$ ’s attributes, node attributes of $u$ ’s neighbors $V ( \mathbb { N } _ { u } )$ , and their edge attributes $\pmb { \mathsf { A } } ( u )$ . In particular, the learned distribution is encoded by parameters $\phi$ .
96
+ 2. Edge $E ( u , v )$ is selected for node $u$ .
97
+ 3. The above two steps are repeated $k$ times.
98
+
99
+ Note that the above process performs sampling without replacement. Given a node $u$ , each of its adjacent edges is selected at most once. Moreover, the sampling function $f _ { \phi } ( \cdot )$ is shared among nodes; therefore, the number of parameters $\phi$ is independent of the input graph size.
100
+
101
+ Making samples differentiable. While conventional methods are able to generate discrete samples (Sadhanala et al., 2016), these samples are not differentiable such that it is difficult to utilize them to optimize sample generation. To make samples differentiable, we propose a Gumbel-Softmax based multi-layer neural network to implement the sampling function $f _ { \phi } ( \cdot )$ discussed in above.
102
+
103
+ To make the discussion self-contained, we briefly discuss the idea of Gumbel-Softmax. GumbelSoftmax is a reparameterization trick used to generate differentiable discrete samples (Jang et al., 2017; Maddison et al., 2017). Under appropriate hyper-parameter settings, Gumbel-Softmax is able to generate continuous vectors that are as “sharp” as one-hot vectors widely used to encode discrete data.
104
+
105
+ Without loss of generality, we focus on a specific node $u$ in a graph $G = ( V , E , \pmb { \Delta } )$ . Let $\mathbb { N } _ { u }$ be the set of one-hop neighbors of node $u$ . We implement $f _ { \phi } ( \cdot )$ as follows.
106
+
107
+ 1. $\forall v \in \mathbb { N } _ { u }$
108
+
109
+ $$
110
+ z _ { u , v } = \mathbf { M } \mathbf { L } \mathbf { P } _ { \phi } ( V ( u ) , V ( v ) , \mathbf { A } ( u , v ) ) ,
111
+ $$
112
+
113
+ where ${ \mathrm { M L P } } _ { \phi }$ is a multi-layer neural network with parameters $\phi$ .
114
+
115
+ 2. $\forall v \in \mathbb { N } _ { u }$ , we employ a softmax function to compute the probability to sample the edge,
116
+
117
+ $$
118
+ \pi _ { u , v } = \frac { \exp ( z _ { u , v } ) } { \sum _ { w \in \mathbb { N } _ { u } } \exp ( z _ { u , w } ) }
119
+ $$
120
+
121
+ 3. Using Gumbel-Softmax, we generate differentiable samples
122
+
123
+ $$
124
+ x _ { u , v } = \frac { \exp ( ( \log ( \pi _ { u , v } ) + \epsilon _ { v } ) / \tau ) } { \sum _ { w \in \mathbb { N } _ { u } } \exp ( ( \log ( \pi _ { u , w } ) + \epsilon _ { w } ) / \tau ) }
125
+ $$
126
+
127
+ where $x _ { u , v }$ is a scalar, $\epsilon _ { v } = - \log ( - \log ( s ) )$ with $s$ randomly drawn from Uniform $( 0 , 1 )$ , and $\tau$ is a hyper-parameter called temperature which controls the interpolation between discrete distribution and continuous categorical densities.
128
+
129
+ Note that when we sample $k$ edges, the computation for $z _ { u , v }$ and $\pi _ { u , v }$ only needs to be performed once. For the hyper-parameter $\tau$ , we discuss how to tune it as follows.
130
+
131
+ Discussion on temperature tuning. The behavior of Gumbel-Softmax is governed by a hyperparameter $\tau$ called temperature. In general, when $\tau$ is small, the Gumbel-Softmax distribution resembles the discrete distribution, which induces strong sparsity; however, small $\tau$ also introduces high variance gradient that blocks effective backpropagation. A high value of $\tau$ cannot produce expected sparsification effect. Following the practice in (Jang et al., 2017), we adopt the strategy by starting the training with a high temperature and anneal to a small value with a guided schedule.
132
+
133
+ Sparsification algorithm and its complexity. As shown in Algorithm 2, given hyper-parameter $k$ , the sparsification network visits each node’s one-hop neighbors $k$ times. Let $m$ be the total number of edges in the graph. The complexity of sampling subgraphs by the sparsification network is $O ( k m )$ . When $k$ is small in practice, the overall complexity is $O ( m )$ .
134
+
135
+ # Algorithm 2 Sampling subgraphs by sparsification network
136
+
137
+ Input: graph $G = ( V , E , \pmb { \Delta } )$ and integer $k$ .
138
+ 1: Edge set $\mathbb { H } = \boldsymbol { \emptyset }$
139
+ 2: for $u \in \mathbb { V }$ do
140
+ 3: for $v \in \mathbb { N } _ { u }$ do
141
+ 4: $z _ { u , v } \gets \mathrm { M L P } _ { \phi } ( V ( u ) , V ( v ) , \mathbf { A } ( u , v ) )$
142
+ 5: end for
143
+ 6: for $v \in \mathbb { N } _ { u }$ do
144
+ 7: $\pi _ { u , v } \exp ( z _ { u , v } ) / { \sum _ { w \in \mathbb { N } _ { u } } \exp ( z _ { u , w } ) }$
145
+ 8: end for
146
+ 9: for $j = 1 , \cdots , k$ do
147
+ 10: for $v \in \mathbb { N } _ { u }$ do
148
+ 11: $\begin{array} { r } { x _ { u , v } \overset { \sim } { } \exp ( ( \log ( \pi _ { u , v } ) + \epsilon _ { v } ) / \tau ) / { \sum _ { w \in \mathbb { N } _ { u } } \exp ( ( \log ( \pi _ { u , w } ) + \epsilon _ { w } ) / \tau ) } } \end{array}$
149
+ 12: end for
150
+ 13: Add the edge represented by vector $[ x _ { u , v } ]$ into $\mathbb { H }$
151
+ 14: end for
152
+ 15: end for
153
+
154
+ Comparison with multiple related methods. Unlike GraphSAGE (Hamilton et al., 2017), FastGCN (Chen et al., 2018), and AS-GCN (Huang et al., 2018) that incorporate layer-wise node samplers to reduce the complexity of GNNs, NeuralSparse samples subgraphs before applying GNNs. As for the computation complexity, the sparsification in NeuralSparse is more friendly to parallel computation than the layer-conditioned approach in AS-GCN. Compared with GAT (Velickovi ˇ c´ et al., 2018; Zhang et al., 2018a), the NeuralSparse can produce sparser neighborhood, which effectively mitigates overfitting risks. Unlike LDS (Franceschi et al., 2019), NeuralSparse learns inductive graph sparsification, and its graph sampling is constrained by input graph topology.
155
+
156
+ # 5 EXPERIMENTAL STUDY
157
+
158
+ In this section, we evaluate our proposed NeuralSparse on node classification task, including inductive and transductive settings. We demonstrate that NeuralSparse achieves superior classification performance over state-of-the-art GNN models. Moreover, we provide a case study to demonstrate how sparsified subgraphs generated by NeuralSparse could improve classification. The supplementary material contains more detailed experimental information.
159
+
160
+ # 5.1 DATASETS
161
+
162
+ We employ five datasets from various domains and conduct node classification task following the settings as described in Hamilton et al. (2017); Kipf & Welling (2017). The dataset statistics are summarized in Table 1.
163
+
164
+ Inductive datasets. We utilize the Reddit and PPI datasets and follow the same setting in Hamilton et al. (2017). The Reddit dataset contains post-to-post graph with word vectors as node features. The node labels represent which community Reddit posts belong to. The protein-protein interaction (PPI) dataset contains graphs corresponding to different human tissues. The node features are positional gene sets, motif gene sets and immunological signatures. The nodes are multi-labeled by gene ontology. The graph in the Transaction dataset contains real transactions between organizations in two years, with the first year for training and the second year for validation/testing. Each node represents an organization and each edge indicates a transaction between two organizations. Node attributes are side information about the organizations such as account balance, cash reserve, etc. On this dataset, we aim to classify organizations into two categories: promising or others for investment in near future. The class distribution in the Transaction dataset is highly imbalanced. During the training under inductive setting, algorithms have only access to training nodes’ attributes and edges. In the PPI and Transaction datasets, the models have to generalize to completely unseen graphs.
165
+
166
+ Table 1: Dataset statistics
167
+
168
+ <table><tr><td></td><td>Reddit</td><td>PPI</td><td>Transaction</td><td>Cora</td><td>Citeseer</td></tr><tr><td>Task</td><td>Inductive</td><td>Inductive</td><td>Inductive</td><td>Transductive</td><td>Transductive</td></tr><tr><td>Nodes</td><td>232,965</td><td>56,944</td><td>95,544</td><td>2,708</td><td>3,327</td></tr><tr><td>Edges</td><td>11,606,919</td><td>818,716</td><td>963,468</td><td>5,429</td><td>4,732</td></tr><tr><td>Features</td><td>602</td><td>50</td><td>120</td><td>1,433</td><td>3,703</td></tr><tr><td>Classes</td><td>41</td><td>121</td><td>2</td><td>7</td><td>6</td></tr><tr><td>Training Nodes</td><td>152,410</td><td>44,906</td><td>47,772</td><td>140</td><td>120</td></tr><tr><td>Validation Nodes</td><td>23,699</td><td>6,514</td><td>9,554</td><td>500</td><td>500</td></tr><tr><td>Testing Nodes</td><td>55,334</td><td>5,524</td><td>38,218</td><td>1,000</td><td>1,000</td></tr></table>
169
+
170
+ Transductive datasets. We use two citation benchmark datasets with transductive experimental setting in Yang et al. (2016); Kipf & Welling (2017). The citation graphs contain nodes corresponding to documents and edges as citations. Node features are the sparse bag-of-words representations of documents and node labels indicate the topic class of the documents. In transductive learning, the training methods have access to all node features and edges, with a limited subset of node labels.
171
+
172
+ # 5.2 EXPERIMENTAL SETUP
173
+
174
+ Baseline models. We incorporate four state-of-the-art methods as the base GNN components, including GCN (Kipf & Welling, 2017), GraphSAGE (Hamilton et al., 2017), GAT (Velickovi ˇ c et al., ´ 2018), and GIN (Xu et al., 2019). We evaluate our proposed NeuralSparse with sparsification network and each of the four GNNs. Besides, we also implement variants of NeuralSparse by replacing the sparsification network with either the spectral sparsifier (SS, Sadhanala et al., 2016) or the Rank Degree (RD, Voudigari et al., 2016) method.
175
+
176
+ Temperature tuning. We anneal the temperature with the schedule $\tau = \operatorname* { m a x } ( 0 . 0 5 , \exp ( - r p ) )$ , where $p$ is the training epoch and $r ~ \in ~ 1 0 ^ { \{ - 5 , - 4 , - 3 , - 2 , - 1 \} }$ . $\tau$ is updated every $N$ steps and $N \in \{ 5 0 , 1 0 0 , . . . , 5 0 0 \}$ . Compared with MNIST VAE model in Jang et al. (2017), smaller hyperparameter $\tau$ fits NeuralSparse better in practice.
177
+
178
+ Metrics. We evaluate the performance on the transductive datasets with accuracy (Kipf & Welling, 2017). For inductive tasks on the Reddit and PPI datasets, we report micro-averaged F1 scores (Hamilton et al., 2017). Due to the highly imbalanced classes in the Transaction dataset, models are evaluated with AUC value (Huang & Ling, 2005). The results show the average of 10 runs.
179
+
180
+ # 5.3 CLASSIFICATION PERFORMANCE
181
+
182
+ Table 2 summarizes classification performance of NeuralSparse and the baseline methods on all datasets. For Reddit, PPI, Transaction, Cora and Citeseer, the hyper-parameter $k$ is set as 30, 15, 10, 5, and 3 respectively. The hyper-parameter $l$ is set as 1 in this experiment. Note that the result of GAT on Reddit is missing due to the out-of-memory error.
183
+
184
+ Overall, NeuralSparse is able to help GNN techniques achieve competitive generalization performance with sparsified graph data. We make the following observations. (1) Compared with basic GNN models, NeuralSparse can enhance the generalization performance on node classification tasks by utilizing the sparsified subgraphs from sparsification network, especially in the inductive setting. Indeed, large neighborhood size in the original graphs could bring increased chance of introducing noise into the convolutional operations, leading to sub-optimal performance. (2) With different GNN models, the NeuralSparse can consistently achieve comparable or superior performance, which demonstrates NeuralSparse is general and can be applied to multiple classification models.
185
+
186
+ Table 2: Node classification performance
187
+
188
+ <table><tr><td rowspan="2">Sparsifier</td><td rowspan="2">Method</td><td>Reddit</td><td>PPI</td><td>Transaction</td><td>Cora</td><td>Citeseer</td></tr><tr><td>Micro-F1</td><td>Micro-F1</td><td>AUC</td><td>Accuracy</td><td>Accuracy</td></tr><tr><td rowspan="4">N/A</td><td>GCN</td><td>0.922 ± 0.041</td><td>0.532 ± 0.024</td><td>0.564 ± 0.018</td><td>0.810 ± 0.027</td><td>0.694 ± 0.020</td></tr><tr><td>GraphSAGE</td><td>0.938 ± 0.029</td><td>0.600 ± 0.027</td><td>0.574 ± 0.029</td><td>0.825 ± 0.033</td><td>0.710 ± 0.020</td></tr><tr><td>GAT</td><td></td><td>0.917 ± 0.030</td><td>0.616 ± 0.022</td><td>0.821 ± 0.043</td><td>0.721 ± 0.037</td></tr><tr><td>GIN</td><td>0.928 ± 0.022</td><td>0.703 ± 0.028</td><td>0.607 ± 0.031</td><td>0.816 ± 0.020</td><td>0.709 ± 0.037</td></tr><tr><td rowspan="4">sS/ RD*</td><td>GCN</td><td>0.912 ± 0.022</td><td>0.521 ± 0.024</td><td>0.562 ± 0.035</td><td>0.780 ± 0.045</td><td>0.684 ± 0.033</td></tr><tr><td>GraphSAGE</td><td>0.907 ± 0.018</td><td>0.576 ± 0.022</td><td>0.565 ± 0.042</td><td>0.806 ± 0.032</td><td>0.701 ± 0.027</td></tr><tr><td>GAT</td><td></td><td>0.889 ± 0.034</td><td>0.614 ± 0.044</td><td>0.807 ± 0.047</td><td>0.686 ± 0.034</td></tr><tr><td>GIN</td><td>0.901 ± 0.021</td><td>0.693 ± 0.019</td><td>0.593 ± 0.038</td><td>0.785 ± 0.041</td><td>0.706 ± 0.043</td></tr><tr><td rowspan="4">Neural Sparse</td><td>GCN</td><td>0.946 ± 0.020</td><td>0.600 ± 0.014</td><td>0.610 ± 0.022</td><td>0.821 ± 0.014</td><td>0.715 ± 0.014</td></tr><tr><td>GraphSAGE</td><td>0.951 ± 0.015</td><td>0.626 ± 0.023</td><td>0.649 ± 0.018</td><td>0.832 ± 0.024</td><td>0.720 ± 0.013</td></tr><tr><td>GAT</td><td></td><td>0.921 ± 0.015</td><td>0.671 ± 0.018</td><td>0.834 ± 0.015</td><td>0.724 ± 0.026</td></tr><tr><td>GIN</td><td>0.937± 0.027</td><td>0.744 ± 0.015</td><td>0.634±0.023</td><td>0.824 ± 0.027</td><td>0.719 ± 0.015</td></tr></table>
189
+
190
+ (\* Report the better performance with SS or RD)
191
+
192
+ ![](images/2893d00ddd1fcdf5088ab61bc0a7cb6c06e5d73bb59385e19233158ebec593ea.jpg)
193
+ Figure 3: Sparsified subgraphs and performance vs hyper-parameters
194
+
195
+ (3) In comparison with the two NeuralSparse variants SS-GraphSAGE and RD-GraphSAGE, NeuralSparse outperforms because of the automatically learned graph sparsification with both structural and non-structural information as input.
196
+
197
+ # 5.4 SENSITIVITY TO HYPER-PARAMETERS AND SPARSIFIED SUBGRAPHS
198
+
199
+ Figure 3(c) demonstrates how classification performance responds when $k$ increases on the Transaction dataset. There exists an optimal $k$ that delivers the best classification AUC score. When $k$ is small, NeuralSparse can only make use of little relevant structural information in feature aggregation, which leads to inferior performance. When $k$ increases, the aggregation convolution involves more complex neighborhood aggregation with higher chance of overfitting noise data, which negatively impacts the classification performance for unseen testing data. Figure 3(d) shows how hyperparameter $l$ impacts classification performance on the Transaction dataset. When $l$ increases from 1 to 5, we observe a relatively small improvement in classification AUC score. As the parameters in the sparsification network are shared by all edges in the graph, the estimation variance from random sampling could already be mitigated to some extent by a number of sampled edges in a sparsified subgraph. Thus, when we increase the number of sparsified subgraphs, the incremental gain could be small.
200
+
201
+ In Figure 3(a, b), we present the sparsified graphs output by two baseline methods, SS and RD. By comparing the two plots with Figure 1(b), we make the following observations. First, the NeuralSparse sparsified graph tends to select edges that connect nodes of identical labels, which favors the downstream classification task. The observed clustering effect could further boost the confidence of decision making. Second, instead of exploring all the neighbors, we can focus on selected connections/edges in sparsified graphs, which could make it easier for human experts to perform model interpretation and result visualization.
202
+
203
+ # 6 CONCLUSION
204
+
205
+ In this paper, we propose Neural Sparsification (NeuralSparse) to address the overfitting issues brought by the complexity in real-life large graphs. NeuralSparse consists of two major components: (1) The sparsification network sparsifies input graphs by sampling edges following a learned distribution; (2) GNNs take sparsified subgraphs as input and extracts node representations for downstream tasks. The two components in NeuralSparse can be jointly trained with supervised loss, gradient descent, and backpropagation techniques. The experimental study on real-life datasets show that the NeuralSparse consistently renders more robust graph representations, and brings up to $7 \%$ improvement in accuracy over the state-of-the-art GNN models.
206
+
207
+ # REFERENCES
208
+
209
+ Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: a system for largescale machine learning. In OSDI, 2016.
210
+
211
+ Sami Abu-El-Haija, Bryan Perozzi, Amol Kapoor, Hrayr Harutyunyan, Nazanin Alipourfard, Kristina Lerman, Greg Ver Steeg, and Aram Galstyan. Mixhop: Higher-order graph convolution architectures via sparsified neighborhood mixing. In ICML, 2019.
212
+
213
+ Bijaya Adhikari, Yao Zhang, Sorour E Amiri, Aditya Bharadwaj, and B Aditya Prakash. Propagation-based temporal network summarization. TKDE, 2018.
214
+
215
+ Leman Akoglu, Hanghang Tong, and Danai Koutra. Graph based anomaly detection and description: a survey. Data mining and knowledge discovery, 2015.
216
+
217
+ Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. In ICLR, 2014.
218
+
219
+ Daniele Calandriello, Ioannis Koutis, Alessandro Lazaric, and Michal Valko. Improved large-scale graph learning through ridge spectral sparsification. In ICML, 2018.
220
+
221
+ Alireza Chakeri, Hamidreza Farhidzadeh, and Lawrence O Hall. Spectral sparsification in spectral clustering. In ICPR, 2016.
222
+
223
+ Jie Chen, Tengfei Ma, and Cao Xiao. Fastgcn: fast learning with graph convolutional networks via importance sampling. In ICLR, 2018.
224
+
225
+ Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on ¨ graphs with fast localized spectral filtering. In NIPS, 2016.
226
+
227
+ Talya Eden, Shweta Jain, Ali Pinar, Dana Ron, and C. Seshadhri. Provable and practical approximations for the degree distribution using sublinear graph samples. In WWW, 2018.
228
+
229
+ Luca Franceschi, Mathias Niepert, Massimiliano Pontil, and Xiao He. Learning discrete structures for graph neural networks. In ICML, 2019.
230
+
231
+ Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NIPS, 2017.
232
+
233
+ Jin Huang and Charles X Ling. Using auc and accuracy in evaluating learning algorithms. TKDE, 2005.
234
+
235
+ Wenbing Huang, Tong Zhang, Yu Rong, and Junzhou Huang. Adaptive sampling towards fast graph representation learning. In NeurIPS, 2018.
236
+
237
+ Christian Hubler, Hans-Peter Kriegel, Karsten Borgwardt, and Zoubin Ghahramani. Metropolis ¨ algorithms for representative subgraph sampling. In ICDM, 2008.
238
+
239
+ Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In ICLR, 2017.
240
+
241
+ Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
242
+
243
+ John Boaz Lee, Ryan Rossi, and Xiangnan Kong. Graph classification using structural attention. In KDD, 2018.
244
+
245
+ Jure Leskovec and Christos Faloutsos. Sampling from large graphs. In KDD, 2006.
246
+
247
+ Yaguang Li, Rose Yu, Cyrus Shahabi, and Yan Liu. Diffusion convolutional recurrent neural net work: Data-driven traffic forecasting. In ICLR, 2018.
248
+
249
+ Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. In ICLR, 2016.
250
+
251
+ Yike Liu, Tara Safavi, Abhilash Dighe, and Danai Koutra. Graph summarization methods and applications: A survey. ACM Computing Surveys, 2018.
252
+
253
+ Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. In ICLR, 2017.
254
+
255
+ Arun S Maiya and Tanya Y Berger-Wolf. Sampling community structure. In WWW, 2010.
256
+
257
+ Michael Mathioudakis, Francesco Bonchi, Carlos Castillo, Aristides Gionis, and Antti Ukkonen. Sparsification of influence networks. In KDD, 2011.
258
+
259
+ Mathias Niepert, Mohamed Ahmed, and Konstantin Kutzkov. Learning convolutional neural networks for graphs. In ICML, 2016.
260
+
261
+ Veeru Sadhanala, Yu-Xiang Wang, and Ryan Tibshirani. Graph sparsification approaches for laplacian smoothing. In AISTATS, 2016.
262
+
263
+ Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 2009.
264
+
265
+ Martin Simonovsky and Nikos Komodakis. Dynamic edge-conditioned filters in convolutional neural networks on graphs. In CVPR, 2017.
266
+
267
+ Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Li ´ o, and Yoshua \` Bengio. Graph attention networks. In ICLR, 2018.
268
+
269
+ Petar Velickovi ˇ c, William Fedus, William L Hamilton, Pietro Li ´ o, Yoshua Bengio, and R Devon \` Hjelm. Deep graph infomax. In ICLR, 2019.
270
+
271
+ Elli Voudigari, Nikos Salamanos, Theodore Papageorgiou, and Emmanuel J Yannakoudakis. Rank degree: An efficient algorithm for graph sampling. In ASONAM, 2016.
272
+
273
+ Keyulu Xu, Chengtao Li, Yonglong Tian, Tomohiro Sonobe, Ken-ichi Kawarabayashi, and Stefanie Jegelka. Representation learning on graphs with jumping knowledge networks. In ICML, 2018.
274
+
275
+ Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? ICLR, 2019.
276
+
277
+ Zhilin Yang, William W Cohen, and Ruslan Salakhutdinov. Revisiting semi-supervised learning with graph embeddings. In ICML, 2016.
278
+
279
+ Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In KDD, 2018a.
280
+
281
+ Zhitao Ying, Jiaxuan You, Christopher Morris, Xiang Ren, Will Hamilton, and Jure Leskovec. Hierarchical graph representation learning with differentiable pooling. In NeurIPS, 2018b.
282
+
283
+ Jiani Zhang, Xingjian Shi, Junyuan Xie, Hao Ma, Irwin King, and Dit-Yan Yeung. Gaan: Gated attention networks for learning on large and spatiotemporal graphs. arXiv preprint arXiv:1803.07294, 2018a.
284
+
285
+ L-C Zhang and M Patone. Graph sampling. Metron, 2017.
286
+
287
+ Yizhou Zhang, Yun Xiong, Xiangnan Kong, Shanshan Li, Jinhong Mi, and Yangyong Zhu. Deep collective classification in heterogeneous information networks. In WWW, 2018b.
288
+
289
+ Yutao Zhang, Fanjin Zhang, Peiran Yao, and Jie Tang. Name disambiguation in aminer: Clustering, maintenance, and human in the loop. In KDD, 2018c.
290
+
291
+ Peixiang Zhao. gsparsify: Graph motif based sparsification for graph clustering. In CIKM, 2015.
292
+
293
+ Chenyi Zhuang and Qiang Ma. Dual graph convolutional networks for graph-based semi-supervised classification. In WWW, 2018.
294
+
295
+ # S1 DATASET DETAILS
296
+
297
+ In this section, we provide additional details about the Transaction datasets in our experiments. The Transaction dataset contains attributed graph that records transaction history between organizations in two years: 2014 and 2015. Each node represents an organization and each directed edge indicates a transaction between two organizations. Node attributes include organization information like account balance, cash research, etc. Under the inductive experimental setting, We use the 47,772 organization data of the year 2014 for training and remaining data are hidden from the model. The 9,554 organizations are used for validation and 38,218 for testing. Validation and testing node sets are from year 2015 and are not connected to the nodes in the training set. Like the PPI dataset, models need to generalize to unseen graph when testing on the Transaction dataset.
298
+
299
+ # S2 EXPERIMENTAL SETTINGS
300
+
301
+ In this section, we provide more details about our implementation and experiments in favor of reproducibility.
302
+
303
+ # S2.1 HARDWARE
304
+
305
+ All experiment are run on a Linux machine with 16 Intel(R) Xeon(R) CPU (E5-2637 v4 $@$ 3.50GHz) and 128GB RAM. Some models (e.g. NeuralSparse and GCN) are accelerated by 4 NVIDIA GeForce GTX1080Ti GPU with 11GB RAM.
306
+
307
+ # S2.2 IMPLEMENTATIONS OF NEURALSPARSE
308
+
309
+ We implement the proposed NeuralSparse in tensorflow framework for efficient GPU computation. In particular, the multi-layer neural network (Equation 4) in the sparsification network is implemented by two-layer feed-forward neural networks in all experiment, where the hyper-parameter $k$ is searched between 2 and 50 for the optimal performance. We employ cross-entropy to formulate the loss function and apply Adam optimizer for training. The learning rate of Adam optimizer is initially set to be $\alpha = \mathrm { \bar { 1 . 0 } \times 1 0 ^ { - 3 } }$ . We initial the weight matrices in the proposed NeuralSparse model with Xavier initialization.
310
+
311
+ In the following, we detail the network structures of NeuralSparse used on individual datasets. $\mathrm { F C } ( a ,$ $b , f )$ means a fully-connected layer with $a$ input neurons and $b$ output neurons activated by function $f$ (none means no activation function is used). $\mathrm { G N N } ( a , b , f )$ means a Graph Neural Network layer with input dimension $a$ , output dimension $b$ , and activation function $f$ . We implement GNN layer with GCN, GraphSAGE, GAT, GIN in the experiments.
312
+
313
+ Reddit The sparsification network runs with: FC(1204, 16, ReLU)-FC(16, 1, Gumbel-Softmax).
314
+ The structure of GNN is GNN(602, 128, ReLU)-GNN(128, 64, ReLU)-FC(64, 41, softmax).
315
+
316
+ PPI The sparsification network runs with: FC(100, 16, ReLU)-FC(16, 1, Gumbel-Softmax). The structure of GNN is GNN(50, 128, ReLU)-GNN(128, 128, ReLU)-FC(128, 121, softmax).
317
+
318
+ Transaction The sparsification network runs with: FC(243, 16, ReLU)-FC(16, 1, GumbelSoftmax). The structure of GNN is GNN(121, 128, ReLU)-GNN(128, 32, ReLU)-FC(32, 2, softmax). Note that there is one-dimensional edge attribute indicating the transaction amount in this dataset.
319
+
320
+ Cora The sparsification network runs with: FC(2866, 32, ReLU)-FC(32, 1, Gumbel-Softmax). The structure of GNN is GNN(1433, 128, ReLU)-GNN(128, 64, ReLU)-FC(64, 7, softmax).
321
+
322
+ Citeseer The sparsification network runs with: FC(7406, 64, ReLU)-FC(64, 1, Gumbel-Softmax).
323
+ The structure of GNN is GNN(3703, 128, ReLU)-GNN(128, 64, ReLU)-FC(64, 6, softmax).
324
+
325
+ As the spectral sparsification models cannot be jointly trained with subsequent GNN module, the sparsification process is treated as a preprocessing step. For Spectral Sparsifier (SS), $\epsilon$ is set to 0.4 in all datasets. For the Rank Degree algorithm (RD), we select $1 \%$ of nodes as the initial seeds and adopt $\rho \in \{ 0 . 1 , 0 . 2 , \cdot \cdot \cdot , 0 . 8 \}$ for the best results.
326
+
327
+ # S3 QUALITATIVE EDGE SAMPLING EVALUATION
328
+
329
+ In this section, we qualitatively demonstrate the difference by Figure 1(a) original graph, Figure 1(b) NeuralSparse, Figure 3(a) SS, and Figure 3(b) RD. In addition, we provide quantitative analysis in Table S1, where we report the percentage of edges that connect nodes of same class labels in sparsified graphs. Both qualitative and quantitative results suggest a common trend: NeuralSparse prefers to select neighbors with the same labels compared with the baseline methods.
330
+
331
+ Table S1: Percentage of edges connecting nodes of the same labels
332
+
333
+ <table><tr><td></td><td>Reddit</td><td>PPI</td><td>Transaction</td><td>Cora</td><td>Citeseer</td></tr><tr><td>Original</td><td>53.1%</td><td>55.0%</td><td>67.3%</td><td>82.2%</td><td>73.1%</td></tr><tr><td>SS</td><td>50.9%</td><td>52.8%</td><td>62.8%</td><td>79.8%</td><td>75.6%</td></tr><tr><td>RD</td><td>49.8%</td><td>53.5%</td><td>63.4%</td><td>84.8%</td><td>72.3%</td></tr><tr><td>NeuralSparse</td><td>59.6%</td><td>61.5%</td><td>76.8%</td><td>93.1%</td><td>87.4%</td></tr></table>
334
+
335
+ # S4 EXPERIMENT WITH SIMILAR NUMBERS OF TRAINABLE PARAMETERS
336
+
337
+ In this section, we evaluate the impact brought by reducing the number of parameters in a GNN with NeuralSparse so that the numbers of trainable parameters in a NeuralSparse GNN and an original GNN are similar. In particular, we focus on GCN in this set of experiment. Using the same notation in S2.2, NeuralSparse-GCN-Compact is implemented as follows.
338
+
339
+ Reddit. NeuralSparse-GCN-Compact runs with: FC(1204, 8, ReLU)-FC(8, 1, Gumbel-Softmax) and GCN(602, 112, ReLU)-GCN(112, 64, ReLU)-FC(64, 41, softmax). The total number of trainable parameters is 86,856 in the NeuralSparse-GCN-Compact, while it is 87,872 in the original GCN.
340
+
341
+ PPI. NeuralSparse-GCN-Compact runs with: FC(100, 16, ReLU)-FC(16, 1, Gumbel-Softmax) and GCN(50, 118, ReLU)-GCN(118, 128, ReLU)-FC(128, 121, softmax). The total number of trainable parameters is 38,108 in the NeuralSparse-GCN-Compact, while it is 38,272 in the original GCN.
342
+
343
+ Transaction. NeuralSparse-GCN-Compact runs with: FC(243, 16, ReLU)-FC(16, 1, GumbelSoftmax) and GCN(121, 100, ReLU)-GCN(100, 32, ReLU)-FC(32, 2, softmax). The total number of trainable parameters is 19,268 in the NeuralSparse-GCN-Compact, while it is 19,648 in the original GCN.
344
+
345
+ Cora NeuralSparse-GCN-Compact runs with: FC(2866, 8, ReLU)-FC(8, 1, Gumbel-Softmax) and GCN(1433, 115, ReLU)-GCN(115, 32, ReLU)-FC(32, 7, softmax). The total number of trainable parameters is 191,635 in the NeuralSparse-GCN-Compact, while it is 192,064 in the original GCN.
346
+
347
+ Citeseer NeuralSparse-GCN-Compact runs with: FC(7406, 32, ReLU)-FC(32, 1, Gumbel-Softmax) and GCN(3703, 64, ReLU)-GCN(64, 32, ReLU)-FC(32, 6, softmax). The total number of trainable parameters is 476,256 in the NeuralSparse-GCN-Compact, while it is 482,560 in the original GCN.
348
+
349
+ Table S2: Node classification performance with similar numbers of trainable parameters
350
+
351
+ <table><tr><td>Dataset</td><td>Reddit</td><td>PPI</td><td>Transaction</td><td>Cora</td><td>Citeseer</td></tr><tr><td>Metrics</td><td>Micro-F1</td><td>Micro-F1</td><td>AUC</td><td>Accuracy</td><td>Accuracy</td></tr><tr><td>GCN</td><td>0.922 ± 0.041</td><td>0.532 ± 0.024</td><td>0.564 ± 0.018</td><td>0.810 ± 0.027</td><td>0.694 ± 0.020</td></tr><tr><td>NeuralSparse- GCN</td><td>0.946 ± 0.020</td><td>0.600 ± 0.014</td><td>0.610 ± 0.022</td><td>0.821 ± 0.014</td><td>0.715 ± 0.014</td></tr><tr><td>NeuralSparse- GCN-Compact</td><td>0.943 ± 0.018</td><td>0.601 ± 0.021</td><td>0.605 ± 0.013</td><td>0.820 ± 0.012</td><td>0.713 ± 0.009</td></tr></table>
352
+
353
+ From the evaluation results shown in Table S2, we draw the following observations. First, both NeuralSparse-GCN and NeuralSparse-GCN-Compact consistently outperform GCN on all the datasets. Second, compared with NeuralSparse-GCN, NeuralSparse-GCN-Compact achieves comparable prediction accuracy with smaller variance in most cases.
354
+
355
+ ![](images/d4ff06450eeed7222339b4c481d90a0bdd0f3540836d5c1a52e337e61d91cdee.jpg)
356
+ S5 HOW PERFORMANCE EVOLVES AS HYPER-PARAMETER $k$ CHANGES?
357
+ Figure S1: Impact from hyper-parameter $k$ on validation and testing on the Transaction dataset
358
+
359
+ In this section, we demonstrate how the hyper-parameter $k$ impacts the performance of NeuralSparse-GAT and NeuralSparse-GraphSAGE in both validation and testing on the Transaction dataset. In terms of validation, as shown in Figure S1, the validation performance increases when $k$ ranges from 2 to 10 with more available graph data. After $k$ exceeds 10, the increase in validation performance slows down and turns to be saturated. In terms of testing performance, it shares a similar trend when $k$ ranges from 2 to 10. Meanwhile, the testing performance drops more after $k$ exceeds 10.
360
+
361
+ # S6 EMPIRICAL COMPARISON BETWEEN NEURALSPARSE AND LDS
362
+
363
+ # S6.1 EVALUATION RESULTS
364
+
365
+ In this section, we compare NeuralSparse and LDS (Franceschi et al., 2019) with the datasets in transductive setting. Here, we utilize three ways to prepare the input graphs of Cora and Citeseer datasets.
366
+
367
+ • Setting A: k-NN graphs (Franceschi et al., 2019). In this setting, the graph structures are completely missing. The input graphs are replaced with k-nearest neighbor graphs initialized from node features. The $k$ in kNN graph is selected from $\{ 1 0 , 2 0 \}$ . • Setting B: original input graphs of Cora and Citeseer datasets with the same random split as Kipf & Welling (2017). • Setting C: edge union of original input graphs and k-NN graphs with $k$ fixed as 10.
368
+
369
+ Table S3: Node classification performance in setting A
370
+
371
+ <table><tr><td></td><td>Cora(10)</td><td>Cora(20)</td><td>Citeseer(10)</td><td>Citeseer(20)</td></tr><tr><td>GCN</td><td>0.641 ± 0.009</td><td>0.631 ± 0.013</td><td>0.653 ± 0.012</td><td>0.671 ± 0.019</td></tr><tr><td>LDS-GCN</td><td>0.715 ± 0.008</td><td>0.703 ± 0.011</td><td>0.691 ± 0.021</td><td>0.715 ± 0.011</td></tr><tr><td>NeuralSparse-GCN</td><td>0.723 ± 0.012</td><td>0.719 ± 0.008</td><td>0.731 ± 0.011</td><td>0.724 ± 0.017</td></tr></table>
372
+
373
+ Our observation is summarized as follows. In general, NeuralSparse and LDS achieves comparable node classification accuracy. Specifically, NeuralSparse has relatively better performance in Setting
374
+
375
+ Table S4: Node classification performance in setting B
376
+
377
+ <table><tr><td></td><td>Cora</td><td>Citeseer</td></tr><tr><td>GCN</td><td>0.810 ± 0.027</td><td>0.694 ± 0.020</td></tr><tr><td>LDS</td><td>0.831 ± 0.017</td><td>0.727 ± 0.021</td></tr><tr><td>NeuralSparse-GCN</td><td>0.821 ± 0.014</td><td>0.724 ± 0.014</td></tr></table>
378
+
379
+ Table S5: Node classification performance in setting C
380
+
381
+ <table><tr><td></td><td>Cora + kNN</td><td>Citeseer +kNN</td></tr><tr><td>GCN</td><td>0.631 ± 0.014</td><td>0.646 ± 0.009</td></tr><tr><td>LDS</td><td>0.731 ± 0.019</td><td>0.725 ± 0.013</td></tr><tr><td>NeuralSparse-GCN</td><td>0.751 ± 0.013</td><td>0.743 ± 0.007</td></tr></table>
382
+
383
+ A and Setting C. LDS performs slightly better in Setting B. From the above observation, we conjecture that NeuralSparse is more robust to graphs with more random edges while LDS is more suitable in a graph of relatively less noise by adding additional edges. We will verify the conjecture in the next subsection.
384
+
385
+ # S6.2 RANDOM EDGE ADDITION TO CORA AND CITESEER
386
+
387
+ We further compare NeuralSparse and LDS (Franceschi et al., 2019) on the node classification tasks where original graph structure is available but more random edges are introduced as noise. Starting from the original graphs, we add edges by randomly sampling two nodes $u , v$ from node set $\mathbb { V }$ and connecting them.
388
+
389
+ The results are shown in Figure S2. In both datasets, NeuralSparse achieves better performance compared with LDS as the noise level goes beyond $200 \%$ . When the amount of noise increases, the classification accuracy of LDS drops significantly.
390
+
391
+ This result confirms our conjecture that NeuralSparse is more robust to random edges, compared to LDS.
392
+
393
+ ![](images/1541d39eb1baff4e83762097c3969c3f8fa9923cd0d18f75e0847ea35860f6c2.jpg)
394
+ Figure S2: Node classification performance when adding noise to graph structure.
395
+
396
+ With the above comments and experimental results, we hope to clarify the difference between the two models and demonstrate that our proposed NeuralSparse is more robust to noises in real-life graphs.
397
+
398
+ # S7 HOW DO TASK-IRRELEVANT EDGES COULD NEGATIVELY IMPACT THE PERFORMANCE OF GCN?
399
+
400
+ In this section, we use an example to demonstrate how an input graph with task-irrelevant edges could impact the performance of GCN. For the ease of discussion and visualization, we focus on a GCN with a simple architecture and synthetic graphs where we could adjust graph topology by hyper-parameters in graph generators.
401
+
402
+ In terms of GCN, we investigate a one-layer GCN
403
+
404
+ $$
405
+ f _ { W } = S o f t m a x ( \hat { A } X W ) = S o f t m a x ( Z W )
406
+ $$
407
+
408
+ where $\hat { A }$ is a normalized adjacency matrix, $X$ is the input node feature matrix, $W$ is the GCN parameters, and $Z = { \hat { A } } X$ denotes node representations in the aggregation space. Intuitively, the quality of $Z$ has direct impact to this GCN’s performance.
409
+
410
+ In terms of input graphs, we generate them for node classification tasks as follows.
411
+
412
+ 1. Nodes and their labels. 2,000 nodes are generated, where 1,000 nodes are assigned with positive labels and the rest are assigned with negative labels.
413
+
414
+ 2. Node features. Each node has a two-dimensional feature vector. For positive nodes, the node features are generated from a Gaussian distribution, where $\mu _ { p o s } = ( - 0 . 5 , 0 )$ and $\Sigma _ { p o s }$ is a diagonal matrix with $\Sigma _ { p o s } [ 0 , 0 ] = \Sigma _ { p o s } [ 1 , 1 ] = 0 . 3$ . For negative nodes, the node features are generated from another Gaussian distribution, where $\mu _ { n e g } = ( 0 . 5 , 0 )$ and $\Sigma _ { n e g }$ is a diagonal matrix with $\Sigma _ { n e g } [ 0 , 0 ] = \Sigma _ { n e g } [ 1 , 1 ] = 0 . 3$ .
415
+
416
+ 3. Edges. Given a hyper-parameter $\bar { d } .$ , for each node, it randomly selects $\bar { d }$ nodes as its onehop neighbors. With respect to this node classification task, an edge that connects two nodes of different labels could be irrelevant, bringing noise to the GCN.
417
+
418
+ ![](images/5dd96ea033e5b6b52630f581022f785856b9b69c307a829bf40b8859dcee63ee.jpg)
419
+ Figure S3: Distributions of $Z$ in graphs with different $\bar { d }$
420
+
421
+ In Figure S3, the distributions of node representation $Z$ are demonstrated at different $\bar { d }$ . When $\bar { d }$ is 0, $\hat { A }$ is an identity matrix so that we simply use input node features in model learning. As shown in Figure S3(a), it is difficult to find a good boundary that well separates the positive and negative nodes by using node features only. However, when we adjusts $\bar { d }$ to 10 or 20 with richer connections, the situation doesn’t get better. Because of the noise introduced by irrelevant edges, it becomes harder to find the classification boundary. While a deep learning may still be able to find a complex boundary that well separates the training data, the boundary could overfit the introduced noise, resulting in low generalization power.
422
+
423
+ In Figure S4, we illustrate how NeuralSparse enhances the prediction accuracy of the GCN. In particular, we focus on the graph with $\bar { d } \stackrel { = } { = } 2 0$ , and sparsify this graph by NeuralSparse. As shown in Figure S4, ranging the hyper-parameter $k$ from 1 to 15, the distributions of $Z$ vary. When $k$ is 1, there is no significant change compared with the distribution in Figure S3(a), as the amount of accessible relevant graph data is still small. When $k$ is increased to 5 or 10, the classification boundary becomes much clearer. As the edge generation process is uniformly random, the expected number of relevant edges per node is roughly 10. When $k$ is 15, this $k$ could be an over-estimate on the amount of relevant edges, making it a bit harder to find a good separation.
424
+
425
+ ![](images/9620fde2d203ee0c349ec93bb26a4e2176f89d84c237215f6816272e46b0151c.jpg)
426
+ Figure S4: Distributions of $\textsf { Z }$ in sparsified subgraphs by NeuralSparse
427
+
428
+ ![](images/227ab45090ec6968d2b28aa7ec871c8a3c410dab8e34e7fe1bba4a2f0d10f15c.jpg)
429
+ Figure S5: Distributions of $\boldsymbol { \mathrm { Z } }$ in sparsified subgraphs by random downsampling
430
+
431
+ In Figure S5, we demonstrate how random downsampling could impact the prediction accuracy of the GCN. In general, we could not see any significant improvement. Indeed, it is crucial to perform a task-driven sparsification as NeuralSparse does.
parse/train/S1emOTNKvS/S1emOTNKvS_content_list.json ADDED
@@ -0,0 +1,2226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "ROBUST GRAPH REPRESENTATION LEARNING VIA NEURAL SPARSIFICATION ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 98,
9
+ 821,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 184,
19
+ 171,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Graph representation learning serves as the core of many important prediction tasks, ranging from product recommendation in online marketing to fraud detection in financial domain. Real-life graphs are usually large with complex local neighborhood, where each node is described by a rich set of features and easily connects to dozens or even hundreds of neighbors. Most existing graph learning techniques rely on neighborhood aggregation, however, the complexity on reallife graphs is usually high, posing non-trivial overfitting risk during model training. In this paper, we present Neural Sparsification (NeuralSparse), a supervised graph sparsification technique that mitigates the overfitting risk by reducing the complexity of input graphs. Our method takes both structural and non-structural information as input, utilizes deep neural networks to parameterize the sparsification process, and optimizes the parameters by feedback signals from downstream tasks. Under the NeuralSparse framework, supervised graph sparsification could seamlessly connect with existing graph neural networks for more robust performance on testing data. Experimental results on both benchmark and private datasets show that, NeuralSparse can effectively improve testing accuracy and bring up to $7 . 4 \\%$ improvement when working with existing graph neural networks on node classification tasks. ",
40
+ "bbox": [
41
+ 233,
42
+ 266,
43
+ 764,
44
+ 516
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 178,
54
+ 544,
55
+ 336,
56
+ 560
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Representation learning has been in the center of many machine learning tasks on graphs, such as name disambiguation in citation networks (Zhang et al., 2018c), spam detection in social networks (Akoglu et al., 2015), recommendations in online marketing (Ying et al., 2018a), and many others (Hamilton et al., 2017; Li et al., 2018). As a class of models that can simultaneously utilize non-structural (e.g., node and edge features) and structural information in graphs, Graph Neural Networks (GNNs) (Kipf & Welling, 2017; Hamilton et al., 2017; Li et al., 2016) construct effective representations for downstream tasks by iteratively aggregating neighborhood information (Kipf & Welling, 2017; Hamilton et al., 2017). Such methods have demonstrated state-of-the-art performance in classification and prediction tasks on graph data (Velickovi ˇ c et al., 2018; Chen et al., 2018; ´ Xu et al., 2019; Velickovi ˇ c et al., 2019). ´ ",
63
+ "bbox": [
64
+ 174,
65
+ 575,
66
+ 825,
67
+ 714
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Meanwhile, graphs from real-life applications are usually large with complex local neighborhood, where each node has rich features and dozens or even hundreds of neighbors. As shown in Figure 1(a), this subgraph from Transaction dataset (detailed in Section 5.1) consists of 38 nodes (i.e., promising organizations and other organizations) with average node degree 15 and node feature dimension 120. The GNNs are expected to grasp useful patterns from neighboring nodes; however, as representative patterns are diluted by overwhelming information in local neighborhood, graph learning algorithms could be misled by neighborhood aggregation. Such complexity in input graphs poses non-trivial overfitting risk to existing GNN based learning techniques. ",
74
+ "bbox": [
75
+ 174,
76
+ 722,
77
+ 825,
78
+ 833
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "While it is straightforward yet expensive (sometimes even impractical) to address this overfitting problem by increasing the number of labeled samples, we investigate a cheaper alternative of reducing input graph complexity by graph sparsification in this work. Graph sparsification (Liu et al., 2018; Zhang & Patone, 2017) aims to find smaller subgraphs from input large graphs that best preserve desired properties. Existing sparsification methods could lead to suboptimal performance for downstream prediction tasks: (1) these methods are unsupervised such that the resulting sparsified graphs may not favor downstream tasks; and (2) they only consider structural information for sparsification decision, while non-structural information in graphs, such as node/edge features, could have non-trivial impact to the quality of sparsification. Recently, there have been GNN models attempting to sample subgraphs from predefined distributions (Leskovec & Faloutsos, 2006; Adhikari et al., 2018; Hamilton et al., 2017; Chen et al., 2018). As the predefined distributions could be irrelevant to subsequent tasks, the sparsified graphs may miss important information for downstream tasks, leading to suboptimal prediction performance. ",
85
+ "bbox": [
86
+ 174,
87
+ 840,
88
+ 823,
89
+ 922
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/a43cf4a2a96344ec1e8fc7e7c88b613b2ff17335b46d3936823be8fdec0a8151.jpg",
96
+ "image_caption": [
97
+ "Figure 1: A subgraph of 38 organizations from Transaction dataset: (a) The original subgraph sampled from the Transaction dataset, where nodes and edges represent organizations and their transactions, respectively; (b) The sparsified subgraph by NeuralSparse; (c) Testing AUC on identifying promising organizations. "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 189,
102
+ 99,
103
+ 810,
104
+ 268
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "",
111
+ "bbox": [
112
+ 174,
113
+ 356,
114
+ 825,
115
+ 453
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "Present work. We propose Neural Sparsification (NeuralSparse), a general framework that simultaneously learns graph sparsification and graph representation by feedback signals from downstream tasks. The NeuralSparse consists of two major components: sparsification network and GNN. For the sparsification network, we utilize a deep neural network to parameterize the sparsification process: how to select edges from one-hop neighborhood given a fixed budget. In the training phase, the network learns to optimize a sparsification strategy that favors downstream tasks. In the testing phase, the network sparsifies input graphs following the learned strategy, instead of sampling subgraphs from a predefined distribution. Unlike conventional sparsification techniques, our technique takes both structural and non-structural information as input and optimizes the sparsification strategy by feedback from downstream tasks, instead of using (possibly irrelevant) heuristics. For the GNN component, the NeuralSparse feeds the sparsified graphs to a GNN and learns a graph representation for subsequent prediction tasks. ",
122
+ "bbox": [
123
+ 174,
124
+ 460,
125
+ 825,
126
+ 626
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "Under the framework of NeuralSparse, we are able to leverage the standard stochastic gradient descent and backpropagation techniques to simultaneously optimize graph sparsification and representation. As shown in Figure 1(b), the graph sparsified by the NeuralSparse has lower complexity with average node degree around 5. As a result (illustrated in Figure 1(c)), the testing classification accuracy on the sparsified graph is improved by $15 \\%$ , compared with its counterpart in the original input graph, while conventional techniques could not offer competitive sparsification for the classification task. ",
133
+ "bbox": [
134
+ 174,
135
+ 633,
136
+ 825,
137
+ 731
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "Experimental results on both public and private datasets show that the NeuralSparse is able to consistently provide improved performance for existing GNNs on node classification tasks, bringing up to $7 \\%$ improvement. ",
144
+ "bbox": [
145
+ 176,
146
+ 738,
147
+ 823,
148
+ 780
149
+ ],
150
+ "page_idx": 1
151
+ },
152
+ {
153
+ "type": "text",
154
+ "text": "2 RELATED WORK ",
155
+ "text_level": 1,
156
+ "bbox": [
157
+ 176,
158
+ 800,
159
+ 344,
160
+ 816
161
+ ],
162
+ "page_idx": 1
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Our work is related to two lines of research: graph sparsification and graph representation learning. ",
167
+ "bbox": [
168
+ 174,
169
+ 832,
170
+ 820,
171
+ 848
172
+ ],
173
+ "page_idx": 1
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "Graph sparsification. The goal of graph sparsification is to find small subgraphs from input large graphs that best preserve desired properties. Existing techniques are mainly unsupervised and deal with simple graphs without node/edge features for preserving predefined graph metrics (Hubler ¨ et al., 2008), information propagation traces (Mathioudakis et al., 2011), graph spectrum (Calandriello et al., 2018; Chakeri et al., 2016; Adhikari et al., 2018), node degree distribution (Eden et al., ",
178
+ "bbox": [
179
+ 174,
180
+ 853,
181
+ 823,
182
+ 924
183
+ ],
184
+ "page_idx": 1
185
+ },
186
+ {
187
+ "type": "image",
188
+ "img_path": "images/c63dd1a64bdebd2d5ba7cb87d0882072aa533e69b171d8077663067594ddf877.jpg",
189
+ "image_caption": [
190
+ "Figure 2: The overview of NeuralSparse "
191
+ ],
192
+ "image_footnote": [],
193
+ "bbox": [
194
+ 176,
195
+ 102,
196
+ 821,
197
+ 252
198
+ ],
199
+ "page_idx": 2
200
+ },
201
+ {
202
+ "type": "text",
203
+ "text": "2018; Voudigari et al., 2016), node distance distribution (Leskovec & Faloutsos, 2006), or clustering coefficient (Maiya & Berger-Wolf, 2010). Importance based edge sampling has also been studied in a scenario where we could predefine edge importance (Zhao, 2015; Chen et al., 2018). ",
204
+ "bbox": [
205
+ 174,
206
+ 295,
207
+ 825,
208
+ 338
209
+ ],
210
+ "page_idx": 2
211
+ },
212
+ {
213
+ "type": "text",
214
+ "text": "Unlike existing methods that mainly work with simple graphs without node/edge features in an unsupervised manner, our method takes node/edge features as parts of input and optimizes graph sparsification by supervision signals from errors made in downstream tasks. ",
215
+ "bbox": [
216
+ 174,
217
+ 344,
218
+ 825,
219
+ 387
220
+ ],
221
+ "page_idx": 2
222
+ },
223
+ {
224
+ "type": "text",
225
+ "text": "Graph representation learning. Graph neural networks (GNNs) are the most popular techniques that enable vector representation learning for large graphs with complex node/edge features. All existing GNNs share a common spirit: extracting local structural features by neighborhood aggregation. Scarselli et al. (2009) explore how to extract multi-hop features by iterative neighborhood aggregation. Inspired by the success of convolutional neural networks, multiple studies (Defferrard et al., 2016; Bruna et al., 2014) investigate how to learn convolutional filters in the graph spectral domain under transductive settings (Zhang et al., 2018b; Zhuang & Ma, 2018). To enable inductive learning, convolutional filters in the graph domain are proposed (Simonovsky & Komodakis, 2017; Niepert et al., 2016; Kipf & Welling, 2017; Velickovi ˇ c et al., 2018; Xu et al., 2018), and a few stud- ´ ies (Hamilton et al., 2017; Lee et al., 2018) explore how to differentiate neighborhood filtering by sequential models. In addition, multiple recent works (Ying et al., 2018b; Xu et al., 2019; Abu-ElHaija et al., 2019) investigate the expressive power of GNNs. Recently, (Franceschi et al., 2019) study how to sample high-quality subgraphs from a space of all possible graphs of a complete graph so that the sampled graphs enhance the prediction power in downstream learning tasks. In particular, the proposed method only focus on transductive tasks. ",
226
+ "bbox": [
227
+ 174,
228
+ 393,
229
+ 825,
230
+ 602
231
+ ],
232
+ "page_idx": 2
233
+ },
234
+ {
235
+ "type": "text",
236
+ "text": "Our work contributes from a unique angle: by reducing the noise from input graphs, our technique can further boost testing performance of existing GNNs. ",
237
+ "bbox": [
238
+ 174,
239
+ 609,
240
+ 823,
241
+ 637
242
+ ],
243
+ "page_idx": 2
244
+ },
245
+ {
246
+ "type": "text",
247
+ "text": "3 PROPOSED METHOD: NEURALSPARSE ",
248
+ "text_level": 1,
249
+ "bbox": [
250
+ 174,
251
+ 656,
252
+ 526,
253
+ 672
254
+ ],
255
+ "page_idx": 2
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "In this section, we introduce the core idea of our method. We start with the notations that are frequently used in this paper. We then describe the theoretical justification behind NeuralSparse and our architecture to tackle the supervised node classification problem. ",
260
+ "bbox": [
261
+ 174,
262
+ 688,
263
+ 825,
264
+ 729
265
+ ],
266
+ "page_idx": 2
267
+ },
268
+ {
269
+ "type": "text",
270
+ "text": "Notations. In this paper, we represent an input graph of $n$ nodes as $G = ( V , E , \\pmb { \\Delta } )$ : (1) $V \\in \\mathbb { R } ^ { n \\times d _ { n } }$ includes node features with dimensionality $d _ { n }$ ; (2) $E \\in \\mathbb { R } ^ { n \\times n }$ is a binary matrix where $E ( u , v ) = 1$ if there is an edge between node $u$ and node $v$ ; (3) $\\pmb { \\mathsf { A } } \\in \\mathbb { R } ^ { n \\times n \\times d _ { e } }$ encodes input edge features of dimensionality $d _ { e }$ . In addition, we use $Y$ to denote the prediction target in downstream tasks (e.g., $Y \\in \\mathbb { R } ^ { n \\times d _ { l } }$ if we are dealing with a node classification problem with $d _ { l }$ classes). ",
271
+ "bbox": [
272
+ 174,
273
+ 736,
274
+ 825,
275
+ 808
276
+ ],
277
+ "page_idx": 2
278
+ },
279
+ {
280
+ "type": "text",
281
+ "text": "Theoretical justification. From the perspective of statistical learning, the key of a defined prediction task is to learn $P ( Y \\mid G )$ , where $Y$ is the prediction target and $G$ is an input graph. Instead of directly working with original graphs, we would like to leverage sparsified subgraphs to mitigate overfitting risks. In other words, we are interested in the following variant, ",
282
+ "bbox": [
283
+ 174,
284
+ 814,
285
+ 823,
286
+ 869
287
+ ],
288
+ "page_idx": 2
289
+ },
290
+ {
291
+ "type": "equation",
292
+ "img_path": "images/baecb669e46895deb559d198d4ebcbaa6e7f28d4a4f36c4566360f93b8ff3344.jpg",
293
+ "text": "$$\nP ( Y \\mid G ) \\approx \\sum _ { g \\in \\mathbb { S } _ { G } } P ( Y \\mid g ) P ( g \\mid G ) ,\n$$",
294
+ "text_format": "latex",
295
+ "bbox": [
296
+ 374,
297
+ 872,
298
+ 622,
299
+ 907
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "where $g$ is a sparsified subgraph, and $\\mathbb { S } _ { G }$ is a class of sparsified subgraphs of $G$ ",
306
+ "bbox": [
307
+ 173,
308
+ 909,
309
+ 694,
310
+ 924
311
+ ],
312
+ "page_idx": 2
313
+ },
314
+ {
315
+ "type": "text",
316
+ "text": "In general, because of the combinatorial complexity in graphs, it is intractable to enumerate all possible $g$ as well as estimate the exact values of $P ( \\boldsymbol { Y } \\mid g )$ and $P ( g \\mid G )$ . Therefore, we approximate the distributions by tractable functions, ",
317
+ "bbox": [
318
+ 173,
319
+ 103,
320
+ 825,
321
+ 146
322
+ ],
323
+ "page_idx": 3
324
+ },
325
+ {
326
+ "type": "equation",
327
+ "img_path": "images/d63f62c5395365e3025a59a77d5223aa7118178281207bebcbbfd6028e03cc54.jpg",
328
+ "text": "$$\n\\sum _ { g \\in \\mathbb { S } _ { G } } P ( Y \\mid g ) P ( g \\mid G ) \\approx \\sum _ { g \\in \\mathbb { S } _ { G } } Q _ { \\theta } ( Y \\mid g ) Q _ { \\phi } ( g \\mid G )\n$$",
329
+ "text_format": "latex",
330
+ "bbox": [
331
+ 321,
332
+ 154,
333
+ 676,
334
+ 190
335
+ ],
336
+ "page_idx": 3
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "where $Q _ { \\theta }$ and $Q _ { \\phi }$ are approximation functions for $P ( \\boldsymbol { Y } \\mid g )$ and $P ( g \\mid G )$ parameterized by $\\theta$ and $\\phi$ , respectively. ",
341
+ "bbox": [
342
+ 174,
343
+ 198,
344
+ 825,
345
+ 228
346
+ ],
347
+ "page_idx": 3
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "Moreover, to make the above graph sparsification process differentiable, we employ reparameterization tricks (Jang et al., 2017) to make $Q _ { \\phi } ( g \\mid G )$ directly generate differentiable samples, such that ",
352
+ "bbox": [
353
+ 174,
354
+ 233,
355
+ 825,
356
+ 275
357
+ ],
358
+ "page_idx": 3
359
+ },
360
+ {
361
+ "type": "equation",
362
+ "img_path": "images/285a998080dbbb1769a4c63bf7752ad4caf9e1899dedabacb007342cf4c1af95.jpg",
363
+ "text": "$$\n\\sum _ { g \\in \\mathbb { S } _ { G } } Q _ { \\theta } ( Y \\mid g ) Q _ { \\phi } ( g \\mid G ) \\propto \\sum _ { g ^ { \\prime } \\sim Q _ { \\phi } ( g \\mid G ) } Q _ { \\theta } ( Y \\mid g ^ { \\prime } )\n$$",
364
+ "text_format": "latex",
365
+ "bbox": [
366
+ 326,
367
+ 272,
368
+ 671,
369
+ 310
370
+ ],
371
+ "page_idx": 3
372
+ },
373
+ {
374
+ "type": "text",
375
+ "text": "where $g ^ { \\prime } \\sim Q _ { \\phi } ( g \\mid G )$ means $g ^ { \\prime }$ is a random sample drawn from $Q _ { \\phi } ( g \\mid G )$ . ",
376
+ "bbox": [
377
+ 171,
378
+ 316,
379
+ 683,
380
+ 332
381
+ ],
382
+ "page_idx": 3
383
+ },
384
+ {
385
+ "type": "text",
386
+ "text": "To this end, the key is how to find appropriate approximation functions $Q _ { \\phi } ( g \\mid G )$ and $Q _ { \\theta } ( Y \\mid g )$ ",
387
+ "bbox": [
388
+ 173,
389
+ 338,
390
+ 812,
391
+ 353
392
+ ],
393
+ "page_idx": 3
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "Architecture. In this paper, we propose Neural Sparsification (NeuralSparse) to implement the theoretical framework discussed in Equation 3. As shown in Figure 2, NeuralSparse consists of two major components: sparsification network and GNNs. ",
398
+ "bbox": [
399
+ 173,
400
+ 359,
401
+ 825,
402
+ 402
403
+ ],
404
+ "page_idx": 3
405
+ },
406
+ {
407
+ "type": "text",
408
+ "text": "• The sparsification network is a multi-layer neural network that implements $Q _ { \\phi } ( g \\mid G )$ : Taking $G$ as input, it generates a random sparsified subgraph of $G$ drawn from a learned distribution. • GNNs implement $Q _ { \\theta } ( Y \\mid g )$ that takes a sparsified subgraph as input, extracts node representations, and makes predictions for downstream tasks. ",
409
+ "bbox": [
410
+ 168,
411
+ 414,
412
+ 825,
413
+ 478
414
+ ],
415
+ "page_idx": 3
416
+ },
417
+ {
418
+ "type": "text",
419
+ "text": "Algorithm 1 Training algorithm for NeuralSparse ",
420
+ "text_level": 1,
421
+ "bbox": [
422
+ 174,
423
+ 501,
424
+ 501,
425
+ 515
426
+ ],
427
+ "page_idx": 3
428
+ },
429
+ {
430
+ "type": "text",
431
+ "text": "",
432
+ "bbox": [
433
+ 174,
434
+ 518,
435
+ 578,
436
+ 534
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "table",
442
+ "img_path": "images/2ad64405f0de634fa213972c8ea96790de456e0aa913771b9ccac05806a45e88.jpg",
443
+ "table_caption": [],
444
+ "table_footnote": [],
445
+ "table_body": "<table><tr><td colspan=\"3\">lnput:graphG=(V,E,A),integerl,andtraininglabelsY.</td></tr><tr><td></td><td>while stop criterion is not met do Generate sparsified subgraphs {g1, g2,·., gt} by sparsification network (Section 4);</td><td></td><td></td></tr><tr><td>2: 3:</td><td>Produce prediction {Y1,Y2,··,Y𝑖} by feeding {g1, g2,·. , gt} into GNNs;</td><td></td><td></td></tr><tr><td>4:</td><td>Calculate loss function J;</td><td></td><td></td></tr><tr><td>5:</td><td></td><td></td><td></td></tr><tr><td>6: end while</td><td>Update and θ by descending J</td><td></td><td></td></tr></table>",
446
+ "bbox": [
447
+ 178,
448
+ 522,
449
+ 782,
450
+ 618
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "As the sparsified subgraph samples are differentiable, the two components can be jointly trained using gradient descent based backpropagation techniques from a supervised loss function, as illustrated in Algorithm 1. While the GNNs have been widely investigated in recent works (Kipf & Welling, 2017; Hamilton et al., 2017; Velickovi ˇ c et al., 2018), we focus on the practical implementation for ´ sparsification network in the remaining of this paper. ",
457
+ "bbox": [
458
+ 173,
459
+ 637,
460
+ 825,
461
+ 709
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "4 SPARSIFICATION NETWORK ",
468
+ "text_level": 1,
469
+ "bbox": [
470
+ 176,
471
+ 729,
472
+ 434,
473
+ 747
474
+ ],
475
+ "page_idx": 3
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "Following the theory discussed above, the goal of sparsification network is to generate sparsified subgraphs for input graphs, serving as the approximation function $Q _ { \\phi } ( g \\mid G )$ . Therefore, we need to answer the following three questions in sparsification network. i). What is $\\mathbb { S } _ { G }$ in Equation 1, the class of subgraphs we focus on? ii). How to sample sparsified subgraphs? iii). How to make sparsified subgraph sampling process differentiable for the end-to-end training? In the following, we address the questions one by one. ",
480
+ "bbox": [
481
+ 173,
482
+ 762,
483
+ 825,
484
+ 847
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "$k$ -neighbor subgraphs. We focus on $k$ -neighbor subgraphs for $\\mathbb { S } _ { G }$ (Sadhanala et al., 2016): Given an input graph, a $k$ -neighbor subgraph shares the same set of nodes with the input graph, and each node in the subgraph can select no more than $k$ edges from its one-hop neighborhood. Although the concept of sparsification network is not limited to a specific class of subgraphs, we choose $k$ - neighbor subgraphs for the following reasons. ",
491
+ "bbox": [
492
+ 174,
493
+ 853,
494
+ 823,
495
+ 924
496
+ ],
497
+ "page_idx": 3
498
+ },
499
+ {
500
+ "type": "text",
501
+ "text": "• We are able to adjust the estimation on the amount of task-relevant graph data by tuning the hyper-parameter $k$ . Intuitively, when $k$ is an under-estimate, the amount of task-relevant graph data accessed by GNNs could be inadequate, leading to inferior performance. When $k$ is an overestimate, the downstream GNNs may overfit the introduced noise or irrelevant graph data, resulting in sub-optimal performance. It could be difficult to set a golden hyper-parameter that works all time, but one has the freedom to choose the $k$ that is the best fit for a specific task. • $k$ -neighbor subgraphs are friendly to parallel computation. As each node selects its edges independently from its neighborhood, we can utilize tensor operations in existing deep learning frameworks, such as tensorflow (Abadi et al., 2016), to speed up the sparsification process. ",
502
+ "bbox": [
503
+ 169,
504
+ 103,
505
+ 825,
506
+ 234
507
+ ],
508
+ "page_idx": 4
509
+ },
510
+ {
511
+ "type": "text",
512
+ "text": "Sampling $k$ -neighbor subgraphs. Given $k$ and an input graph $G = ( V , E , \\mathbf { A } )$ , we obtain a $k$ - neighbor subgraph by repeatedly sampling edges for each node in the original graph. Without loss of generality, we sketch this sampling process by focusing on a specific node $u$ in graph $G$ . Let $\\mathbb { N } _ { u }$ be the set of one-hop neighbors of node $u$ . ",
513
+ "bbox": [
514
+ 173,
515
+ 244,
516
+ 825,
517
+ 301
518
+ ],
519
+ "page_idx": 4
520
+ },
521
+ {
522
+ "type": "text",
523
+ "text": "1. $v \\sim f _ { \\phi } ( V ( u ) , V ( \\mathbb { N } _ { u } ) , \\pmb { \\mathsf { A } } ( u ) )$ , where $f _ { \\phi } ( \\cdot )$ is a function that generates a one-hop neighbor $v$ from the learned distribution based on node $u$ ’s attributes, node attributes of $u$ ’s neighbors $V ( \\mathbb { N } _ { u } )$ , and their edge attributes $\\pmb { \\mathsf { A } } ( u )$ . In particular, the learned distribution is encoded by parameters $\\phi$ . \n2. Edge $E ( u , v )$ is selected for node $u$ . \n3. The above two steps are repeated $k$ times. ",
524
+ "bbox": [
525
+ 176,
526
+ 311,
527
+ 825,
528
+ 392
529
+ ],
530
+ "page_idx": 4
531
+ },
532
+ {
533
+ "type": "text",
534
+ "text": "Note that the above process performs sampling without replacement. Given a node $u$ , each of its adjacent edges is selected at most once. Moreover, the sampling function $f _ { \\phi } ( \\cdot )$ is shared among nodes; therefore, the number of parameters $\\phi$ is independent of the input graph size. ",
535
+ "bbox": [
536
+ 174,
537
+ 404,
538
+ 823,
539
+ 445
540
+ ],
541
+ "page_idx": 4
542
+ },
543
+ {
544
+ "type": "text",
545
+ "text": "Making samples differentiable. While conventional methods are able to generate discrete samples (Sadhanala et al., 2016), these samples are not differentiable such that it is difficult to utilize them to optimize sample generation. To make samples differentiable, we propose a Gumbel-Softmax based multi-layer neural network to implement the sampling function $f _ { \\phi } ( \\cdot )$ discussed in above. ",
546
+ "bbox": [
547
+ 174,
548
+ 452,
549
+ 825,
550
+ 508
551
+ ],
552
+ "page_idx": 4
553
+ },
554
+ {
555
+ "type": "text",
556
+ "text": "To make the discussion self-contained, we briefly discuss the idea of Gumbel-Softmax. GumbelSoftmax is a reparameterization trick used to generate differentiable discrete samples (Jang et al., 2017; Maddison et al., 2017). Under appropriate hyper-parameter settings, Gumbel-Softmax is able to generate continuous vectors that are as “sharp” as one-hot vectors widely used to encode discrete data. ",
557
+ "bbox": [
558
+ 173,
559
+ 515,
560
+ 825,
561
+ 585
562
+ ],
563
+ "page_idx": 4
564
+ },
565
+ {
566
+ "type": "text",
567
+ "text": "Without loss of generality, we focus on a specific node $u$ in a graph $G = ( V , E , \\pmb { \\Delta } )$ . Let $\\mathbb { N } _ { u }$ be the set of one-hop neighbors of node $u$ . We implement $f _ { \\phi } ( \\cdot )$ as follows. ",
568
+ "bbox": [
569
+ 171,
570
+ 592,
571
+ 823,
572
+ 621
573
+ ],
574
+ "page_idx": 4
575
+ },
576
+ {
577
+ "type": "text",
578
+ "text": "1. $\\forall v \\in \\mathbb { N } _ { u }$ ",
579
+ "bbox": [
580
+ 178,
581
+ 631,
582
+ 261,
583
+ 647
584
+ ],
585
+ "page_idx": 4
586
+ },
587
+ {
588
+ "type": "equation",
589
+ "img_path": "images/7270bd84adece150bfe78946cd9dd8c0a7c5d93bd622e1af6fbde136f2cdcf40.jpg",
590
+ "text": "$$\nz _ { u , v } = \\mathbf { M } \\mathbf { L } \\mathbf { P } _ { \\phi } ( V ( u ) , V ( v ) , \\mathbf { A } ( u , v ) ) ,\n$$",
591
+ "text_format": "latex",
592
+ "bbox": [
593
+ 387,
594
+ 643,
595
+ 632,
596
+ 661
597
+ ],
598
+ "page_idx": 4
599
+ },
600
+ {
601
+ "type": "text",
602
+ "text": "where ${ \\mathrm { M L P } } _ { \\phi }$ is a multi-layer neural network with parameters $\\phi$ . ",
603
+ "bbox": [
604
+ 194,
605
+ 664,
606
+ 619,
607
+ 679
608
+ ],
609
+ "page_idx": 4
610
+ },
611
+ {
612
+ "type": "text",
613
+ "text": "2. $\\forall v \\in \\mathbb { N } _ { u }$ , we employ a softmax function to compute the probability to sample the edge, ",
614
+ "bbox": [
615
+ 173,
616
+ 681,
617
+ 769,
618
+ 696
619
+ ],
620
+ "page_idx": 4
621
+ },
622
+ {
623
+ "type": "equation",
624
+ "img_path": "images/d13f4b0be651065fa06a514d908010713d9c0e68b0a7f7232046fe2538206d7e.jpg",
625
+ "text": "$$\n\\pi _ { u , v } = \\frac { \\exp ( z _ { u , v } ) } { \\sum _ { w \\in \\mathbb { N } _ { u } } \\exp ( z _ { u , w } ) }\n$$",
626
+ "text_format": "latex",
627
+ "bbox": [
628
+ 419,
629
+ 702,
630
+ 601,
631
+ 738
632
+ ],
633
+ "page_idx": 4
634
+ },
635
+ {
636
+ "type": "text",
637
+ "text": "3. Using Gumbel-Softmax, we generate differentiable samples ",
638
+ "bbox": [
639
+ 176,
640
+ 744,
641
+ 591,
642
+ 761
643
+ ],
644
+ "page_idx": 4
645
+ },
646
+ {
647
+ "type": "equation",
648
+ "img_path": "images/cbe1e535314e3a1a4a5457d67191ad85c2ffa5506c23f209c3890a512f5d5439.jpg",
649
+ "text": "$$\nx _ { u , v } = \\frac { \\exp ( ( \\log ( \\pi _ { u , v } ) + \\epsilon _ { v } ) / \\tau ) } { \\sum _ { w \\in \\mathbb { N } _ { u } } \\exp ( ( \\log ( \\pi _ { u , w } ) + \\epsilon _ { w } ) / \\tau ) }\n$$",
650
+ "text_format": "latex",
651
+ "bbox": [
652
+ 369,
653
+ 765,
654
+ 651,
655
+ 801
656
+ ],
657
+ "page_idx": 4
658
+ },
659
+ {
660
+ "type": "text",
661
+ "text": "where $x _ { u , v }$ is a scalar, $\\epsilon _ { v } = - \\log ( - \\log ( s ) )$ with $s$ randomly drawn from Uniform $( 0 , 1 )$ , and $\\tau$ is a hyper-parameter called temperature which controls the interpolation between discrete distribution and continuous categorical densities. ",
662
+ "bbox": [
663
+ 196,
664
+ 806,
665
+ 825,
666
+ 848
667
+ ],
668
+ "page_idx": 4
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "Note that when we sample $k$ edges, the computation for $z _ { u , v }$ and $\\pi _ { u , v }$ only needs to be performed once. For the hyper-parameter $\\tau$ , we discuss how to tune it as follows. ",
673
+ "bbox": [
674
+ 176,
675
+ 859,
676
+ 820,
677
+ 888
678
+ ],
679
+ "page_idx": 4
680
+ },
681
+ {
682
+ "type": "text",
683
+ "text": "Discussion on temperature tuning. The behavior of Gumbel-Softmax is governed by a hyperparameter $\\tau$ called temperature. In general, when $\\tau$ is small, the Gumbel-Softmax distribution resembles the discrete distribution, which induces strong sparsity; however, small $\\tau$ also introduces high variance gradient that blocks effective backpropagation. A high value of $\\tau$ cannot produce expected sparsification effect. Following the practice in (Jang et al., 2017), we adopt the strategy by starting the training with a high temperature and anneal to a small value with a guided schedule. ",
684
+ "bbox": [
685
+ 173,
686
+ 895,
687
+ 821,
688
+ 924
689
+ ],
690
+ "page_idx": 4
691
+ },
692
+ {
693
+ "type": "text",
694
+ "text": "",
695
+ "bbox": [
696
+ 174,
697
+ 103,
698
+ 823,
699
+ 160
700
+ ],
701
+ "page_idx": 5
702
+ },
703
+ {
704
+ "type": "text",
705
+ "text": "Sparsification algorithm and its complexity. As shown in Algorithm 2, given hyper-parameter $k$ , the sparsification network visits each node’s one-hop neighbors $k$ times. Let $m$ be the total number of edges in the graph. The complexity of sampling subgraphs by the sparsification network is $O ( k m )$ . When $k$ is small in practice, the overall complexity is $O ( m )$ . ",
706
+ "bbox": [
707
+ 173,
708
+ 166,
709
+ 825,
710
+ 223
711
+ ],
712
+ "page_idx": 5
713
+ },
714
+ {
715
+ "type": "text",
716
+ "text": "Algorithm 2 Sampling subgraphs by sparsification network ",
717
+ "text_level": 1,
718
+ "bbox": [
719
+ 173,
720
+ 239,
721
+ 566,
722
+ 255
723
+ ],
724
+ "page_idx": 5
725
+ },
726
+ {
727
+ "type": "text",
728
+ "text": "Input: graph $G = ( V , E , \\pmb { \\Delta } )$ and integer $k$ . \n1: Edge set $\\mathbb { H } = \\boldsymbol { \\emptyset }$ \n2: for $u \\in \\mathbb { V }$ do \n3: for $v \\in \\mathbb { N } _ { u }$ do \n4: $z _ { u , v } \\gets \\mathrm { M L P } _ { \\phi } ( V ( u ) , V ( v ) , \\mathbf { A } ( u , v ) )$ \n5: end for \n6: for $v \\in \\mathbb { N } _ { u }$ do \n7: $\\pi _ { u , v } \\exp ( z _ { u , v } ) / { \\sum _ { w \\in \\mathbb { N } _ { u } } \\exp ( z _ { u , w } ) }$ \n8: end for \n9: for $j = 1 , \\cdots , k$ do \n10: for $v \\in \\mathbb { N } _ { u }$ do \n11: $\\begin{array} { r } { x _ { u , v } \\overset { \\sim } { } \\exp ( ( \\log ( \\pi _ { u , v } ) + \\epsilon _ { v } ) / \\tau ) / { \\sum _ { w \\in \\mathbb { N } _ { u } } \\exp ( ( \\log ( \\pi _ { u , w } ) + \\epsilon _ { w } ) / \\tau ) } } \\end{array}$ \n12: end for \n13: Add the edge represented by vector $[ x _ { u , v } ]$ into $\\mathbb { H }$ \n14: end for \n15: end for ",
729
+ "bbox": [
730
+ 176,
731
+ 257,
732
+ 732,
733
+ 481
734
+ ],
735
+ "page_idx": 5
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "Comparison with multiple related methods. Unlike GraphSAGE (Hamilton et al., 2017), FastGCN (Chen et al., 2018), and AS-GCN (Huang et al., 2018) that incorporate layer-wise node samplers to reduce the complexity of GNNs, NeuralSparse samples subgraphs before applying GNNs. As for the computation complexity, the sparsification in NeuralSparse is more friendly to parallel computation than the layer-conditioned approach in AS-GCN. Compared with GAT (Velickovi ˇ c´ et al., 2018; Zhang et al., 2018a), the NeuralSparse can produce sparser neighborhood, which effectively mitigates overfitting risks. Unlike LDS (Franceschi et al., 2019), NeuralSparse learns inductive graph sparsification, and its graph sampling is constrained by input graph topology. ",
740
+ "bbox": [
741
+ 173,
742
+ 497,
743
+ 825,
744
+ 609
745
+ ],
746
+ "page_idx": 5
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "5 EXPERIMENTAL STUDY ",
751
+ "text_level": 1,
752
+ "bbox": [
753
+ 176,
754
+ 630,
755
+ 400,
756
+ 646
757
+ ],
758
+ "page_idx": 5
759
+ },
760
+ {
761
+ "type": "text",
762
+ "text": "In this section, we evaluate our proposed NeuralSparse on node classification task, including inductive and transductive settings. We demonstrate that NeuralSparse achieves superior classification performance over state-of-the-art GNN models. Moreover, we provide a case study to demonstrate how sparsified subgraphs generated by NeuralSparse could improve classification. The supplementary material contains more detailed experimental information. ",
763
+ "bbox": [
764
+ 174,
765
+ 662,
766
+ 825,
767
+ 733
768
+ ],
769
+ "page_idx": 5
770
+ },
771
+ {
772
+ "type": "text",
773
+ "text": "5.1 DATASETS ",
774
+ "text_level": 1,
775
+ "bbox": [
776
+ 174,
777
+ 751,
778
+ 287,
779
+ 765
780
+ ],
781
+ "page_idx": 5
782
+ },
783
+ {
784
+ "type": "text",
785
+ "text": "We employ five datasets from various domains and conduct node classification task following the settings as described in Hamilton et al. (2017); Kipf & Welling (2017). The dataset statistics are summarized in Table 1. ",
786
+ "bbox": [
787
+ 178,
788
+ 776,
789
+ 821,
790
+ 819
791
+ ],
792
+ "page_idx": 5
793
+ },
794
+ {
795
+ "type": "text",
796
+ "text": "Inductive datasets. We utilize the Reddit and PPI datasets and follow the same setting in Hamilton et al. (2017). The Reddit dataset contains post-to-post graph with word vectors as node features. The node labels represent which community Reddit posts belong to. The protein-protein interaction (PPI) dataset contains graphs corresponding to different human tissues. The node features are positional gene sets, motif gene sets and immunological signatures. The nodes are multi-labeled by gene ontology. The graph in the Transaction dataset contains real transactions between organizations in two years, with the first year for training and the second year for validation/testing. Each node represents an organization and each edge indicates a transaction between two organizations. Node attributes are side information about the organizations such as account balance, cash reserve, etc. On this dataset, we aim to classify organizations into two categories: promising or others for investment in near future. The class distribution in the Transaction dataset is highly imbalanced. During the training under inductive setting, algorithms have only access to training nodes’ attributes and edges. In the PPI and Transaction datasets, the models have to generalize to completely unseen graphs. ",
797
+ "bbox": [
798
+ 174,
799
+ 825,
800
+ 823,
801
+ 924
802
+ ],
803
+ "page_idx": 5
804
+ },
805
+ {
806
+ "type": "table",
807
+ "img_path": "images/e4cb5680bb6bc3cae62b5bfae1509c163ad2ef42a10145ef12b399b1981d4c00.jpg",
808
+ "table_caption": [
809
+ "Table 1: Dataset statistics "
810
+ ],
811
+ "table_footnote": [],
812
+ "table_body": "<table><tr><td></td><td>Reddit</td><td>PPI</td><td>Transaction</td><td>Cora</td><td>Citeseer</td></tr><tr><td>Task</td><td>Inductive</td><td>Inductive</td><td>Inductive</td><td>Transductive</td><td>Transductive</td></tr><tr><td>Nodes</td><td>232,965</td><td>56,944</td><td>95,544</td><td>2,708</td><td>3,327</td></tr><tr><td>Edges</td><td>11,606,919</td><td>818,716</td><td>963,468</td><td>5,429</td><td>4,732</td></tr><tr><td>Features</td><td>602</td><td>50</td><td>120</td><td>1,433</td><td>3,703</td></tr><tr><td>Classes</td><td>41</td><td>121</td><td>2</td><td>7</td><td>6</td></tr><tr><td>Training Nodes</td><td>152,410</td><td>44,906</td><td>47,772</td><td>140</td><td>120</td></tr><tr><td>Validation Nodes</td><td>23,699</td><td>6,514</td><td>9,554</td><td>500</td><td>500</td></tr><tr><td>Testing Nodes</td><td>55,334</td><td>5,524</td><td>38,218</td><td>1,000</td><td>1,000</td></tr></table>",
813
+ "bbox": [
814
+ 187,
815
+ 112,
816
+ 807,
817
+ 253
818
+ ],
819
+ "page_idx": 6
820
+ },
821
+ {
822
+ "type": "text",
823
+ "text": "",
824
+ "bbox": [
825
+ 174,
826
+ 282,
827
+ 825,
828
+ 367
829
+ ],
830
+ "page_idx": 6
831
+ },
832
+ {
833
+ "type": "text",
834
+ "text": "Transductive datasets. We use two citation benchmark datasets with transductive experimental setting in Yang et al. (2016); Kipf & Welling (2017). The citation graphs contain nodes corresponding to documents and edges as citations. Node features are the sparse bag-of-words representations of documents and node labels indicate the topic class of the documents. In transductive learning, the training methods have access to all node features and edges, with a limited subset of node labels. ",
835
+ "bbox": [
836
+ 174,
837
+ 373,
838
+ 825,
839
+ 444
840
+ ],
841
+ "page_idx": 6
842
+ },
843
+ {
844
+ "type": "text",
845
+ "text": "5.2 EXPERIMENTAL SETUP ",
846
+ "text_level": 1,
847
+ "bbox": [
848
+ 176,
849
+ 463,
850
+ 375,
851
+ 477
852
+ ],
853
+ "page_idx": 6
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "Baseline models. We incorporate four state-of-the-art methods as the base GNN components, including GCN (Kipf & Welling, 2017), GraphSAGE (Hamilton et al., 2017), GAT (Velickovi ˇ c et al., ´ 2018), and GIN (Xu et al., 2019). We evaluate our proposed NeuralSparse with sparsification network and each of the four GNNs. Besides, we also implement variants of NeuralSparse by replacing the sparsification network with either the spectral sparsifier (SS, Sadhanala et al., 2016) or the Rank Degree (RD, Voudigari et al., 2016) method. ",
858
+ "bbox": [
859
+ 174,
860
+ 491,
861
+ 825,
862
+ 574
863
+ ],
864
+ "page_idx": 6
865
+ },
866
+ {
867
+ "type": "text",
868
+ "text": "Temperature tuning. We anneal the temperature with the schedule $\\tau = \\operatorname* { m a x } ( 0 . 0 5 , \\exp ( - r p ) )$ , where $p$ is the training epoch and $r ~ \\in ~ 1 0 ^ { \\{ - 5 , - 4 , - 3 , - 2 , - 1 \\} }$ . $\\tau$ is updated every $N$ steps and $N \\in \\{ 5 0 , 1 0 0 , . . . , 5 0 0 \\}$ . Compared with MNIST VAE model in Jang et al. (2017), smaller hyperparameter $\\tau$ fits NeuralSparse better in practice. ",
869
+ "bbox": [
870
+ 174,
871
+ 582,
872
+ 825,
873
+ 640
874
+ ],
875
+ "page_idx": 6
876
+ },
877
+ {
878
+ "type": "text",
879
+ "text": "Metrics. We evaluate the performance on the transductive datasets with accuracy (Kipf & Welling, 2017). For inductive tasks on the Reddit and PPI datasets, we report micro-averaged F1 scores (Hamilton et al., 2017). Due to the highly imbalanced classes in the Transaction dataset, models are evaluated with AUC value (Huang & Ling, 2005). The results show the average of 10 runs. ",
880
+ "bbox": [
881
+ 174,
882
+ 646,
883
+ 825,
884
+ 702
885
+ ],
886
+ "page_idx": 6
887
+ },
888
+ {
889
+ "type": "text",
890
+ "text": "5.3 CLASSIFICATION PERFORMANCE ",
891
+ "text_level": 1,
892
+ "bbox": [
893
+ 176,
894
+ 722,
895
+ 442,
896
+ 736
897
+ ],
898
+ "page_idx": 6
899
+ },
900
+ {
901
+ "type": "text",
902
+ "text": "Table 2 summarizes classification performance of NeuralSparse and the baseline methods on all datasets. For Reddit, PPI, Transaction, Cora and Citeseer, the hyper-parameter $k$ is set as 30, 15, 10, 5, and 3 respectively. The hyper-parameter $l$ is set as 1 in this experiment. Note that the result of GAT on Reddit is missing due to the out-of-memory error. ",
903
+ "bbox": [
904
+ 174,
905
+ 750,
906
+ 825,
907
+ 805
908
+ ],
909
+ "page_idx": 6
910
+ },
911
+ {
912
+ "type": "text",
913
+ "text": "Overall, NeuralSparse is able to help GNN techniques achieve competitive generalization performance with sparsified graph data. We make the following observations. (1) Compared with basic GNN models, NeuralSparse can enhance the generalization performance on node classification tasks by utilizing the sparsified subgraphs from sparsification network, especially in the inductive setting. Indeed, large neighborhood size in the original graphs could bring increased chance of introducing noise into the convolutional operations, leading to sub-optimal performance. (2) With different GNN models, the NeuralSparse can consistently achieve comparable or superior performance, which demonstrates NeuralSparse is general and can be applied to multiple classification models. ",
914
+ "bbox": [
915
+ 174,
916
+ 811,
917
+ 825,
918
+ 924
919
+ ],
920
+ "page_idx": 6
921
+ },
922
+ {
923
+ "type": "table",
924
+ "img_path": "images/29474594c48338b6baa73bfa1db1df8d01e6bffbd22ce58ee8c1cbb19683fe2d.jpg",
925
+ "table_caption": [
926
+ "Table 2: Node classification performance "
927
+ ],
928
+ "table_footnote": [
929
+ "(\\* Report the better performance with SS or RD) "
930
+ ],
931
+ "table_body": "<table><tr><td rowspan=\"2\">Sparsifier</td><td rowspan=\"2\">Method</td><td>Reddit</td><td>PPI</td><td>Transaction</td><td>Cora</td><td>Citeseer</td></tr><tr><td>Micro-F1</td><td>Micro-F1</td><td>AUC</td><td>Accuracy</td><td>Accuracy</td></tr><tr><td rowspan=\"4\">N/A</td><td>GCN</td><td>0.922 ± 0.041</td><td>0.532 ± 0.024</td><td>0.564 ± 0.018</td><td>0.810 ± 0.027</td><td>0.694 ± 0.020</td></tr><tr><td>GraphSAGE</td><td>0.938 ± 0.029</td><td>0.600 ± 0.027</td><td>0.574 ± 0.029</td><td>0.825 ± 0.033</td><td>0.710 ± 0.020</td></tr><tr><td>GAT</td><td></td><td>0.917 ± 0.030</td><td>0.616 ± 0.022</td><td>0.821 ± 0.043</td><td>0.721 ± 0.037</td></tr><tr><td>GIN</td><td>0.928 ± 0.022</td><td>0.703 ± 0.028</td><td>0.607 ± 0.031</td><td>0.816 ± 0.020</td><td>0.709 ± 0.037</td></tr><tr><td rowspan=\"4\">sS/ RD*</td><td>GCN</td><td>0.912 ± 0.022</td><td>0.521 ± 0.024</td><td>0.562 ± 0.035</td><td>0.780 ± 0.045</td><td>0.684 ± 0.033</td></tr><tr><td>GraphSAGE</td><td>0.907 ± 0.018</td><td>0.576 ± 0.022</td><td>0.565 ± 0.042</td><td>0.806 ± 0.032</td><td>0.701 ± 0.027</td></tr><tr><td>GAT</td><td></td><td>0.889 ± 0.034</td><td>0.614 ± 0.044</td><td>0.807 ± 0.047</td><td>0.686 ± 0.034</td></tr><tr><td>GIN</td><td>0.901 ± 0.021</td><td>0.693 ± 0.019</td><td>0.593 ± 0.038</td><td>0.785 ± 0.041</td><td>0.706 ± 0.043</td></tr><tr><td rowspan=\"4\">Neural Sparse</td><td>GCN</td><td>0.946 ± 0.020</td><td>0.600 ± 0.014</td><td>0.610 ± 0.022</td><td>0.821 ± 0.014</td><td>0.715 ± 0.014</td></tr><tr><td>GraphSAGE</td><td>0.951 ± 0.015</td><td>0.626 ± 0.023</td><td>0.649 ± 0.018</td><td>0.832 ± 0.024</td><td>0.720 ± 0.013</td></tr><tr><td>GAT</td><td></td><td>0.921 ± 0.015</td><td>0.671 ± 0.018</td><td>0.834 ± 0.015</td><td>0.724 ± 0.026</td></tr><tr><td>GIN</td><td>0.937± 0.027</td><td>0.744 ± 0.015</td><td>0.634±0.023</td><td>0.824 ± 0.027</td><td>0.719 ± 0.015</td></tr></table>",
932
+ "bbox": [
933
+ 150,
934
+ 107,
935
+ 856,
936
+ 314
937
+ ],
938
+ "page_idx": 7
939
+ },
940
+ {
941
+ "type": "image",
942
+ "img_path": "images/2893d00ddd1fcdf5088ab61bc0a7cb6c06e5d73bb59385e19233158ebec593ea.jpg",
943
+ "image_caption": [
944
+ "Figure 3: Sparsified subgraphs and performance vs hyper-parameters "
945
+ ],
946
+ "image_footnote": [],
947
+ "bbox": [
948
+ 183,
949
+ 349,
950
+ 820,
951
+ 479
952
+ ],
953
+ "page_idx": 7
954
+ },
955
+ {
956
+ "type": "text",
957
+ "text": "(3) In comparison with the two NeuralSparse variants SS-GraphSAGE and RD-GraphSAGE, NeuralSparse outperforms because of the automatically learned graph sparsification with both structural and non-structural information as input. ",
958
+ "bbox": [
959
+ 173,
960
+ 540,
961
+ 825,
962
+ 583
963
+ ],
964
+ "page_idx": 7
965
+ },
966
+ {
967
+ "type": "text",
968
+ "text": "5.4 SENSITIVITY TO HYPER-PARAMETERS AND SPARSIFIED SUBGRAPHS ",
969
+ "text_level": 1,
970
+ "bbox": [
971
+ 176,
972
+ 619,
973
+ 689,
974
+ 633
975
+ ],
976
+ "page_idx": 7
977
+ },
978
+ {
979
+ "type": "text",
980
+ "text": "Figure 3(c) demonstrates how classification performance responds when $k$ increases on the Transaction dataset. There exists an optimal $k$ that delivers the best classification AUC score. When $k$ is small, NeuralSparse can only make use of little relevant structural information in feature aggregation, which leads to inferior performance. When $k$ increases, the aggregation convolution involves more complex neighborhood aggregation with higher chance of overfitting noise data, which negatively impacts the classification performance for unseen testing data. Figure 3(d) shows how hyperparameter $l$ impacts classification performance on the Transaction dataset. When $l$ increases from 1 to 5, we observe a relatively small improvement in classification AUC score. As the parameters in the sparsification network are shared by all edges in the graph, the estimation variance from random sampling could already be mitigated to some extent by a number of sampled edges in a sparsified subgraph. Thus, when we increase the number of sparsified subgraphs, the incremental gain could be small. ",
981
+ "bbox": [
982
+ 173,
983
+ 652,
984
+ 825,
985
+ 819
986
+ ],
987
+ "page_idx": 7
988
+ },
989
+ {
990
+ "type": "text",
991
+ "text": "In Figure 3(a, b), we present the sparsified graphs output by two baseline methods, SS and RD. By comparing the two plots with Figure 1(b), we make the following observations. First, the NeuralSparse sparsified graph tends to select edges that connect nodes of identical labels, which favors the downstream classification task. The observed clustering effect could further boost the confidence of decision making. Second, instead of exploring all the neighbors, we can focus on selected connections/edges in sparsified graphs, which could make it easier for human experts to perform model interpretation and result visualization. ",
992
+ "bbox": [
993
+ 173,
994
+ 825,
995
+ 823,
996
+ 922
997
+ ],
998
+ "page_idx": 7
999
+ },
1000
+ {
1001
+ "type": "text",
1002
+ "text": "6 CONCLUSION ",
1003
+ "text_level": 1,
1004
+ "bbox": [
1005
+ 174,
1006
+ 102,
1007
+ 318,
1008
+ 117
1009
+ ],
1010
+ "page_idx": 8
1011
+ },
1012
+ {
1013
+ "type": "text",
1014
+ "text": "In this paper, we propose Neural Sparsification (NeuralSparse) to address the overfitting issues brought by the complexity in real-life large graphs. NeuralSparse consists of two major components: (1) The sparsification network sparsifies input graphs by sampling edges following a learned distribution; (2) GNNs take sparsified subgraphs as input and extracts node representations for downstream tasks. The two components in NeuralSparse can be jointly trained with supervised loss, gradient descent, and backpropagation techniques. The experimental study on real-life datasets show that the NeuralSparse consistently renders more robust graph representations, and brings up to $7 \\%$ improvement in accuracy over the state-of-the-art GNN models. ",
1015
+ "bbox": [
1016
+ 174,
1017
+ 133,
1018
+ 825,
1019
+ 244
1020
+ ],
1021
+ "page_idx": 8
1022
+ },
1023
+ {
1024
+ "type": "text",
1025
+ "text": "REFERENCES ",
1026
+ "text_level": 1,
1027
+ "bbox": [
1028
+ 176,
1029
+ 103,
1030
+ 287,
1031
+ 117
1032
+ ],
1033
+ "page_idx": 9
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "Mart´ın Abadi, Paul Barham, Jianmin Chen, Zhifeng Chen, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Geoffrey Irving, Michael Isard, et al. Tensorflow: a system for largescale machine learning. In OSDI, 2016. ",
1038
+ "bbox": [
1039
+ 176,
1040
+ 126,
1041
+ 823,
1042
+ 167
1043
+ ],
1044
+ "page_idx": 9
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "Sami Abu-El-Haija, Bryan Perozzi, Amol Kapoor, Hrayr Harutyunyan, Nazanin Alipourfard, Kristina Lerman, Greg Ver Steeg, and Aram Galstyan. Mixhop: Higher-order graph convolution architectures via sparsified neighborhood mixing. In ICML, 2019. ",
1049
+ "bbox": [
1050
+ 176,
1051
+ 178,
1052
+ 821,
1053
+ 220
1054
+ ],
1055
+ "page_idx": 9
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "Bijaya Adhikari, Yao Zhang, Sorour E Amiri, Aditya Bharadwaj, and B Aditya Prakash. Propagation-based temporal network summarization. TKDE, 2018. ",
1060
+ "bbox": [
1061
+ 171,
1062
+ 228,
1063
+ 821,
1064
+ 258
1065
+ ],
1066
+ "page_idx": 9
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "Leman Akoglu, Hanghang Tong, and Danai Koutra. Graph based anomaly detection and description: a survey. Data mining and knowledge discovery, 2015. ",
1071
+ "bbox": [
1072
+ 171,
1073
+ 266,
1074
+ 823,
1075
+ 296
1076
+ ],
1077
+ "page_idx": 9
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "Joan Bruna, Wojciech Zaremba, Arthur Szlam, and Yann LeCun. Spectral networks and locally connected networks on graphs. In ICLR, 2014. ",
1082
+ "bbox": [
1083
+ 169,
1084
+ 304,
1085
+ 825,
1086
+ 334
1087
+ ],
1088
+ "page_idx": 9
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "Daniele Calandriello, Ioannis Koutis, Alessandro Lazaric, and Michal Valko. Improved large-scale graph learning through ridge spectral sparsification. In ICML, 2018. ",
1093
+ "bbox": [
1094
+ 171,
1095
+ 342,
1096
+ 823,
1097
+ 371
1098
+ ],
1099
+ "page_idx": 9
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "Alireza Chakeri, Hamidreza Farhidzadeh, and Lawrence O Hall. Spectral sparsification in spectral clustering. In ICPR, 2016. ",
1104
+ "bbox": [
1105
+ 171,
1106
+ 380,
1107
+ 823,
1108
+ 409
1109
+ ],
1110
+ "page_idx": 9
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "Jie Chen, Tengfei Ma, and Cao Xiao. Fastgcn: fast learning with graph convolutional networks via importance sampling. In ICLR, 2018. ",
1115
+ "bbox": [
1116
+ 171,
1117
+ 417,
1118
+ 823,
1119
+ 446
1120
+ ],
1121
+ "page_idx": 9
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "Michael Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on ¨ graphs with fast localized spectral filtering. In NIPS, 2016. ",
1126
+ "bbox": [
1127
+ 171,
1128
+ 455,
1129
+ 823,
1130
+ 484
1131
+ ],
1132
+ "page_idx": 9
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "Talya Eden, Shweta Jain, Ali Pinar, Dana Ron, and C. Seshadhri. Provable and practical approximations for the degree distribution using sublinear graph samples. In WWW, 2018. ",
1137
+ "bbox": [
1138
+ 174,
1139
+ 492,
1140
+ 821,
1141
+ 523
1142
+ ],
1143
+ "page_idx": 9
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "Luca Franceschi, Mathias Niepert, Massimiliano Pontil, and Xiao He. Learning discrete structures for graph neural networks. In ICML, 2019. ",
1148
+ "bbox": [
1149
+ 176,
1150
+ 530,
1151
+ 823,
1152
+ 560
1153
+ ],
1154
+ "page_idx": 9
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NIPS, 2017. ",
1159
+ "bbox": [
1160
+ 176,
1161
+ 568,
1162
+ 821,
1163
+ 598
1164
+ ],
1165
+ "page_idx": 9
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "Jin Huang and Charles X Ling. Using auc and accuracy in evaluating learning algorithms. TKDE, 2005. ",
1170
+ "bbox": [
1171
+ 174,
1172
+ 606,
1173
+ 821,
1174
+ 636
1175
+ ],
1176
+ "page_idx": 9
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "Wenbing Huang, Tong Zhang, Yu Rong, and Junzhou Huang. Adaptive sampling towards fast graph representation learning. In NeurIPS, 2018. ",
1181
+ "bbox": [
1182
+ 176,
1183
+ 645,
1184
+ 821,
1185
+ 674
1186
+ ],
1187
+ "page_idx": 9
1188
+ },
1189
+ {
1190
+ "type": "text",
1191
+ "text": "Christian Hubler, Hans-Peter Kriegel, Karsten Borgwardt, and Zoubin Ghahramani. Metropolis ¨ algorithms for representative subgraph sampling. In ICDM, 2008. ",
1192
+ "bbox": [
1193
+ 174,
1194
+ 681,
1195
+ 821,
1196
+ 712
1197
+ ],
1198
+ "page_idx": 9
1199
+ },
1200
+ {
1201
+ "type": "text",
1202
+ "text": "Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In ICLR, 2017. ",
1203
+ "bbox": [
1204
+ 174,
1205
+ 719,
1206
+ 821,
1207
+ 750
1208
+ ],
1209
+ "page_idx": 9
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. ",
1214
+ "bbox": [
1215
+ 173,
1216
+ 757,
1217
+ 821,
1218
+ 786
1219
+ ],
1220
+ "page_idx": 9
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "John Boaz Lee, Ryan Rossi, and Xiangnan Kong. Graph classification using structural attention. In KDD, 2018. ",
1225
+ "bbox": [
1226
+ 173,
1227
+ 795,
1228
+ 823,
1229
+ 824
1230
+ ],
1231
+ "page_idx": 9
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "Jure Leskovec and Christos Faloutsos. Sampling from large graphs. In KDD, 2006. ",
1236
+ "bbox": [
1237
+ 173,
1238
+ 833,
1239
+ 722,
1240
+ 849
1241
+ ],
1242
+ "page_idx": 9
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "Yaguang Li, Rose Yu, Cyrus Shahabi, and Yan Liu. Diffusion convolutional recurrent neural net work: Data-driven traffic forecasting. In ICLR, 2018. ",
1247
+ "bbox": [
1248
+ 174,
1249
+ 857,
1250
+ 816,
1251
+ 886
1252
+ ],
1253
+ "page_idx": 9
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. In ICLR, 2016. ",
1258
+ "bbox": [
1259
+ 173,
1260
+ 895,
1261
+ 820,
1262
+ 924
1263
+ ],
1264
+ "page_idx": 9
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "Yike Liu, Tara Safavi, Abhilash Dighe, and Danai Koutra. Graph summarization methods and applications: A survey. ACM Computing Surveys, 2018. ",
1269
+ "bbox": [
1270
+ 173,
1271
+ 103,
1272
+ 825,
1273
+ 133
1274
+ ],
1275
+ "page_idx": 10
1276
+ },
1277
+ {
1278
+ "type": "text",
1279
+ "text": "Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. In ICLR, 2017. ",
1280
+ "bbox": [
1281
+ 173,
1282
+ 140,
1283
+ 823,
1284
+ 170
1285
+ ],
1286
+ "page_idx": 10
1287
+ },
1288
+ {
1289
+ "type": "text",
1290
+ "text": "Arun S Maiya and Tanya Y Berger-Wolf. Sampling community structure. In WWW, 2010. ",
1291
+ "bbox": [
1292
+ 173,
1293
+ 178,
1294
+ 766,
1295
+ 195
1296
+ ],
1297
+ "page_idx": 10
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "Michael Mathioudakis, Francesco Bonchi, Carlos Castillo, Aristides Gionis, and Antti Ukkonen. Sparsification of influence networks. In KDD, 2011. ",
1302
+ "bbox": [
1303
+ 171,
1304
+ 202,
1305
+ 821,
1306
+ 232
1307
+ ],
1308
+ "page_idx": 10
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "Mathias Niepert, Mohamed Ahmed, and Konstantin Kutzkov. Learning convolutional neural networks for graphs. In ICML, 2016. ",
1313
+ "bbox": [
1314
+ 171,
1315
+ 239,
1316
+ 823,
1317
+ 270
1318
+ ],
1319
+ "page_idx": 10
1320
+ },
1321
+ {
1322
+ "type": "text",
1323
+ "text": "Veeru Sadhanala, Yu-Xiang Wang, and Ryan Tibshirani. Graph sparsification approaches for laplacian smoothing. In AISTATS, 2016. ",
1324
+ "bbox": [
1325
+ 173,
1326
+ 277,
1327
+ 823,
1328
+ 308
1329
+ ],
1330
+ "page_idx": 10
1331
+ },
1332
+ {
1333
+ "type": "text",
1334
+ "text": "Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 2009. ",
1335
+ "bbox": [
1336
+ 171,
1337
+ 315,
1338
+ 821,
1339
+ 345
1340
+ ],
1341
+ "page_idx": 10
1342
+ },
1343
+ {
1344
+ "type": "text",
1345
+ "text": "Martin Simonovsky and Nikos Komodakis. Dynamic edge-conditioned filters in convolutional neural networks on graphs. In CVPR, 2017. ",
1346
+ "bbox": [
1347
+ 171,
1348
+ 353,
1349
+ 823,
1350
+ 382
1351
+ ],
1352
+ "page_idx": 10
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Li ´ o, and Yoshua \\` Bengio. Graph attention networks. In ICLR, 2018. ",
1357
+ "bbox": [
1358
+ 171,
1359
+ 391,
1360
+ 825,
1361
+ 421
1362
+ ],
1363
+ "page_idx": 10
1364
+ },
1365
+ {
1366
+ "type": "text",
1367
+ "text": "Petar Velickovi ˇ c, William Fedus, William L Hamilton, Pietro Li ´ o, Yoshua Bengio, and R Devon \\` Hjelm. Deep graph infomax. In ICLR, 2019. ",
1368
+ "bbox": [
1369
+ 173,
1370
+ 429,
1371
+ 825,
1372
+ 458
1373
+ ],
1374
+ "page_idx": 10
1375
+ },
1376
+ {
1377
+ "type": "text",
1378
+ "text": "Elli Voudigari, Nikos Salamanos, Theodore Papageorgiou, and Emmanuel J Yannakoudakis. Rank degree: An efficient algorithm for graph sampling. In ASONAM, 2016. ",
1379
+ "bbox": [
1380
+ 171,
1381
+ 467,
1382
+ 823,
1383
+ 496
1384
+ ],
1385
+ "page_idx": 10
1386
+ },
1387
+ {
1388
+ "type": "text",
1389
+ "text": "Keyulu Xu, Chengtao Li, Yonglong Tian, Tomohiro Sonobe, Ken-ichi Kawarabayashi, and Stefanie Jegelka. Representation learning on graphs with jumping knowledge networks. In ICML, 2018. ",
1390
+ "bbox": [
1391
+ 171,
1392
+ 503,
1393
+ 823,
1394
+ 534
1395
+ ],
1396
+ "page_idx": 10
1397
+ },
1398
+ {
1399
+ "type": "text",
1400
+ "text": "Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? ICLR, 2019. ",
1401
+ "bbox": [
1402
+ 173,
1403
+ 541,
1404
+ 823,
1405
+ 570
1406
+ ],
1407
+ "page_idx": 10
1408
+ },
1409
+ {
1410
+ "type": "text",
1411
+ "text": "Zhilin Yang, William W Cohen, and Ruslan Salakhutdinov. Revisiting semi-supervised learning with graph embeddings. In ICML, 2016. ",
1412
+ "bbox": [
1413
+ 173,
1414
+ 579,
1415
+ 823,
1416
+ 609
1417
+ ],
1418
+ "page_idx": 10
1419
+ },
1420
+ {
1421
+ "type": "text",
1422
+ "text": "Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In KDD, 2018a. ",
1423
+ "bbox": [
1424
+ 173,
1425
+ 617,
1426
+ 823,
1427
+ 647
1428
+ ],
1429
+ "page_idx": 10
1430
+ },
1431
+ {
1432
+ "type": "text",
1433
+ "text": "Zhitao Ying, Jiaxuan You, Christopher Morris, Xiang Ren, Will Hamilton, and Jure Leskovec. Hierarchical graph representation learning with differentiable pooling. In NeurIPS, 2018b. ",
1434
+ "bbox": [
1435
+ 171,
1436
+ 655,
1437
+ 823,
1438
+ 684
1439
+ ],
1440
+ "page_idx": 10
1441
+ },
1442
+ {
1443
+ "type": "text",
1444
+ "text": "Jiani Zhang, Xingjian Shi, Junyuan Xie, Hao Ma, Irwin King, and Dit-Yan Yeung. Gaan: Gated attention networks for learning on large and spatiotemporal graphs. arXiv preprint arXiv:1803.07294, 2018a. ",
1445
+ "bbox": [
1446
+ 174,
1447
+ 693,
1448
+ 823,
1449
+ 736
1450
+ ],
1451
+ "page_idx": 10
1452
+ },
1453
+ {
1454
+ "type": "text",
1455
+ "text": "L-C Zhang and M Patone. Graph sampling. Metron, 2017. ",
1456
+ "bbox": [
1457
+ 173,
1458
+ 744,
1459
+ 560,
1460
+ 761
1461
+ ],
1462
+ "page_idx": 10
1463
+ },
1464
+ {
1465
+ "type": "text",
1466
+ "text": "Yizhou Zhang, Yun Xiong, Xiangnan Kong, Shanshan Li, Jinhong Mi, and Yangyong Zhu. Deep collective classification in heterogeneous information networks. In WWW, 2018b. ",
1467
+ "bbox": [
1468
+ 171,
1469
+ 768,
1470
+ 823,
1471
+ 797
1472
+ ],
1473
+ "page_idx": 10
1474
+ },
1475
+ {
1476
+ "type": "text",
1477
+ "text": "Yutao Zhang, Fanjin Zhang, Peiran Yao, and Jie Tang. Name disambiguation in aminer: Clustering, maintenance, and human in the loop. In KDD, 2018c. ",
1478
+ "bbox": [
1479
+ 174,
1480
+ 806,
1481
+ 820,
1482
+ 835
1483
+ ],
1484
+ "page_idx": 10
1485
+ },
1486
+ {
1487
+ "type": "text",
1488
+ "text": "Peixiang Zhao. gsparsify: Graph motif based sparsification for graph clustering. In CIKM, 2015. ",
1489
+ "bbox": [
1490
+ 173,
1491
+ 843,
1492
+ 808,
1493
+ 859
1494
+ ],
1495
+ "page_idx": 10
1496
+ },
1497
+ {
1498
+ "type": "text",
1499
+ "text": "Chenyi Zhuang and Qiang Ma. Dual graph convolutional networks for graph-based semi-supervised classification. In WWW, 2018. ",
1500
+ "bbox": [
1501
+ 173,
1502
+ 868,
1503
+ 823,
1504
+ 897
1505
+ ],
1506
+ "page_idx": 10
1507
+ },
1508
+ {
1509
+ "type": "text",
1510
+ "text": "S1 DATASET DETAILS ",
1511
+ "text_level": 1,
1512
+ "bbox": [
1513
+ 174,
1514
+ 102,
1515
+ 372,
1516
+ 118
1517
+ ],
1518
+ "page_idx": 11
1519
+ },
1520
+ {
1521
+ "type": "text",
1522
+ "text": "In this section, we provide additional details about the Transaction datasets in our experiments. The Transaction dataset contains attributed graph that records transaction history between organizations in two years: 2014 and 2015. Each node represents an organization and each directed edge indicates a transaction between two organizations. Node attributes include organization information like account balance, cash research, etc. Under the inductive experimental setting, We use the 47,772 organization data of the year 2014 for training and remaining data are hidden from the model. The 9,554 organizations are used for validation and 38,218 for testing. Validation and testing node sets are from year 2015 and are not connected to the nodes in the training set. Like the PPI dataset, models need to generalize to unseen graph when testing on the Transaction dataset. ",
1523
+ "bbox": [
1524
+ 174,
1525
+ 135,
1526
+ 825,
1527
+ 261
1528
+ ],
1529
+ "page_idx": 11
1530
+ },
1531
+ {
1532
+ "type": "text",
1533
+ "text": "S2 EXPERIMENTAL SETTINGS ",
1534
+ "text_level": 1,
1535
+ "bbox": [
1536
+ 176,
1537
+ 284,
1538
+ 437,
1539
+ 300
1540
+ ],
1541
+ "page_idx": 11
1542
+ },
1543
+ {
1544
+ "type": "text",
1545
+ "text": "In this section, we provide more details about our implementation and experiments in favor of reproducibility. ",
1546
+ "bbox": [
1547
+ 173,
1548
+ 318,
1549
+ 821,
1550
+ 345
1551
+ ],
1552
+ "page_idx": 11
1553
+ },
1554
+ {
1555
+ "type": "text",
1556
+ "text": "S2.1 HARDWARE ",
1557
+ "text_level": 1,
1558
+ "bbox": [
1559
+ 174,
1560
+ 366,
1561
+ 307,
1562
+ 380
1563
+ ],
1564
+ "page_idx": 11
1565
+ },
1566
+ {
1567
+ "type": "text",
1568
+ "text": "All experiment are run on a Linux machine with 16 Intel(R) Xeon(R) CPU (E5-2637 v4 $@$ 3.50GHz) and 128GB RAM. Some models (e.g. NeuralSparse and GCN) are accelerated by 4 NVIDIA GeForce GTX1080Ti GPU with 11GB RAM. ",
1569
+ "bbox": [
1570
+ 176,
1571
+ 393,
1572
+ 825,
1573
+ 435
1574
+ ],
1575
+ "page_idx": 11
1576
+ },
1577
+ {
1578
+ "type": "text",
1579
+ "text": "S2.2 IMPLEMENTATIONS OF NEURALSPARSE ",
1580
+ "text_level": 1,
1581
+ "bbox": [
1582
+ 176,
1583
+ 455,
1584
+ 498,
1585
+ 469
1586
+ ],
1587
+ "page_idx": 11
1588
+ },
1589
+ {
1590
+ "type": "text",
1591
+ "text": "We implement the proposed NeuralSparse in tensorflow framework for efficient GPU computation. In particular, the multi-layer neural network (Equation 4) in the sparsification network is implemented by two-layer feed-forward neural networks in all experiment, where the hyper-parameter $k$ is searched between 2 and 50 for the optimal performance. We employ cross-entropy to formulate the loss function and apply Adam optimizer for training. The learning rate of Adam optimizer is initially set to be $\\alpha = \\mathrm { \\bar { 1 . 0 } \\times 1 0 ^ { - 3 } }$ . We initial the weight matrices in the proposed NeuralSparse model with Xavier initialization. ",
1592
+ "bbox": [
1593
+ 174,
1594
+ 482,
1595
+ 825,
1596
+ 580
1597
+ ],
1598
+ "page_idx": 11
1599
+ },
1600
+ {
1601
+ "type": "text",
1602
+ "text": "In the following, we detail the network structures of NeuralSparse used on individual datasets. $\\mathrm { F C } ( a ,$ $b , f )$ means a fully-connected layer with $a$ input neurons and $b$ output neurons activated by function $f$ (none means no activation function is used). $\\mathrm { G N N } ( a , b , f )$ means a Graph Neural Network layer with input dimension $a$ , output dimension $b$ , and activation function $f$ . We implement GNN layer with GCN, GraphSAGE, GAT, GIN in the experiments. ",
1603
+ "bbox": [
1604
+ 174,
1605
+ 587,
1606
+ 825,
1607
+ 657
1608
+ ],
1609
+ "page_idx": 11
1610
+ },
1611
+ {
1612
+ "type": "text",
1613
+ "text": "Reddit The sparsification network runs with: FC(1204, 16, ReLU)-FC(16, 1, Gumbel-Softmax). \nThe structure of GNN is GNN(602, 128, ReLU)-GNN(128, 64, ReLU)-FC(64, 41, softmax). ",
1614
+ "bbox": [
1615
+ 173,
1616
+ 664,
1617
+ 821,
1618
+ 691
1619
+ ],
1620
+ "page_idx": 11
1621
+ },
1622
+ {
1623
+ "type": "text",
1624
+ "text": "PPI The sparsification network runs with: FC(100, 16, ReLU)-FC(16, 1, Gumbel-Softmax). The structure of GNN is GNN(50, 128, ReLU)-GNN(128, 128, ReLU)-FC(128, 121, softmax). ",
1625
+ "bbox": [
1626
+ 174,
1627
+ 699,
1628
+ 823,
1629
+ 728
1630
+ ],
1631
+ "page_idx": 11
1632
+ },
1633
+ {
1634
+ "type": "text",
1635
+ "text": "Transaction The sparsification network runs with: FC(243, 16, ReLU)-FC(16, 1, GumbelSoftmax). The structure of GNN is GNN(121, 128, ReLU)-GNN(128, 32, ReLU)-FC(32, 2, softmax). Note that there is one-dimensional edge attribute indicating the transaction amount in this dataset. ",
1636
+ "bbox": [
1637
+ 176,
1638
+ 734,
1639
+ 825,
1640
+ 790
1641
+ ],
1642
+ "page_idx": 11
1643
+ },
1644
+ {
1645
+ "type": "text",
1646
+ "text": "Cora The sparsification network runs with: FC(2866, 32, ReLU)-FC(32, 1, Gumbel-Softmax). The structure of GNN is GNN(1433, 128, ReLU)-GNN(128, 64, ReLU)-FC(64, 7, softmax). ",
1647
+ "bbox": [
1648
+ 174,
1649
+ 796,
1650
+ 821,
1651
+ 825
1652
+ ],
1653
+ "page_idx": 11
1654
+ },
1655
+ {
1656
+ "type": "text",
1657
+ "text": "Citeseer The sparsification network runs with: FC(7406, 64, ReLU)-FC(64, 1, Gumbel-Softmax). \nThe structure of GNN is GNN(3703, 128, ReLU)-GNN(128, 64, ReLU)-FC(64, 6, softmax). ",
1658
+ "bbox": [
1659
+ 176,
1660
+ 832,
1661
+ 820,
1662
+ 861
1663
+ ],
1664
+ "page_idx": 11
1665
+ },
1666
+ {
1667
+ "type": "text",
1668
+ "text": "As the spectral sparsification models cannot be jointly trained with subsequent GNN module, the sparsification process is treated as a preprocessing step. For Spectral Sparsifier (SS), $\\epsilon$ is set to 0.4 in all datasets. For the Rank Degree algorithm (RD), we select $1 \\%$ of nodes as the initial seeds and adopt $\\rho \\in \\{ 0 . 1 , 0 . 2 , \\cdot \\cdot \\cdot , 0 . 8 \\}$ for the best results. ",
1669
+ "bbox": [
1670
+ 176,
1671
+ 867,
1672
+ 825,
1673
+ 924
1674
+ ],
1675
+ "page_idx": 11
1676
+ },
1677
+ {
1678
+ "type": "text",
1679
+ "text": "S3 QUALITATIVE EDGE SAMPLING EVALUATION ",
1680
+ "text_level": 1,
1681
+ "bbox": [
1682
+ 173,
1683
+ 102,
1684
+ 594,
1685
+ 118
1686
+ ],
1687
+ "page_idx": 12
1688
+ },
1689
+ {
1690
+ "type": "text",
1691
+ "text": "In this section, we qualitatively demonstrate the difference by Figure 1(a) original graph, Figure 1(b) NeuralSparse, Figure 3(a) SS, and Figure 3(b) RD. In addition, we provide quantitative analysis in Table S1, where we report the percentage of edges that connect nodes of same class labels in sparsified graphs. Both qualitative and quantitative results suggest a common trend: NeuralSparse prefers to select neighbors with the same labels compared with the baseline methods. ",
1692
+ "bbox": [
1693
+ 174,
1694
+ 132,
1695
+ 825,
1696
+ 204
1697
+ ],
1698
+ "page_idx": 12
1699
+ },
1700
+ {
1701
+ "type": "table",
1702
+ "img_path": "images/6ca8a713e4509b955135f969762d03423aec92e0c688dea5b0ae09f5965eda84.jpg",
1703
+ "table_caption": [
1704
+ "Table S1: Percentage of edges connecting nodes of the same labels "
1705
+ ],
1706
+ "table_footnote": [],
1707
+ "table_body": "<table><tr><td></td><td>Reddit</td><td>PPI</td><td>Transaction</td><td>Cora</td><td>Citeseer</td></tr><tr><td>Original</td><td>53.1%</td><td>55.0%</td><td>67.3%</td><td>82.2%</td><td>73.1%</td></tr><tr><td>SS</td><td>50.9%</td><td>52.8%</td><td>62.8%</td><td>79.8%</td><td>75.6%</td></tr><tr><td>RD</td><td>49.8%</td><td>53.5%</td><td>63.4%</td><td>84.8%</td><td>72.3%</td></tr><tr><td>NeuralSparse</td><td>59.6%</td><td>61.5%</td><td>76.8%</td><td>93.1%</td><td>87.4%</td></tr></table>",
1708
+ "bbox": [
1709
+ 253,
1710
+ 242,
1711
+ 741,
1712
+ 325
1713
+ ],
1714
+ "page_idx": 12
1715
+ },
1716
+ {
1717
+ "type": "text",
1718
+ "text": "S4 EXPERIMENT WITH SIMILAR NUMBERS OF TRAINABLE PARAMETERS ",
1719
+ "text_level": 1,
1720
+ "bbox": [
1721
+ 173,
1722
+ 353,
1723
+ 787,
1724
+ 368
1725
+ ],
1726
+ "page_idx": 12
1727
+ },
1728
+ {
1729
+ "type": "text",
1730
+ "text": "In this section, we evaluate the impact brought by reducing the number of parameters in a GNN with NeuralSparse so that the numbers of trainable parameters in a NeuralSparse GNN and an original GNN are similar. In particular, we focus on GCN in this set of experiment. Using the same notation in S2.2, NeuralSparse-GCN-Compact is implemented as follows. ",
1731
+ "bbox": [
1732
+ 174,
1733
+ 382,
1734
+ 825,
1735
+ 439
1736
+ ],
1737
+ "page_idx": 12
1738
+ },
1739
+ {
1740
+ "type": "text",
1741
+ "text": "Reddit. NeuralSparse-GCN-Compact runs with: FC(1204, 8, ReLU)-FC(8, 1, Gumbel-Softmax) and GCN(602, 112, ReLU)-GCN(112, 64, ReLU)-FC(64, 41, softmax). The total number of trainable parameters is 86,856 in the NeuralSparse-GCN-Compact, while it is 87,872 in the original GCN. ",
1742
+ "bbox": [
1743
+ 174,
1744
+ 445,
1745
+ 825,
1746
+ 501
1747
+ ],
1748
+ "page_idx": 12
1749
+ },
1750
+ {
1751
+ "type": "text",
1752
+ "text": "PPI. NeuralSparse-GCN-Compact runs with: FC(100, 16, ReLU)-FC(16, 1, Gumbel-Softmax) and GCN(50, 118, ReLU)-GCN(118, 128, ReLU)-FC(128, 121, softmax). The total number of trainable parameters is 38,108 in the NeuralSparse-GCN-Compact, while it is 38,272 in the original GCN. ",
1753
+ "bbox": [
1754
+ 174,
1755
+ 508,
1756
+ 825,
1757
+ 551
1758
+ ],
1759
+ "page_idx": 12
1760
+ },
1761
+ {
1762
+ "type": "text",
1763
+ "text": "Transaction. NeuralSparse-GCN-Compact runs with: FC(243, 16, ReLU)-FC(16, 1, GumbelSoftmax) and GCN(121, 100, ReLU)-GCN(100, 32, ReLU)-FC(32, 2, softmax). The total number of trainable parameters is 19,268 in the NeuralSparse-GCN-Compact, while it is 19,648 in the original GCN. ",
1764
+ "bbox": [
1765
+ 174,
1766
+ 558,
1767
+ 825,
1768
+ 613
1769
+ ],
1770
+ "page_idx": 12
1771
+ },
1772
+ {
1773
+ "type": "text",
1774
+ "text": "Cora NeuralSparse-GCN-Compact runs with: FC(2866, 8, ReLU)-FC(8, 1, Gumbel-Softmax) and GCN(1433, 115, ReLU)-GCN(115, 32, ReLU)-FC(32, 7, softmax). The total number of trainable parameters is 191,635 in the NeuralSparse-GCN-Compact, while it is 192,064 in the original GCN. ",
1775
+ "bbox": [
1776
+ 174,
1777
+ 619,
1778
+ 825,
1779
+ 662
1780
+ ],
1781
+ "page_idx": 12
1782
+ },
1783
+ {
1784
+ "type": "text",
1785
+ "text": "Citeseer NeuralSparse-GCN-Compact runs with: FC(7406, 32, ReLU)-FC(32, 1, Gumbel-Softmax) and GCN(3703, 64, ReLU)-GCN(64, 32, ReLU)-FC(32, 6, softmax). The total number of trainable parameters is 476,256 in the NeuralSparse-GCN-Compact, while it is 482,560 in the original GCN. ",
1786
+ "bbox": [
1787
+ 174,
1788
+ 669,
1789
+ 825,
1790
+ 712
1791
+ ],
1792
+ "page_idx": 12
1793
+ },
1794
+ {
1795
+ "type": "table",
1796
+ "img_path": "images/426e98015da8f4046f68ca53fa3c12c78b4147a6a30e6b32e5496ad4d6462a30.jpg",
1797
+ "table_caption": [
1798
+ "Table S2: Node classification performance with similar numbers of trainable parameters "
1799
+ ],
1800
+ "table_footnote": [],
1801
+ "table_body": "<table><tr><td>Dataset</td><td>Reddit</td><td>PPI</td><td>Transaction</td><td>Cora</td><td>Citeseer</td></tr><tr><td>Metrics</td><td>Micro-F1</td><td>Micro-F1</td><td>AUC</td><td>Accuracy</td><td>Accuracy</td></tr><tr><td>GCN</td><td>0.922 ± 0.041</td><td>0.532 ± 0.024</td><td>0.564 ± 0.018</td><td>0.810 ± 0.027</td><td>0.694 ± 0.020</td></tr><tr><td>NeuralSparse- GCN</td><td>0.946 ± 0.020</td><td>0.600 ± 0.014</td><td>0.610 ± 0.022</td><td>0.821 ± 0.014</td><td>0.715 ± 0.014</td></tr><tr><td>NeuralSparse- GCN-Compact</td><td>0.943 ± 0.018</td><td>0.601 ± 0.021</td><td>0.605 ± 0.013</td><td>0.820 ± 0.012</td><td>0.713 ± 0.009</td></tr></table>",
1802
+ "bbox": [
1803
+ 156,
1804
+ 760,
1805
+ 844,
1806
+ 880
1807
+ ],
1808
+ "page_idx": 12
1809
+ },
1810
+ {
1811
+ "type": "text",
1812
+ "text": "From the evaluation results shown in Table S2, we draw the following observations. First, both NeuralSparse-GCN and NeuralSparse-GCN-Compact consistently outperform GCN on all the datasets. Second, compared with NeuralSparse-GCN, NeuralSparse-GCN-Compact achieves comparable prediction accuracy with smaller variance in most cases. ",
1813
+ "bbox": [
1814
+ 173,
1815
+ 895,
1816
+ 826,
1817
+ 924
1818
+ ],
1819
+ "page_idx": 12
1820
+ },
1821
+ {
1822
+ "type": "text",
1823
+ "text": "",
1824
+ "bbox": [
1825
+ 171,
1826
+ 103,
1827
+ 823,
1828
+ 132
1829
+ ],
1830
+ "page_idx": 13
1831
+ },
1832
+ {
1833
+ "type": "image",
1834
+ "img_path": "images/d4ff06450eeed7222339b4c481d90a0bdd0f3540836d5c1a52e337e61d91cdee.jpg",
1835
+ "image_caption": [
1836
+ "S5 HOW PERFORMANCE EVOLVES AS HYPER-PARAMETER $k$ CHANGES? ",
1837
+ "Figure S1: Impact from hyper-parameter $k$ on validation and testing on the Transaction dataset "
1838
+ ],
1839
+ "image_footnote": [],
1840
+ "bbox": [
1841
+ 313,
1842
+ 193,
1843
+ 679,
1844
+ 391
1845
+ ],
1846
+ "page_idx": 13
1847
+ },
1848
+ {
1849
+ "type": "text",
1850
+ "text": "In this section, we demonstrate how the hyper-parameter $k$ impacts the performance of NeuralSparse-GAT and NeuralSparse-GraphSAGE in both validation and testing on the Transaction dataset. In terms of validation, as shown in Figure S1, the validation performance increases when $k$ ranges from 2 to 10 with more available graph data. After $k$ exceeds 10, the increase in validation performance slows down and turns to be saturated. In terms of testing performance, it shares a similar trend when $k$ ranges from 2 to 10. Meanwhile, the testing performance drops more after $k$ exceeds 10. ",
1851
+ "bbox": [
1852
+ 173,
1853
+ 441,
1854
+ 825,
1855
+ 540
1856
+ ],
1857
+ "page_idx": 13
1858
+ },
1859
+ {
1860
+ "type": "text",
1861
+ "text": "S6 EMPIRICAL COMPARISON BETWEEN NEURALSPARSE AND LDS ",
1862
+ "text_level": 1,
1863
+ "bbox": [
1864
+ 176,
1865
+ 559,
1866
+ 740,
1867
+ 575
1868
+ ],
1869
+ "page_idx": 13
1870
+ },
1871
+ {
1872
+ "type": "text",
1873
+ "text": "S6.1 EVALUATION RESULTS ",
1874
+ "text_level": 1,
1875
+ "bbox": [
1876
+ 174,
1877
+ 590,
1878
+ 382,
1879
+ 606
1880
+ ],
1881
+ "page_idx": 13
1882
+ },
1883
+ {
1884
+ "type": "text",
1885
+ "text": "In this section, we compare NeuralSparse and LDS (Franceschi et al., 2019) with the datasets in transductive setting. Here, we utilize three ways to prepare the input graphs of Cora and Citeseer datasets. ",
1886
+ "bbox": [
1887
+ 174,
1888
+ 617,
1889
+ 823,
1890
+ 659
1891
+ ],
1892
+ "page_idx": 13
1893
+ },
1894
+ {
1895
+ "type": "text",
1896
+ "text": "• Setting A: k-NN graphs (Franceschi et al., 2019). In this setting, the graph structures are completely missing. The input graphs are replaced with k-nearest neighbor graphs initialized from node features. The $k$ in kNN graph is selected from $\\{ 1 0 , 2 0 \\}$ . • Setting B: original input graphs of Cora and Citeseer datasets with the same random split as Kipf & Welling (2017). • Setting C: edge union of original input graphs and k-NN graphs with $k$ fixed as 10. ",
1897
+ "bbox": [
1898
+ 210,
1899
+ 671,
1900
+ 825,
1901
+ 767
1902
+ ],
1903
+ "page_idx": 13
1904
+ },
1905
+ {
1906
+ "type": "table",
1907
+ "img_path": "images/cdc1403f783284407c8ea6ead700dc52a51567c9d313609f8780b36120de920a.jpg",
1908
+ "table_caption": [
1909
+ "Table S3: Node classification performance in setting A "
1910
+ ],
1911
+ "table_footnote": [],
1912
+ "table_body": "<table><tr><td></td><td>Cora(10)</td><td>Cora(20)</td><td>Citeseer(10)</td><td>Citeseer(20)</td></tr><tr><td>GCN</td><td>0.641 ± 0.009</td><td>0.631 ± 0.013</td><td>0.653 ± 0.012</td><td>0.671 ± 0.019</td></tr><tr><td>LDS-GCN</td><td>0.715 ± 0.008</td><td>0.703 ± 0.011</td><td>0.691 ± 0.021</td><td>0.715 ± 0.011</td></tr><tr><td>NeuralSparse-GCN</td><td>0.723 ± 0.012</td><td>0.719 ± 0.008</td><td>0.731 ± 0.011</td><td>0.724 ± 0.017</td></tr></table>",
1913
+ "bbox": [
1914
+ 194,
1915
+ 810,
1916
+ 799,
1917
+ 881
1918
+ ],
1919
+ "page_idx": 13
1920
+ },
1921
+ {
1922
+ "type": "text",
1923
+ "text": "Our observation is summarized as follows. In general, NeuralSparse and LDS achieves comparable node classification accuracy. Specifically, NeuralSparse has relatively better performance in Setting ",
1924
+ "bbox": [
1925
+ 176,
1926
+ 895,
1927
+ 823,
1928
+ 924
1929
+ ],
1930
+ "page_idx": 13
1931
+ },
1932
+ {
1933
+ "type": "table",
1934
+ "img_path": "images/2ef9a7920c38d8af18e737373b15f370ae8fc9c78ddf0f216ac84bd6404bc95a.jpg",
1935
+ "table_caption": [
1936
+ "Table S4: Node classification performance in setting B "
1937
+ ],
1938
+ "table_footnote": [],
1939
+ "table_body": "<table><tr><td></td><td>Cora</td><td>Citeseer</td></tr><tr><td>GCN</td><td>0.810 ± 0.027</td><td>0.694 ± 0.020</td></tr><tr><td>LDS</td><td>0.831 ± 0.017</td><td>0.727 ± 0.021</td></tr><tr><td>NeuralSparse-GCN</td><td>0.821 ± 0.014</td><td>0.724 ± 0.014</td></tr></table>",
1940
+ "bbox": [
1941
+ 308,
1942
+ 127,
1943
+ 686,
1944
+ 198
1945
+ ],
1946
+ "page_idx": 14
1947
+ },
1948
+ {
1949
+ "type": "table",
1950
+ "img_path": "images/00e192fd82c559cf0531e7f2597e8433a9a7443cc03d3c0968b78cc93f700048.jpg",
1951
+ "table_caption": [
1952
+ "Table S5: Node classification performance in setting C "
1953
+ ],
1954
+ "table_footnote": [],
1955
+ "table_body": "<table><tr><td></td><td>Cora + kNN</td><td>Citeseer +kNN</td></tr><tr><td>GCN</td><td>0.631 ± 0.014</td><td>0.646 ± 0.009</td></tr><tr><td>LDS</td><td>0.731 ± 0.019</td><td>0.725 ± 0.013</td></tr><tr><td>NeuralSparse-GCN</td><td>0.751 ± 0.013</td><td>0.743 ± 0.007</td></tr></table>",
1956
+ "bbox": [
1957
+ 303,
1958
+ 251,
1959
+ 689,
1960
+ 321
1961
+ ],
1962
+ "page_idx": 14
1963
+ },
1964
+ {
1965
+ "type": "text",
1966
+ "text": "A and Setting C. LDS performs slightly better in Setting B. From the above observation, we conjecture that NeuralSparse is more robust to graphs with more random edges while LDS is more suitable in a graph of relatively less noise by adding additional edges. We will verify the conjecture in the next subsection. ",
1967
+ "bbox": [
1968
+ 174,
1969
+ 359,
1970
+ 825,
1971
+ 416
1972
+ ],
1973
+ "page_idx": 14
1974
+ },
1975
+ {
1976
+ "type": "text",
1977
+ "text": "S6.2 RANDOM EDGE ADDITION TO CORA AND CITESEER ",
1978
+ "text_level": 1,
1979
+ "bbox": [
1980
+ 174,
1981
+ 448,
1982
+ 586,
1983
+ 463
1984
+ ],
1985
+ "page_idx": 14
1986
+ },
1987
+ {
1988
+ "type": "text",
1989
+ "text": "We further compare NeuralSparse and LDS (Franceschi et al., 2019) on the node classification tasks where original graph structure is available but more random edges are introduced as noise. Starting from the original graphs, we add edges by randomly sampling two nodes $u , v$ from node set $\\mathbb { V }$ and connecting them. ",
1990
+ "bbox": [
1991
+ 174,
1992
+ 479,
1993
+ 825,
1994
+ 536
1995
+ ],
1996
+ "page_idx": 14
1997
+ },
1998
+ {
1999
+ "type": "text",
2000
+ "text": "The results are shown in Figure S2. In both datasets, NeuralSparse achieves better performance compared with LDS as the noise level goes beyond $200 \\%$ . When the amount of noise increases, the classification accuracy of LDS drops significantly. ",
2001
+ "bbox": [
2002
+ 174,
2003
+ 544,
2004
+ 825,
2005
+ 587
2006
+ ],
2007
+ "page_idx": 14
2008
+ },
2009
+ {
2010
+ "type": "text",
2011
+ "text": "This result confirms our conjecture that NeuralSparse is more robust to random edges, compared to LDS. ",
2012
+ "bbox": [
2013
+ 171,
2014
+ 592,
2015
+ 823,
2016
+ 621
2017
+ ],
2018
+ "page_idx": 14
2019
+ },
2020
+ {
2021
+ "type": "image",
2022
+ "img_path": "images/1541d39eb1baff4e83762097c3969c3f8fa9923cd0d18f75e0847ea35860f6c2.jpg",
2023
+ "image_caption": [
2024
+ "Figure S2: Node classification performance when adding noise to graph structure. "
2025
+ ],
2026
+ "image_footnote": [],
2027
+ "bbox": [
2028
+ 272,
2029
+ 651,
2030
+ 720,
2031
+ 820
2032
+ ],
2033
+ "page_idx": 14
2034
+ },
2035
+ {
2036
+ "type": "text",
2037
+ "text": "With the above comments and experimental results, we hope to clarify the difference between the two models and demonstrate that our proposed NeuralSparse is more robust to noises in real-life graphs. ",
2038
+ "bbox": [
2039
+ 174,
2040
+ 882,
2041
+ 825,
2042
+ 924
2043
+ ],
2044
+ "page_idx": 14
2045
+ },
2046
+ {
2047
+ "type": "text",
2048
+ "text": "S7 HOW DO TASK-IRRELEVANT EDGES COULD NEGATIVELY IMPACT THE PERFORMANCE OF GCN? ",
2049
+ "text_level": 1,
2050
+ "bbox": [
2051
+ 171,
2052
+ 103,
2053
+ 790,
2054
+ 136
2055
+ ],
2056
+ "page_idx": 15
2057
+ },
2058
+ {
2059
+ "type": "text",
2060
+ "text": "In this section, we use an example to demonstrate how an input graph with task-irrelevant edges could impact the performance of GCN. For the ease of discussion and visualization, we focus on a GCN with a simple architecture and synthetic graphs where we could adjust graph topology by hyper-parameters in graph generators. ",
2061
+ "bbox": [
2062
+ 173,
2063
+ 151,
2064
+ 825,
2065
+ 209
2066
+ ],
2067
+ "page_idx": 15
2068
+ },
2069
+ {
2070
+ "type": "text",
2071
+ "text": "In terms of GCN, we investigate a one-layer GCN ",
2072
+ "bbox": [
2073
+ 176,
2074
+ 215,
2075
+ 501,
2076
+ 229
2077
+ ],
2078
+ "page_idx": 15
2079
+ },
2080
+ {
2081
+ "type": "equation",
2082
+ "img_path": "images/5faea304229ac50664388576ed84d4383e11fa3f3759531edcdbfb23428e2c7e.jpg",
2083
+ "text": "$$\nf _ { W } = S o f t m a x ( \\hat { A } X W ) = S o f t m a x ( Z W )\n$$",
2084
+ "text_format": "latex",
2085
+ "bbox": [
2086
+ 346,
2087
+ 238,
2088
+ 651,
2089
+ 257
2090
+ ],
2091
+ "page_idx": 15
2092
+ },
2093
+ {
2094
+ "type": "text",
2095
+ "text": "where $\\hat { A }$ is a normalized adjacency matrix, $X$ is the input node feature matrix, $W$ is the GCN parameters, and $Z = { \\hat { A } } X$ denotes node representations in the aggregation space. Intuitively, the quality of $Z$ has direct impact to this GCN’s performance. ",
2096
+ "bbox": [
2097
+ 174,
2098
+ 268,
2099
+ 825,
2100
+ 314
2101
+ ],
2102
+ "page_idx": 15
2103
+ },
2104
+ {
2105
+ "type": "text",
2106
+ "text": "In terms of input graphs, we generate them for node classification tasks as follows. ",
2107
+ "bbox": [
2108
+ 174,
2109
+ 319,
2110
+ 714,
2111
+ 335
2112
+ ],
2113
+ "page_idx": 15
2114
+ },
2115
+ {
2116
+ "type": "text",
2117
+ "text": "1. Nodes and their labels. 2,000 nodes are generated, where 1,000 nodes are assigned with positive labels and the rest are assigned with negative labels. ",
2118
+ "bbox": [
2119
+ 212,
2120
+ 347,
2121
+ 820,
2122
+ 376
2123
+ ],
2124
+ "page_idx": 15
2125
+ },
2126
+ {
2127
+ "type": "text",
2128
+ "text": "2. Node features. Each node has a two-dimensional feature vector. For positive nodes, the node features are generated from a Gaussian distribution, where $\\mu _ { p o s } = ( - 0 . 5 , 0 )$ and $\\Sigma _ { p o s }$ is a diagonal matrix with $\\Sigma _ { p o s } [ 0 , 0 ] = \\Sigma _ { p o s } [ 1 , 1 ] = 0 . 3$ . For negative nodes, the node features are generated from another Gaussian distribution, where $\\mu _ { n e g } = ( 0 . 5 , 0 )$ and $\\Sigma _ { n e g }$ is a diagonal matrix with $\\Sigma _ { n e g } [ 0 , 0 ] = \\Sigma _ { n e g } [ 1 , 1 ] = 0 . 3$ . ",
2129
+ "bbox": [
2130
+ 214,
2131
+ 382,
2132
+ 825,
2133
+ 454
2134
+ ],
2135
+ "page_idx": 15
2136
+ },
2137
+ {
2138
+ "type": "text",
2139
+ "text": "3. Edges. Given a hyper-parameter $\\bar { d } .$ , for each node, it randomly selects $\\bar { d }$ nodes as its onehop neighbors. With respect to this node classification task, an edge that connects two nodes of different labels could be irrelevant, bringing noise to the GCN. ",
2140
+ "bbox": [
2141
+ 214,
2142
+ 459,
2143
+ 825,
2144
+ 502
2145
+ ],
2146
+ "page_idx": 15
2147
+ },
2148
+ {
2149
+ "type": "image",
2150
+ "img_path": "images/5dd96ea033e5b6b52630f581022f785856b9b69c307a829bf40b8859dcee63ee.jpg",
2151
+ "image_caption": [
2152
+ "Figure S3: Distributions of $Z$ in graphs with different $\\bar { d }$ "
2153
+ ],
2154
+ "image_footnote": [],
2155
+ "bbox": [
2156
+ 287,
2157
+ 525,
2158
+ 710,
2159
+ 627
2160
+ ],
2161
+ "page_idx": 15
2162
+ },
2163
+ {
2164
+ "type": "text",
2165
+ "text": "In Figure S3, the distributions of node representation $Z$ are demonstrated at different $\\bar { d }$ . When $\\bar { d }$ is 0, $\\hat { A }$ is an identity matrix so that we simply use input node features in model learning. As shown in Figure S3(a), it is difficult to find a good boundary that well separates the positive and negative nodes by using node features only. However, when we adjusts $\\bar { d }$ to 10 or 20 with richer connections, the situation doesn’t get better. Because of the noise introduced by irrelevant edges, it becomes harder to find the classification boundary. While a deep learning may still be able to find a complex boundary that well separates the training data, the boundary could overfit the introduced noise, resulting in low generalization power. ",
2166
+ "bbox": [
2167
+ 173,
2168
+ 691,
2169
+ 825,
2170
+ 806
2171
+ ],
2172
+ "page_idx": 15
2173
+ },
2174
+ {
2175
+ "type": "text",
2176
+ "text": "In Figure S4, we illustrate how NeuralSparse enhances the prediction accuracy of the GCN. In particular, we focus on the graph with $\\bar { d } \\stackrel { = } { = } 2 0$ , and sparsify this graph by NeuralSparse. As shown in Figure S4, ranging the hyper-parameter $k$ from 1 to 15, the distributions of $Z$ vary. When $k$ is 1, there is no significant change compared with the distribution in Figure S3(a), as the amount of accessible relevant graph data is still small. When $k$ is increased to 5 or 10, the classification boundary becomes much clearer. As the edge generation process is uniformly random, the expected number of relevant edges per node is roughly 10. When $k$ is 15, this $k$ could be an over-estimate on the amount of relevant edges, making it a bit harder to find a good separation. ",
2177
+ "bbox": [
2178
+ 173,
2179
+ 811,
2180
+ 825,
2181
+ 924
2182
+ ],
2183
+ "page_idx": 15
2184
+ },
2185
+ {
2186
+ "type": "image",
2187
+ "img_path": "images/9620fde2d203ee0c349ec93bb26a4e2176f89d84c237215f6816272e46b0151c.jpg",
2188
+ "image_caption": [
2189
+ "Figure S4: Distributions of $\\textsf { Z }$ in sparsified subgraphs by NeuralSparse "
2190
+ ],
2191
+ "image_footnote": [],
2192
+ "bbox": [
2193
+ 217,
2194
+ 103,
2195
+ 781,
2196
+ 207
2197
+ ],
2198
+ "page_idx": 16
2199
+ },
2200
+ {
2201
+ "type": "image",
2202
+ "img_path": "images/227ab45090ec6968d2b28aa7ec871c8a3c410dab8e34e7fe1bba4a2f0d10f15c.jpg",
2203
+ "image_caption": [
2204
+ "Figure S5: Distributions of $\\boldsymbol { \\mathrm { Z } }$ in sparsified subgraphs by random downsampling "
2205
+ ],
2206
+ "image_footnote": [],
2207
+ "bbox": [
2208
+ 210,
2209
+ 257,
2210
+ 787,
2211
+ 359
2212
+ ],
2213
+ "page_idx": 16
2214
+ },
2215
+ {
2216
+ "type": "text",
2217
+ "text": "In Figure S5, we demonstrate how random downsampling could impact the prediction accuracy of the GCN. In general, we could not see any significant improvement. Indeed, it is crucial to perform a task-driven sparsification as NeuralSparse does. ",
2218
+ "bbox": [
2219
+ 173,
2220
+ 419,
2221
+ 825,
2222
+ 462
2223
+ ],
2224
+ "page_idx": 16
2225
+ }
2226
+ ]
parse/train/S1emOTNKvS/S1emOTNKvS_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/train/S1emOTNKvS/S1emOTNKvS_model.json ADDED
The diff for this file is too large to render. See raw diff