Datasets:
Add files using upload-large-folder tool
Browse files- parse/train/CmI7NqBR4Ua/CmI7NqBR4Ua.md +0 -0
- parse/train/CmI7NqBR4Ua/CmI7NqBR4Ua_content_list.json +0 -0
- parse/train/CmI7NqBR4Ua/CmI7NqBR4Ua_middle.json +0 -0
- parse/train/CmI7NqBR4Ua/CmI7NqBR4Ua_model.json +0 -0
- parse/train/H135uzZ0-/H135uzZ0-.md +275 -0
- parse/train/H135uzZ0-/H135uzZ0-_content_list.json +1206 -0
- parse/train/H135uzZ0-/H135uzZ0-_middle.json +0 -0
- parse/train/H135uzZ0-/H135uzZ0-_model.json +0 -0
- parse/train/Hy1d-ebAb/Hy1d-ebAb.md +501 -0
- parse/train/Hy1d-ebAb/Hy1d-ebAb_content_list.json +0 -0
- parse/train/Hy1d-ebAb/Hy1d-ebAb_middle.json +0 -0
- parse/train/Hy1d-ebAb/Hy1d-ebAb_model.json +0 -0
- parse/train/HyEi7bWR-/HyEi7bWR-.md +311 -0
- parse/train/HyEi7bWR-/HyEi7bWR-_content_list.json +1610 -0
- parse/train/HyEi7bWR-/HyEi7bWR-_middle.json +0 -0
- parse/train/HyEi7bWR-/HyEi7bWR-_model.json +0 -0
- parse/train/r1genAVKPB/r1genAVKPB.md +475 -0
- parse/train/r1genAVKPB/r1genAVKPB_content_list.json +0 -0
- parse/train/r1genAVKPB/r1genAVKPB_middle.json +0 -0
- parse/train/r1genAVKPB/r1genAVKPB_model.json +0 -0
parse/train/CmI7NqBR4Ua/CmI7NqBR4Ua.md
ADDED
|
Binary file (61.6 kB). View file
|
|
|
parse/train/CmI7NqBR4Ua/CmI7NqBR4Ua_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/CmI7NqBR4Ua/CmI7NqBR4Ua_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/CmI7NqBR4Ua/CmI7NqBR4Ua_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/H135uzZ0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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MIXED PRECISION TRAINING OF CONVOLUTIONALNEURAL NETWORKS USING INTEGER OPERATIONS
|
| 2 |
+
|
| 3 |
+
Dipankar Das∗, Naveen Mellempudi∗, Dheevatsa Mudigere∗, Dhiraj Kalamkar∗
|
| 4 |
+
|
| 5 |
+
{dipankar.das,naveen.k.mellempudi,
|
| 6 |
+
dheevatsa.mudigere,dhiraj.d.kalamkar}@intel.com
|
| 7 |
+
Parallel Computing Lab
|
| 8 |
+
Intel Labs, India
|
| 9 |
+
Sasikanth Avancha, Kunal Banerjee, Srinivas Sridharan, Karthik Vaidyanathan, Bharat Kaul
|
| 10 |
+
Parallel Computing Lab
|
| 11 |
+
Intel Labs, India
|
| 12 |
+
Evangelos Georganas, Alexander Heinecke, Pradeep Dubey
|
| 13 |
+
Parallel Computing Lab
|
| 14 |
+
Intel Labs, SC
|
| 15 |
+
Jesus Corbal
|
| 16 |
+
Product Architecture Group
|
| 17 |
+
Intel, OR
|
| 18 |
+
Nikita Shustrov, Roma Dubtsov, Evarist Fomenko, Vadim Pirogov
|
| 19 |
+
Software Services Group
|
| 20 |
+
Intel, OR
|
| 21 |
+
|
| 22 |
+
# ABSTRACT
|
| 23 |
+
|
| 24 |
+
The state-of-the-art (SOTA) for mixed precision training is dominated by variants of low precision floating point operations, and in particular FP16 accumulating into FP32 Micikevicius et al. (2017). On the other hand, while a lot of research has also happened in the domain of low and mixed-precision Integer training, these works either present results for non-SOTA networks (for instance only AlexNet for ImageNet-1K), or relatively small datasets (like CIFAR-10). In this work, we train state-of-the-art visual understanding neural networks on ImageNet-1K dataset, with Integer operations on General Purpose (GP) hardware. In particular, we focus on Integer Fused-Multiply-and-Accumulate (FMA) operations which take two pairs of INT16 operands and accumulate results into an INT32 output.We propose a shared exponent representation of tensors, and develop a Dynamic Fixed Point (DFP) scheme suitable for common neural network operations. The nuances of developing an efficient integer convolution kernel is examined, including methods to handle overflow of the INT32 accumulator. We implement CNN training for ResNet-50, GoogLeNet-v1, VGG-16 and AlexNet; and these networks achieve or exceed SOTA accuracy within the same number of iterations as their FP32 counterparts without any change in hyper-parameters and with a $1 . 8 \mathrm { X }$ improvement in end-to-end training throughput. To the best of our knowledge these results represent the first INT16 training results on GP hardware for ImageNet-1K dataset using SOTA CNNs and achieve highest reported accuracy using half precision representation.
|
| 25 |
+
|
| 26 |
+
# 1 INTRODUCTION
|
| 27 |
+
|
| 28 |
+
While single precision floating point (FP32) representation has been the mainstay for deep learning training, half-precision and sub-half-precision arithmetic has recently captured interest of the academic and industrial research community. Primarily this interest stems from the ability to attain potentially upto 2X or more speedup of training as compared to FP32, when using half-precision fused-multiply and accumulate operations. For instance NVIDIA Volta NVIDIA (2017) provides 8X more half-precision Flops as compared to FP32.
|
| 29 |
+
|
| 30 |
+
Unlike single precision floating point, which is a unanimous choice for $3 2 b$ training, half-precision training can either use half-precision floating point (FP16), or integers (INT16). These two options offer varying degrees of precision and range; with INT16 having higher precision but lower dynamic range as compared to FP16. This also leads to residues between half-precision representation and single precision to be fundamentally different – with integer representations contributing lower residual errors for larger (and possibly more important) elements of a tensor. Beyond this first order distinction in data types, there are multiple algorithmic and semantic differences (for example FP16 multiply-and-accumulate operation accumulating into FP32 results) for each of these data types. Hence, when discussing half-precision training, the whole gamut of tensor representation, semantics of multiply-and-accumulate operation, down-conversion scheme (if the accumulation is to a higher precision), scaling and normalization techniques, and overflow management methods must be considered in totality to achieve SOTA accuracy. Indeed, unless the right combination of the aforesaid vectors are selected, half precision training is likely to fail. Conversely, drawing conclusions on the efficacy of a method by not selecting all vectors properly can lead to inaccurate conclusions.
|
| 31 |
+
|
| 32 |
+
In this work we describe a mixed-precision training setup which uses:
|
| 33 |
+
|
| 34 |
+
• INT16 tensors with shared tensor-wide exponent, with a potential to extend to sub-tensor wide exponents.
|
| 35 |
+
• An instruction which multiplies two INT16 numbers and stores the output into a INT32 accumulator.
|
| 36 |
+
• A down-convert scheme based on the maximum value of the output tensor in the current iteration using multiple rounding methods like nearest, stochastic, and biased rounding.
|
| 37 |
+
• An overflow management scheme which accumulates partial INT32 results into FP32, along with trading off input precision with length of accumulate chain to gain performance.
|
| 38 |
+
|
| 39 |
+
The compute for neural network training is dominated by GEMM-like, convolution, or dot-product operations. These are amenable to speedup via specialized low-precision instructions for fusedmultiply-and-accumulate (FMA), like AVX512_4VNNI 1. However, this does not necessarily mean using half-precision representation for all tensors, or using only half-precision operations. In fact, performance speedups by migrating the compute intensive operations in both forward and back prorogation (FPROP, BPROP and WTGRAD) is often close to the maximum achievable speedup obtained by replacing all operations (for instance SGD) in half-precision. In cases where it is not, performance degradation typically happens due to limitations of memory bandwidth, and other architectural reasons.Hence on a balanced general purpose machine, a mixed-precision strategy of keeping precision critical operations (like SGD and some normalizations) in single precision and compute intensive operations in half precision can be employed. The proposed integer-16 based mixed-precision training follows this template.
|
| 40 |
+
|
| 41 |
+
Using the aforesaid method, we train multiple visual understanding CNNs and achieve Top-1 accuracies Russakovsky et al. (2015)on the ImageNet-1K dataset Deng et al. (2009) which match or exceed single precision results. These results are obtained without changing any hyper-parameters, and in as many iterations as the baseline FP32 training. We achieve $7 5 . 7 7 \%$ Top-1 accuracy for ResNet-50 which, to the best of our knowledge, significantly exceeds any result published for halfprecision training, for example Micikevicius et al. (2017); Ginsburg et al. (2017). Further, we also demonstrate our methodology achieves state-of-the-art accuracy (comparable to FP32 baseline) with int16 training on GoogLeNet-v1, VGG-16 and AlexNet networks. To the best of our knowledge, these are first such results using int16 training.
|
| 42 |
+
|
| 43 |
+
The rest of the paper is organized as follows: Section 2 discusses the literature pertaining to various aspects of half-precision training. The dynamic fixed point format for representing half-precision tensors is described in Section 3. Dynamic fixed point kernels and neural network training operations are described in Section 4, and experimental results are presented in Section 5. Finally, we conclude this work in Section 6.
|
| 44 |
+
|
| 45 |
+
# 2 RELATED WORK
|
| 46 |
+
|
| 47 |
+
Using reduced precision for Deep learning has been an active topic of research. As a result there are a number of different reduced precision data representations, the more standard floating-point based Micikevicius et al. (2017); Ginsburg et al. (2017); Dettmers (2015) and custom fixed point schemes Vanhoucke et al. (2011); Courbariaux et al. (2014); Gupta et al. (2015); Hubara et al. (2016b); Köster et al. (2017).
|
| 48 |
+
|
| 49 |
+
The recently published mixed precision training work from Micikevicius et al. (2017) uses 16- bit floating point storage for activations, weights and gradients. The forward, back propagation computation uses FP16 computation with results accumulating into FP32 and a master-copy of the full precision (FP32) weights are retained for the update operation. They demonstrate a broad variety of deep learning training applications involving deep networks and larger data-sets (ILSVRC-class problems) with minimal loss compared to baseline FP32 results. Further, this shows that FP16/FP32 mixed precision requires loss scaling Ginsburg et al. (2017) to achieve near-SOTA accuracy. This ensures back-propagated gradient values are shifted into FP16 representable range and the small magnitude (negative exponent) values, which are critical for accuracy are captured. Such scaling is inherent with fixed point representations, making it more amenable and accurate for deep learning training.
|
| 50 |
+
|
| 51 |
+
Custom fixed point representations offer more flexibility - in terms of both increased precision and dynamic range. This allows for better mapping of the representation to the underlying application, thus making it more robust and accurate than floating-point based schemes.Vanhoucke et al. (2011) have shown that the dynamically scaled fixed point representation proposed by Williamson (1991) can be very effective for convolution neural networks - demonstrating upto to $4 \times$ improvement over an aggressively tuned floating point implementation on general purpose CPU hardware. Gupta et al. (2015) have done a comprehensive study on the effect of low precision fixed point computation for deep learning and have successfully trained smaller networks using 16-bit fixed point on specialized hardware. With further reduced bit-widths, such fixed point data representations are more attractive - offering increased capacity for precision with larger mantissa bits and dynamically scaled shared exponents. There have been several publications with $< 1 6$ -bit precision and almost all of them use such custom fixed point schemes. Courbariaux et al. (2014) use a dynamical fixed point format (DFXP), with low precision multiplications with upto 12-bit operations. Building on this Courbariaux et al. (2015) proposed training with only binary weights while all other tensors and operations are in full precision. Hubara et al. (2016a) further extended this to use binary activations as well, but with gradients and weights still retained in full precision.Hubara et al. (2016b) proposed training with activations and weights quantized up to 6-bits and gradients in full precision. Rastegari et al. (2016) use binary representation for all components including gradients. However, all of the aforementioned use smaller benchmark model/data-sets and results in a non-trivial drop in accuracy with larger ImageNet data-set Deng et al. (2009) and classification task Russakovsky et al. (2015). Köster et al. (2017) have shown that a fixed point numerical format designed for deep neural networks (Flexpoint), out-performs FP16 and achieves numerical parity with FP32 across a wide set of applications. However, this is designed specifically for specialized hardware and the published results are with software emulation. Here we propose a more general dynamic fixed point representation and associated compute primitives, which can leverage general purpose hardware using the integercompute pipeline. Further we provide actual accuracy and performance for training large networks for the ILSVRC classification task, measured on available hardware.
|
| 52 |
+
|
| 53 |
+
# 3 THE DYNAMIC FIXED POINT FORMAT
|
| 54 |
+
|
| 55 |
+
Dynamic Fixed Point (DFP) tensors are represented by a combination of an integer tensor $I$ and an exponent $E _ { s }$ , shared across all the integer elements. For the sake of convenience, the DFP tensor can be denoted as $\mathsf { ) F P - P } = \left. I , E _ { s } \right.$ , where $P$ represents the number of bits used by the integer elements in $I$ (ex: DFP-16 contains 16-bit integers).
|
| 56 |
+
|
| 57 |
+
Figure 1 illustrates the differences in data representation between IEEE-754 standard format float, half-float and DFP-16 data format. DFP-16 data type offers a trade-off between float and half-float in terms of precision and dynamic range. When compared to full-precision floats, DFP-16 can achieve higher compute density and can carry higher effective precision compared to half-floats because of
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
|
| 61 |
+
Figure 1: Snapshot of precision and dynamic range capabilities of a) IEEE-754 float b) IEEE-754 half-float, and c) Dynamic Fixed Point (DFP-16) data formats.
|
| 62 |
+
|
| 63 |
+
larger 15-bit mantissa (compared to 11-bits for half-floats). Further, the effective dynamic range of DFP format can be increased by extending the data type to use Blocked-DFP representation. BlockedDFP uses fine-grained quantization to assign multiple exponents per tensor with smaller blocks of integers sharing a common exponent. Mellempudi et al. (2017) have demonstrated effectiveness of fine-grained quantization for low-precision inference tasks.
|
| 64 |
+
|
| 65 |
+
In this work, we use a single shared exponent for each tensor. The integers are stored in 2’s complement representation and the shared exponent is an 8-bit signed integer. We use standard commodity integer hardware to perform arithmetic operations on DFP tensors. This implies that the exponent handling and precision management of DFP is done in the software, which is covered in more detail in Section 4.3.
|
| 66 |
+
|
| 67 |
+
# 3.1 DFP TENSOR PRIMITIVES
|
| 68 |
+
|
| 69 |
+
To facilitate end-to-end mixed-precision training using DFP, we have created primitives to perform arithmetic operations on DFP tensors and data conversions between DFP and float. When converting floating point tensors into to DFP data type, the shared exponent is derived from the exponent of absolute maximum value of the floating point tensor. If $F$ is the floating point tensor, the exponent of the absolute maximum value is expressed as follows.
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
E _ { f m a x } = E ( \operatorname* { m a x } _ { \forall f \in F } | f | )
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
The value of the shared exponent $E _ { s }$ is a function of $E _ { f m a x }$ and the number of bits $P$ used by the output integer tensor $I$ .
|
| 76 |
+
|
| 77 |
+
$$
|
| 78 |
+
E _ { s } = E _ { f m a x } - ( P - 2 )
|
| 79 |
+
$$
|
| 80 |
+
|
| 81 |
+
The relationship of the resulting DFP tensor $\langle I , E _ { s } \rangle$ with the input floating point tensor $F$ is expressed by Eq.3.
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
\forall i _ { n } \in I , f _ { n } = i _ { n } \times 2 ^ { E _ { s } } , \mathrm { w h e r e } f _ { n } \in F
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
Extending this basic formulation Eq.3, we can define a set of common DFP primitives required for neural network training.
|
| 88 |
+
|
| 89 |
+
• Multiplying two DFP-16 tensors produces 32-bit $I$ tensor with a new shared exponent expressed as follows.
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
i _ { a b } = i _ { a } \times i _ { b } a n d e x p o n e n t , E _ { s } ^ { a b } = E _ { s } ^ { a } + E _ { s } ^ { b }
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
• Adding two DFP-16 tensors results in a 32-bit $I$ tensor and a new shared exponent.
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
i _ { a + b } = \left\{ \begin{array} { l l } { i _ { a } + ( i _ { b } > > ( E _ { s } ^ { a } - E _ { s } ^ { b } ) ) , w h e n E _ { s } ^ { a } > E _ { s } ^ { b } } \\ { i _ { b } + ( i _ { a } > > ( E _ { s } ^ { b } - E _ { s } ^ { a } ) ) , w h e n E _ { s } ^ { b } > E _ { s } ^ { a } } \end{array} \right. \quad \mathrm { a n d } \mathrm { e x p o n e n t } , E _ { s } ^ { a + b } = \operatorname* { m a x } _ { E _ { s } ^ { a } , E _ { s } ^ { b } }
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
Note that when a Fused Multiply and Add operation is performed, all products have the same shared exponent: $E _ { s } ^ { a b } = \mathbf { \bar { \rho } } \bar { E _ { s } ^ { a } } + E _ { s } ^ { b }$ , and hence the sum of such products also has the same shared exponent.
|
| 102 |
+
|
| 103 |
+
• Down-Conversion scales DFP-32 output of a layer to DFP-16 to be passed as input to the next layer. The 32-bit $I$ tensor right-shifted $R _ { s }$ bits to fit into 16-bit tensor. The $R _ { s }$ value and the new shared exponent are expressed as follows.
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
R _ { s } = A - ( P + L Z C ( \operatorname* { m a x } _ { \forall i _ { a b } \in I ^ { 3 2 } } | i _ { a b } | ) )
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
In Eqn.6, A is accumulator bit-width, LZC( ) returns the leading zero bit-count.
|
| 110 |
+
|
| 111 |
+
# 4 NEURAL NETWORK TRAINING USING DYNAMIC FIXED POINT
|
| 112 |
+
|
| 113 |
+
Neural network training is an iterative process over mini-batches of data points, with four main operations on a given mini-batch: forward propagation (FPROP), back-propagation (BPROP), weight gradient computation (WTGRAD), and the solver (typically stochastic gradient descent, or ADAM).
|
| 114 |
+
|
| 115 |
+
In a CNN, the three steps of forward-propagation, back-propagation, and weight-gradient computation are often the compute intensive steps, and consist of GEMM-like (General Matrix Multiply) convolution operations which dominate the compute, and additional element-wise operations like normalization, non-linear (ReLU) and element-wise addition. In this work we propse a method to use INT16 operations, for implementing kernels for the convolutions and GEMM. There kernels are stitched with the rest of the operations in neural network training via Dynamic Fixed Point to floating point conversions described earlier in Section 3. In this section, we first describe the overall method for using dynamic fixed point in neural network training, and then explain the optimized kernel for convolutions.
|
| 116 |
+
|
| 117 |
+
# 4.1 TRAINING WITH DYNAMIC FIXED POINT
|
| 118 |
+
|
| 119 |
+
The mixed precision training scheme used in this work is described in Figure 2. The core compute kernels in this scheme are the FP, BP, and $W U$ convolution functions which take two DFP-16 tensors as input and produces a FP32 tensor as output. For example $F P$ accepts two DFP-16 tensors, $a _ { q }$ , and $w _ { q }$ (activations and weights for layer- $\varLambda _ { \iota }$ ), and produces a FP32 output tensorThe FP and BP operations are followed by quantization steps $( Q _ { a } , Q _ { e } )$ which convert the FP32 tensors to DFP-16 tensors $( \hat { a } _ { q } ^ { l }$ $e _ { q } ^ { l }$ ) for operations in the next layer. The WU step is followed by the Stochastic Gradient Descent (SGD) step, which takes the FP32 tensor for weight-gradients $( \Delta w )$ and a FP32 copy of the weights $( W ^ { l } )$ as inputs, and produces an updated weight tensor as output. We follow the now established practice Micikevicius et al. (2017) of keeping a FP32 copy of weights as well as a low precision (DFP-16) copy of weights. Therefore SGD or other solvers are FP32 operations. In case a batch-norm layer is used, the DFP-16 tensors are loaded into registers and then the data is up-converted to FP32 to prevent overflows during stats computation.
|
| 120 |
+
|
| 121 |
+
# 4.2 CORE COMPUTE KERNELS
|
| 122 |
+
|
| 123 |
+
In this section we delve into efficient implementations of core compute kernels written using Integer FMA instruction sequence; in particular the AVX512_4VNNI instruction (described in Algorithm 1). This instruction takes a memory pointer as the first input and four vector registers as the second input and performs 8 multiply-add operations per output (16 Integer-OPs). For each 32b lane, the instruction takes two pairs of 16-bit Integers, performs a multiply followed by a horizontal add.
|
| 124 |
+
|
| 125 |
+
# Algorithm 1 Semantics of the QVNNI16 Instruction
|
| 126 |
+
|
| 127 |
+
1: $\mathrm { K } { = } 4$ ; SIMD_WIDTH=16;
|
| 128 |
+
2: QVNNI16(short \*mem, _m512i vinp2[0..3], _m512i vout)
|
| 129 |
+
3: for $\mathbf { v } = 0$ . . . K-1 do
|
| 130 |
+
4: for $\mathbf { o } = 0$ . . . SIMD_WIDTH-1 do
|
| 131 |
+
5: vout[o] $+ =$ vinp2[v][2\*o]\*mem[2\*v] + vinp2[v][2\*o+1]\*mem[2\*v+1]
|
| 132 |
+
6: end for
|
| 133 |
+
7: end for
|
| 134 |
+
|
| 135 |
+
The FPROP convolution kernel is written using AVX512_4VNNI instruction in Algorithm 2. The data layout of the weights captures the 2-way horizontal accumulation operation in AVX512_4VNNI.
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
Figure 2: High-level data flow diagram for mixed precision training. Operators $F P ^ { l }$ , $B P ^ { l }$ and $W U ^ { l }$ indicate convolution layers, while $Q _ { a }$ , $Q _ { w }$ , $Q _ { e }$ are quantization operators for activations, weights and back propagated errors. Please note, the weight gradients $( \Delta w ^ { \hat { l } } )$ are not quantized before SGD, the updated weights are quantized for the next iteration.
|
| 139 |
+
|
| 140 |
+
Here the last dimension moves along consecutive input-feature maps. Hence the dimensions of activations is: N, C/16, H, W, 16, and that of weights is C/16, K/16, KH, KW, 8c, 16k, 2c (where C and K are input and output feature maps, H, W are input feature map height and width, and KH, KW are kernel height/width). Note that while we briefly touch upon data layout and blocking of the core kernel loops in Algorithm 2, detailed analysis of performance is not the objective of this work. These details are explored only to highlight different functional components of the kernel.
|
| 141 |
+
|
| 142 |
+
# 4.3 HANDLING OVERFLOWS IN INT16-INT32 FMAS
|
| 143 |
+
|
| 144 |
+
Multiplication of two INT16 numbers can result in a 30-bit outcome, and hence an accumulate chain of 3 products of INT16 multiplicative pairs can cause an overflow of the INT32 accumulator. In neural network training, accumulate chains can exceed a million in length (for example in the WTGRAD kernel).
|
| 145 |
+
|
| 146 |
+
One way to prevent overflows is to convert an INT32 intermediate output into FP32 before accumulation as described in lines 26-31 in Algorithm 2. Here we first convert the INT32 result to FP32 using the VCVTINTFP32 instruction, followed by a scale and accumulate into the final FP32 result using the VFP32MADD instruction. The scale used is $2 ^ { ( E _ { i n p } + E _ { w t } ) }$ (equation 3), which is broadcast and stored in the vscale vector register. The instruction sequence in lines 26-31 can be applied after every AVX512_4VNNI instruction to prevent almost all overflows. However the overheads would be significant and hurt performance. Hence we pick the strategy of partial accumulations into INT32 for short accumulate chains, and subsequently converting the results into FP32.
|
| 147 |
+
|
| 148 |
+
Performance Impact: As outlined in Algorithm2 for performance we block additionally over the input feature maps (ICBLK) and use optimal register blocking $( R B \_ S I Z E )$ . The difference between an ideal instruction sequence (with no overflow management) and Algorithm 2 is essentially the additional VCVTINTFP32 instruction (line 28). In the loop in lines 8-31, we have (ICBLK/16) $^ { * } K H ^ { * } K W ^ { * } 2 ^ { * } R B$ AVX512_4VNNI instructions, and $R B ^ { * } \mathcal { 4 } + ( I C B L K / I 6 ) ^ { * } K H ^ { * } K W ^ { * } \mathcal { 4 }$ non-AVX512_4VNNI instructions, and RB VCVTINTFP32 instructions. The instruction overhead from overflow management therefore varies between ${ < } 1 \%$ in most cases, to at most $3 \%$ .
|
| 149 |
+
|
| 150 |
+
The length of the accumulate chain (via sizing the input feature map blocking factor ICBLK in line 7) is selected to optimize instruction overheads and cache/instruction reuse. In this work we strive to keep the accumulate chain to more than 200 (which is empirically shown to be close to optimal). Often this accumulate chain also overflows, which we circumvent by shifting inputs. In this work, we shift both the inputs by 1-bit for all convolutions in all experiments. Hence effectively we have a DFP15 representation of all DFP tensors. It is notable that this shift value is largely dependent on this
|
| 151 |
+
|
| 152 |
+
# Algorithm 2 Example Forward Propagation Loop
|
| 153 |
+
|
| 154 |
+
1: fprop(DFP16 <input[IC/16][IH][IW][16], $e _ { i n p } >$ , DFP16 <weights[IC/16][OC/16][KH][KW][8][16][2],
|
| 155 |
+
$e _ { w t } >$ ; FP32 output[OC/16][OH][OW][16] = 0)
|
| 156 |
+
2: _m512 vwt[0. . . 3], vout[RB_SIZE], vtemp, vscale;
|
| 157 |
+
3: vscale $=$ VBROADCAST $( 2 ^ { ( e _ { - } i n p + e _ { - } w t ) } .$ )
|
| 158 |
+
4: for ofm ${ } = 0$ . . . OC/16-1 do
|
| 159 |
+
5: for ofh ${ } = 0$ . . . OH-1 do
|
| 160 |
+
6: for ofw ${ } = 0$ . . . OW/RB_SIZE-1 do
|
| 161 |
+
7: for ifm ${ } = 0$ ... IC/ICBLK-1 do
|
| 162 |
+
8: for $\mathrm { r b } { = } 0$ . . . RB_SIZE-1 do
|
| 163 |
+
9: vout[r $\mathbf b ] = \mathbf s$ ETZERO()
|
| 164 |
+
10: end for
|
| 165 |
+
11: for $\mathrm { i f m b } = 0$ ... ICBLK/16-1 do
|
| 166 |
+
12: for $\operatorname { k h } = 0$ . . . KH-1 do
|
| 167 |
+
13: for ${ \mathrm { k w } } = 0$ . . . KW-1 do
|
| 168 |
+
14: for $\mathrm { i b } = 0 \dots 1$ do
|
| 169 |
+
15: for $\mathbf { v } { = } 0 \ldots 3$ do
|
| 170 |
+
16: vwt[v] ${ \bf \Pi } = \bf { L O A D }$ (&weights[ifm][ofm][kh][kw][ib\*4+v][0][0])
|
| 171 |
+
17: end for
|
| 172 |
+
18: for $\operatorname { r b } = 0$ . . . RB_SIZE-1 do
|
| 173 |
+
19: AVX512_4VNNI(&input[ifm\*(IC/ICBLK)+icb][S\*ofh+kh][S\*ofw+kw][ib]),
|
| 174 |
+
vwt[0. . . 3], vout[rb])
|
| 175 |
+
20: end for
|
| 176 |
+
21: end for
|
| 177 |
+
22: end for
|
| 178 |
+
23: end for
|
| 179 |
+
24: end for
|
| 180 |
+
25: end for
|
| 181 |
+
26: for $\mathrm { r b } { = } 0$ . . . RB-1 do
|
| 182 |
+
27: vtemp $\mathbf { \tau } _ { \mathbf { \lambda } } = \mathbf { L O A D }$ (&output[ofm][ofmh][ofmw\*RB_SIZE $^ +$ rb][0])
|
| 183 |
+
28: vout[rb] $=$ VCVTINTFP32(vout[rb])
|
| 184 |
+
29: vtemp $=$ VFP32MADD(vtemp, vout[rb], vscale) //vtemp $=$ vtemp $^ +$ vout[rb]\*vscale
|
| 185 |
+
30: STORE(vtemp, &output[ofm][ofmh][ofmw\*RB_SIZE $^ +$ rb][0])
|
| 186 |
+
31: end for
|
| 187 |
+
32: end for
|
| 188 |
+
33: end for
|
| 189 |
+
34: end for
|
| 190 |
+
|
| 191 |
+
inner accumulate chain length, and by constraining it we can find a shift value applicable across all operations. The combination of input shift and conversion of outputs to FP32 allows us to prevent occurrence of any overflows and hence catastrophic errors during training.
|
| 192 |
+
|
| 193 |
+
# 5 EXPERIMENTS AND RESULTS
|
| 194 |
+
|
| 195 |
+
We compare mixed precision DFP16 training with baseline full precision (FP32) for several ImageNetclass SOTA CNNs. Both baseline and DFP16 experiments are run using versions of the BVLC CAFFE framework Jia et al. (2014). For the baseline runs we use Intel’s CAFFE branch2. For the mixed precision DFP16 experiments we use a private fork of this branch, where we have added DFP16 data-type support. The DFP16 compute primitives are supported through the prototype 16-bit integer kernels in Intel’s MKL-DNN library3 along with explicit exponent management as described in Section.4. Both baseline and mixed precision DFP16 experiments are run on the newly introduced Intel
|
| 196 |
+
|
| 197 |
+
Table 1: Training configuration and ImageNet-1K classification accuracy
|
| 198 |
+
|
| 199 |
+
<table><tr><td rowspan="2">Models</td><td rowspan="2">Batch-size /Epochs</td><td colspan="2">Baseline</td><td colspan="2">Mixed precision DFP16</td></tr><tr><td>Top-1</td><td>Top-5</td><td>Top-1</td><td>Top-5</td></tr><tr><td>ResNet-50</td><td>1024 /90</td><td>75.70%</td><td>92.78%</td><td>75.77%</td><td>92.84%</td></tr><tr><td>GoogLeNet-v1</td><td>1024/80</td><td>69.26%</td><td>89.31%</td><td>69.34%</td><td>89.31%</td></tr><tr><td>VGG-16</td><td>256/60</td><td>68.23%</td><td>88.47%</td><td>68.12%</td><td>88.18%</td></tr><tr><td>AlexNet</td><td>1024 /88</td><td>57.43%</td><td>80.65%</td><td>56.94%</td><td>80.06%</td></tr></table>
|
| 200 |
+
|
| 201 |
+
# 5.1 ACCURACY RESULTS FOR CNNS
|
| 202 |
+
|
| 203 |
+
We trained several CNNs for the ImageNet-1K classification task using mixed precision DFP16: AlexNet Krizhevsky et al. (2012), VGG-16 Simonyan & Zisserman (2014), GoogLeNet-v1 Szegedy et al. (2015), ResNet-50 He et al. (2016). We use exactly the same batch-size and hyper-parameter configuration for both the baseline FP32 and DFP16 training runs (Table.1). In both cases, the models are trained from scratch using synchronous SGD on multiple nodes. In our experiments the first convolution layer (C1) and the fully connected layers are in FP32 (constituting about $5 - 1 0 \%$ of compute for modern CNNs). Table.1 shows ImageNet-1K classification accuracies, training with DFP16 achieve SOTA accuracy for all four models and in several cases even better than the baseline full precision result.
|
| 204 |
+
|
| 205 |
+
To the best of our knowledge, top-1 accuracy of $7 5 . 7 7 \%$ and top-5 accuracy of $9 2 . 8 4 \%$ for ResNet-50 with mixed precision DFP16 - is highest achieved accuracy on the ImageNet-1K classification task with any form of reduced precision training.
|
| 206 |
+
|
| 207 |
+

|
| 208 |
+
Figure 3: Convergence plots for DFP-16b training vs. reference baseline FP32 results for ResNet-50, GoogLeNet-v1, VGG-16 and AlexNet trained for ImageNet-1K classification task
|
| 209 |
+
|
| 210 |
+
It can be seen from Figure.3 that DFP16, closely tracks the full precision training. For some models like GoogLeNet-v1 and AlexNet, we observe the initially DFP16 training lags the baseline, however this gaps is closed with subsequent epochs especially after the learning rate changes. Further, we observe that compared to baseline run - with DFP16 the validation/test loss tracks much closer to the training loss. We believe this is the effect of the additional noise introduced from reduced precision computation/storage, which is results in better generalization with reduced training-testing gap and better accuracies.
|
| 211 |
+
|
| 212 |
+
# 5.2 PERFORMANCE DISCUSSION
|
| 213 |
+
|
| 214 |
+
For demonstrating the performance potential with mixed precision DFP16 training, we present detailed performance analysis and breakdown for the ResNet-50 topology as case study. The performance numbers reported below were measured on an Inte $\textsuperscript { \textregistered }$ XeonPhiTM Processor 7295 (codename Knights-Mill)5 4
|
| 215 |
+
|
| 216 |
+
For the convolution kernels going from FP32 to DFP16, the $3 \times 3$ kernels are $1 . 8 \times$ faster and the $1 \times 1$ kernels are $1 . 4 \times$ faster; resulting in overall $1 . 5 \times$ speedup. The baseline kernels include memory prefetch optimization, which when applied to DFP kernels should improve the performance by an additional $2 0 \%$ . The batchnorm computation is $2 \times$ faster with DFP16, the speed up here is primarily due to $5 0 \%$ bandwidth saving due to smaller memory footprint. In addition, the ReLU and EltWise layers are fused with batchnorm (Figure.4)) to avoid additional memory passes over the activation tensor. This fusion technique is orthogonal to mixed precision DFP16 training and can also be applied to baseline FP32 version as well, however its more relevant mixed precision DFP16 training due
|
| 217 |
+
|
| 218 |
+

|
| 219 |
+
Figure 4: Performance breakdown of mixed precision DFP16 training vs. baseline FP32
|
| 220 |
+
|
| 221 |
+
to faster compute. Furthermore, such memory bandwidth optimizations are becoming more critical with the growing disparity between compute capabilities and memory bandwidth with advent of specialized compute accelerators.
|
| 222 |
+
|
| 223 |
+
With the above optimizations, we achieve an overall training throughput of 276 images/sec and 1.8X speed up over FP32 for ResNet-50. Additionally, we have improved SGD computation by $3 \times$ over the standard implementation in Intel-Caffe, pushing the training throughput to 317 images/sec, shown as the framework overhead reduction in Figure.4. When exlpoiting similar tuning knobs, such as fusion and improved SGD, in case the of the baseline FP32 version its performance increases to 194 images/sec. Even in this case Mixed Precision DFP16 can yield a high speedup of 1.6X with respect to time-to-train.
|
| 224 |
+
|
| 225 |
+
# 6 CONCLUSIONS
|
| 226 |
+
|
| 227 |
+
We demonstrate industry-first reduced precision INT-based training result on large networks/data-sets. Showing on-par or better than FP32 baseline accuracies and potentially $2 \times$ savings in computation, communication and storage. Further, we propose a general dynamic fixed point representation scheme, with associated compute primitives and algorithm for the shared exponent management. This DFP solution can be used with general purpose hardware, leveraging the integer compute pipeline. We demonstrate this with implementation of CNN training for ResNet-50, GoogLeNet-v1, VGG-16 and AlexNet; training these networks with mixed precision DFP16 for the ImageNet-1K classification task. While this work focuses on visual understanding CNNs, in future we plan to demonstrate the efficacy of this method for other types of networks like RNNs, LSTMs, GANs and extend this to wider set of applications.
|
| 228 |
+
|
| 229 |
+
# ACKNOWLEDGMENTS
|
| 230 |
+
|
| 231 |
+
The authors would like to thank the Intel CRT-DC team that operates the Endeavor cluster and also the Excalibur cluster team for their outstanding support and assistance.
|
| 232 |
+
|
| 233 |
+
# REFERENCES
|
| 234 |
+
|
| 235 |
+
Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Training deep neural networks with low precision multiplications. arXiv preprint arXiv:1412.7024, 2014.
|
| 236 |
+
|
| 237 |
+
Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. In Advances in Neural Information Processing Systems, pp. 3123–3131, 2015.
|
| 238 |
+
|
| 239 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009.
|
| 240 |
+
|
| 241 |
+
Tim Dettmers. 8-bit approximations for parallelism in deep learning. arXiv preprint arXiv:1511.04561, 2015.
|
| 242 |
+
|
| 243 |
+
Boris Ginsburg, Sergei Nikolaev, and Paulius Micikevicius. Training of deep networks with halfprecision float. NVidia GPU Technology Conference, 2017.
|
| 244 |
+
|
| 245 |
+
Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. In ICML, pp. 1737–1746, 2015.
|
| 246 |
+
|
| 247 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778, 2016.
|
| 248 |
+
|
| 249 |
+
Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. In Advances in neural information processing systems, pp. 4107–4115, 2016a.
|
| 250 |
+
|
| 251 |
+
Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. arXiv preprint arXiv:1609.07061, 2016b.
|
| 252 |
+
|
| 253 |
+
Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014.
|
| 254 |
+
|
| 255 |
+
Urs Köster, Tristan Webb, Xin Wang, Marcel Nassar, Arjun K. Bansal, William Constable, Oguz Elibol, Stewart Hall, Luke Hornof, Amir Khosrowshahi, Carey Kloss, Ruby J. Pai, and Naveen Rao. Flexpoint: An adaptive numerical format for efficient training of deep neural networks. CoRR, abs/1711.02213, 2017. URL http://arxiv.org/abs/1711.02213.
|
| 256 |
+
|
| 257 |
+
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.
|
| 258 |
+
|
| 259 |
+
Naveen Mellempudi, Abhisek Kundu, Dheevatsa Mudigere, Dipankar Das, Bharat Kaul, and Pradeep Dubey. Ternary neural networks with fine-grained quantization. arXiv preprint arXiv:1705.01462, 2017.
|
| 260 |
+
|
| 261 |
+
Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaev, Ganesh Venkatesh, et al. Mixed precision training. arXiv preprint arXiv:1710.03740, 2017.
|
| 262 |
+
|
| 263 |
+
NVIDIA. Nvidia tesla v100 gpu architecture - whitepaper. 2017. URL http://www.nvidia. com/object/volta-architecture-whitepaper.html.
|
| 264 |
+
|
| 265 |
+
Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In ECCV, 2016.
|
| 266 |
+
|
| 267 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015.
|
| 268 |
+
|
| 269 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 270 |
+
|
| 271 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015.
|
| 272 |
+
|
| 273 |
+
Vincent Vanhoucke, Andrew Senior, and Mark Z Mao. Improving the speed of neural networks on cpus. In Proc. Deep Learning and Unsupervised Feature Learning NIPS Workshop, volume 1, pp. 4. Citeseer, 2011.
|
| 274 |
+
|
| 275 |
+
Darrell Williamson. Dynamically scaled fixed point arithmetic. In Communications, Computers and Signal Processing, 1991., IEEE Pacific Rim Conference on, pp. 315–318. IEEE, 1991.
|
parse/train/H135uzZ0-/H135uzZ0-_content_list.json
ADDED
|
@@ -0,0 +1,1206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "MIXED PRECISION TRAINING OF CONVOLUTIONALNEURAL NETWORKS USING INTEGER OPERATIONS",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
174,
|
| 8 |
+
98,
|
| 9 |
+
823,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Dipankar Das∗, Naveen Mellempudi∗, Dheevatsa Mudigere∗, Dhiraj Kalamkar∗ ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
184,
|
| 19 |
+
169,
|
| 20 |
+
714,
|
| 21 |
+
185
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "{dipankar.das,naveen.k.mellempudi, \ndheevatsa.mudigere,dhiraj.d.kalamkar}@intel.com \nParallel Computing Lab \nIntel Labs, India \nSasikanth Avancha, Kunal Banerjee, Srinivas Sridharan, Karthik Vaidyanathan, Bharat Kaul \nParallel Computing Lab \nIntel Labs, India \nEvangelos Georganas, Alexander Heinecke, Pradeep Dubey \nParallel Computing Lab \nIntel Labs, SC \nJesus Corbal \nProduct Architecture Group \nIntel, OR \nNikita Shustrov, Roma Dubtsov, Evarist Fomenko, Vadim Pirogov \nSoftware Services Group \nIntel, OR ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
184,
|
| 30 |
+
185,
|
| 31 |
+
647,
|
| 32 |
+
239
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "",
|
| 39 |
+
"bbox": [
|
| 40 |
+
184,
|
| 41 |
+
261,
|
| 42 |
+
838,
|
| 43 |
+
303
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "text",
|
| 49 |
+
"text": "",
|
| 50 |
+
"bbox": [
|
| 51 |
+
183,
|
| 52 |
+
324,
|
| 53 |
+
598,
|
| 54 |
+
366
|
| 55 |
+
],
|
| 56 |
+
"page_idx": 0
|
| 57 |
+
},
|
| 58 |
+
{
|
| 59 |
+
"type": "text",
|
| 60 |
+
"text": "",
|
| 61 |
+
"bbox": [
|
| 62 |
+
629,
|
| 63 |
+
324,
|
| 64 |
+
813,
|
| 65 |
+
366
|
| 66 |
+
],
|
| 67 |
+
"page_idx": 0
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"text": "",
|
| 72 |
+
"bbox": [
|
| 73 |
+
183,
|
| 74 |
+
387,
|
| 75 |
+
643,
|
| 76 |
+
429
|
| 77 |
+
],
|
| 78 |
+
"page_idx": 0
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"text": "ABSTRACT ",
|
| 83 |
+
"text_level": 1,
|
| 84 |
+
"bbox": [
|
| 85 |
+
454,
|
| 86 |
+
465,
|
| 87 |
+
544,
|
| 88 |
+
482
|
| 89 |
+
],
|
| 90 |
+
"page_idx": 0
|
| 91 |
+
},
|
| 92 |
+
{
|
| 93 |
+
"type": "text",
|
| 94 |
+
"text": "The state-of-the-art (SOTA) for mixed precision training is dominated by variants of low precision floating point operations, and in particular FP16 accumulating into FP32 Micikevicius et al. (2017). On the other hand, while a lot of research has also happened in the domain of low and mixed-precision Integer training, these works either present results for non-SOTA networks (for instance only AlexNet for ImageNet-1K), or relatively small datasets (like CIFAR-10). In this work, we train state-of-the-art visual understanding neural networks on ImageNet-1K dataset, with Integer operations on General Purpose (GP) hardware. In particular, we focus on Integer Fused-Multiply-and-Accumulate (FMA) operations which take two pairs of INT16 operands and accumulate results into an INT32 output.We propose a shared exponent representation of tensors, and develop a Dynamic Fixed Point (DFP) scheme suitable for common neural network operations. The nuances of developing an efficient integer convolution kernel is examined, including methods to handle overflow of the INT32 accumulator. We implement CNN training for ResNet-50, GoogLeNet-v1, VGG-16 and AlexNet; and these networks achieve or exceed SOTA accuracy within the same number of iterations as their FP32 counterparts without any change in hyper-parameters and with a $1 . 8 \\mathrm { X }$ improvement in end-to-end training throughput. To the best of our knowledge these results represent the first INT16 training results on GP hardware for ImageNet-1K dataset using SOTA CNNs and achieve highest reported accuracy using half precision representation. ",
|
| 95 |
+
"bbox": [
|
| 96 |
+
233,
|
| 97 |
+
497,
|
| 98 |
+
764,
|
| 99 |
+
787
|
| 100 |
+
],
|
| 101 |
+
"page_idx": 0
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"type": "text",
|
| 105 |
+
"text": "1 INTRODUCTION ",
|
| 106 |
+
"text_level": 1,
|
| 107 |
+
"bbox": [
|
| 108 |
+
176,
|
| 109 |
+
814,
|
| 110 |
+
336,
|
| 111 |
+
830
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 0
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "While single precision floating point (FP32) representation has been the mainstay for deep learning training, half-precision and sub-half-precision arithmetic has recently captured interest of the academic and industrial research community. Primarily this interest stems from the ability to attain potentially upto 2X or more speedup of training as compared to FP32, when using half-precision fused-multiply and accumulate operations. For instance NVIDIA Volta NVIDIA (2017) provides 8X more half-precision Flops as compared to FP32. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
174,
|
| 120 |
+
845,
|
| 121 |
+
825,
|
| 122 |
+
902
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 0
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "",
|
| 129 |
+
"bbox": [
|
| 130 |
+
174,
|
| 131 |
+
103,
|
| 132 |
+
823,
|
| 133 |
+
132
|
| 134 |
+
],
|
| 135 |
+
"page_idx": 1
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "Unlike single precision floating point, which is a unanimous choice for $3 2 b$ training, half-precision training can either use half-precision floating point (FP16), or integers (INT16). These two options offer varying degrees of precision and range; with INT16 having higher precision but lower dynamic range as compared to FP16. This also leads to residues between half-precision representation and single precision to be fundamentally different – with integer representations contributing lower residual errors for larger (and possibly more important) elements of a tensor. Beyond this first order distinction in data types, there are multiple algorithmic and semantic differences (for example FP16 multiply-and-accumulate operation accumulating into FP32 results) for each of these data types. Hence, when discussing half-precision training, the whole gamut of tensor representation, semantics of multiply-and-accumulate operation, down-conversion scheme (if the accumulation is to a higher precision), scaling and normalization techniques, and overflow management methods must be considered in totality to achieve SOTA accuracy. Indeed, unless the right combination of the aforesaid vectors are selected, half precision training is likely to fail. Conversely, drawing conclusions on the efficacy of a method by not selecting all vectors properly can lead to inaccurate conclusions. ",
|
| 140 |
+
"bbox": [
|
| 141 |
+
174,
|
| 142 |
+
138,
|
| 143 |
+
825,
|
| 144 |
+
333
|
| 145 |
+
],
|
| 146 |
+
"page_idx": 1
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "text",
|
| 150 |
+
"text": "In this work we describe a mixed-precision training setup which uses: ",
|
| 151 |
+
"bbox": [
|
| 152 |
+
173,
|
| 153 |
+
340,
|
| 154 |
+
630,
|
| 155 |
+
354
|
| 156 |
+
],
|
| 157 |
+
"page_idx": 1
|
| 158 |
+
},
|
| 159 |
+
{
|
| 160 |
+
"type": "text",
|
| 161 |
+
"text": "• INT16 tensors with shared tensor-wide exponent, with a potential to extend to sub-tensor wide exponents. \n• An instruction which multiplies two INT16 numbers and stores the output into a INT32 accumulator. \n• A down-convert scheme based on the maximum value of the output tensor in the current iteration using multiple rounding methods like nearest, stochastic, and biased rounding. \n• An overflow management scheme which accumulates partial INT32 results into FP32, along with trading off input precision with length of accumulate chain to gain performance. ",
|
| 162 |
+
"bbox": [
|
| 163 |
+
215,
|
| 164 |
+
368,
|
| 165 |
+
825,
|
| 166 |
+
506
|
| 167 |
+
],
|
| 168 |
+
"page_idx": 1
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "text",
|
| 172 |
+
"text": "The compute for neural network training is dominated by GEMM-like, convolution, or dot-product operations. These are amenable to speedup via specialized low-precision instructions for fusedmultiply-and-accumulate (FMA), like AVX512_4VNNI 1. However, this does not necessarily mean using half-precision representation for all tensors, or using only half-precision operations. In fact, performance speedups by migrating the compute intensive operations in both forward and back prorogation (FPROP, BPROP and WTGRAD) is often close to the maximum achievable speedup obtained by replacing all operations (for instance SGD) in half-precision. In cases where it is not, performance degradation typically happens due to limitations of memory bandwidth, and other architectural reasons.Hence on a balanced general purpose machine, a mixed-precision strategy of keeping precision critical operations (like SGD and some normalizations) in single precision and compute intensive operations in half precision can be employed. The proposed integer-16 based mixed-precision training follows this template. ",
|
| 173 |
+
"bbox": [
|
| 174 |
+
174,
|
| 175 |
+
520,
|
| 176 |
+
825,
|
| 177 |
+
686
|
| 178 |
+
],
|
| 179 |
+
"page_idx": 1
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"type": "text",
|
| 183 |
+
"text": "Using the aforesaid method, we train multiple visual understanding CNNs and achieve Top-1 accuracies Russakovsky et al. (2015)on the ImageNet-1K dataset Deng et al. (2009) which match or exceed single precision results. These results are obtained without changing any hyper-parameters, and in as many iterations as the baseline FP32 training. We achieve $7 5 . 7 7 \\%$ Top-1 accuracy for ResNet-50 which, to the best of our knowledge, significantly exceeds any result published for halfprecision training, for example Micikevicius et al. (2017); Ginsburg et al. (2017). Further, we also demonstrate our methodology achieves state-of-the-art accuracy (comparable to FP32 baseline) with int16 training on GoogLeNet-v1, VGG-16 and AlexNet networks. To the best of our knowledge, these are first such results using int16 training. ",
|
| 184 |
+
"bbox": [
|
| 185 |
+
174,
|
| 186 |
+
693,
|
| 187 |
+
825,
|
| 188 |
+
818
|
| 189 |
+
],
|
| 190 |
+
"page_idx": 1
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"type": "text",
|
| 194 |
+
"text": "The rest of the paper is organized as follows: Section 2 discusses the literature pertaining to various aspects of half-precision training. The dynamic fixed point format for representing half-precision tensors is described in Section 3. Dynamic fixed point kernels and neural network training operations are described in Section 4, and experimental results are presented in Section 5. Finally, we conclude this work in Section 6. ",
|
| 195 |
+
"bbox": [
|
| 196 |
+
174,
|
| 197 |
+
825,
|
| 198 |
+
825,
|
| 199 |
+
895
|
| 200 |
+
],
|
| 201 |
+
"page_idx": 1
|
| 202 |
+
},
|
| 203 |
+
{
|
| 204 |
+
"type": "text",
|
| 205 |
+
"text": "2 RELATED WORK ",
|
| 206 |
+
"text_level": 1,
|
| 207 |
+
"bbox": [
|
| 208 |
+
176,
|
| 209 |
+
102,
|
| 210 |
+
344,
|
| 211 |
+
117
|
| 212 |
+
],
|
| 213 |
+
"page_idx": 2
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"type": "text",
|
| 217 |
+
"text": "Using reduced precision for Deep learning has been an active topic of research. As a result there are a number of different reduced precision data representations, the more standard floating-point based Micikevicius et al. (2017); Ginsburg et al. (2017); Dettmers (2015) and custom fixed point schemes Vanhoucke et al. (2011); Courbariaux et al. (2014); Gupta et al. (2015); Hubara et al. (2016b); Köster et al. (2017). ",
|
| 218 |
+
"bbox": [
|
| 219 |
+
174,
|
| 220 |
+
136,
|
| 221 |
+
825,
|
| 222 |
+
205
|
| 223 |
+
],
|
| 224 |
+
"page_idx": 2
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"type": "text",
|
| 228 |
+
"text": "The recently published mixed precision training work from Micikevicius et al. (2017) uses 16- bit floating point storage for activations, weights and gradients. The forward, back propagation computation uses FP16 computation with results accumulating into FP32 and a master-copy of the full precision (FP32) weights are retained for the update operation. They demonstrate a broad variety of deep learning training applications involving deep networks and larger data-sets (ILSVRC-class problems) with minimal loss compared to baseline FP32 results. Further, this shows that FP16/FP32 mixed precision requires loss scaling Ginsburg et al. (2017) to achieve near-SOTA accuracy. This ensures back-propagated gradient values are shifted into FP16 representable range and the small magnitude (negative exponent) values, which are critical for accuracy are captured. Such scaling is inherent with fixed point representations, making it more amenable and accurate for deep learning training. ",
|
| 229 |
+
"bbox": [
|
| 230 |
+
174,
|
| 231 |
+
212,
|
| 232 |
+
825,
|
| 233 |
+
366
|
| 234 |
+
],
|
| 235 |
+
"page_idx": 2
|
| 236 |
+
},
|
| 237 |
+
{
|
| 238 |
+
"type": "text",
|
| 239 |
+
"text": "Custom fixed point representations offer more flexibility - in terms of both increased precision and dynamic range. This allows for better mapping of the representation to the underlying application, thus making it more robust and accurate than floating-point based schemes.Vanhoucke et al. (2011) have shown that the dynamically scaled fixed point representation proposed by Williamson (1991) can be very effective for convolution neural networks - demonstrating upto to $4 \\times$ improvement over an aggressively tuned floating point implementation on general purpose CPU hardware. Gupta et al. (2015) have done a comprehensive study on the effect of low precision fixed point computation for deep learning and have successfully trained smaller networks using 16-bit fixed point on specialized hardware. With further reduced bit-widths, such fixed point data representations are more attractive - offering increased capacity for precision with larger mantissa bits and dynamically scaled shared exponents. There have been several publications with $< 1 6$ -bit precision and almost all of them use such custom fixed point schemes. Courbariaux et al. (2014) use a dynamical fixed point format (DFXP), with low precision multiplications with upto 12-bit operations. Building on this Courbariaux et al. (2015) proposed training with only binary weights while all other tensors and operations are in full precision. Hubara et al. (2016a) further extended this to use binary activations as well, but with gradients and weights still retained in full precision.Hubara et al. (2016b) proposed training with activations and weights quantized up to 6-bits and gradients in full precision. Rastegari et al. (2016) use binary representation for all components including gradients. However, all of the aforementioned use smaller benchmark model/data-sets and results in a non-trivial drop in accuracy with larger ImageNet data-set Deng et al. (2009) and classification task Russakovsky et al. (2015). Köster et al. (2017) have shown that a fixed point numerical format designed for deep neural networks (Flexpoint), out-performs FP16 and achieves numerical parity with FP32 across a wide set of applications. However, this is designed specifically for specialized hardware and the published results are with software emulation. Here we propose a more general dynamic fixed point representation and associated compute primitives, which can leverage general purpose hardware using the integercompute pipeline. Further we provide actual accuracy and performance for training large networks for the ILSVRC classification task, measured on available hardware. ",
|
| 240 |
+
"bbox": [
|
| 241 |
+
173,
|
| 242 |
+
373,
|
| 243 |
+
825,
|
| 244 |
+
746
|
| 245 |
+
],
|
| 246 |
+
"page_idx": 2
|
| 247 |
+
},
|
| 248 |
+
{
|
| 249 |
+
"type": "text",
|
| 250 |
+
"text": "3 THE DYNAMIC FIXED POINT FORMAT ",
|
| 251 |
+
"text_level": 1,
|
| 252 |
+
"bbox": [
|
| 253 |
+
176,
|
| 254 |
+
771,
|
| 255 |
+
521,
|
| 256 |
+
787
|
| 257 |
+
],
|
| 258 |
+
"page_idx": 2
|
| 259 |
+
},
|
| 260 |
+
{
|
| 261 |
+
"type": "text",
|
| 262 |
+
"text": "Dynamic Fixed Point (DFP) tensors are represented by a combination of an integer tensor $I$ and an exponent $E _ { s }$ , shared across all the integer elements. For the sake of convenience, the DFP tensor can be denoted as $\\mathsf { ) F P - P } = \\left. I , E _ { s } \\right.$ , where $P$ represents the number of bits used by the integer elements in $I$ (ex: DFP-16 contains 16-bit integers). ",
|
| 263 |
+
"bbox": [
|
| 264 |
+
174,
|
| 265 |
+
804,
|
| 266 |
+
823,
|
| 267 |
+
861
|
| 268 |
+
],
|
| 269 |
+
"page_idx": 2
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"type": "text",
|
| 273 |
+
"text": "Figure 1 illustrates the differences in data representation between IEEE-754 standard format float, half-float and DFP-16 data format. DFP-16 data type offers a trade-off between float and half-float in terms of precision and dynamic range. When compared to full-precision floats, DFP-16 can achieve higher compute density and can carry higher effective precision compared to half-floats because of ",
|
| 274 |
+
"bbox": [
|
| 275 |
+
174,
|
| 276 |
+
867,
|
| 277 |
+
825,
|
| 278 |
+
924
|
| 279 |
+
],
|
| 280 |
+
"page_idx": 2
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"type": "image",
|
| 284 |
+
"img_path": "images/f21466b27ed3903e60d80fa0f4762eeade7a8f7602365ed8b82f92d029a435b3.jpg",
|
| 285 |
+
"image_caption": [],
|
| 286 |
+
"image_footnote": [],
|
| 287 |
+
"bbox": [
|
| 288 |
+
181,
|
| 289 |
+
69,
|
| 290 |
+
825,
|
| 291 |
+
252
|
| 292 |
+
],
|
| 293 |
+
"page_idx": 3
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "text",
|
| 297 |
+
"text": "Figure 1: Snapshot of precision and dynamic range capabilities of a) IEEE-754 float b) IEEE-754 half-float, and c) Dynamic Fixed Point (DFP-16) data formats. ",
|
| 298 |
+
"bbox": [
|
| 299 |
+
171,
|
| 300 |
+
267,
|
| 301 |
+
823,
|
| 302 |
+
296
|
| 303 |
+
],
|
| 304 |
+
"page_idx": 3
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "text",
|
| 308 |
+
"text": "larger 15-bit mantissa (compared to 11-bits for half-floats). Further, the effective dynamic range of DFP format can be increased by extending the data type to use Blocked-DFP representation. BlockedDFP uses fine-grained quantization to assign multiple exponents per tensor with smaller blocks of integers sharing a common exponent. Mellempudi et al. (2017) have demonstrated effectiveness of fine-grained quantization for low-precision inference tasks. ",
|
| 309 |
+
"bbox": [
|
| 310 |
+
173,
|
| 311 |
+
321,
|
| 312 |
+
825,
|
| 313 |
+
393
|
| 314 |
+
],
|
| 315 |
+
"page_idx": 3
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "text",
|
| 319 |
+
"text": "In this work, we use a single shared exponent for each tensor. The integers are stored in 2’s complement representation and the shared exponent is an 8-bit signed integer. We use standard commodity integer hardware to perform arithmetic operations on DFP tensors. This implies that the exponent handling and precision management of DFP is done in the software, which is covered in more detail in Section 4.3. ",
|
| 320 |
+
"bbox": [
|
| 321 |
+
174,
|
| 322 |
+
400,
|
| 323 |
+
825,
|
| 324 |
+
469
|
| 325 |
+
],
|
| 326 |
+
"page_idx": 3
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "text",
|
| 330 |
+
"text": "3.1 DFP TENSOR PRIMITIVES ",
|
| 331 |
+
"text_level": 1,
|
| 332 |
+
"bbox": [
|
| 333 |
+
174,
|
| 334 |
+
486,
|
| 335 |
+
397,
|
| 336 |
+
501
|
| 337 |
+
],
|
| 338 |
+
"page_idx": 3
|
| 339 |
+
},
|
| 340 |
+
{
|
| 341 |
+
"type": "text",
|
| 342 |
+
"text": "To facilitate end-to-end mixed-precision training using DFP, we have created primitives to perform arithmetic operations on DFP tensors and data conversions between DFP and float. When converting floating point tensors into to DFP data type, the shared exponent is derived from the exponent of absolute maximum value of the floating point tensor. If $F$ is the floating point tensor, the exponent of the absolute maximum value is expressed as follows. ",
|
| 343 |
+
"bbox": [
|
| 344 |
+
173,
|
| 345 |
+
512,
|
| 346 |
+
825,
|
| 347 |
+
583
|
| 348 |
+
],
|
| 349 |
+
"page_idx": 3
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"type": "equation",
|
| 353 |
+
"img_path": "images/519a9378816b7811e4796f9faeda2a755d68ad54a4a8f32c0247b5fa4cf3f237.jpg",
|
| 354 |
+
"text": "$$\nE _ { f m a x } = E ( \\operatorname* { m a x } _ { \\forall f \\in F } | f | )\n$$",
|
| 355 |
+
"text_format": "latex",
|
| 356 |
+
"bbox": [
|
| 357 |
+
421,
|
| 358 |
+
589,
|
| 359 |
+
576,
|
| 360 |
+
613
|
| 361 |
+
],
|
| 362 |
+
"page_idx": 3
|
| 363 |
+
},
|
| 364 |
+
{
|
| 365 |
+
"type": "text",
|
| 366 |
+
"text": "The value of the shared exponent $E _ { s }$ is a function of $E _ { f m a x }$ and the number of bits $P$ used by the output integer tensor $I$ . ",
|
| 367 |
+
"bbox": [
|
| 368 |
+
173,
|
| 369 |
+
619,
|
| 370 |
+
825,
|
| 371 |
+
647
|
| 372 |
+
],
|
| 373 |
+
"page_idx": 3
|
| 374 |
+
},
|
| 375 |
+
{
|
| 376 |
+
"type": "equation",
|
| 377 |
+
"img_path": "images/909ee9a4258c76eb0c8f87347bf0a4620e00bc3f67ebef90e3a3191b563ef4f2.jpg",
|
| 378 |
+
"text": "$$\nE _ { s } = E _ { f m a x } - ( P - 2 )\n$$",
|
| 379 |
+
"text_format": "latex",
|
| 380 |
+
"bbox": [
|
| 381 |
+
416,
|
| 382 |
+
647,
|
| 383 |
+
581,
|
| 384 |
+
664
|
| 385 |
+
],
|
| 386 |
+
"page_idx": 3
|
| 387 |
+
},
|
| 388 |
+
{
|
| 389 |
+
"type": "text",
|
| 390 |
+
"text": "The relationship of the resulting DFP tensor $\\langle I , E _ { s } \\rangle$ with the input floating point tensor $F$ is expressed by Eq.3. ",
|
| 391 |
+
"bbox": [
|
| 392 |
+
173,
|
| 393 |
+
666,
|
| 394 |
+
825,
|
| 395 |
+
694
|
| 396 |
+
],
|
| 397 |
+
"page_idx": 3
|
| 398 |
+
},
|
| 399 |
+
{
|
| 400 |
+
"type": "equation",
|
| 401 |
+
"img_path": "images/4c33f2058e36a758cf9ff2f7cbbc965c73e7c1bc9a35f7fe27ededb4942021d9.jpg",
|
| 402 |
+
"text": "$$\n\\forall i _ { n } \\in I , f _ { n } = i _ { n } \\times 2 ^ { E _ { s } } , \\mathrm { w h e r e } f _ { n } \\in F\n$$",
|
| 403 |
+
"text_format": "latex",
|
| 404 |
+
"bbox": [
|
| 405 |
+
369,
|
| 406 |
+
693,
|
| 407 |
+
629,
|
| 408 |
+
712
|
| 409 |
+
],
|
| 410 |
+
"page_idx": 3
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "Extending this basic formulation Eq.3, we can define a set of common DFP primitives required for neural network training. ",
|
| 415 |
+
"bbox": [
|
| 416 |
+
173,
|
| 417 |
+
714,
|
| 418 |
+
825,
|
| 419 |
+
744
|
| 420 |
+
],
|
| 421 |
+
"page_idx": 3
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "• Multiplying two DFP-16 tensors produces 32-bit $I$ tensor with a new shared exponent expressed as follows. ",
|
| 426 |
+
"bbox": [
|
| 427 |
+
210,
|
| 428 |
+
755,
|
| 429 |
+
823,
|
| 430 |
+
785
|
| 431 |
+
],
|
| 432 |
+
"page_idx": 3
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "equation",
|
| 436 |
+
"img_path": "images/6a5f89eb68bded9b6beac4ad45bf31cbb45307f302e2d6dca2326299cf4c5c7b.jpg",
|
| 437 |
+
"text": "$$\ni _ { a b } = i _ { a } \\times i _ { b } a n d e x p o n e n t , E _ { s } ^ { a b } = E _ { s } ^ { a } + E _ { s } ^ { b }\n$$",
|
| 438 |
+
"text_format": "latex",
|
| 439 |
+
"bbox": [
|
| 440 |
+
377,
|
| 441 |
+
790,
|
| 442 |
+
678,
|
| 443 |
+
809
|
| 444 |
+
],
|
| 445 |
+
"page_idx": 3
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"type": "text",
|
| 449 |
+
"text": "• Adding two DFP-16 tensors results in a 32-bit $I$ tensor and a new shared exponent. ",
|
| 450 |
+
"bbox": [
|
| 451 |
+
215,
|
| 452 |
+
816,
|
| 453 |
+
774,
|
| 454 |
+
833
|
| 455 |
+
],
|
| 456 |
+
"page_idx": 3
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "equation",
|
| 460 |
+
"img_path": "images/c0c0352edb6697da2db641dcea88e27c2d17131a6d37386cfe8e6c3f2f382bfa.jpg",
|
| 461 |
+
"text": "$$\ni _ { a + b } = \\left\\{ \\begin{array} { l l } { i _ { a } + ( i _ { b } > > ( E _ { s } ^ { a } - E _ { s } ^ { b } ) ) , w h e n E _ { s } ^ { a } > E _ { s } ^ { b } } \\\\ { i _ { b } + ( i _ { a } > > ( E _ { s } ^ { b } - E _ { s } ^ { a } ) ) , w h e n E _ { s } ^ { b } > E _ { s } ^ { a } } \\end{array} \\right. \\quad \\mathrm { a n d } \\mathrm { e x p o n e n t } , E _ { s } ^ { a + b } = \\operatorname* { m a x } _ { E _ { s } ^ { a } , E _ { s } ^ { b } }\n$$",
|
| 462 |
+
"text_format": "latex",
|
| 463 |
+
"bbox": [
|
| 464 |
+
251,
|
| 465 |
+
838,
|
| 466 |
+
789,
|
| 467 |
+
876
|
| 468 |
+
],
|
| 469 |
+
"page_idx": 3
|
| 470 |
+
},
|
| 471 |
+
{
|
| 472 |
+
"type": "text",
|
| 473 |
+
"text": "Note that when a Fused Multiply and Add operation is performed, all products have the same shared exponent: $E _ { s } ^ { a b } = \\mathbf { \\bar { \\rho } } \\bar { E _ { s } ^ { a } } + E _ { s } ^ { b }$ , and hence the sum of such products also has the same shared exponent. ",
|
| 474 |
+
"bbox": [
|
| 475 |
+
232,
|
| 476 |
+
881,
|
| 477 |
+
823,
|
| 478 |
+
924
|
| 479 |
+
],
|
| 480 |
+
"page_idx": 3
|
| 481 |
+
},
|
| 482 |
+
{
|
| 483 |
+
"type": "text",
|
| 484 |
+
"text": "• Down-Conversion scales DFP-32 output of a layer to DFP-16 to be passed as input to the next layer. The 32-bit $I$ tensor right-shifted $R _ { s }$ bits to fit into 16-bit tensor. The $R _ { s }$ value and the new shared exponent are expressed as follows. ",
|
| 485 |
+
"bbox": [
|
| 486 |
+
217,
|
| 487 |
+
103,
|
| 488 |
+
823,
|
| 489 |
+
145
|
| 490 |
+
],
|
| 491 |
+
"page_idx": 4
|
| 492 |
+
},
|
| 493 |
+
{
|
| 494 |
+
"type": "equation",
|
| 495 |
+
"img_path": "images/48652dac02538ae156e94a563dfa1972d41d216afa52d71152546f515e828680.jpg",
|
| 496 |
+
"text": "$$\nR _ { s } = A - ( P + L Z C ( \\operatorname* { m a x } _ { \\forall i _ { a b } \\in I ^ { 3 2 } } | i _ { a b } | ) )\n$$",
|
| 497 |
+
"text_format": "latex",
|
| 498 |
+
"bbox": [
|
| 499 |
+
416,
|
| 500 |
+
147,
|
| 501 |
+
669,
|
| 502 |
+
171
|
| 503 |
+
],
|
| 504 |
+
"page_idx": 4
|
| 505 |
+
},
|
| 506 |
+
{
|
| 507 |
+
"type": "text",
|
| 508 |
+
"text": "In Eqn.6, A is accumulator bit-width, LZC( ) returns the leading zero bit-count. ",
|
| 509 |
+
"bbox": [
|
| 510 |
+
233,
|
| 511 |
+
194,
|
| 512 |
+
751,
|
| 513 |
+
209
|
| 514 |
+
],
|
| 515 |
+
"page_idx": 4
|
| 516 |
+
},
|
| 517 |
+
{
|
| 518 |
+
"type": "text",
|
| 519 |
+
"text": "4 NEURAL NETWORK TRAINING USING DYNAMIC FIXED POINT ",
|
| 520 |
+
"text_level": 1,
|
| 521 |
+
"bbox": [
|
| 522 |
+
171,
|
| 523 |
+
227,
|
| 524 |
+
722,
|
| 525 |
+
244
|
| 526 |
+
],
|
| 527 |
+
"page_idx": 4
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"type": "text",
|
| 531 |
+
"text": "Neural network training is an iterative process over mini-batches of data points, with four main operations on a given mini-batch: forward propagation (FPROP), back-propagation (BPROP), weight gradient computation (WTGRAD), and the solver (typically stochastic gradient descent, or ADAM). ",
|
| 532 |
+
"bbox": [
|
| 533 |
+
174,
|
| 534 |
+
258,
|
| 535 |
+
825,
|
| 536 |
+
301
|
| 537 |
+
],
|
| 538 |
+
"page_idx": 4
|
| 539 |
+
},
|
| 540 |
+
{
|
| 541 |
+
"type": "text",
|
| 542 |
+
"text": "In a CNN, the three steps of forward-propagation, back-propagation, and weight-gradient computation are often the compute intensive steps, and consist of GEMM-like (General Matrix Multiply) convolution operations which dominate the compute, and additional element-wise operations like normalization, non-linear (ReLU) and element-wise addition. In this work we propse a method to use INT16 operations, for implementing kernels for the convolutions and GEMM. There kernels are stitched with the rest of the operations in neural network training via Dynamic Fixed Point to floating point conversions described earlier in Section 3. In this section, we first describe the overall method for using dynamic fixed point in neural network training, and then explain the optimized kernel for convolutions. ",
|
| 543 |
+
"bbox": [
|
| 544 |
+
174,
|
| 545 |
+
308,
|
| 546 |
+
825,
|
| 547 |
+
433
|
| 548 |
+
],
|
| 549 |
+
"page_idx": 4
|
| 550 |
+
},
|
| 551 |
+
{
|
| 552 |
+
"type": "text",
|
| 553 |
+
"text": "4.1 TRAINING WITH DYNAMIC FIXED POINT ",
|
| 554 |
+
"text_level": 1,
|
| 555 |
+
"bbox": [
|
| 556 |
+
173,
|
| 557 |
+
449,
|
| 558 |
+
498,
|
| 559 |
+
463
|
| 560 |
+
],
|
| 561 |
+
"page_idx": 4
|
| 562 |
+
},
|
| 563 |
+
{
|
| 564 |
+
"type": "text",
|
| 565 |
+
"text": "The mixed precision training scheme used in this work is described in Figure 2. The core compute kernels in this scheme are the FP, BP, and $W U$ convolution functions which take two DFP-16 tensors as input and produces a FP32 tensor as output. For example $F P$ accepts two DFP-16 tensors, $a _ { q }$ , and $w _ { q }$ (activations and weights for layer- $\\varLambda _ { \\iota }$ ), and produces a FP32 output tensorThe FP and BP operations are followed by quantization steps $( Q _ { a } , Q _ { e } )$ which convert the FP32 tensors to DFP-16 tensors $( \\hat { a } _ { q } ^ { l }$ $e _ { q } ^ { l }$ ) for operations in the next layer. The WU step is followed by the Stochastic Gradient Descent (SGD) step, which takes the FP32 tensor for weight-gradients $( \\Delta w )$ and a FP32 copy of the weights $( W ^ { l } )$ as inputs, and produces an updated weight tensor as output. We follow the now established practice Micikevicius et al. (2017) of keeping a FP32 copy of weights as well as a low precision (DFP-16) copy of weights. Therefore SGD or other solvers are FP32 operations. In case a batch-norm layer is used, the DFP-16 tensors are loaded into registers and then the data is up-converted to FP32 to prevent overflows during stats computation. ",
|
| 566 |
+
"bbox": [
|
| 567 |
+
173,
|
| 568 |
+
474,
|
| 569 |
+
825,
|
| 570 |
+
646
|
| 571 |
+
],
|
| 572 |
+
"page_idx": 4
|
| 573 |
+
},
|
| 574 |
+
{
|
| 575 |
+
"type": "text",
|
| 576 |
+
"text": "4.2 CORE COMPUTE KERNELS ",
|
| 577 |
+
"text_level": 1,
|
| 578 |
+
"bbox": [
|
| 579 |
+
176,
|
| 580 |
+
662,
|
| 581 |
+
400,
|
| 582 |
+
676
|
| 583 |
+
],
|
| 584 |
+
"page_idx": 4
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"type": "text",
|
| 588 |
+
"text": "In this section we delve into efficient implementations of core compute kernels written using Integer FMA instruction sequence; in particular the AVX512_4VNNI instruction (described in Algorithm 1). This instruction takes a memory pointer as the first input and four vector registers as the second input and performs 8 multiply-add operations per output (16 Integer-OPs). For each 32b lane, the instruction takes two pairs of 16-bit Integers, performs a multiply followed by a horizontal add. ",
|
| 589 |
+
"bbox": [
|
| 590 |
+
173,
|
| 591 |
+
688,
|
| 592 |
+
825,
|
| 593 |
+
758
|
| 594 |
+
],
|
| 595 |
+
"page_idx": 4
|
| 596 |
+
},
|
| 597 |
+
{
|
| 598 |
+
"type": "text",
|
| 599 |
+
"text": "Algorithm 1 Semantics of the QVNNI16 Instruction ",
|
| 600 |
+
"text_level": 1,
|
| 601 |
+
"bbox": [
|
| 602 |
+
174,
|
| 603 |
+
771,
|
| 604 |
+
521,
|
| 605 |
+
786
|
| 606 |
+
],
|
| 607 |
+
"page_idx": 4
|
| 608 |
+
},
|
| 609 |
+
{
|
| 610 |
+
"type": "text",
|
| 611 |
+
"text": "1: $\\mathrm { K } { = } 4$ ; SIMD_WIDTH=16; \n2: QVNNI16(short \\*mem, _m512i vinp2[0..3], _m512i vout) \n3: for $\\mathbf { v } = 0$ . . . K-1 do \n4: for $\\mathbf { o } = 0$ . . . SIMD_WIDTH-1 do \n5: vout[o] $+ =$ vinp2[v][2\\*o]\\*mem[2\\*v] + vinp2[v][2\\*o+1]\\*mem[2\\*v+1] \n6: end for \n7: end for ",
|
| 612 |
+
"bbox": [
|
| 613 |
+
179,
|
| 614 |
+
790,
|
| 615 |
+
651,
|
| 616 |
+
882
|
| 617 |
+
],
|
| 618 |
+
"page_idx": 4
|
| 619 |
+
},
|
| 620 |
+
{
|
| 621 |
+
"type": "text",
|
| 622 |
+
"text": "The FPROP convolution kernel is written using AVX512_4VNNI instruction in Algorithm 2. The data layout of the weights captures the 2-way horizontal accumulation operation in AVX512_4VNNI. ",
|
| 623 |
+
"bbox": [
|
| 624 |
+
173,
|
| 625 |
+
895,
|
| 626 |
+
825,
|
| 627 |
+
924
|
| 628 |
+
],
|
| 629 |
+
"page_idx": 4
|
| 630 |
+
},
|
| 631 |
+
{
|
| 632 |
+
"type": "image",
|
| 633 |
+
"img_path": "images/4536be823c29f49dd6443a81a3e365ca08fb4d71479340abc3d4cb7c34f8b9c2.jpg",
|
| 634 |
+
"image_caption": [
|
| 635 |
+
"Figure 2: High-level data flow diagram for mixed precision training. Operators $F P ^ { l }$ , $B P ^ { l }$ and $W U ^ { l }$ indicate convolution layers, while $Q _ { a }$ , $Q _ { w }$ , $Q _ { e }$ are quantization operators for activations, weights and back propagated errors. Please note, the weight gradients $( \\Delta w ^ { \\hat { l } } )$ are not quantized before SGD, the updated weights are quantized for the next iteration. "
|
| 636 |
+
],
|
| 637 |
+
"image_footnote": [],
|
| 638 |
+
"bbox": [
|
| 639 |
+
228,
|
| 640 |
+
64,
|
| 641 |
+
774,
|
| 642 |
+
335
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 5
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "Here the last dimension moves along consecutive input-feature maps. Hence the dimensions of activations is: N, C/16, H, W, 16, and that of weights is C/16, K/16, KH, KW, 8c, 16k, 2c (where C and K are input and output feature maps, H, W are input feature map height and width, and KH, KW are kernel height/width). Note that while we briefly touch upon data layout and blocking of the core kernel loops in Algorithm 2, detailed analysis of performance is not the objective of this work. These details are explored only to highlight different functional components of the kernel. ",
|
| 649 |
+
"bbox": [
|
| 650 |
+
174,
|
| 651 |
+
424,
|
| 652 |
+
825,
|
| 653 |
+
508
|
| 654 |
+
],
|
| 655 |
+
"page_idx": 5
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"type": "text",
|
| 659 |
+
"text": "4.3 HANDLING OVERFLOWS IN INT16-INT32 FMAS ",
|
| 660 |
+
"text_level": 1,
|
| 661 |
+
"bbox": [
|
| 662 |
+
174,
|
| 663 |
+
526,
|
| 664 |
+
558,
|
| 665 |
+
541
|
| 666 |
+
],
|
| 667 |
+
"page_idx": 5
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"type": "text",
|
| 671 |
+
"text": "Multiplication of two INT16 numbers can result in a 30-bit outcome, and hence an accumulate chain of 3 products of INT16 multiplicative pairs can cause an overflow of the INT32 accumulator. In neural network training, accumulate chains can exceed a million in length (for example in the WTGRAD kernel). ",
|
| 672 |
+
"bbox": [
|
| 673 |
+
174,
|
| 674 |
+
553,
|
| 675 |
+
825,
|
| 676 |
+
608
|
| 677 |
+
],
|
| 678 |
+
"page_idx": 5
|
| 679 |
+
},
|
| 680 |
+
{
|
| 681 |
+
"type": "text",
|
| 682 |
+
"text": "One way to prevent overflows is to convert an INT32 intermediate output into FP32 before accumulation as described in lines 26-31 in Algorithm 2. Here we first convert the INT32 result to FP32 using the VCVTINTFP32 instruction, followed by a scale and accumulate into the final FP32 result using the VFP32MADD instruction. The scale used is $2 ^ { ( E _ { i n p } + E _ { w t } ) }$ (equation 3), which is broadcast and stored in the vscale vector register. The instruction sequence in lines 26-31 can be applied after every AVX512_4VNNI instruction to prevent almost all overflows. However the overheads would be significant and hurt performance. Hence we pick the strategy of partial accumulations into INT32 for short accumulate chains, and subsequently converting the results into FP32. ",
|
| 683 |
+
"bbox": [
|
| 684 |
+
174,
|
| 685 |
+
616,
|
| 686 |
+
825,
|
| 687 |
+
728
|
| 688 |
+
],
|
| 689 |
+
"page_idx": 5
|
| 690 |
+
},
|
| 691 |
+
{
|
| 692 |
+
"type": "text",
|
| 693 |
+
"text": "Performance Impact: As outlined in Algorithm2 for performance we block additionally over the input feature maps (ICBLK) and use optimal register blocking $( R B \\_ S I Z E )$ . The difference between an ideal instruction sequence (with no overflow management) and Algorithm 2 is essentially the additional VCVTINTFP32 instruction (line 28). In the loop in lines 8-31, we have (ICBLK/16) $^ { * } K H ^ { * } K W ^ { * } 2 ^ { * } R B$ AVX512_4VNNI instructions, and $R B ^ { * } \\mathcal { 4 } + ( I C B L K / I 6 ) ^ { * } K H ^ { * } K W ^ { * } \\mathcal { 4 }$ non-AVX512_4VNNI instructions, and RB VCVTINTFP32 instructions. The instruction overhead from overflow management therefore varies between ${ < } 1 \\%$ in most cases, to at most $3 \\%$ . ",
|
| 694 |
+
"bbox": [
|
| 695 |
+
174,
|
| 696 |
+
736,
|
| 697 |
+
825,
|
| 698 |
+
833
|
| 699 |
+
],
|
| 700 |
+
"page_idx": 5
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "text",
|
| 704 |
+
"text": "The length of the accumulate chain (via sizing the input feature map blocking factor ICBLK in line 7) is selected to optimize instruction overheads and cache/instruction reuse. In this work we strive to keep the accumulate chain to more than 200 (which is empirically shown to be close to optimal). Often this accumulate chain also overflows, which we circumvent by shifting inputs. In this work, we shift both the inputs by 1-bit for all convolutions in all experiments. Hence effectively we have a DFP15 representation of all DFP tensors. It is notable that this shift value is largely dependent on this ",
|
| 705 |
+
"bbox": [
|
| 706 |
+
174,
|
| 707 |
+
840,
|
| 708 |
+
825,
|
| 709 |
+
924
|
| 710 |
+
],
|
| 711 |
+
"page_idx": 5
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"type": "text",
|
| 715 |
+
"text": "Algorithm 2 Example Forward Propagation Loop ",
|
| 716 |
+
"text_level": 1,
|
| 717 |
+
"bbox": [
|
| 718 |
+
176,
|
| 719 |
+
103,
|
| 720 |
+
503,
|
| 721 |
+
118
|
| 722 |
+
],
|
| 723 |
+
"page_idx": 6
|
| 724 |
+
},
|
| 725 |
+
{
|
| 726 |
+
"type": "text",
|
| 727 |
+
"text": "1: fprop(DFP16 <input[IC/16][IH][IW][16], $e _ { i n p } >$ , DFP16 <weights[IC/16][OC/16][KH][KW][8][16][2], \n$e _ { w t } >$ ; FP32 output[OC/16][OH][OW][16] = 0) \n2: _m512 vwt[0. . . 3], vout[RB_SIZE], vtemp, vscale; \n3: vscale $=$ VBROADCAST $( 2 ^ { ( e _ { - } i n p + e _ { - } w t ) } .$ ) \n4: for ofm ${ } = 0$ . . . OC/16-1 do \n5: for ofh ${ } = 0$ . . . OH-1 do \n6: for ofw ${ } = 0$ . . . OW/RB_SIZE-1 do \n7: for ifm ${ } = 0$ ... IC/ICBLK-1 do \n8: for $\\mathrm { r b } { = } 0$ . . . RB_SIZE-1 do \n9: vout[r $\\mathbf b ] = \\mathbf s$ ETZERO() \n10: end for \n11: for $\\mathrm { i f m b } = 0$ ... ICBLK/16-1 do \n12: for $\\operatorname { k h } = 0$ . . . KH-1 do \n13: for ${ \\mathrm { k w } } = 0$ . . . KW-1 do \n14: for $\\mathrm { i b } = 0 \\dots 1$ do \n15: for $\\mathbf { v } { = } 0 \\ldots 3$ do \n16: vwt[v] ${ \\bf \\Pi } = \\bf { L O A D }$ (&weights[ifm][ofm][kh][kw][ib\\*4+v][0][0]) \n17: end for \n18: for $\\operatorname { r b } = 0$ . . . RB_SIZE-1 do \n19: AVX512_4VNNI(&input[ifm\\*(IC/ICBLK)+icb][S\\*ofh+kh][S\\*ofw+kw][ib]), \nvwt[0. . . 3], vout[rb]) \n20: end for \n21: end for \n22: end for \n23: end for \n24: end for \n25: end for \n26: for $\\mathrm { r b } { = } 0$ . . . RB-1 do \n27: vtemp $\\mathbf { \\tau } _ { \\mathbf { \\lambda } } = \\mathbf { L O A D }$ (&output[ofm][ofmh][ofmw\\*RB_SIZE $^ +$ rb][0]) \n28: vout[rb] $=$ VCVTINTFP32(vout[rb]) \n29: vtemp $=$ VFP32MADD(vtemp, vout[rb], vscale) //vtemp $=$ vtemp $^ +$ vout[rb]\\*vscale \n30: STORE(vtemp, &output[ofm][ofmh][ofmw\\*RB_SIZE $^ +$ rb][0]) \n31: end for \n32: end for \n33: end for \n34: end for ",
|
| 728 |
+
"bbox": [
|
| 729 |
+
173,
|
| 730 |
+
118,
|
| 731 |
+
818,
|
| 732 |
+
582
|
| 733 |
+
],
|
| 734 |
+
"page_idx": 6
|
| 735 |
+
},
|
| 736 |
+
{
|
| 737 |
+
"type": "text",
|
| 738 |
+
"text": "inner accumulate chain length, and by constraining it we can find a shift value applicable across all operations. The combination of input shift and conversion of outputs to FP32 allows us to prevent occurrence of any overflows and hence catastrophic errors during training. ",
|
| 739 |
+
"bbox": [
|
| 740 |
+
176,
|
| 741 |
+
604,
|
| 742 |
+
823,
|
| 743 |
+
647
|
| 744 |
+
],
|
| 745 |
+
"page_idx": 6
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"type": "text",
|
| 749 |
+
"text": "5 EXPERIMENTS AND RESULTS ",
|
| 750 |
+
"text_level": 1,
|
| 751 |
+
"bbox": [
|
| 752 |
+
176,
|
| 753 |
+
666,
|
| 754 |
+
447,
|
| 755 |
+
683
|
| 756 |
+
],
|
| 757 |
+
"page_idx": 6
|
| 758 |
+
},
|
| 759 |
+
{
|
| 760 |
+
"type": "text",
|
| 761 |
+
"text": "We compare mixed precision DFP16 training with baseline full precision (FP32) for several ImageNetclass SOTA CNNs. Both baseline and DFP16 experiments are run using versions of the BVLC CAFFE framework Jia et al. (2014). For the baseline runs we use Intel’s CAFFE branch2. For the mixed precision DFP16 experiments we use a private fork of this branch, where we have added DFP16 data-type support. The DFP16 compute primitives are supported through the prototype 16-bit integer kernels in Intel’s MKL-DNN library3 along with explicit exponent management as described in Section.4. Both baseline and mixed precision DFP16 experiments are run on the newly introduced Intel\rR XeonPhiTM Knights-Mill4. hardware using upto 32 nodes for training. Overall we see an average 1.8X speedup in the training throughput compared to the the baseline FP32 performance on the same platform. ",
|
| 762 |
+
"bbox": [
|
| 763 |
+
173,
|
| 764 |
+
696,
|
| 765 |
+
825,
|
| 766 |
+
840
|
| 767 |
+
],
|
| 768 |
+
"page_idx": 6
|
| 769 |
+
},
|
| 770 |
+
{
|
| 771 |
+
"type": "table",
|
| 772 |
+
"img_path": "images/0d00649a9933898e765cf12dbb5a256b66792189734a5602e7884a721710f800.jpg",
|
| 773 |
+
"table_caption": [
|
| 774 |
+
"Table 1: Training configuration and ImageNet-1K classification accuracy "
|
| 775 |
+
],
|
| 776 |
+
"table_footnote": [],
|
| 777 |
+
"table_body": "<table><tr><td rowspan=\"2\">Models</td><td rowspan=\"2\">Batch-size /Epochs</td><td colspan=\"2\">Baseline</td><td colspan=\"2\">Mixed precision DFP16</td></tr><tr><td>Top-1</td><td>Top-5</td><td>Top-1</td><td>Top-5</td></tr><tr><td>ResNet-50</td><td>1024 /90</td><td>75.70%</td><td>92.78%</td><td>75.77%</td><td>92.84%</td></tr><tr><td>GoogLeNet-v1</td><td>1024/80</td><td>69.26%</td><td>89.31%</td><td>69.34%</td><td>89.31%</td></tr><tr><td>VGG-16</td><td>256/60</td><td>68.23%</td><td>88.47%</td><td>68.12%</td><td>88.18%</td></tr><tr><td>AlexNet</td><td>1024 /88</td><td>57.43%</td><td>80.65%</td><td>56.94%</td><td>80.06%</td></tr></table>",
|
| 778 |
+
"bbox": [
|
| 779 |
+
191,
|
| 780 |
+
82,
|
| 781 |
+
802,
|
| 782 |
+
189
|
| 783 |
+
],
|
| 784 |
+
"page_idx": 7
|
| 785 |
+
},
|
| 786 |
+
{
|
| 787 |
+
"type": "text",
|
| 788 |
+
"text": "5.1 ACCURACY RESULTS FOR CNNS ",
|
| 789 |
+
"text_level": 1,
|
| 790 |
+
"bbox": [
|
| 791 |
+
174,
|
| 792 |
+
199,
|
| 793 |
+
442,
|
| 794 |
+
213
|
| 795 |
+
],
|
| 796 |
+
"page_idx": 7
|
| 797 |
+
},
|
| 798 |
+
{
|
| 799 |
+
"type": "text",
|
| 800 |
+
"text": "We trained several CNNs for the ImageNet-1K classification task using mixed precision DFP16: AlexNet Krizhevsky et al. (2012), VGG-16 Simonyan & Zisserman (2014), GoogLeNet-v1 Szegedy et al. (2015), ResNet-50 He et al. (2016). We use exactly the same batch-size and hyper-parameter configuration for both the baseline FP32 and DFP16 training runs (Table.1). In both cases, the models are trained from scratch using synchronous SGD on multiple nodes. In our experiments the first convolution layer (C1) and the fully connected layers are in FP32 (constituting about $5 - 1 0 \\%$ of compute for modern CNNs). Table.1 shows ImageNet-1K classification accuracies, training with DFP16 achieve SOTA accuracy for all four models and in several cases even better than the baseline full precision result. ",
|
| 801 |
+
"bbox": [
|
| 802 |
+
173,
|
| 803 |
+
226,
|
| 804 |
+
826,
|
| 805 |
+
352
|
| 806 |
+
],
|
| 807 |
+
"page_idx": 7
|
| 808 |
+
},
|
| 809 |
+
{
|
| 810 |
+
"type": "text",
|
| 811 |
+
"text": "To the best of our knowledge, top-1 accuracy of $7 5 . 7 7 \\%$ and top-5 accuracy of $9 2 . 8 4 \\%$ for ResNet-50 with mixed precision DFP16 - is highest achieved accuracy on the ImageNet-1K classification task with any form of reduced precision training. ",
|
| 812 |
+
"bbox": [
|
| 813 |
+
176,
|
| 814 |
+
358,
|
| 815 |
+
825,
|
| 816 |
+
401
|
| 817 |
+
],
|
| 818 |
+
"page_idx": 7
|
| 819 |
+
},
|
| 820 |
+
{
|
| 821 |
+
"type": "image",
|
| 822 |
+
"img_path": "images/2bb056f384aa5c2357d97075ead0925781f7d84c718a74b19cc37ed3c7bfbd69.jpg",
|
| 823 |
+
"image_caption": [
|
| 824 |
+
"Figure 3: Convergence plots for DFP-16b training vs. reference baseline FP32 results for ResNet-50, GoogLeNet-v1, VGG-16 and AlexNet trained for ImageNet-1K classification task "
|
| 825 |
+
],
|
| 826 |
+
"image_footnote": [],
|
| 827 |
+
"bbox": [
|
| 828 |
+
187,
|
| 829 |
+
420,
|
| 830 |
+
812,
|
| 831 |
+
757
|
| 832 |
+
],
|
| 833 |
+
"page_idx": 7
|
| 834 |
+
},
|
| 835 |
+
{
|
| 836 |
+
"type": "text",
|
| 837 |
+
"text": "It can be seen from Figure.3 that DFP16, closely tracks the full precision training. For some models like GoogLeNet-v1 and AlexNet, we observe the initially DFP16 training lags the baseline, however this gaps is closed with subsequent epochs especially after the learning rate changes. Further, we observe that compared to baseline run - with DFP16 the validation/test loss tracks much closer to the training loss. We believe this is the effect of the additional noise introduced from reduced precision computation/storage, which is results in better generalization with reduced training-testing gap and better accuracies. ",
|
| 838 |
+
"bbox": [
|
| 839 |
+
173,
|
| 840 |
+
825,
|
| 841 |
+
825,
|
| 842 |
+
924
|
| 843 |
+
],
|
| 844 |
+
"page_idx": 7
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"type": "text",
|
| 848 |
+
"text": "5.2 PERFORMANCE DISCUSSION ",
|
| 849 |
+
"text_level": 1,
|
| 850 |
+
"bbox": [
|
| 851 |
+
176,
|
| 852 |
+
103,
|
| 853 |
+
411,
|
| 854 |
+
117
|
| 855 |
+
],
|
| 856 |
+
"page_idx": 8
|
| 857 |
+
},
|
| 858 |
+
{
|
| 859 |
+
"type": "text",
|
| 860 |
+
"text": "For demonstrating the performance potential with mixed precision DFP16 training, we present detailed performance analysis and breakdown for the ResNet-50 topology as case study. The performance numbers reported below were measured on an Inte $\\textsuperscript { \\textregistered }$ XeonPhiTM Processor 7295 (codename Knights-Mill)5 4 ",
|
| 861 |
+
"bbox": [
|
| 862 |
+
174,
|
| 863 |
+
132,
|
| 864 |
+
825,
|
| 865 |
+
193
|
| 866 |
+
],
|
| 867 |
+
"page_idx": 8
|
| 868 |
+
},
|
| 869 |
+
{
|
| 870 |
+
"type": "text",
|
| 871 |
+
"text": "For the convolution kernels going from FP32 to DFP16, the $3 \\times 3$ kernels are $1 . 8 \\times$ faster and the $1 \\times 1$ kernels are $1 . 4 \\times$ faster; resulting in overall $1 . 5 \\times$ speedup. The baseline kernels include memory prefetch optimization, which when applied to DFP kernels should improve the performance by an additional $2 0 \\%$ . The batchnorm computation is $2 \\times$ faster with DFP16, the speed up here is primarily due to $5 0 \\%$ bandwidth saving due to smaller memory footprint. In addition, the ReLU and EltWise layers are fused with batchnorm (Figure.4)) to avoid additional memory passes over the activation tensor. This fusion technique is orthogonal to mixed precision DFP16 training and can also be applied to baseline FP32 version as well, however its more relevant mixed precision DFP16 training due ",
|
| 872 |
+
"bbox": [
|
| 873 |
+
174,
|
| 874 |
+
200,
|
| 875 |
+
452,
|
| 876 |
+
462
|
| 877 |
+
],
|
| 878 |
+
"page_idx": 8
|
| 879 |
+
},
|
| 880 |
+
{
|
| 881 |
+
"type": "image",
|
| 882 |
+
"img_path": "images/22f54896ad96dbe009985855e52a1c3578db2e7dd054e738f92b2a330ce14700.jpg",
|
| 883 |
+
"image_caption": [
|
| 884 |
+
"Figure 4: Performance breakdown of mixed precision DFP16 training vs. baseline FP32 "
|
| 885 |
+
],
|
| 886 |
+
"image_footnote": [],
|
| 887 |
+
"bbox": [
|
| 888 |
+
467,
|
| 889 |
+
212,
|
| 890 |
+
818,
|
| 891 |
+
409
|
| 892 |
+
],
|
| 893 |
+
"page_idx": 8
|
| 894 |
+
},
|
| 895 |
+
{
|
| 896 |
+
"type": "text",
|
| 897 |
+
"text": "to faster compute. Furthermore, such memory bandwidth optimizations are becoming more critical with the growing disparity between compute capabilities and memory bandwidth with advent of specialized compute accelerators. ",
|
| 898 |
+
"bbox": [
|
| 899 |
+
174,
|
| 900 |
+
463,
|
| 901 |
+
825,
|
| 902 |
+
503
|
| 903 |
+
],
|
| 904 |
+
"page_idx": 8
|
| 905 |
+
},
|
| 906 |
+
{
|
| 907 |
+
"type": "text",
|
| 908 |
+
"text": "With the above optimizations, we achieve an overall training throughput of 276 images/sec and 1.8X speed up over FP32 for ResNet-50. Additionally, we have improved SGD computation by $3 \\times$ over the standard implementation in Intel-Caffe, pushing the training throughput to 317 images/sec, shown as the framework overhead reduction in Figure.4. When exlpoiting similar tuning knobs, such as fusion and improved SGD, in case the of the baseline FP32 version its performance increases to 194 images/sec. Even in this case Mixed Precision DFP16 can yield a high speedup of 1.6X with respect to time-to-train. ",
|
| 909 |
+
"bbox": [
|
| 910 |
+
174,
|
| 911 |
+
511,
|
| 912 |
+
825,
|
| 913 |
+
608
|
| 914 |
+
],
|
| 915 |
+
"page_idx": 8
|
| 916 |
+
},
|
| 917 |
+
{
|
| 918 |
+
"type": "text",
|
| 919 |
+
"text": "6 CONCLUSIONS ",
|
| 920 |
+
"text_level": 1,
|
| 921 |
+
"bbox": [
|
| 922 |
+
176,
|
| 923 |
+
636,
|
| 924 |
+
328,
|
| 925 |
+
651
|
| 926 |
+
],
|
| 927 |
+
"page_idx": 8
|
| 928 |
+
},
|
| 929 |
+
{
|
| 930 |
+
"type": "text",
|
| 931 |
+
"text": "We demonstrate industry-first reduced precision INT-based training result on large networks/data-sets. Showing on-par or better than FP32 baseline accuracies and potentially $2 \\times$ savings in computation, communication and storage. Further, we propose a general dynamic fixed point representation scheme, with associated compute primitives and algorithm for the shared exponent management. This DFP solution can be used with general purpose hardware, leveraging the integer compute pipeline. We demonstrate this with implementation of CNN training for ResNet-50, GoogLeNet-v1, VGG-16 and AlexNet; training these networks with mixed precision DFP16 for the ImageNet-1K classification task. While this work focuses on visual understanding CNNs, in future we plan to demonstrate the efficacy of this method for other types of networks like RNNs, LSTMs, GANs and extend this to wider set of applications. ",
|
| 932 |
+
"bbox": [
|
| 933 |
+
174,
|
| 934 |
+
671,
|
| 935 |
+
826,
|
| 936 |
+
810
|
| 937 |
+
],
|
| 938 |
+
"page_idx": 8
|
| 939 |
+
},
|
| 940 |
+
{
|
| 941 |
+
"type": "text",
|
| 942 |
+
"text": "ACKNOWLEDGMENTS ",
|
| 943 |
+
"text_level": 1,
|
| 944 |
+
"bbox": [
|
| 945 |
+
176,
|
| 946 |
+
834,
|
| 947 |
+
326,
|
| 948 |
+
847
|
| 949 |
+
],
|
| 950 |
+
"page_idx": 8
|
| 951 |
+
},
|
| 952 |
+
{
|
| 953 |
+
"type": "text",
|
| 954 |
+
"text": "The authors would like to thank the Intel CRT-DC team that operates the Endeavor cluster and also the Excalibur cluster team for their outstanding support and assistance. ",
|
| 955 |
+
"bbox": [
|
| 956 |
+
176,
|
| 957 |
+
859,
|
| 958 |
+
823,
|
| 959 |
+
887
|
| 960 |
+
],
|
| 961 |
+
"page_idx": 8
|
| 962 |
+
},
|
| 963 |
+
{
|
| 964 |
+
"type": "text",
|
| 965 |
+
"text": "REFERENCES ",
|
| 966 |
+
"text_level": 1,
|
| 967 |
+
"bbox": [
|
| 968 |
+
176,
|
| 969 |
+
102,
|
| 970 |
+
287,
|
| 971 |
+
118
|
| 972 |
+
],
|
| 973 |
+
"page_idx": 9
|
| 974 |
+
},
|
| 975 |
+
{
|
| 976 |
+
"type": "text",
|
| 977 |
+
"text": "Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Training deep neural networks with low precision multiplications. arXiv preprint arXiv:1412.7024, 2014. ",
|
| 978 |
+
"bbox": [
|
| 979 |
+
173,
|
| 980 |
+
126,
|
| 981 |
+
823,
|
| 982 |
+
155
|
| 983 |
+
],
|
| 984 |
+
"page_idx": 9
|
| 985 |
+
},
|
| 986 |
+
{
|
| 987 |
+
"type": "text",
|
| 988 |
+
"text": "Matthieu Courbariaux, Yoshua Bengio, and Jean-Pierre David. Binaryconnect: Training deep neural networks with binary weights during propagations. In Advances in Neural Information Processing Systems, pp. 3123–3131, 2015. ",
|
| 989 |
+
"bbox": [
|
| 990 |
+
174,
|
| 991 |
+
165,
|
| 992 |
+
823,
|
| 993 |
+
207
|
| 994 |
+
],
|
| 995 |
+
"page_idx": 9
|
| 996 |
+
},
|
| 997 |
+
{
|
| 998 |
+
"type": "text",
|
| 999 |
+
"text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009. ",
|
| 1000 |
+
"bbox": [
|
| 1001 |
+
174,
|
| 1002 |
+
217,
|
| 1003 |
+
823,
|
| 1004 |
+
260
|
| 1005 |
+
],
|
| 1006 |
+
"page_idx": 9
|
| 1007 |
+
},
|
| 1008 |
+
{
|
| 1009 |
+
"type": "text",
|
| 1010 |
+
"text": "Tim Dettmers. 8-bit approximations for parallelism in deep learning. arXiv preprint arXiv:1511.04561, 2015. ",
|
| 1011 |
+
"bbox": [
|
| 1012 |
+
173,
|
| 1013 |
+
268,
|
| 1014 |
+
825,
|
| 1015 |
+
299
|
| 1016 |
+
],
|
| 1017 |
+
"page_idx": 9
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"type": "text",
|
| 1021 |
+
"text": "Boris Ginsburg, Sergei Nikolaev, and Paulius Micikevicius. Training of deep networks with halfprecision float. NVidia GPU Technology Conference, 2017. ",
|
| 1022 |
+
"bbox": [
|
| 1023 |
+
174,
|
| 1024 |
+
308,
|
| 1025 |
+
823,
|
| 1026 |
+
337
|
| 1027 |
+
],
|
| 1028 |
+
"page_idx": 9
|
| 1029 |
+
},
|
| 1030 |
+
{
|
| 1031 |
+
"type": "text",
|
| 1032 |
+
"text": "Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. In ICML, pp. 1737–1746, 2015. ",
|
| 1033 |
+
"bbox": [
|
| 1034 |
+
173,
|
| 1035 |
+
345,
|
| 1036 |
+
823,
|
| 1037 |
+
376
|
| 1038 |
+
],
|
| 1039 |
+
"page_idx": 9
|
| 1040 |
+
},
|
| 1041 |
+
{
|
| 1042 |
+
"type": "text",
|
| 1043 |
+
"text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778, 2016. ",
|
| 1044 |
+
"bbox": [
|
| 1045 |
+
173,
|
| 1046 |
+
385,
|
| 1047 |
+
826,
|
| 1048 |
+
428
|
| 1049 |
+
],
|
| 1050 |
+
"page_idx": 9
|
| 1051 |
+
},
|
| 1052 |
+
{
|
| 1053 |
+
"type": "text",
|
| 1054 |
+
"text": "Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Binarized neural networks. In Advances in neural information processing systems, pp. 4107–4115, 2016a. ",
|
| 1055 |
+
"bbox": [
|
| 1056 |
+
171,
|
| 1057 |
+
436,
|
| 1058 |
+
825,
|
| 1059 |
+
467
|
| 1060 |
+
],
|
| 1061 |
+
"page_idx": 9
|
| 1062 |
+
},
|
| 1063 |
+
{
|
| 1064 |
+
"type": "text",
|
| 1065 |
+
"text": "Itay Hubara, Matthieu Courbariaux, Daniel Soudry, Ran El-Yaniv, and Yoshua Bengio. Quantized neural networks: Training neural networks with low precision weights and activations. arXiv preprint arXiv:1609.07061, 2016b. ",
|
| 1066 |
+
"bbox": [
|
| 1067 |
+
173,
|
| 1068 |
+
476,
|
| 1069 |
+
823,
|
| 1070 |
+
518
|
| 1071 |
+
],
|
| 1072 |
+
"page_idx": 9
|
| 1073 |
+
},
|
| 1074 |
+
{
|
| 1075 |
+
"type": "text",
|
| 1076 |
+
"text": "Yangqing Jia, Evan Shelhamer, Jeff Donahue, Sergey Karayev, Jonathan Long, Ross Girshick, Sergio Guadarrama, and Trevor Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. ",
|
| 1077 |
+
"bbox": [
|
| 1078 |
+
174,
|
| 1079 |
+
529,
|
| 1080 |
+
825,
|
| 1081 |
+
570
|
| 1082 |
+
],
|
| 1083 |
+
"page_idx": 9
|
| 1084 |
+
},
|
| 1085 |
+
{
|
| 1086 |
+
"type": "text",
|
| 1087 |
+
"text": "Urs Köster, Tristan Webb, Xin Wang, Marcel Nassar, Arjun K. Bansal, William Constable, Oguz Elibol, Stewart Hall, Luke Hornof, Amir Khosrowshahi, Carey Kloss, Ruby J. Pai, and Naveen Rao. Flexpoint: An adaptive numerical format for efficient training of deep neural networks. CoRR, abs/1711.02213, 2017. URL http://arxiv.org/abs/1711.02213. ",
|
| 1088 |
+
"bbox": [
|
| 1089 |
+
174,
|
| 1090 |
+
580,
|
| 1091 |
+
826,
|
| 1092 |
+
637
|
| 1093 |
+
],
|
| 1094 |
+
"page_idx": 9
|
| 1095 |
+
},
|
| 1096 |
+
{
|
| 1097 |
+
"type": "text",
|
| 1098 |
+
"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. ",
|
| 1099 |
+
"bbox": [
|
| 1100 |
+
174,
|
| 1101 |
+
646,
|
| 1102 |
+
826,
|
| 1103 |
+
689
|
| 1104 |
+
],
|
| 1105 |
+
"page_idx": 9
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"type": "text",
|
| 1109 |
+
"text": "Naveen Mellempudi, Abhisek Kundu, Dheevatsa Mudigere, Dipankar Das, Bharat Kaul, and Pradeep Dubey. Ternary neural networks with fine-grained quantization. arXiv preprint arXiv:1705.01462, 2017. ",
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
173,
|
| 1112 |
+
699,
|
| 1113 |
+
826,
|
| 1114 |
+
742
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 9
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaev, Ganesh Venkatesh, et al. Mixed precision training. arXiv preprint arXiv:1710.03740, 2017. ",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
174,
|
| 1123 |
+
752,
|
| 1124 |
+
825,
|
| 1125 |
+
795
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 9
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "text",
|
| 1131 |
+
"text": "NVIDIA. Nvidia tesla v100 gpu architecture - whitepaper. 2017. URL http://www.nvidia. com/object/volta-architecture-whitepaper.html. ",
|
| 1132 |
+
"bbox": [
|
| 1133 |
+
171,
|
| 1134 |
+
804,
|
| 1135 |
+
825,
|
| 1136 |
+
833
|
| 1137 |
+
],
|
| 1138 |
+
"page_idx": 9
|
| 1139 |
+
},
|
| 1140 |
+
{
|
| 1141 |
+
"type": "text",
|
| 1142 |
+
"text": "Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In ECCV, 2016. ",
|
| 1143 |
+
"bbox": [
|
| 1144 |
+
171,
|
| 1145 |
+
843,
|
| 1146 |
+
825,
|
| 1147 |
+
872
|
| 1148 |
+
],
|
| 1149 |
+
"page_idx": 9
|
| 1150 |
+
},
|
| 1151 |
+
{
|
| 1152 |
+
"type": "text",
|
| 1153 |
+
"text": "Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015. ",
|
| 1154 |
+
"bbox": [
|
| 1155 |
+
174,
|
| 1156 |
+
881,
|
| 1157 |
+
825,
|
| 1158 |
+
924
|
| 1159 |
+
],
|
| 1160 |
+
"page_idx": 9
|
| 1161 |
+
},
|
| 1162 |
+
{
|
| 1163 |
+
"type": "text",
|
| 1164 |
+
"text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ",
|
| 1165 |
+
"bbox": [
|
| 1166 |
+
171,
|
| 1167 |
+
103,
|
| 1168 |
+
825,
|
| 1169 |
+
132
|
| 1170 |
+
],
|
| 1171 |
+
"page_idx": 10
|
| 1172 |
+
},
|
| 1173 |
+
{
|
| 1174 |
+
"type": "text",
|
| 1175 |
+
"text": "Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015. ",
|
| 1176 |
+
"bbox": [
|
| 1177 |
+
176,
|
| 1178 |
+
140,
|
| 1179 |
+
825,
|
| 1180 |
+
184
|
| 1181 |
+
],
|
| 1182 |
+
"page_idx": 10
|
| 1183 |
+
},
|
| 1184 |
+
{
|
| 1185 |
+
"type": "text",
|
| 1186 |
+
"text": "Vincent Vanhoucke, Andrew Senior, and Mark Z Mao. Improving the speed of neural networks on cpus. In Proc. Deep Learning and Unsupervised Feature Learning NIPS Workshop, volume 1, pp. 4. Citeseer, 2011. ",
|
| 1187 |
+
"bbox": [
|
| 1188 |
+
173,
|
| 1189 |
+
193,
|
| 1190 |
+
823,
|
| 1191 |
+
234
|
| 1192 |
+
],
|
| 1193 |
+
"page_idx": 10
|
| 1194 |
+
},
|
| 1195 |
+
{
|
| 1196 |
+
"type": "text",
|
| 1197 |
+
"text": "Darrell Williamson. Dynamically scaled fixed point arithmetic. In Communications, Computers and Signal Processing, 1991., IEEE Pacific Rim Conference on, pp. 315–318. IEEE, 1991. ",
|
| 1198 |
+
"bbox": [
|
| 1199 |
+
173,
|
| 1200 |
+
244,
|
| 1201 |
+
825,
|
| 1202 |
+
272
|
| 1203 |
+
],
|
| 1204 |
+
"page_idx": 10
|
| 1205 |
+
}
|
| 1206 |
+
]
|
parse/train/H135uzZ0-/H135uzZ0-_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LEARNING DEEP GENERATIVE MODELS OF GRAPHS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Graphs are fundamental data structures required to model many important realworld data, from knowledge graphs, physical and social interactions to molecules and proteins. In this paper, we study the problem of learning generative models of graphs from a dataset of graphs of interest. After learning, these models can be used to generate samples with similar properties as the ones in the dataset. Such models can be useful in a lot of applications, e.g. drug discovery and knowledge graph construction. The task of learning generative models of graphs, however, has its unique challenges. In particular, how to handle symmetries in graphs and ordering of its elements during the generation process are important issues. We propose a generic graph neural net based model that is capable of generating any arbitrary graph. We study its performance on a few graph generation tasks compared to baselines that exploit domain knowledge. We discuss potential issues and open problems for such generative models going forward.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Graphs are natural representations of information in many problem domains. For example, relations between entities in knowledge graphs and social networks are well captured by graphs, and they are also good for modeling the physical world, e.g. molecular structure and the interactions between objects in physical systems. Thus, the ability to capture the distribution of a particular family of graphs has many applications. For instance, sampling from the graph model can lead to the discovery of new configurations that share same global properties as is, for example, required in drug discovery (Gómez-Bombarelli et al., 2016). Obtaining graph-structured semantic representations for natural language sentences (Kuhlmann & Oepen, 2016) requires the ability to model (conditional) distributions on graphs. Distributions on graphs can also provide priors for Bayesian structure learning of graphical models (Margaritis, 2003).
|
| 12 |
+
|
| 13 |
+
Probabilistic models of graphs have been studied for a long time, from at least two perspectives. On one hand, there are random graph models that robustly assign probabilities to large classes of graphs (Erdos & Rényi, 1960; Barabási & Albert, 1999). These make strong independence assump- ˝ tions and are designed to capture only certain graph properties, like degree distribution and diameter. While these are effective models of the distributions of graphs found in some domains, such as social networks, they are poor models of more richly structured graphs where small structural differences can be functionally significant, such as those encountered in chemistry or when representing the meaning of natural language sentences. As an alternative, a more expressive class of models makes use of graph grammars, which generalize devices from formal language theory so as to produce non-sequential structures (Rozenberg, 1997). Graph grammars are systems of rewrite rules that incrementally derive an output graph via a sequence of transformations of intermediate graphs.While symbolic graph grammars can be made stochastic or otherwise weighted using standard techniques (Droste & Gastin, 2007), from a learnability standpoint, two problems remain. First, inducing grammars from a set of unannotated graphs is nontrivial since formalism-appropriate derivation steps must be inferred and transformed into rules (Lautemann, 1988; Aguiñaga et al., 2016, for example). Second, as with linear output grammars, graph grammars make a hard distinction between what is in the language and what is excluded, making such models problematic for applications where it is inappropriate to assign 0 probability to certain graphs.
|
| 14 |
+
|
| 15 |
+
In this work we develop an expressive model which makes no assumptions on the graphs and can therefore assign probabilities to any arbitrary graph.1 Our model generates graphs in a manner similar to graph grammars, where during the course of a derivation new structure (specifically, a new node or a new edge) is added to the existing graph, and where the probability of that addition event depends on the history of the graph derivation. To represent the graph during each step of the derivation, we use a representation based on graph-structured neural networks (graph nets). Recently there has been a surge of interest in graph nets for learning graph representations and solving graph prediction problems (Henaff et al., 2015; Duvenaud et al., 2015; Li et al., 2016; Battaglia et al., 2016; Kipf & Welling, 2016; Gilmer et al., 2017). These models are structured according to the graph being utilized, and are parameterized independent of graph sizes therefore invariant to isomorphism, providing a good match for our purposes.
|
| 16 |
+
|
| 17 |
+
We evaluate our model by fitting graphs in three problem domains: (1) generating random graphs with certain common topological properties (e.g., cyclicity); (2) generating molecule graphs; and (3) conditional generation of parse trees. Our proposed model performs better than random graph models and LSTM baselines on (1) and (2) and is close to a LSTM sequence to sequence with attention model on (3). We also analyze the challenges our model is facing, e.g. the difficulty of learning and optimization, and discuss possible ways to make it better.
|
| 18 |
+
|
| 19 |
+
# 2 RELATED WORK
|
| 20 |
+
|
| 21 |
+
The earliest probabilistic model of graphs developed by Erdos & Rényi (1960) assumed an inde- ˝ pendent identical probability for each possible edge. This model leads to rich mathematical theory on random graphs, but it is too simplistic to model more complicated graphs that violate this i.i.d. assumption. Most of the more recent random graph models involve some form of “preferential attachment”, for example in (Barabási & Albert, 1999) the more connections a node has, the more likely it will be connect to new nodes added to the graph. Another class of graph models aim to capture the small diameter and local clustering properties in graphs, like the small-world model (Watts & Strogatz, 1998). Such models usually just capture one property of the graphs we want to model and are not flexible enough to model a wide range of graphs. Leskovec et al. (2010) proposed the Kronecker graphs model which is capable of modeling multiple properties of graphs, but it still only has limited capacity to allow tractable mathematical analysis.
|
| 22 |
+
|
| 23 |
+
There are a significant amount of work from the natural language processing and program synthesis communities on modeling the generation of trees. Socher et al. (2011) proposed a recursive neural network model to build parse trees for natural language and visual scenes. Maddison & Tarlow (2014) developed probabilistic models of parsed syntax trees for source code. Vinyals et al. (2015c) flattened a tree into a sequence and then modeled parse tree generation as a sequence to sequence task. Dyer et al. (2016) proposed recurrent neural network models capable of modeling any top-down transition-based parsing process for generating parse trees. Kusner et al. (2017) developed models for context-free grammars for generating SMILES string representations for molecule structures. Such tree models are very good at their task of generating trees, but they are incapable of generating more general graphs that contain more complicated loopy structures.
|
| 24 |
+
|
| 25 |
+
Our graph generative model is based on a class of neural net models we call graph nets. Originally developed in Scarselli et al. (2009), a range of variants of such graph structured neural net models have been developed and applied to various graph problems more recently (Henaff et al., 2015; Li et al., 2016; Kipf & Welling, 2016; Battaglia et al., 2016; Gilmer et al., 2017). Such models learn representations of graphs, nodes and edges based on a propagation process which communicates information across a graph, and are invariant to graph isomorphism because of the graph size independent parameterization. We use these graph nets to learn representations for making various decisions in the graph generation process.
|
| 26 |
+
|
| 27 |
+
Our work share some similarity to the recent work of Johnson (2017), where a graph is constructed to solve reasoning problems. The main difference between our work and (Johnson, 2017) is that our goal in this paper is to learn and represent unconditional or conditional densities on a space of graphs given a representative sample of graphs, whereas Johnson (2017) is primarily interested in using graphs as intermediate representations in reasoning tasks. However, (Johnson, 2017) do offer a probabilistic semantics for their graphs (the soft, real-valued node and connectivity strengths). But, as a generative model, Johnson (2017) did make a few strong assumptions for the generation process, e.g. a fixed number of nodes for each sentence, independent probability for edges given a batch of new nodes, etc.; while our model doesn’t make any of these assumptions. On the other side, as we are modeling graph structures, the samples from our model are graphs where an edge or node either exists or does not exist; whereas in (Johnson, 2017) all the graph components, e.g. existence of a node or edge, are all soft, and it is this form of soft node / edge connectivity that was been used for other reasoning tasks. Dense and soft representation may be good for some applications, while the sparse discrete graph structures may be good for others. Potentially, our graph generative model can also be used in an end-to-end pipeline to solve prediction problems as well, like (Johnson, 2017).
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1: Depiction of the steps taken during the generation process.
|
| 31 |
+
|
| 32 |
+
# 3 MODEL
|
| 33 |
+
|
| 34 |
+
Our generative model of graphs is a sequential process which generates one node at a time and connects each node to the partial graph already generated by creating edges one by one.
|
| 35 |
+
|
| 36 |
+
# 3.1 THE SEQUENTIAL GRAPH GENERATION PROCESS
|
| 37 |
+
|
| 38 |
+
The actions by which our model generates graphs is illustrated in Figure 1 (for the formal presentation, refer to Algorithm 1 in Appendix A). Briefly, in this generative process, in each iteration we (1) sample whether to add a new node of a particular type or terminate; if a node type is chosen, (2) we add a node of this type to the graph and (3) check if any further edges are needed to connect the new node to the existing graph; if yes (4) we select a node in the graph and add an edge connecting the new node to the selected node. The algorithm goes back to step (3) and repeats until the model decides not to add another edge. Finally, the algorithm goes back to step (1) to add subsequent nodes.
|
| 39 |
+
|
| 40 |
+
There are many different ways to tweak this generation process. For example, edges can be made directional or typed by jointly modeling the node selection process with type and direction random variables (in the molecule generation experiments below, we use typed nodes and edges). Additionally, constraints on certain structural aspects of graphs can be imposed such as forbidding self-loops or multiple edges between a pair of nodes.
|
| 41 |
+
|
| 42 |
+
The graph generation process can be seen as a sequence of decisions, i.e., (1) add a new node or not (with probabilities provided by an $f _ { a d d n o d e }$ module), (2) add a new edge or not (probabilities provided by $f _ { a d d e d g e } )$ , and (3) pick one node to connect to the new node (probabilities provided by $f _ { n o d e s } )$ ). One example graph with corresponding decision sequence is shown in Figure 6 in the Appendix. Note that different ordering of the nodes and edges can lead to different decision sequences for the same graph, how to properly handle these orderings is therefore an important issue which we will discuss below.
|
| 43 |
+
|
| 44 |
+
Once the graph is transformed into such a sequence of structure building actions, we can use a number of different generative models to model it. One obvious choice is to treat the sequences as sentences in natural language, and use conventional LSTM language models. We propose to use graph nets to model this sequential decision process instead. That is, we define the modules that provide probabilities for the structure building events (faddnode, faddedge and $f _ { n o d e s } )$ in terms of graph nets. As graph nets make use of the structure of the graph to create representations of nodes and edges via an information propagation process, this parameterization will be more sensitive to the structures being constructed than might be possible in an LSTM-based action sequence model.
|
| 45 |
+
|
| 46 |
+
# 3.2 PROPAGATION ON GRAPHS AND GRAPH REPRESENTATIONS
|
| 47 |
+
|
| 48 |
+
For any graph $G = ( V , E )$ , we associate a node embedding vector $\mathbf { h } _ { v } \in \mathbb { R } ^ { H }$ with each node $v \in V$ . These vectors can be computed initially from node inputs, e.g. node type embeddings, and then propagated on the graph to aggregate information from the local neighborhood. The propagation process is an iterative process, in each round of propagation, a “message” vector is computed on each edge, and after all the messages are computed, each node collects all incoming messages and updates its own representation, as characterized in Eq. 1, 2 and 3, where $f _ { e }$ and $f _ { n }$ are mappings that can be parameterized as neural networks, $\mathbf { x } _ { u , v }$ is a feature vector for the edge $( u , v )$ , e.g. edge type embedding, $\mathbf { m } _ { u v }$ is the message vector from $u$ to $v ^ { 2 }$ , $\mathbf { a } _ { v }$ is the aggregated incoming message for node $v$ and $\mathbf { h } _ { v } ^ { \prime }$ is the new representation for node $v$ after one round of propagation. A typical choice for $f _ { e }$ and $f _ { n }$ is to use fully-connected neural nets for both, but $f _ { n }$ can also be any recurrent neural network core like GRU or LSTM as well. In our experience LSTM and GRU cores perform similarly, we therefore use the simpler GRUs for $f _ { n }$ throughout our experiments.
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\begin{array} { l } { \mathbf { m } _ { u v } = f _ { e } ( \mathbf { h } _ { u } , \mathbf { h } _ { v } , \mathbf { x } _ { u , v } ) \quad \forall ( u , v ) \in E , } \\ { \mathbf { a } _ { v } = \displaystyle \sum _ { u : ( u , v ) \in E } \mathbf { m } _ { u v } \quad \forall v \in V , } \\ { \mathbf { h } _ { v } ^ { \prime } = f _ { n } ( \mathbf { a } _ { v } , \mathbf { h } _ { v } ) \quad \forall v \in V , } \end{array}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
\begin{array} { l } { { \displaystyle { \bf h } _ { G } = \sum _ { v \in V } { \bf h } _ { v } ^ { G } } } \\ { { \displaystyle { \bf h } _ { G } = \sum _ { v \in V } { \bf g } _ { v } ^ { G } \odot { \bf h } _ { v } ^ { G } } } \end{array}
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
Given a set of node embeddings $\mathbf { h } _ { V } ~ = ~ \{ \mathbf { h } _ { 1 } , \dots , \mathbf { h } _ { | V | } \}$ , one round of propagation denoted as prop $( \mathbf { h } _ { V } , G )$ returns a set of transformed node embeddings ${ \bf h } _ { V } ^ { \prime }$ which aggregates information from each node’s neighbors (as specified by $G$ ). It does not change the graph structure. Multiple rounds of propagation, i.e. $\mathrm { p r o p } ( \mathrm { p r o p } ( \cdot \cdot \cdot ( \mathbf { h } _ { V } , G ) , \cdot \cdot \cdot , G )$ , can be used to aggregate information across a larger neighborhood. Furthermore, different rounds of propagation can have different set of parameters to further increase the capacity of this model, all our experiments use this setting.
|
| 59 |
+
|
| 60 |
+
To compute a vector representation for the whole graph, we first map the node representations to a higher dimensional $\mathbf { h } _ { v } ^ { G } = f _ { m } ( \mathbf { h } _ { v } )$ , then these mapped vectors are summed together to obtain a single vector $\mathbf { h } _ { G }$ (Eq. 4). The dimensionality of $\mathbf { h } _ { G }$ is chosen to be higher than that of $\mathbf { h } _ { v }$ as the graph contains more information than individual nodes. A particularly useful variant of this aggregation module is to use a separate gating network which predicts $\mathbf { g } _ { v } ^ { G } = \dot { \sigma } ( g _ { m } ( \mathbf { h } _ { v } ) )$ for each node, where $\sigma$ is the logistic sigmoid function and $g _ { m }$ is another mapping function, and computes $\mathbf { h } _ { G }$ as a gated sum (Eq. 5). Also the sum can be replaced with other reduce operators like mean or max. We use gated sum in all our experiments. We denote the aggregation operation across the graph without propagation as ${ \bf h } _ { G } = \bar { R ( { \bf h } _ { V } , G ) }$ .
|
| 61 |
+
|
| 62 |
+
# 3.3 PROBABILITIES OF STRUCTURE BUILDING DECISIONS
|
| 63 |
+
|
| 64 |
+
Our graph generative model defines a distribution over the sequence of graph generating decisions by defining a probability distribution over possible outcomes for each step. Each of the decision steps is modeled using one of the three modules defined according to the following equations:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array} { r l } & { \mathbf { h } _ { V } ^ { ( T ) } = \mathrm { p r o p } ^ { ( T ) } ( \mathbf { h } _ { V } , G ) } \\ & { \mathbf { h } _ { G } = R ( \mathbf { h } _ { V } ^ { ( T ) } , G ) } \\ & { f _ { a d n o d e } ( G ) = \mathrm { s o f t m a x } ( f _ { a n } ( \mathbf { h } _ { G } ) ) \quad \quad ( 6 ) \qquad } \end{array} \qquad \begin{array} { r l } & { f _ { a d d e d g e } ( G , v ) = \sigma \big ( f _ { a e } ( \mathbf { h } _ { G } , \mathbf { h } _ { v } ^ { ( T ) } ) \big ) } \\ & { s _ { u } = f _ { s } ( \mathbf { h } _ { u } ^ { ( T ) } , \mathbf { h } _ { v } ^ { ( T ) } ) , \quad \forall u \in V } \\ & { f _ { n o d e s } ( G , v ) = \mathrm { s o f t m a x } ( \mathbf { s } ) } \end{array}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
(a) $f _ { a d d n o d e } ( G )$ In this module, we take an existing graph $G$ as input, together with its node representations $\mathbf { h } _ { V }$ , to produce the parameters necessary to make the decision whether to terminate the algorithm or add another node (this will be probabilities for each node type if nodes are typed).
|
| 71 |
+
|
| 72 |
+
To compute these probabilities, we first run $T$ rounds of propagation to update node vectors, after which we compute a graph representation vector and predict an output from there through a standard MLP followed by softmax or logistic sigmoid. This process is formulated in Eq. 6, 7, 8. Here the superscript $( T )$ indicates the results after running the propagation $T$ times. $f _ { a n }$ is a MLP that maps the graph representation vector $\mathbf { h } _ { G }$ to the action output space, here it is the probability (or a vector of probability values) of adding a new node (type) or terminating.
|
| 73 |
+
|
| 74 |
+
After the predictions are made, the new node vectors ${ \bf h } _ { V } ^ { ( T ) }$ are carried over to the next step, and the same carry-over is applied after each and any decision step. This makes the node vectors recurrent, across both the propagation steps and the different decision steps.
|
| 75 |
+
|
| 76 |
+
(b) $f _ { a d d e d g e } ( G , v )$ This module is similar to (a), we only change the output module slightly as in Eq. 9 to get the probability of adding an edge to the newly created node $v$ through a different MLP $f _ { a e }$ , after getting the graph representation vector $\mathbf { h } _ { G }$ .
|
| 77 |
+
|
| 78 |
+
(c) $f _ { n o d e s } ( G , v )$ In this module, after $T$ rounds of propagation, we compute a score for each node (Eq. 10), which is then passed through a softmax to be properly normalized (Eq. 11). $f _ { s }$ maps node state pairs $\mathbf { h } _ { u }$ and $\mathbf { h } _ { v }$ to a score $s _ { u }$ for connecting $u$ to the new node $v$ , and $p ( \mathbf { y } )$ is the output distribution over nodes. This can be extended to handle typed edges by making $s _ { u }$ a vector of scores same size as the number of edge types, and taking the softmax over all nodes and edge types.
|
| 79 |
+
|
| 80 |
+
Initializing Node States Whenever a new node is added to the graph, we need to initialize its state vector. If there are some inputs associated with the node, they can be used to get the initialization vector. We also aggregate across the graph to get a graph vector, and use it as an extra source of input for initialization. More concretely, the node state for a new node $v$ is initialized as the following:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\mathbf { h } _ { v } = f _ { i n i t } ( R _ { i n i t } ( \mathbf { h } _ { V } , G ) , \mathbf { x } _ { v } ) .
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
Here $\mathbf { x } _ { v }$ is any input feature associated with the node, e.g. node type embeddings, and $R _ { i n i t } ( { \bf h } _ { V } , G )$ computes a graph representation, $f _ { i n i t }$ is an MLP. If not using $R _ { i n i t } ( { \bf h } _ { V } , G )$ as part of the input to the initialization module, nodes with the same input features added at different stages of the generation process will have the same initialization. Adding the graph vector fixes this issue.
|
| 87 |
+
|
| 88 |
+
Conditional Generative Model The graph generative model described above can also be used to do conditional generation, where some input is used to condition the generation process. We only need to make a few minor changes to the model architecture, by making a few design decisions about where to add in the conditioning information.
|
| 89 |
+
|
| 90 |
+
The conditioning information comes in the form of a vector, and then it can be added in one or more of the following modules: (1) the propagation process; (2) the output component for the three modules, i.e. in $f _ { n } , f _ { e }$ and $f _ { s }$ ; (3) the node state initialization module $f _ { i n i t }$ . In our experiments, we use the conditioning information only in $f _ { n }$ and $f _ { i n i t }$ . Standard techniques for improving conditioning like attention can also be used, where we can use the graph representation to compute a query vector.
|
| 91 |
+
|
| 92 |
+
# 3.4 TRAINING AND EVALUATION
|
| 93 |
+
|
| 94 |
+
Our graph generative model defines a joint distribution $p ( G , \pi )$ over graphs $G$ and node and edge ordering $\pi$ (corresponding to the derivation in a traditional graph grammar). When generating samples, both the graph itself and an ordering are generated by the model. For both training and evaluation, we are interested in the marginal $\begin{array} { r } { \bar { p ( G ) } \stackrel { - } { = } \sum _ { \pi \in \mathcal { P } ( G ) } \overset { - } { p ( G , \pi ) } } \end{array}$ . This marginal is, however, intractable to compute for moderately large graphs as it involves a sum over all possible permutations. To evaluate this marginal likelihood we therefore need to use either sampling or some approximation instead. One Monte-Carlo estimate is based on importance sampling, where
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
p ( G ) = \sum _ { \pi } p ( G , \pi ) = \sum _ { \pi } q ( \pi \mid G ) { \frac { p ( G , \pi ) } { q ( \pi \mid G ) } } = \mathbb { E } _ { q ( \pi \mid G ) } \left[ { \frac { p ( G , \pi ) } { q ( \pi \mid G ) } } \right] .
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
Here $q ( \pi | G )$ is any proposal distribution over permutations, and the estimate can be obtained by generating a few samples from $q ( \pi \mid G )$ and then average $p ( G , \pi ) / q ( \pi \mid G )$ for the samples. The variance of this estimate is minimized when $q ( \pi \mid G ) = p ( \pi \mid G )$ . When a fixed canonical ordering is available for any arbitrary $G$ , we can use it to train and evaluate our model by taking $q ( \pi \mid G )$ to be a delta function that puts all the probability on this canonical ordering. This choice of $q$ , however, only gives us a lower bound on the true marginal likelihood as it does not have full support over the set of all permutations.
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Figure 2: Training curves for the graph model and LSTM model on three sets.
|
| 104 |
+
|
| 105 |
+
In training, since direct optimization of $\log p ( G )$ is intractable, we can therefore learn the joint distribution $p ( G , \pi )$ instead by maximizing the expected joint log-likelihood
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\begin{array} { r } { \mathbb { E } _ { p _ { d a t a } ( G , \pi ) } [ \log p ( G , \pi ) ] = \mathbb { E } _ { p _ { d a t a } ( G ) } \mathbb { E } _ { p _ { d a t a } ( \pi | G ) } [ \log p ( G , \pi ) ] . } \end{array}
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
Given a dataset of graphs, we can get samples from $p _ { d a t a } ( G )$ fairly easily, and we have the freedom to choose $p _ { d a t a } ( \pi | G )$ for training. Since the maximizer of Eq. 14 is $p ( G , \pi ) = p _ { d a t a } ( G , \pi )$ , to make the training process match the evaluation process, we can take $p _ { d a t a } ( \pi \mid G ) = q ( \pi \mid G )$ . Training with such a $p _ { d a t a } ( \pi \mid G )$ will drive the posterior of the model distribution $p ( \pi \mid G )$ close to the proposal distribution $q ( \pi \mid G )$ , therefore improving the quality of our estimate of the marginal probability.
|
| 112 |
+
|
| 113 |
+
Ordering is an important issue for our graph model, in the experiments we always use a fixed ordering or uniform random ordering for training, and leave the potentially better solution of learning an ordering to future work. In particular, in the learning to rank literature there is an extensive body of work on learning distributions over permutations, for example the Mallows model (Mallows, 1957) and the Plackett-Luce model (Plackett, 1975; Luce, 1959), which may be used here. Interested readers can also refer to (Leskovec et al., 2010; Vinyals et al., 2015a; Stewart et al., 2016) for discussions of similar ordering issues from different angles.
|
| 114 |
+
|
| 115 |
+
# 4 EXPERIMENTS
|
| 116 |
+
|
| 117 |
+
We study the properties and performance of different graph generation models and odering strategies on three different tasks. More experiment results and detailed settings are included in Appendix C.
|
| 118 |
+
|
| 119 |
+
# 4.1 GENERATION OF GRAPHS WITH CERTAIN TOPOLOGICAL PROPERTIES
|
| 120 |
+
|
| 121 |
+
In the first experiment, we train graph generative models on three sets of synthetic undirected graphs: (1) cycles, (2) trees, and (3) graphs generated by the Barabasi–Albert model (Barabási & Albert, 1999), which is a good model for power-law degree distribution. We generate data on the fly during training, all cycles and trees have between 10 to 20 nodes, and the Barabasi–Albert model is set to generate graphs of 15 nodes and each node is connected to 2 existing nodes when added to the graph.
|
| 122 |
+
|
| 123 |
+
For comparison, we contast our model against the Erdos & Rényi (1960) random graph model and ˝ a LSTM baseline. We estimate the edge probability parameter $p$ in the Erdos–Rényi model using ˝ maximum likelihood. For the LSTM model, we sequentialized the decision sequences (see Figure 6 for an example) used by the graph model and trained LSTM language models on them. During training, for each graph we uniformly randomly permute the orderings of the nodes and order the edges by node indices, and then present the permuted graph to the graph model and the LSTM model. In experiments on all three sets, we used a graph model with node state dimensionality of 16 and set the number of propagation steps $T = 2$ , and the LSTM model has a hidden state size of 64. The two models have roughly the same number of parameters (LSTM 36k, graph model 32k).
|
| 124 |
+
|
| 125 |
+
The training curves plotting $- \log p ( G , \pi )$ with $G , \pi$ sampled from the training distribution, comparing the graph model and the LSTM model, are shown in Figure 2. From these curves we can clearly see that the graph models train faster and have better asymptotic performance as well.
|
| 126 |
+
|
| 127 |
+
Table 1: Percentage of valid samples for three models on cycles and trees datasets, and the KLdivergence between the degree distributions of samples and data for Barabasi–Albert graphs.
|
| 128 |
+
|
| 129 |
+
<table><tr><td>Dataset</td><td>Graph Model</td><td>LSTM</td><td>Erd6s-Renyi Model</td></tr><tr><td>Cycles</td><td>84.4%</td><td>48.5%</td><td>0.0%</td></tr><tr><td>Trees</td><td>96.6%</td><td>30.2%</td><td>0.3%</td></tr><tr><td>Barabasi-Albert Graphs</td><td>0.0013</td><td>0.0537</td><td>0.3715</td></tr></table>
|
| 130 |
+
|
| 131 |
+
Since our graphs have topological properties, we can also evaluate the samples of these models and see how well they align with these properties. We generated 10,000 samples from each model. For cycles and trees, we evaluate what percentage of samples are actually cycles or trees. For graphs generated by the Barabasi–Albert model, we compute the node degree distribution. The results are shown in Table 1 and Figure 3. Again we can see that the proposed graph model has the capability of matching the training data well in terms of all these metrics. Note that we used the same graph model on three different sets of graphs, and the model learns to adapt to the data.
|
| 132 |
+
|
| 133 |
+
Here the success of the graph model compared to the LSTM baseline can be partly attributed to the ability to refer to specific nodes in a graph. The ability to do this inevitably requires keeping track of a varying set of objects and then pointing to them, which is non-trivial for a LSTM to do. Pointer networks (Vinyals et al., 2015b) can be used to handle the pointers, but building a varying set of objects is challenging in the first place, and the graph model provides a way to do it.
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
Figure 3: Degree histogram for samples generated by models trained on Barabasi– Albert Graphs. The histogram labeled “Ground Truth” shows the data distribution estimated from 10,000 examples.
|
| 137 |
+
|
| 138 |
+
# 4.2 MOLECULE GENERATION
|
| 139 |
+
|
| 140 |
+
In the second experiment, we train graph generative models for the task of molecule generation. Recently, there has been a number of papers tackling this problem by using RNN language models on SMILES string representations of molecules (Gómez-Bombarelli et al., 2016; Segler et al., 2017; Bjerrum & Threlfall, 2017). An example of a molecule and its corresponding SMILES string are shown in Figure 4. Kusner et al. (2017) took one step further and used context free grammar to model the SMILES strings. However, inherently molecules are graph structured objects where it is possible to have cycles.
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 4: NNc1nncc(O)n1
|
| 144 |
+
|
| 145 |
+
We used the ChEMBL database (the latest version, 23) for this study; previous versions of ChEMBL were also used in (Segler et al., 2017; Olivecrona et al., 2017) for molecule generation. We filtered the database and chose to model molecules with at most 20 heavy atoms. This resulted in a training / validation / testing split of 130,830 / 26,166 / 104,664 examples each. The chemical toolkit RDKit (2006) is used to convert between the SMILES strings and the graph representation of the molecules. Both the nodes and the edges in molecule graphs are typed. All the model hyperparameters are tuned on the validation set, number of propagation steps $T$ is chosen from $\{ 1 , 2 \}$ .
|
| 146 |
+
|
| 147 |
+
We compare the graph model with baseline LSTM language models trained on the SMILES strings as well as the graph generating sequences used by the graph model. RDKit can produce canonical SMILES representations for each molecule with associated edge ordering, we therefore train the models using these canonicalized representations. We also trained these models with permuted ordering. For the graph model, we randomly permute the node ordering and change the edge ordering correspondingly, for the LSTM on SMILES, we first convert the SMILES string into a graph representation, permute the node ordering and then convert back to a SMILES string without canonicalization, similar to (Bjerrum, 2017).
|
| 148 |
+
|
| 149 |
+
<table><tr><td>Model</td><td>Gen.Seq</td><td>Ordering</td><td>N</td><td>NLL</td><td>%valid</td><td>%valid and novel</td></tr><tr><td>LSTM</td><td>SMILES</td><td>Fixed</td><td>1</td><td>21.48</td><td>93.59</td><td>81.27</td></tr><tr><td>LSTM</td><td>SMILES</td><td>Random</td><td><100</td><td>19.99</td><td>93.48</td><td>83.95</td></tr><tr><td>LSTM</td><td>Graph</td><td>Fixed</td><td>1</td><td>22.06</td><td>85.16</td><td>80.14</td></tr><tr><td>LSTM</td><td>Graph</td><td>Random</td><td>O(n!)</td><td>63.25</td><td>91.44</td><td>91.26</td></tr><tr><td>Graph</td><td>Graph</td><td>Fixed</td><td>1</td><td>20.55</td><td>97.52</td><td>90.01</td></tr><tr><td>Graph</td><td>Graph</td><td>Random</td><td>O(n!)</td><td>58.36</td><td>95.98</td><td>95.54</td></tr></table>
|
| 150 |
+
|
| 151 |
+
Table 2: Results on the molecule generation task. $N$ is the number of permutations for each molecule the model is trained on. Typically the number of different SMILES strings for each molecule $< 1 0 0$
|
| 152 |
+
Table 3: Negative log-likelihood evaluation on small molecules with no more than 6 nodes.
|
| 153 |
+
|
| 154 |
+
<table><tr><td>Model</td><td>Gen.Seq</td><td>Ordering</td><td>N</td><td>Fixed Ordering</td><td>Best Ordering</td><td>Marginal</td></tr><tr><td>LSTM</td><td>SMILES</td><td>Fixed</td><td>1</td><td>17.28</td><td>15.98</td><td>15.90</td></tr><tr><td>LSTM</td><td>SMILES</td><td>Random</td><td><100</td><td>15.95</td><td>15.76</td><td>15.67</td></tr><tr><td>LSTM</td><td>Graph</td><td>Fixed</td><td>1</td><td>16.79</td><td>16.35</td><td>16.26</td></tr><tr><td>LSTM</td><td>Graph</td><td>Random</td><td>O(n!)</td><td>20.57</td><td>18.90</td><td>15.96</td></tr><tr><td>Graph</td><td>Graph</td><td>Fixed</td><td>1</td><td>16.19</td><td>15.75</td><td>15.64</td></tr><tr><td>Graph</td><td>Graph</td><td>Random</td><td>O(n!)</td><td>20.18</td><td>18.56</td><td>15.32</td></tr></table>
|
| 155 |
+
|
| 156 |
+
We evaluate the negative log-likelihood for all models with the canonical ordering on the test set. We also generate 100,000 samples from each model and evaluate how many of them are valid well-formatted molecule representations and how many of the generated samples are not already seen in the training set following (Segler et al., 2017; Olivecrona et al., 2017). The results are shown in Table 2, which also lists the type of graph generating sequence and the ordering the models are trained on. Note that the models trained with random ordering are not tailored to the canonical ordering used in evaluation. In Appendix C.2, we show the distribution of a few chemical metrics for the generated samples to further assess the their quality. The LSTM on SMILES strings has a slight edge in terms of likelihood evaluated under canonical ordering (which is domain specific), but the graph model generates significantly more valid and novel samples. It is also interesting that the LSTM model trained with random ordering improves performance on canonical ordering, this is probably related to overfitting. Lastly, when compared using the generic graph generation decision sequence, the Graph architecture outperforms LSTM in NLL as well.
|
| 157 |
+
|
| 158 |
+
It is intractable to estimate the marginal likelihood $\begin{array} { r } { p ( G ) = \sum _ { \pi } p ( G , \pi ) } \end{array}$ for large molecules. However, for small molecules this is possible. We did the enumeration and evaluated the 6 models on small molecules with no more than 6 nodes. As we evaluate, we compare the negative log-likelihood we got with the fixed ordering and the best possible ordering, as well as the true marginal, the results are shown in Table 3. On these small molecules, the graph model trained with random ordering has better marginal likelihood, and surprisingly for the models trained with fixed ordering, the canonical ordering they are trained on are not always the best ordering, which suggests that there are big potential for actually learning an ordering.
|
| 159 |
+
|
| 160 |
+
Figure 5 shows a visualization of the molecule generation processes for the graph model. The model trained with canonical ordering learns to generate nodes and immediately connect it to the latest part of the generated graph, while the model trained with random ordering took a completely different approach by generating pieces first and then connect them together at the end.
|
| 161 |
+
|
| 162 |
+
# 4.3 PARSE TREE GENERATION
|
| 163 |
+
|
| 164 |
+
In the last experiment, we look at a conditional graph generation task - generating parse trees given an input natural language sentence. We took the Wall Street Journal dataset with sequentialized parse trees used in (Vinyals et al., 2015c), and trained LSTM sequence to sequence models with attention as the baselines on both the sequentialized trees as well as on the decision sequences used by the graph model. In the dataset the parse trees are sequentialized following a top-down depth-first traversal ordering, we therefore used this ordering to train our graph model as well. Besides this, we also conducted experiments using the breadth-first traversal ordering. We changed our graph model slightly and replaced the loop for generating edges to a single step that picks one node as the parent for each new node to adapt to the tree structure. This shortens the decision sequence for the graph model, although the flattened parse tree sequence the LSTM uses is still shorter. We also employed an attention mechanism to get better conditioning information as for the sequence to sequence model.
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 5: Visualization of the molecule generation processes for graph model trained with fixed and random ordering. Solid lines represent single bonds, and dashed lines represent double bounds.
|
| 168 |
+
|
| 169 |
+
<table><tr><td>Model</td><td>Gen.Seq</td><td>Ordering</td><td>Perplexity</td><td>%Correct</td></tr><tr><td>LSTM</td><td>Sequentialized Tree</td><td>Depth-First</td><td>1.114</td><td>31.1</td></tr><tr><td>LSTM</td><td>Sequentialized Tree</td><td>Breadth-First</td><td>1.187</td><td>28.3</td></tr><tr><td>LSTM</td><td>Graph</td><td>Depth-First</td><td>1.158</td><td>26.2</td></tr><tr><td>LSTM</td><td>Graph</td><td>Breadth-First</td><td>1.399</td><td>0.0</td></tr><tr><td>Graph</td><td>Graph</td><td>Depth-First</td><td>1.124</td><td>28.7</td></tr><tr><td>Graph</td><td>Graph</td><td>Breadth-First</td><td>1.238</td><td>21.5</td></tr></table>
|
| 170 |
+
|
| 171 |
+
Table 4: Parse tree generation results, evaluated on the Eval set.
|
| 172 |
+
|
| 173 |
+
Table 4 shows the perplexity results of different models on this task. Since the length of the decision sequences for the graph model and sequentialized trees are different, we normalized the log-likelihood of all models using the length of the flattened parse trees to make them comparable. To measure sample quality we used another metric that checks if the generated parse tree exactly matches the ground truth tree. From these results we can see that the LSTM on sequentialized trees is better on both metrics, but the graph model does better than the LSTM trained on the same and more generic graph generating decision sequences, which is compatible with what we observed in the molecule generation experiment.
|
| 174 |
+
|
| 175 |
+
One important issue for the graph model is that it relies on the propagation process to communicate information on the graph structure, and during training we only run propagation for a fixed $T$ steps, and in this case $T = 2$ . Therefore after a change to the tree structure, it is not possible for other remote parts to be aware of this change in such a small number of propagation steps. Increasing $T$ can make information flow further on the graph, however the more propagation steps we use the slower the graph model would become, and more difficult it would be to train them. For this task, a tree-structured model like R3NN (Parisotto et al., 2016) may be a better fit which can propagate information on the whole tree by doing one bottom-up and one top-down pass in each iteration. On the other hand, the graph model is modeling a longer sequence than the sequentialized tree sequence, and the graph structure is constantly changing therefore so as the model structure, which makes training of such graph models to be considerably harder than LSTMs.
|
| 176 |
+
|
| 177 |
+
# 5 DISCUSSIONS AND FUTURE DIRECTIONS
|
| 178 |
+
|
| 179 |
+
The graph model in the proposed form is a powerful model capable of generating arbitrary graphs. However, as we have seen in the experiments and the analysis, there are still a number of challenges facing these models. Here we discuss a few of these challenges and possible solutions going forward.
|
| 180 |
+
|
| 181 |
+
Ordering Ordering of nodes and edges is critical for both learning and evaluation. In the experiments we always used predefined distribution over orderings. However, it may be possible to learn an ordering of nodes and edges by treating the ordering $\pi$ as a latent variable, this is an interesting direction to explore in the future.
|
| 182 |
+
|
| 183 |
+
Long Sequences The generation process used by the graph model is typically a long sequence of decisions. If other forms of sequentializing the graph is available, e.g. SMILES strings or flattened parse trees, then such sequences are typically $2 { - } 3 \mathbf { x }$ shorter. This is a significant disadvantage for the graph model, it not only makes it harder to get the likelihood right, but also makes training more difficult. To alleviate this problem we can tweak the graph model to be more tied to the problem domain, and reduce multiple decision steps and loops to single steps.
|
| 184 |
+
|
| 185 |
+
Scalability Scalability is a challenge to the graph generative model we proposed in this paper. Large graphs typically lead to very long graph generating sequences. On the other side, the graph nets use a fixed $T$ propagation steps to propagate information on the graph. However, large graphs require large $T \mathrm { s }$ to have sufficient information flow, this would also limit the scalability of these models. To solve this problem, we may use models that sequentially sweep over edges, like (Parisotto et al., 2016), or come up with ways to do coarse-to-fine generation.
|
| 186 |
+
|
| 187 |
+
Difficulty in Training We have found that training such graph models is more difficult than training typical LSTM models. The sequence these models are trained on are really long, but also the model structure is constantly changing, which leads to various scaling issues and only adds to the difficulty. We found lowering the learning rate can solve a lot of the instability problem, but more satisfying solutions may be obtained by tweaking the model architecture.
|
| 188 |
+
|
| 189 |
+
# 6 CONCLUSION
|
| 190 |
+
|
| 191 |
+
In this paper, we proposed a powerful deep generative model capable of generating arbitrary graphs through a sequential process. We studied its properties on a few graph generation problems. This model has shown great promise and has unique advantages over standard LSTM models. We hope that our results can spur further research in this direction to obtain better generative models of graphs.
|
| 192 |
+
|
| 193 |
+
# REFERENCES
|
| 194 |
+
|
| 195 |
+
Salvador Aguiñaga, Rodrigo Palacios, David Chiang, and Tim Weninger. Growing graphs from hyperedge replacement graph grammars. In Proc. CIKM, 2016.
|
| 196 |
+
Albert-László Barabási and Réka Albert. Emergence of scaling in random networks. science, 286 (5439):509–512, 1999.
|
| 197 |
+
Peter Battaglia, Razvan Pascanu, Matthew Lai, Danilo Jimenez Rezende, et al. Interaction networks for learning about objects, relations and physics. 2016.
|
| 198 |
+
Esben Jannik Bjerrum. Smiles enumeration as data augmentation for neural network modeling of molecules. arXiv preprint arXiv:1703.07076, 2017.
|
| 199 |
+
Esben Jannik Bjerrum and Richard Threlfall. Molecular generation with recurrent neural networks (rnns). CoRR, 2017.
|
| 200 |
+
Manfred Droste and Paul Gastin. Weighted automata and weighted logics. Theoretical Computer Science, 380(1–2):69–86, 2007.
|
| 201 |
+
David K Duvenaud, Dougal Maclaurin, Jorge Iparraguirre, Rafael Bombarell, Timothy Hirzel, Alán Aspuru-Guzik, and Ryan P Adams. Convolutional networks on graphs for learning molecular fingerprints. In Advances in neural information processing systems, pp. 2224–2232, 2015.
|
| 202 |
+
Chris Dyer, Adhiguna Kuncoro, Miguel Ballesteros, and Noah A Smith. Recurrent neural network grammars. arXiv preprint arXiv:1602.07776, 2016.
|
| 203 |
+
Paul Erdos and Alfréd Rényi. On the evolution of random graphs. ˝ Publ. Math. Inst. Hung. Acad. Sci, 5(1):17–60, 1960.
|
| 204 |
+
|
| 205 |
+
Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. arXiv preprint arXiv:1704.01212, 2017.
|
| 206 |
+
|
| 207 |
+
Rafael Gómez-Bombarelli, David Duvenaud, José Miguel Hernández-Lobato, Jorge AguileraIparraguirre, Timothy D Hirzel, Ryan P Adams, and Alán Aspuru-Guzik. Automatic chemical design using a data-driven continuous representation of molecules. arXiv preprint arXiv:1610.02415, 2016.
|
| 208 |
+
|
| 209 |
+
Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. arXiv preprint arXiv:1506.05163, 2015.
|
| 210 |
+
|
| 211 |
+
Daniel D. Johnson. Learning graphical state transitions. In International Conference on Representation Learning (ICLR), 2017.
|
| 212 |
+
|
| 213 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 214 |
+
|
| 215 |
+
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
|
| 216 |
+
|
| 217 |
+
Marco Kuhlmann and Stephan Oepen. Towards a catalogue of linguistic graph banks. Computational Linguistics, 42(4):819–827, 2016.
|
| 218 |
+
|
| 219 |
+
Matt J Kusner, Brooks Paige, and José Miguel Hernández-Lobato. Grammar variational autoencoder. arXiv preprint arXiv:1703.01925, 2017.
|
| 220 |
+
|
| 221 |
+
Clemens Lautemann. Decomposition trees: Structured graph representation and efficient algorithms. In Proc. of the 13th Colloquium on Trees in Algebra and Programming, 1988.
|
| 222 |
+
|
| 223 |
+
Jure Leskovec, Deepayan Chakrabarti, Jon Kleinberg, Christos Faloutsos, and Zoubin Ghahramani. Kronecker graphs: An approach to modeling networks. Journal of Machine Learning Research, 11 (Feb):985–1042, 2010.
|
| 224 |
+
|
| 225 |
+
Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. 2016.
|
| 226 |
+
|
| 227 |
+
R Duncan Luce. Individual choice behavior: A theoretical analysis. Wiley, 1959.
|
| 228 |
+
|
| 229 |
+
Chris Maddison and Daniel Tarlow. Structured generative models of natural source code. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pp. 649–657, 2014.
|
| 230 |
+
|
| 231 |
+
Colin L Mallows. Non-null ranking models. i. Biometrika, 44(1/2):114–130, 1957.
|
| 232 |
+
|
| 233 |
+
Dimitris Margaritis. Learning Bayesian Network Model Structure from Data. PhD thesis, Carnegie Mellon University, Pittsburgh, 5 2003.
|
| 234 |
+
|
| 235 |
+
Marcus Olivecrona, Thomas Blaschke, Ola Engkvist, and Hongming Chen. Molecular de novo design through deep reinforcement learning. arXiv preprint arXiv:1704.07555, 2017.
|
| 236 |
+
|
| 237 |
+
Emilio Parisotto, Abdel-rahman Mohamed, Rishabh Singh, Lihong Li, Dengyong Zhou, and Pushmeet Kohli. Neuro-symbolic program synthesis. arXiv preprint arXiv:1611.01855, 2016.
|
| 238 |
+
|
| 239 |
+
Robin L Plackett. The analysis of permutations. Applied Statistics, pp. 193–202, 1975.
|
| 240 |
+
|
| 241 |
+
RDKit. Rdkit: Open-source cheminformatics. 2006. URL http://www.rdkit.org.
|
| 242 |
+
|
| 243 |
+
Grzegorz Rozenberg. Handbook of Graph Grammars and Computing by Graph Transformation: Volume 1 Foundations. 1997.
|
| 244 |
+
|
| 245 |
+
Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Transactions on Neural Networks, 20(1):61–80, 2009.
|
| 246 |
+
|
| 247 |
+
Marwin HS Segler, Thierry Kogej, Christian Tyrchan, and Mark P Waller. Generating focussed molecule libraries for drug discovery with recurrent neural networks. arXiv preprint arXiv:1701.01329, 2017.
|
| 248 |
+
|
| 249 |
+
Richard Socher, Cliff C Lin, Chris Manning, and Andrew Y Ng. Parsing natural scenes and natural language with recursive neural networks. In Proceedings of the 28th international conference on machine learning (ICML-11), pp. 129–136, 2011.
|
| 250 |
+
|
| 251 |
+
Russell Stewart, Mykhaylo Andriluka, and Andrew Y Ng. End-to-end people detection in crowded scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2325–2333, 2016.
|
| 252 |
+
|
| 253 |
+
Oriol Vinyals, Samy Bengio, and Manjunath Kudlur. Order matters: Sequence to sequence for sets. arXiv preprint arXiv:1511.06391, 2015a.
|
| 254 |
+
|
| 255 |
+
Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems, pp. 2692–2700, 2015b.
|
| 256 |
+
|
| 257 |
+
Oriol Vinyals, Łukasz Kaiser, Terry Koo, Slav Petrov, Ilya Sutskever, and Geoffrey Hinton. Grammar as a foreign language. In Advances in Neural Information Processing Systems, pp. 2773–2781, 2015c.
|
| 258 |
+
|
| 259 |
+
Duncan J Watts and Steven H Strogatz. Collective dynamics of ‘small-world’networks. nature, 393 (6684):440–442, 1998.
|
| 260 |
+
|
| 261 |
+
<table><tr><td>Algorithm1 Generative Process for Graphs</td><td></td></tr><tr><td>1:E0=,V=,Go=(Vo,Eo),t=1</td><td>Initial graph is empty</td></tr><tr><td>2:padnode ←fadnode(Gt-1)</td><td>Probabilities of initial node type and sTOP</td></tr><tr><td>3: Ut ~ Categorical(paddnode)</td><td>>Sample initial node type or STOP</td></tr><tr><td>4: while Ut ≠ STOP do Vt←Vt-1U{Ut}</td><td>Incorporate node Ut</td></tr><tr><td>5: 6: Et,0←Et-1,i←1</td><td></td></tr><tr><td>padedge ←fddedge(Vt,Et),Ut) 7: Pt,i</td><td> Probability of adding an edge to Ut</td></tr><tr><td>8:</td><td> Sample whether to add an edge to Ut</td></tr><tr><td>9: while Zt,i = 1 do</td><td> Add edges pointing to new node Ut</td></tr><tr><td>10:</td><td>>Probabilities of selecting each node in Vt</td></tr><tr><td>Uti ~ Categorical(ptdes)</td><td></td></tr><tr><td>11: 12: Et,i←Et,i-1U{(Ut,i,Ut)}</td><td> Incorporate edge Ut - Ut,i</td></tr><tr><td>13: i←i+1</td><td></td></tr><tr><td>14: Pt,i</td><td>Probability of adding another edge</td></tr><tr><td>15:</td><td>pdedge←fdedge(Vt,Eti),Ut) Zt,i ~ Bernouli(Ptdde paddedge) >Sample whether to add another edge to Ut</td></tr><tr><td>16: end while</td><td></td></tr><tr><td>17: Et←Et,i-1</td><td></td></tr><tr><td>18: Gt ←(Vt,Et)</td><td></td></tr><tr><td>19:</td><td></td></tr><tr><td>t←t+1 20:</td><td>Padnode ← faddnode(Gt-1) Probabilities of each node type and sTOP for next node</td></tr><tr><td>21:</td><td></td></tr><tr><td>Ut ~ Categorical(paddnode) 22: end while</td><td>√Sample next node type or STOP</td></tr><tr><td>23: return Gt</td><td></td></tr></table>
|
| 262 |
+
|
| 263 |
+
# A GRAPH GENERATION PROCESS
|
| 264 |
+
|
| 265 |
+
The graph generation process is presented in Algorithm 1 for reference.
|
| 266 |
+
|
| 267 |
+
# Possible Sequence 1:
|
| 268 |
+
|
| 269 |
+
# Possible Sequence 2:
|
| 270 |
+
|
| 271 |
+

|
| 272 |
+
Figure 6: An example graph and two corresponding decision sequences.
|
| 273 |
+
|
| 274 |
+
<add node (node 0)> <don’t add edge>
|
| 275 |
+
<add node (node 1)> <add edge> <pick node 0 (edge (0, 1))> <don’t add edge>
|
| 276 |
+
<add node (node 2)> <add edge> <pick node 0 (edge (0, 2))> <add edge> <pick node 1 (edge (1, 2))> <don’t add edge>
|
| 277 |
+
<don’t add node>
|
| 278 |
+
<add node (node 1) $>$ <don’t add edge>
|
| 279 |
+
<add node (node 0) $>$ <add edge> <pick node 1 (edge (0, 1))> <don’t add edge>
|
| 280 |
+
<add node (node 2) $>$ <add edge> <pick node 1 (edge (1, 2))> <add edge> <pick node 0 (edge (0, 2))> <don’t add edge>
|
| 281 |
+
<don’t add node>
|
| 282 |
+
|
| 283 |
+
Figure 6 shows an example graph. Here the graph contains three nodes $\{ 0 , 1 , 2 \}$ , and three edges $\{ ( 0 , 1 ) , ( 0 , 2 ) , ( 1 , 2 ) \}$ . Consider generating nodes in the order of 0, 1 and 2, and generating edge $( 0 , 2 )$ before $( 1 , 2 )$ , then the corresponding decision sequence is the one shown on the left. Here the decisions are indented to clearly show the two loop levels. On the right we show another possible generating sequence generating node 1 first, and then node 0 and 2. In general, for each graph there might be many different possible orderings that can generate it.
|
| 284 |
+
|
| 285 |
+
# B MODEL IMPLEMENTATION DETAILS
|
| 286 |
+
|
| 287 |
+
In this section we present more implementation details about our graph generative model.
|
| 288 |
+
|
| 289 |
+
# B.1 THE PROPAGATION MODEL
|
| 290 |
+
|
| 291 |
+
The message function $f _ { e }$ is implemented as a fully connected neural network, as the following:
|
| 292 |
+
|
| 293 |
+
$$
|
| 294 |
+
\mathbf { m } _ { u v } = f _ { e } ( \mathbf { h } _ { u } , \mathbf { h } _ { v } , \mathbf { x } _ { u , v } ) = \mathrm { M L P } ( \operatorname { c o n c a t } ( [ \mathbf { h } _ { u } , \mathbf { h } _ { v } , \mathbf { x } _ { u , v } ] ) )
|
| 295 |
+
$$
|
| 296 |
+
|
| 297 |
+
can also use an additional edge function $f _ { e } ^ { \prime }$ to compute the message in the reverse direction
|
| 298 |
+
|
| 299 |
+
$$
|
| 300 |
+
\mathbf { m } _ { v u } ^ { \prime } = f _ { e } ^ { \prime } ( \mathbf { h } _ { u } , \mathbf { h } _ { v } , \mathbf { x } _ { u , v } ) = \mathrm { M L P } ^ { \prime } ( \mathrm { c o n c a t } ( [ \mathbf { h } _ { u } , \mathbf { h } _ { v } , \mathbf { x } _ { u , v } ] ) )
|
| 301 |
+
$$
|
| 302 |
+
|
| 303 |
+
When not using reverse messages, the node activation vectors are computed as
|
| 304 |
+
|
| 305 |
+
$$
|
| 306 |
+
\mathbf { a } _ { v } = \sum _ { u : ( u , v ) \in E } \mathbf { m } _ { u v } .
|
| 307 |
+
$$
|
| 308 |
+
|
| 309 |
+
When reverse messages are used, the node activations are
|
| 310 |
+
|
| 311 |
+
$$
|
| 312 |
+
\mathbf { a } _ { v } = \sum _ { u : ( u , v ) \in E } \mathbf { m } _ { u v } + \sum _ { u : ( v , u ) \in E } \mathbf { m } _ { u v } ^ { \prime } .
|
| 313 |
+
$$
|
| 314 |
+
|
| 315 |
+
The node update function $f _ { n }$ is implemented as a recurrent cell in RNNs, as the following:
|
| 316 |
+
|
| 317 |
+
$$
|
| 318 |
+
\mathbf { h } _ { v } ^ { \prime } = \mathrm { R N N C e l l } ( \mathbf { h } _ { v } , \mathbf { a } _ { v } ) ,
|
| 319 |
+
$$
|
| 320 |
+
|
| 321 |
+
where RNNCell can be a vanilla RNN cell, where
|
| 322 |
+
|
| 323 |
+
$$
|
| 324 |
+
\mathbf { h } _ { v } ^ { \prime } = \sigma ( \mathbf { W } \mathbf { h } _ { v } + \mathbf { U } \mathbf { a } _ { v } ) ,
|
| 325 |
+
$$
|
| 326 |
+
|
| 327 |
+
a GRU cell
|
| 328 |
+
|
| 329 |
+
$$
|
| 330 |
+
\begin{array} { r l } & { \mathbf { z } _ { v } = \sigma ( \mathbf { W } _ { z } \mathbf { h } _ { v } + \mathbf { U } _ { z } \mathbf { a } _ { v } ) , } \\ & { \mathbf { r } _ { v } = \sigma ( \mathbf { W } _ { r } \mathbf { h } _ { v } + \mathbf { U } _ { z } \mathbf { a } _ { v } ) , } \\ & { \tilde { \mathbf { h } } _ { v } = \operatorname { t a n h } ( \mathbf { W } ( \mathbf { r } _ { v } \odot \mathbf { h } _ { v } ) + \mathbf { U } \mathbf { a } _ { v } ) , } \\ & { \mathbf { h } _ { v } ^ { \prime } = ( 1 - \mathbf { z } _ { v } ) \odot \mathbf { h } _ { v } + \mathbf { z } _ { v } \odot \tilde { \mathbf { h } } _ { v } , } \end{array}
|
| 331 |
+
$$
|
| 332 |
+
|
| 333 |
+
or an LSTM cell
|
| 334 |
+
|
| 335 |
+
$$
|
| 336 |
+
\begin{array} { r l } & { \mathbf i _ { v } = \sigma \big ( \mathbf W _ { i } \mathbf h _ { v } + \mathbf U _ { i } \mathbf a _ { v } + \mathbf V _ { i } \mathbf c _ { v } \big ) , } \\ & { \mathbf f _ { v } = \sigma \big ( \mathbf W _ { f } \mathbf h _ { v } + \mathbf U _ { f } \mathbf a _ { v } + \mathbf V _ { v } \mathbf c _ { v } \big ) , } \\ & { \tilde { \mathbf c } _ { v } = \mathrm { t a n h } \big ( \mathbf W _ { c } \mathbf h _ { v } + \mathbf U _ { c } \mathbf a _ { v } \big ) , } \\ & { \mathbf c _ { v } ^ { \prime } = \mathbf f _ { v } \odot \mathbf c _ { v } + \mathbf i _ { v } \odot \tilde { \mathbf c } _ { v } , } \\ & { \mathbf o _ { v } ^ { \prime } = \sigma \big ( \mathbf W _ { o } \mathbf h _ { v } + \mathbf U _ { o } \mathbf a _ { v } + \mathbf V _ { o } \mathbf c _ { v } ^ { \prime } \big ) , } \\ & { \mathbf h _ { v } ^ { \prime } = \mathbf o _ { v } ^ { \prime } \odot \mathrm { t a n h } \big ( \mathbf c _ { v } ^ { \prime } \big ) . } \end{array}
|
| 337 |
+
$$
|
| 338 |
+
|
| 339 |
+
In the experiments, we used a linear layer in the message functions $f _ { e }$ in place of the MLP, and we set the dimensionality of the outputs to be twice the dimensionality of the node state vectors $\mathbf { h } _ { u }$ . For the synthetic graphs and molecules, $f _ { e }$ and $f _ { e } ^ { \prime }$ share the same set of parameters, while for the parsing task, $f _ { e }$ and $\bar { f } _ { e } ^ { \prime }$ have different parameters. We always use GRU cells in our model. Overall GRU cells and LSTM cells perform equally well, and both are significantly better than the vanilla RNN cells, but GRU cells are slightly faster than the LSTM cells.
|
| 340 |
+
|
| 341 |
+
Note that each round of propagation can be thought of as a graph propagation “layer”. When propagating for a fixed number of $T$ rounds, we can have tied parameters on all layers, but we found using different parameters on all layers perform consistently better. We use untied weights in all experiments.
|
| 342 |
+
|
| 343 |
+
For aggregating across the graph to get graph representation vectors, we first map the node representations $\mathbf { h } _ { v }$ into a higher dimensional space $\mathbf { h } _ { v } ^ { \hat { G } } = f _ { m } ( \mathbf { h } _ { v } )$ , where $f _ { m }$ is another MLP, and then $\begin{array} { r } { \mathbf { h } _ { G } = \sum _ { v \in V } \mathbf { h } _ { v } ^ { G } } \end{array}$ is the graph representation vector. We found gated sum
|
| 344 |
+
|
| 345 |
+
$$
|
| 346 |
+
\mathbf { h } _ { G } = \sum _ { v \in V } \mathbf { g } _ { v } ^ { G } \odot \mathbf { h } _ { v } ^ { G }
|
| 347 |
+
$$
|
| 348 |
+
|
| 349 |
+
to be consistently better than a simple sum, where $\mathbf { g } _ { v } ^ { G } = \sigma ( g _ { m } ( \mathbf { h } _ { v } ) )$ is a gating vector. In the experiments we always use this form of gated sum, and both $f _ { m }$ and $g _ { m }$ are implemented as a single linear layer, and the dimensionality of $\mathbf { h } _ { G }$ is set to twice the dimensionality of $\mathbf { h } _ { v }$ .
|
| 350 |
+
|
| 351 |
+
# B.2 THE OUTPUT MODEL
|
| 352 |
+
|
| 353 |
+
(a) $f _ { a d d n o d e } ( G )$ This module takes an existing graph as input and produce a binary (non-typed nodes) or categorical output (typed nodes). More concretely, after obtaining a graph representation $\mathbf { h } _ { G }$ , we feed that into an MLP $f _ { a n }$ to output scores. For graphs where the nodes are not typed, we have $f _ { a n } ( \mathbf { h } _ { G } ) \in \mathbb { R }$ and the probability of adding one more node is
|
| 354 |
+
|
| 355 |
+
$$
|
| 356 |
+
f _ { a d d n o d e } ( G ) = p ( \mathrm { a d d ~ o n e ~ m o r e ~ n o d e } | G ) = \sigma ( f _ { a n } ( \mathbf { h } _ { G } ) ) .
|
| 357 |
+
$$
|
| 358 |
+
|
| 359 |
+
For graphs where the nodes can be one of $K$ types, we make $f _ { a n }$ output a $K + 1$ -dimensional vector $f _ { a n } ( \mathbf { \bar { h } } _ { G } ) \in \mathbb { R } ^ { K + 1 }$ , and
|
| 360 |
+
|
| 361 |
+
$$
|
| 362 |
+
\begin{array} { r l } & { \hat { \mathbf { p } } = \left[ \hat { p } _ { 1 } , . . . , \hat { p } _ { K + 1 } \right] ^ { \top } = f _ { a n } ( \mathbf { h } _ { G } ) } \\ & { p _ { k } = \frac { \exp \left( \hat { p } _ { k } \right) } { \sum _ { k ^ { \prime } } \exp \left( \hat { p } _ { k } ^ { \prime } \right) } , \qquad \forall k } \end{array}
|
| 363 |
+
$$
|
| 364 |
+
|
| 365 |
+
then
|
| 366 |
+
|
| 367 |
+
$p$ (add one more node with type $k | G ) = p _ { k }$
|
| 368 |
+
|
| 369 |
+
We add an extra type $K + 1$ to represent the decision of not adding any more nodes.
|
| 370 |
+
|
| 371 |
+
In the experiments, $f _ { a n }$ is always implemented as a linear layer and we found this to be sufficien (b) $f _ { a d d e d g e } ( G , v )$ This module takes the current graph and a newly added node $v$ as input and produces a probability of adding an edge. In terms of implementation it is treated as exactly the same as (a), except that we add the new node into the graph first, and use a different set of parameters both in the propagation module and in the output module where we use a separate $f _ { a e }$ in place of $f _ { a n }$ . This module always produces Bernoulli probabilities, i.e. probability for either adding one edge or not. Typed edges are handled in (c).
|
| 372 |
+
|
| 373 |
+
(c) $f _ { n o d e s } ( G , v )$ This module picks one of the nodes in the graph to be connected to node $v$ . After propagation, we have node representation vectors $\mathbf { h } _ { u } ^ { ( T ) }$ for all $u \in V$ , then a score $s _ { u } \in \mathbb { R }$ for each node $u$ is computed as
|
| 374 |
+
|
| 375 |
+
$$
|
| 376 |
+
s _ { u } = f _ { s } ( \mathbf { h } _ { u } ^ { ( T ) } , \mathbf { h } _ { v } ^ { ( T ) } ) = \mathrm { M L P } ( \mathrm { c o n c a t } ( [ \mathbf { h } _ { u } ^ { ( T ) } , \mathbf { h } _ { v } ^ { ( T ) } ] ) ) ,
|
| 377 |
+
$$
|
| 378 |
+
|
| 379 |
+
The probability of a node being selected is then a softmax over these scores
|
| 380 |
+
|
| 381 |
+
$$
|
| 382 |
+
p _ { u } = \frac { \exp ( s _ { u } ) } { \sum _ { u ^ { \prime } } \exp ( s _ { u ^ { \prime } } ) } .
|
| 383 |
+
$$
|
| 384 |
+
|
| 385 |
+
For graphs with $J$ types of edges, we produce a vector $s _ { u } \in \mathbb { R } ^ { J }$ for each node $u$ , by simply changing the output size of the MLP for $f _ { s }$ . Then the probability of a node $u$ and edge type $j$ being selected is a softmax over all scores across all nodes and edge types
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
p _ { u , j } = \frac { \exp ( s _ { u , j } ) } { \sum _ { u ^ { \prime } , j ^ { \prime } } \exp ( s _ { u ^ { \prime } , j ^ { \prime } } ) } .
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
# B.3 INITIALIZATION AND CONDITIONING
|
| 392 |
+
|
| 393 |
+
When a new node $v$ is created, its node vector $\mathbf { h } _ { v }$ need to be initialized. In our model the node vector $\mathbf { h } _ { v }$ is initialized using inputs from a few different sources: (1) a node type embedding or any other node features that are available; (2) a summary of the current graph, computed as a graph representation vector after aggregation; (3) any conditioning information, if available.
|
| 394 |
+
|
| 395 |
+
Among these, (1) node type embedding e comes from a standard embedding module; (2) is implemented as a graph aggregation operation, more specifically
|
| 396 |
+
|
| 397 |
+
$$
|
| 398 |
+
\mathbf { h } _ { G } ^ { i n i t } = \sum _ { v \in V } \mathbf { g } _ { v } ^ { i n i t } \odot \mathbf { h } _ { v } ^ { i n i t }
|
| 399 |
+
$$
|
| 400 |
+
|
| 401 |
+
where $\mathbf { g } _ { v } ^ { i n i t }$ and $\mathbf { h } _ { v } ^ { i n i t }$ are the gating vectors and projected node state vectors as described in B.1, but with different set of parameters; (3) is a conditioning vector $\mathbf { c }$ if available.
|
| 402 |
+
|
| 403 |
+
$\mathbf { h } _ { v }$ is then initialized as
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
\mathbf { h } _ { v } = f _ { i n i t } ( \mathbf { e } , \mathbf { h } _ { G } ^ { i n i t } , \mathbf { c } ) = \mathrm { M L P } ( \mathrm { c o n c a t } ( [ \mathbf { e } , \mathbf { h } _ { G } ^ { i n i t } , \mathbf { c } ] ) ) .
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
The conditioning vector c summarizes any conditional input information, for images this can be the output of a convolutional neural network, for text this can be the output of an LSTM encoder. In the parse tree generation task, we employed an attention mechanism similar to the one used in Vinyals et al. (2015c).
|
| 410 |
+
|
| 411 |
+
More specifically, we used an LSTM to obtain the representation of each input word $\mathbf { h } _ { i } ^ { c }$ , for $i \in$ $\{ 1 , . . . , L \}$ . Whenever a node is created in the graph, we compute a query vector
|
| 412 |
+
|
| 413 |
+
$$
|
| 414 |
+
\mathbf h _ { G } ^ { q } = \sum _ { v \in V } \mathbf g _ { v } ^ { q } \odot \mathbf h _ { v } ^ { q }
|
| 415 |
+
$$
|
| 416 |
+
|
| 417 |
+
which is again an aggregate over all node vectors. This query vector is used to compute a score for each input word as
|
| 418 |
+
|
| 419 |
+
$$
|
| 420 |
+
u _ { i } ^ { c } = v ^ { \top } \operatorname { t a n h } ( \mathbf { W } \mathbf { h } _ { i } ^ { c } + \mathbf { U } \mathbf { h } _ { G } ^ { q } ) ,
|
| 421 |
+
$$
|
| 422 |
+
|
| 423 |
+
these scores are transformed into weights
|
| 424 |
+
|
| 425 |
+
$$
|
| 426 |
+
\mathbf { a } ^ { c } = \mathrm { S o f t m a x } ( \mathbf { u } ^ { c } ) ,
|
| 427 |
+
$$
|
| 428 |
+
|
| 429 |
+
where $\mathbf { a } ^ { c } = [ a _ { 1 } ^ { c } , . . . , a _ { L } ^ { c } ] ^ { \top }$ and $\mathbf { u } ^ { c } = [ u _ { 1 } ^ { c } , . . . , u _ { L } ^ { c } ] ^ { \top }$ . The conditioning vector $\mathbf { c }$ is computed as
|
| 430 |
+
|
| 431 |
+
$$
|
| 432 |
+
\mathbf { c } = \sum _ { i } a _ { i } ^ { c } \mathbf { h } _ { i } ^ { c } .
|
| 433 |
+
$$
|
| 434 |
+
|
| 435 |
+
# B.4 LEARNING
|
| 436 |
+
|
| 437 |
+
For learning we have a set of training graphs, and we train our model to maximize the expected joint likelihood $\bar { \mathbb { E } } _ { p _ { d a t a } ( G ) } \mathbb { E } _ { p _ { d a t a } ( \pi | G ) } [ \log p ( \bar { G } , \pi ) ]$ as discussed in Section 3.4.
|
| 438 |
+
|
| 439 |
+
Given a graph $G$ and a specified ordering $\pi$ of the nodes and edges, we can obtain a particular graph generating sequence (Appendix A shows an example of this). The log-likelihood $\log p ( G , \pi )$ can then be computed for this sequence, where the likelihood for each individual step is computed using the output modules described in B.2.
|
| 440 |
+
|
| 441 |
+
For $p _ { d a t a } ( \pi | G )$ we explored two possibilities: (1) canonical ordering in the particular domain; (2) uniform random ordering. The canonical ordering is a fixed ordering of a graph nodes and edges given a graph. For molecules, the SMILES string specified an ordering of nodes and edges which we use as the canonical ordering. In the implementation we used the default ordering provided in the chemical toolbox rdkit as the canonical ordering. For parsing we tried two canonical orderings, depth-first-traversal ordering and breadth-first-traversal ordering. For uniform random ordering we first generate a random permutation of node indices which gives us the node ordering, and then sort the edges according to the node indices to get edge ordering. When evaluating the marginals we take the permutations on edges into account as well.
|
| 442 |
+
|
| 443 |
+
# C MORE EXPERIMENT DETAILS AND RESULTS
|
| 444 |
+
|
| 445 |
+
In this section we describe more detailed experiment setup and present more experiment results not included in the main paper.
|
| 446 |
+
|
| 447 |
+
# C.1 SYNTHETIC GRAPH GENERATION
|
| 448 |
+
|
| 449 |
+
For this experiment the hidden size of the LSTM model is set to 64 and the size of node states in the graph model is 16, number of propagation steps $T = 2$ .
|
| 450 |
+
|
| 451 |
+
For both models we selected the learning rates from $\{ 0 . 0 0 1 , 0 . 0 0 0 5 , 0 . 0 0 0 2 \}$ on each of the three sets. We used the Adam (Kingma & Ba, 2014) optimizer for both.
|
| 452 |
+
|
| 453 |
+
# C.2 MOLECULE GENERATION
|
| 454 |
+
|
| 455 |
+
Model Details Our graph model has a node state dimensionality of 128, the LSTM models have hidden size of 512. The two models have roughly the same number of parameters (around 2 million). Our graph model uses GRU cores as $f _ { n }$ , we have tried LSTMs as well but they perform similarly as GRUs. We have also tried GRUs for the baselines, but LSTM models work slightly better. The node state dimensionality and learning rate are chosen according to grid search in $\{ 3 2 , 6 4 , 1 2 8 , 2 5 6 \} \times \{ 0 . 0 0 1 , 0 . 0 0 0 5 , \dot { 0 } . 0 0 0 2 , 0 . 0 0 0 1 \}$ , while for the LSTM models the hidden size and learning rate are chosen from $\{ 1 2 8 , 2 5 6 , 5 1 2 , 1 0 2 \hat { 4 } \} \times \{ 0 . 0 0 1 , 0 . 0 0 0 5 , 0 . 0 0 0 2 \}$ . The best learning rate for the graph model is 0.0001, while for the LSTM model the learning rate is 0.0002 or 0.0005. The LSTM model used a dropout rate of 0.5, while the graph model used a dropout rate of 0.2 which is applied to the last layer of the output modules. As discussed in the main paper, the graph model is significantly more unstable than the LSTM model, and therefore a much smaller learning rate should be used. The number of propagation steps $T$ is chosen from $\{ 1 , 2 \}$ , increasing $T$ is in principle beneficial for the graph representations, but it is also more expensive. For this task a small $T$ is already showing a good performance so we didn’t explore much further. Overall the graph model is roughly $2 { - } 3 \mathbf { x }$ slower than the LSTM model with similar amount of parameters in our comparison.
|
| 456 |
+
|
| 457 |
+
Distribution of chemical properties for samples Here we examine the distribution of chemical metrics for the valid samples generated from trained models. For this study we chose a range of chemical metrics available from RDKit (2006), and computed the metrics for 100,000 samples generated from each model. For reference, we also computed the same metrics for the training set, and compare the sample metrics with the training set metrics.
|
| 458 |
+
|
| 459 |
+
For each metric, we create a histogram to show its distribution across the samples, and compare the histogram to the histogram on the training set by computing the KL divergence between them. The results are shown in Figure 7. Note that all models are able to match the training distribution on these metrics quite well, notably the graph model and LSTM model trained on permuted node and edge sequences has a bias towards generating molecules with higher SA scores which is a measure of the ease of synthesizing the molecules. This is probably due to the fact that these models are trained to generate molecular graphs in arbitrary order (as apposed to following the canonical order that makes sense chemically), therefore more likely to generate things that are harder to synthesize. However, this can be overcome if we train with RL to optimize for this metric. The graph model trained with permuted nodes and edges also has a slight bias toward generating larger molecules with more atoms and bonds.
|
| 460 |
+
|
| 461 |
+
We also note that the graph and LSTM models trained on permuted nodes and edge sequences can still be improved as they are not even overfitting after 1 million training steps. This is because with node and edge permutation, these models see on the order of $n !$ times more data than the other models. Given more training time these models can improve further.
|
| 462 |
+
|
| 463 |
+
Changing the bias for $f _ { a d d n o d e }$ and faddedge Since our graph generation model is very modular, it is possible to tweak the model after it has been trained. For example, we can tweak a single bias parameter in $f _ { a d d n o d e }$ and $f _ { a d d e d g e }$ to increase or decrease the graph size and edge density.
|
| 464 |
+
|
| 465 |
+
In Figure 8 (a) we show the shift in the distribution of number of atoms for the samples when changing the $f _ { a d d n o d e }$ bias. As the bias changes, the samples change accordingly while the model is still able to generate a high percentage of valid samples.
|
| 466 |
+
|
| 467 |
+
Figure 8 (b) shows the shift in the distribution of number of bonds for the samples when changing the $f _ { a d d e d g e }$ bias. The number of bonds, i.e. number of edges in the molecular graph, changes as this bias changes. Note that this level of fine-grained control of edge density in sample generation is not straightforward to achieve with LSTM models trained on SMILES strings. Note that however here the increasing the $f _ { a d d e d g e }$ slightly changed the average node degree, but negatively affected the total number of bonds. This is because the edge density also affected the molecule size, and when the bias is negative, the model tend to generate larger molecules to compensate for this change, and when this bias is positive, the model tend to generate smaller molecules. Combining $f _ { a d d e d g e }$ bias and faddnode bias can achieve the net effect of changing edge density.
|
| 468 |
+
|
| 469 |
+

|
| 470 |
+
Figure 7: Distribution of chemical properties for samples from different models and the training set. rg_lstm: LSTM trained on fixed graph generation decision sequence; rg_lstm_perm: LSTM trained on permuted graph generation decision sequence; lstm: LSTM on SMILES strings; lstm_perm: LSTM on SMILES strings with permuted nodes; graph: graph model on fixed node and edge sequence; graph_perm: graph model on permuted node and edge sequences.
|
| 471 |
+
|
| 472 |
+

|
| 473 |
+
Figure 8: Changing the $f _ { a d d n o d e }$ and $f _ { a d d e d g e }$ biases can affect the generated samples accordingly, therefore achieving a level of fine-grained control of sample generation process. nb<bias> and $e b { < } b i a s { > }$ shows the bias values added to the logits.
|
| 474 |
+
|
| 475 |
+
Step-by-step molecule generation visualization Here we show a few examples for step-by-step molecule generation. Figure 9 shows an example of such step-by-step generation process for a graph model trained on canonical ordering, and Figure 10 shows one such example for a graph model trained on permuted random ordering.
|
| 476 |
+
|
| 477 |
+
Overfitting the Canonical Ordering When trained with canonical ordering, our model will adapt its graph generating behavior to the ordering it is being trained on, Figure 9 and Figure 10 show examples on how the ordering used for training can affect the graph generation behavior.
|
| 478 |
+
|
| 479 |
+
On the other side, training with canonical ordering can result in overfitting more quickly than training with uniform random ordering. In our experiments, training with uniform random ordering rarely overfits at all, but with canonical ordering the model overfits much more quickly. Effectively, with random ordering the model will see potentially factorially many possible orderings for the same graph, which can help reduce overfitting, but this also makes learning harder as many orderings do not exploit the structure of the graphs at all.
|
| 480 |
+
|
| 481 |
+

|
| 482 |
+
Figure 9: Step-by-step generation process visualization for a graph model trained with canonical ordering.
|
| 483 |
+
|
| 484 |
+
Another interesting observation we have about training with canonical ordering is that models trained with canonical ordering may not assign the highest probabilities to the canonical ordering after training. From Table 3 we can see that the log-likelihood results for the canonical ordering (labeled “fixed ordering”) is not always the same as the best possible ordering, even though they are quite close.
|
| 485 |
+
|
| 486 |
+
Figure 11 shows an example histogram of negative log-likelihood $\log p ( G , \pi )$ across all possible orderings $\pi$ for a small molecule under a model trained with canonical ordering. We can see that the small negative log-likelihood values concentrate on very few orderings, and a large number of orderings have significantly larger NLL. This shows that the model can learn to concentrate probabilities to orderings close to the canonical ordering, but it still “leaks” some probability to other orderings.
|
| 487 |
+
|
| 488 |
+
# C.3 PARSING TASK
|
| 489 |
+
|
| 490 |
+
Model Details In this experiment we used a graph model with node state dimensionality of 64, and an LSTM encoder with hidden size 256. Attention over input is implemented using a graph aggregation operation to compute a query vector and then use it to attend to the encoder LSTM states, as described in B.3. The baseline LSTM models have hidden size 512 for both the encoder and the decoder. Dropout of 0.5 is applied to both the encoder and the decoder. For the graph model the dropout in the decoder is reduced to 0.2 and applied to various output modules and the node initialization module. The baseline models have more than 2 times more parameters than the graph model (52M vs 24M), mostly due to using a larger encoder.
|
| 491 |
+
|
| 492 |
+
The node state dimensionality for the graph model and the hidden size of the encoder LSTM is chosen from a grid search $\{ 1 6 , 3 2 , 6 4 , 1 2 8 \} \stackrel { - } { \times } \{ 1 2 8 , 2 5 6 , 5 1 2 \}$ . For the LSTM seq2seq model the size of the encoder and decoder are always tied and selected from $\{ 1 2 8 , 2 5 6 , 5 1 2 \}$ . For all models the learning rate is selected from $\{ 0 . 0 0 1 , \dot { 0 } . 0 0 0 5 , 0 . 0 0 0 2 \}$ .
|
| 493 |
+
|
| 494 |
+
For the LSTM encoder, the input text is always reversed, which empirically is silghtly better than the normal order.
|
| 495 |
+
|
| 496 |
+
For the graph model we experimented with $T \in \{ 1 , 2 , 3 , 4 , 5 \}$ . Larger $T$ can in principle be beneficial for getting better graph representations, however this also means more computation time and more instability. $T = 2$ results in a reasonable balance for this task.
|
| 497 |
+
|
| 498 |
+
<table><tr><td rowspan=2 colspan=5>0 。 00 0 ®。 0。® 0 0 0 0(1) (2) (3) (4) (5)</td></tr><tr><td rowspan=1 colspan=1>0®(2)</td><td rowspan=1 colspan=1>。00(3)</td><td rowspan=1 colspan=1>00。0(4)</td><td rowspan=1 colspan=1>®00 0(5)</td></tr><tr><td rowspan=1 colspan=1>①0。自(6)</td><td rowspan=1 colspan=1>0000 e(7)</td><td rowspan=1 colspan=1>0园。。1@(8)</td><td rowspan=1 colspan=1>。。。① ①自(9)</td><td rowspan=1 colspan=1>。。。® 。(10)</td></tr><tr><td rowspan=1 colspan=1>0® 自(11)</td><td rowspan=1 colspan=1>0。。。 ®(12)</td><td rowspan=1 colspan=1>园。0 ®。(13)</td><td rowspan=1 colspan=1>@。。® ®。 0(14)</td><td rowspan=1 colspan=1>。。。。 6@(15)</td></tr><tr><td rowspan=1 colspan=1>①0。0 0(16)</td><td rowspan=1 colspan=1>0。000 ®(17)</td><td rowspan=1 colspan=1>①00100 0(18)</td><td rowspan=1 colspan=1>00109 。(19)</td><td rowspan=1 colspan=1>000100(20)</td></tr><tr><td rowspan=1 colspan=1>园01o0 ®(21)</td><td rowspan=1 colspan=1>0g010@ 。(22)</td><td rowspan=1 colspan=1>。0100(23)</td><td rowspan=1 colspan=1>园@10。(24)</td><td rowspan=1 colspan=1>0(25)</td></tr><tr><td rowspan=1 colspan=1>®(26)</td><td rowspan=1 colspan=1>090100(27)</td><td rowspan=1 colspan=1>®010®(28)</td><td rowspan=1 colspan=1>。@(29)</td><td rowspan=1 colspan=1>0e0(30)</td></tr><tr><td rowspan=1 colspan=1>Qg®(31)</td><td rowspan=1 colspan=1>00(32)</td><td rowspan=1 colspan=1>0(33)</td><td rowspan=1 colspan=1>e80(34)</td><td rowspan=1 colspan=1>Qe0(35)</td></tr><tr><td rowspan=1 colspan=1>0g(36)</td><td rowspan=1 colspan=1>Qo(37)</td><td rowspan=1 colspan=1>0@。(38)</td><td rowspan=1 colspan=1>(39)</td><td rowspan=1 colspan=1>(40)</td></tr><tr><td rowspan=1 colspan=1>(41)</td><td rowspan=1 colspan=1>(42)</td><td rowspan=1 colspan=1>(43)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1></td></tr></table>
|
| 499 |
+
|
| 500 |
+

|
| 501 |
+
Figure 11: Histogram of negative log-likelihood $\log p ( G , \pi )$ under different orderings $\pi$ for one small molecule under a model trained with canonical ordering.
|
parse/train/Hy1d-ebAb/Hy1d-ebAb_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/Hy1d-ebAb/Hy1d-ebAb_middle.json
ADDED
|
The diff for this file is too large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LEY TRANSFORM
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Recurrent Neural Networks (RNNs) are designed to handle sequential data but suffer from vanishing or exploding gradients. Recent work on Unitary Recurrent Neural Networks (uRNNs) have been used to address this issue and in some cases, exceed the capabilities of Long Short-Term Memory networks (LSTMs). We propose a simpler and novel update scheme to maintain orthogonal recurrent weight matrices without using complex valued matrices. This is done by parametrizing with a skew-symmetric matrix using the Cayley transform. Such a parametrization is unable to represent matrices with negative one eigenvalues, but this limitation is overcome by scaling the recurrent weight matrix by a diagonal matrix consisting of ones and negative ones. The proposed training scheme involves a straightforward gradient calculation and update step. In several experiments, the proposed scaled Cayley orthogonal recurrent neural network (scoRNN) achieves superior results with fewer trainable parameters than other unitary RNNs.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Deep neural networks have been used to solve numerical problems of varying complexity. RNNs have parameters that are reused at each time step of a sequential data point and have achieved state of the art performance on many sequential learning tasks. Nearly all optimization algorithms for neural networks involve some variant of gradient descent. One major obstacle to training RNNs with gradient descent is due to vanishing or exploding gradients, as described in Bengio et al. (1993) and Pascanu et al. (2013). This problem refers to the tendency of gradients to grow or decay exponentially in size, resulting in gradient descent steps that are too small to be effective or so large that the network oversteps the local minimum. This issue significantly diminishes RNNs’ ability to learn time-based dependencies, particularly in problems with long input sequences.
|
| 12 |
+
|
| 13 |
+
A variety of architectures have been introduced to overcome this difficulty. The current preferred RNN architectures are those that introduce gating mechanisms to control when information is retained or discarded, such as LSTMs (Hochreiter & Schmidhuber, 1997) and GRUs (Cho et al., 2014), at the cost of additional trainable parameters. More recently, the unitary evolution RNN (uRNN) (Arjovsky et al., 2016) uses a parametrization that forces the recurrent weight matrix to remain unitary throughout training, and exhibits superior performance to LSTMs on a variety of synthetic and real-world tasks. For clarity, we follow the convention of Wisdom et al. (2016) and refer to this network as the restricted-capacity uRNN.
|
| 14 |
+
|
| 15 |
+
Since the introduction of uRNNs, orthogonal and unitary RNN schemes have increased in both popularity and complexity. Wisdom et al. (2016) use a multiplicative update method detailed in Tagare (2011) and Wen & Yin (2013) to expand uRNNs’ capacity to include all unitary matrices. These networks are referred to as full-capacity uRNNs. Jing et al. (2016)’s EURNN parametrizes this same space with Givens rotations, while Jing et al. (2017)’s GORU introduces a gating mechanism for unitary RNNs to enable short term memory. Vorontsov et al. (2017) introduced modified optimization and regularization methods that restrict singular values of the recurrent matrix to an interval around 1. Each of these methods involve complex valued recurrent weights. For other work in addressing the vanishing and exploding gradient problem, see Henaff et al. (2017) and Le et al. (2015).
|
| 16 |
+
|
| 17 |
+
In this paper, we consider RNNs with a recurrent weight matrix taken from the set of all orthogonal matrices. To construct the orthognal weight matrix, we parametrize it with a skew-symmetric matrix through a scaled Cayley transform. This scaling allows us to avoid the singularity issue occuring for $- 1$ eigenvalues that may arise in the standard Cayley transform. With the parameterization, the network optimization involves a relatively simple gradient descent update. The resulting method achieves superior performance on sequential data tasks with a smaller number of trainable parameters and hidden sizes than other unitary RNNs and LSTMs.
|
| 18 |
+
|
| 19 |
+
The method we present in this paper works entirely with real matrices, and as such, our results deal only with orthogonal and skew-symmetric matrices. However, the method and all related theory remain valid for unitary and skew-Hermitian matrices in the complex case. The experimental results in this paper indicate that state of the art performance can be achieved without the increased complexity of optimization along the Stiefel manifold and using complex matrices.
|
| 20 |
+
|
| 21 |
+
# 2 BACKGROUND
|
| 22 |
+
|
| 23 |
+
# 2.1 RECURRENT NEURAL NETWORKS
|
| 24 |
+
|
| 25 |
+
A recurrent neural network (RNN) is a function with input parameters $U \in \mathbb { R } ^ { n \times m }$ , recurrent parameters $W \in \mathbb { R } ^ { n \times n }$ , recurrent bias $b \in \mathbb { R } ^ { n }$ , output parameters $V \in \mathbb { R } ^ { p \times n }$ , and output bias $c \in \mathbb { R } ^ { p }$ where $m$ is the data input size, $n$ is the number of hidden units, and $p$ is the output data size. From an input sequence ${ \boldsymbol { x } } = ( x _ { 1 } , x _ { 2 } , . . . , x _ { T } )$ where $x _ { i } \in \mathbb { R } ^ { m }$ , the RNN returns an output sequence $y = ( y _ { 1 } , y _ { 2 } , . . . , y _ { T } )$ where each $y _ { i } \in \mathbb { R } ^ { p }$ is given recursively by
|
| 26 |
+
|
| 27 |
+
$$
|
| 28 |
+
\begin{array} { l } { { h _ { t } = \sigma \left( U { { x _ { t } } } + W { { h _ { t - 1 } } } + b \right) } } \\ { { y _ { t } = V { { h _ { t } } } + c } } \end{array} \quad
|
| 29 |
+
$$
|
| 30 |
+
|
| 31 |
+
where $h = ( h _ { 0 } , \ldots , h _ { T - 1 } )$ , $\boldsymbol { h } _ { i } \in \mathbb { R } ^ { n }$ is the hidden layer state at time $i$ and $\sigma ( \cdot )$ is the activation function, which is often a pointwise nonlinearity such as a hyperbolic tangent function or rectified linear unit (Nair & Hinton, 2010).
|
| 32 |
+
|
| 33 |
+
# 2.2 UNITARY RNNS
|
| 34 |
+
|
| 35 |
+
A real matrix $W$ is orthogonal if it satisfies $W ^ { T } W = I$ . The complex analog of orthogonal matrices are unitary matrices, which satisfy $W ^ { * } W = I$ , where $^ *$ denotes the conjugate transpose. Orthogonal and unitary matrices have the desirable property that $\| W x \| _ { 2 } = \| x \| _ { 2 }$ for any vector $x$ . This property motivates the use of orthogonal or unitary matrices in RNNs to avoid vanishing and exploding gradients, as detailed in Arjovsky et al. (2016).
|
| 36 |
+
|
| 37 |
+
Arjovsky et al. (2016) follow the framework of the previous section for their restricted-capacity uRNN, but introduce a parametrization of the recurrent matrix $W$ using a product of simpler matrices. This parameterization is given by a product consisting of diagonal matrices with complex norm 1, complex Householder reflection matrices, discrete Fourier transform matrices, and a fixed permutation matrix with the resulting product being unitary.
|
| 38 |
+
|
| 39 |
+
Wisdom et al. (2016) note that this representation has only $_ { 7 n }$ parameters, which is insufficient to represent all unitary matrices for $n > 7$ . In response, they present the full-capacity uRNN, which uses a multiplicative update step that is able to reach all unitary matrices of order $n$ .
|
| 40 |
+
|
| 41 |
+
The full-capacity uRNN aims to construct a unitary matrix $W ^ { ( k + 1 ) }$ from $W ^ { ( k ) }$ by moving along a curve on the Stiefel manifold $\{ W \in \mathbb { C } ^ { n \times n } \mid \dot { W } ^ { * } W = I \}$ . For the network optimization, it is necessary to use a curve that is in a descent direction of the cost function $L : = L ( W )$ . In Tagare (2011), Wen & Yin (2013), and Wisdom et al. (2016), a descent direction is constructed as $B ^ { ( k ) } W ^ { ( k ) }$ , which is a representation of the derivative operator $D L ( W ^ { ( k ) } )$ in the tangent space of the Stiefel manifold at $W ^ { ( k ) }$ . Then, with $B ^ { ( k ) } W ^ { ( k ) }$ defining the direction of a descent curve, an update along the Stiefel manifold is obtained as
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
W ^ { ( k + 1 ) } = \left( I + { \frac { \lambda } { 2 } } B ^ { ( k ) } \right) ^ { - 1 } \left( I - { \frac { \lambda } { 2 } } B ^ { ( k ) } \right) W ^ { ( k ) }
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $\lambda$ is the learning rate.
|
| 48 |
+
|
| 49 |
+
# 3 SCALED CAYLEY ORTHOGONAL RNN
|
| 50 |
+
|
| 51 |
+
# 3.1 CAYLEY TRANSFORM
|
| 52 |
+
|
| 53 |
+
The Cayley transform gives a bijection between the set of orthogonal matrices without $- 1$ eigenvalues and the set of skew-symmetric matrices (i.e., matrices where $A ^ { T } = - A$ ):
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
W = \left( I + A \right) ^ { - 1 } \left( I - A \right) , \qquad A = \left( I + W \right) ^ { - 1 } \left( I - W \right) .
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
We can use this bijection to parametrize the set of orthogonal matrices without $- 1$ eigenvalues using skew-symmetric matrices. This parametrization is attractive from a machine learning perspective because it is closed under addition: the sum or difference of two skew-symmetric matrices is also skew-symmetric, so we can use gradient descent algorithms like RMSprop (Tieleman $\&$ Hinton, 2012) or Adam (Kingma & Ba, 2014) to train parameters.
|
| 60 |
+
|
| 61 |
+
However, this parametrization cannot represent orthogonal matrices with $- 1$ eigenvalues, since in this case $I + W$ , is not invertible. Theoretically, we can still represent matrices with eigenvalues that are arbitrarily close to $- 1$ ; however, it can require large entries of $A$ . For example, a $2 \mathbf { x } 2$ orthogonal matrix $W$ with eigenvalues $\approx - 0 . 9 9 9 9 9 \pm 0 . 0 0 4 4 7 i$ and its parametrization $A$ by the Cayley transform is given below.
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
W = \left[ \begin{array} { c c } { { - 0 . 9 9 9 9 } } & { { - \sqrt { 1 - 0 . 9 9 9 9 ^ { 2 } } } } \\ { { \sqrt { 1 - 0 . 9 9 9 9 ^ { 2 } } } } & { { - 0 . 9 9 9 9 9 } } \end{array} \right] \qquad A \approx \left[ \begin{array} { c c } { { 0 } } & { { 4 4 7 . 2 1 2 } } \\ { { - 4 4 7 . 2 1 2 } } & { { 0 } } \end{array} \right]
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
Gradient descent algorithms will learn this $A$ matrix very slowly, if at all. This difficulty can be overcome through a suitable diagonal scaling according to results from Kahan (2006).
|
| 68 |
+
|
| 69 |
+
Theorem 3.1 Every orthogonal matrix $W$ can be expressed as
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
W = ( I + A ) ^ { - 1 } ( I - A ) D
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
where $A = [ a _ { i j } ]$ is real-valued, skew-symmetric with $| a _ { i j } | \leq 1$ , and $D$ is diagonal with all nonzero entries equal $t o \pm 1$ .
|
| 76 |
+
|
| 77 |
+
We call the transform in Theorem 3.1 the scaled Cayley transform. Then, with an appropriate choice of $D$ , the scaled Cayley transform can reach any orthogonal matrix including those with $- 1$ eigenvalues. Further, it ensures that the skew-symmetric matrix $A$ that generates the orthogonal matrix will be bounded.
|
| 78 |
+
|
| 79 |
+
Our proposed network, the scaled Cayley orthogonal recurrent neural network (scoRNN), is based on this theorem. We parametrize the recurrent weight matrix $W$ through a skew-symmetric matrix $A$ , which results in $\frac { n ( \bar { n } - 1 ) } { 2 }$ trainable weights. The recurrent matrix $W$ is formed by the scaled Cayley transform: $W = ( I + A ) ^ { - 1 } ( I - A ) D$ . The scoRNN then operates identically to the set of equations given in Section 2.1, but during training we update the skew-symmetric matrix $A$ using gradient descent, while $D$ is fixed throughout the training process. The number of $- 1 \mathrm { s }$ on the diagonal of $D$ , which we call $\rho$ , is considered a hyperparameter in this work and is manually chosen based on the task.
|
| 80 |
+
|
| 81 |
+
# 3.2 UPDATE SCHEME
|
| 82 |
+
|
| 83 |
+
To update the recurrent parameter matrix $A$ as described in Section 3.1, we must find the gradients of $A$ by backpropagating through the Cayley transform. The following theorem describes these gradients. A proof is given in Appendix A.
|
| 84 |
+
|
| 85 |
+
Theorem 3.2 Let $L = L ( W ) : \mathbb { R } ^ { n \times n } \mathbb { R }$ be some differentiable loss function for an RNN with the recurrent weight matrix $W$ . Let $W = W ( A ) : = \left( I + A \right) ^ { - 1 } \left( I - A \right) D$ where $A \in \mathbb { R } ^ { n \times n }$ is skew-symmetric and $D \in \mathbb { R } ^ { n \times n }$ is a fixed diagonal matrix consisting of - $\mathbf { \xi } _ { l }$ and $I$ entries. Then the gradient of $L = L ( W ( A ) )$ with respect to $A$ is
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
\frac { \partial L } { \partial A } = V ^ { T } - V
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
At each training step of scoRNN, we first use the standard backpropagation algorithm to compute $\textstyle { \frac { \partial L } { \partial W } }$ and then use Theorem 3.2 to compute $\textstyle { \frac { \partial L } { \partial A } }$ . We then update $A$ with gradient descent (or a related optimization method), and reconstruct $W$ as follows:
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
\begin{array} { l } { { A ^ { ( k + 1 ) } = A ^ { ( k ) } - \lambda \frac { \partial { \cal { L } } ( W ( A ^ { ( k ) } ) ) } { \partial A } } } \\ { { W ^ { ( k + 1 ) } = \left( I + A ^ { ( k + 1 ) } \right) ^ { - 1 } \left( I - A ^ { ( k + 1 ) } \right) D } } \end{array}
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
The skew-symmetry of $\textstyle { \frac { \partial L } { \partial A } }$ ensures that $A ^ { ( k + 1 ) }$ will be skew-symmetric and, in turn, $W ^ { ( k + 1 ) }$ will be orthogonal.
|
| 98 |
+
|
| 99 |
+
The scoRNN and the full-capacity uRNN from Section 2.2 both have the capacity to optimize an orthogonal or unitary recurrent matrix $W$ , but they use different update schemes. The full-capacity uRNN performs a multiplicative update that moves $W$ along the tangent space of the Stiefel manifold, which can be shown to be a descent direction, but not necessarily the steepest one. In contrast, scoRNN performs an additive update in the direction of steepest descent with respect to its parametrization. The scoRNN update proves to be much more resistant to loss of orthogonality during training; see Appendix B. It also maintains stable hidden state gradients in the sense that the gradient norm does not change significantly in time; see Appendix C for experimental results. This is achieved with very little overhead computational costs over the standard RNN; see Appendix D for experiments comparing computational speeds.
|
| 100 |
+
|
| 101 |
+
# 4 OTHER ARCHITECTURE DETAILS
|
| 102 |
+
|
| 103 |
+
The basic architecture of scoRNN is very similar to the standard RNN as presented in Section 2.1. From a network layer perspective, one can think of the application of the recurrent weight in a three layer process. Let $\boldsymbol { h } _ { t } \in \mathbb { R } ^ { n }$ be the current state of the scoRNN at a particular time step, $t$ . We then pass $h _ { t }$ through the following layers:
|
| 104 |
+
|
| 105 |
+
Note that the above scheme is the same as taking $h _ { t } W h _ { t }$ as discussed previously.
|
| 106 |
+
|
| 107 |
+
# 4.1 MODRELU ACTIVATION FUNCTION
|
| 108 |
+
|
| 109 |
+
The modReLU function was first implemented by Arjovsky et al. (2016) to handle complex valued functions and weights. Unlike previous methods, our method only uses real-valued functions and weights. Nevertheless, we have found that the modReLU function in the real case also performed better than other activation functions. The function is defined as
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\sigma _ { \mathrm { m o d R e L U } } ( z ) = { \frac { z } { | z | } } \sigma _ { \mathrm { R e L U } } \left( | z | + b \right) = { \left\{ \begin{array} { l l } { { \frac { z } { | z | } } \left( | z | + b \right) } & { { \mathrm { i f ~ } } | z | + b \geq 0 } \\ { 0 } & { { \mathrm { i f ~ } } | z | + b < 0 } \end{array} \right. }
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
where $b$ is a trainable bias. In the real case, this simplifies to $\mathrm { s i g n } ( z ) \sigma _ { \mathrm { R e L U } } ( | z | + b )$ . To implement this activation function in scoRNN, we replace the computation of $h _ { t }$ in Section 2.1 with
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
\begin{array} { l } { { z _ { t } = U x _ { t } + W h _ { t - 1 } } } \\ { { h _ { t } = \sigma _ { \operatorname { m o d R e L U } } ( z _ { t } ) } } \end{array}
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
We believe that the improved performance of the modReLU over other activation functions, such as ReLU, is because it admits both positive and negative activation values, which appears to be important for the state transition in orthogonal RNNs. This is similar to the hyperbolic tangent function but does not have vanishing gradient issues.
|
| 122 |
+
|
| 123 |
+
# 4.2 INITIALIZATION
|
| 124 |
+
|
| 125 |
+
Modifying the initialization of our parameter matrices, in particular our recurrent parameter matrix $A$ , had a significant effect on performance. The most effective initialization method we found uses
|
| 126 |
+
|
| 127 |
+
a technique inspired by Henaff et al. (2017). We initialize all of the entries of $A$ to be 0 except for $2 \mathbf { x } 2$ blocks along the diagonal, which are given as
|
| 128 |
+
|
| 129 |
+
$$
|
| 130 |
+
A = \left[ \begin{array} { c c c c } { { B _ { 1 } } } & { { } } & { { } } & { { } } \\ { { } } & { { \ddots } } & { { } } & { { } } \\ { { } } & { { } } & { { B _ { \lfloor n / 2 \rfloor } } } \end{array} \right] \quad \mathrm { w h e r e } \quad B _ { j } = \left[ \begin{array} { c c } { { 0 } } & { { s _ { j } } } \\ { { - s _ { j } } } & { { 0 } } \end{array} \right]
|
| 131 |
+
$$
|
| 132 |
+
|
| 133 |
+
with $\begin{array} { r } { s _ { j } = \sqrt { \frac { 1 - \cos { ( t _ { j } ) } } { 1 + \cos { ( t _ { j } ) } } } } \end{array}$ and $t _ { j }$ is sampled uniformly from $[ 0 , \frac { \pi } { 2 } ]$ . The Cayley transform of this $A$ will have eigenvalues equal to $\pm e ^ { i t _ { j } }$ for each $j$ , which will be distributed uniformly along the right unit half-circle. Multiplication by the scaling matrix $D$ will reflect $\rho$ of these eigenvalues across the imaginary axis. We use this method to initialize scoRNN’s $A$ matrix in all of the experiments listed in section 5.
|
| 134 |
+
|
| 135 |
+
# 5 EXPERIMENTS
|
| 136 |
+
|
| 137 |
+
For each experiment, we found optimal hyperparameters for scoRNN using a grid search. For other models, we used the best hyperparameters settings as reported in Wisdom et al. (2016) and Arjovsky et al. (2016). If not available, we performed a grid search to find the best hyperparameters.
|
| 138 |
+
|
| 139 |
+
# 5.1 COPYING PROBLEM
|
| 140 |
+
|
| 141 |
+
This experiment follows descriptions found in Arjovsky et al. (2016) and Wisdom et al. (2016), and tests an RNN’s ability to reproduce a sequence seen many timesteps earlier. In the problem setup, there are 10 input classes, which we denote using the digits 0-9, with 0 being used as a ’blank’ class and 9 being used as a ’marker’ class. The RNN receives an input sequence of length $T + 2 0$ . This sequence consists of entirely zeros, except for the first ten elements, which are uniformly sampled from classes 1-8, and a 9 placed ten timesteps from the end. The goal for the machine is to output zeros until it sees a 9, at which point it should output the ten elements from the beginning of the input sequence. Thus, information must propagate from the beginning to the end of the sequence for a machine to successfully learn this task, making it critical to avoid vanishing/exploding gradients.
|
| 142 |
+
|
| 143 |
+
A baseline strategy with which to compare machine performance is that of outputting 0 until the machine sees a 9, and then outputting 10 elements randomly sampled from classes 1-8. The expected cross-entropy for such a strategy is 10 log (8)T +20 . In practice, it is common to see gated RNNs such as LSTMs converge to this local minimum.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 1: Cross entropy of each machine on the copying problem with $T = 1 0 0 0$ (left) and $T =$ 2000 (right).
|
| 147 |
+
|
| 148 |
+
We vary the number of hidden units of the machines to match the number of parameters, approximately 22k each. This results in an LSTM with $n = 6 8$ , a restricted-capacity uRNN with $n = 4 7 0$ , a full-capacity uRNN with $n = 1 2 8$ , and a scoRNN with $n = 1 9 0$ . We found the best performance with the scoRNN came from $\rho = n / 2$ , which gives an initial $W$ with eigenvalues distributed uniformly on the entire unit circle.
|
| 149 |
+
|
| 150 |
+
Figure 1 compares each model’s performance for $T = 1 0 0 0$ and $T \ : = \ : 2 0 0 0$ , with the baseline cross-entropy given as a dashed line. In both cases, cross-entropy for the restricted-capacity uRNN and LSTM never drop below the baseline. For the $T = 1 0 0 0$ test, the full-capacity uRNN and scoRNN converge immediately to zero entropy solutions, with the full-capacity uRNN converging slightly faster. For $T = 2 0 0 0$ , the full-capacity uRNN remains at the baseline for several thousand iterations, but is eventually able to find a correct solution. In contrast, the scoRNN error has a smooth convergence that bypasses the baseline, but does so more slowly than the full-capacity uRNN.
|
| 151 |
+
|
| 152 |
+
# 5.2 ADDING PROBLEM
|
| 153 |
+
|
| 154 |
+
We examined a variation of the adding problem as proposed by Arjovsky et al. (2016) which is based on the work of Hochreiter & Schmidhuber (1997). This variation involves passing two sequences concurrently into the RNN, each of length $T$ . The first sequence is a sequence of digits sampled uniformly with values ranging in a half-open interval, $\mathcal { U } [ 0 , 1 )$ . The second sequence is a marker sequence consisting of all zeros except for two entries that are marked by one. The first 1 is located uniformly within the interval $[ 1 , \frac { T } { 2 } )$ of the sequence and the second 1 is located uniformly within the interval $[ \textstyle { \frac { T } { 2 } } , T )$ of the sequence. The label for each pair of sequences is the sum of the two entries that are marked by one, which forces the machine to identify relevant information in the first sequence among noise. As the sequence length increases, it becomes more crucial to avoid vanishing/exploding gradients. Naively predicting one regardless of the sequence gives an expected mean squared error (MSE) of approximately 0.167. This will be considered as the baseline.
|
| 155 |
+
|
| 156 |
+
The number of hidden units for each network was adjusted so that each had approximately $1 4 \mathrm { k }$ trainable parameters. This results in $n = 1 7 0$ for the scoRNN, $n = 6 0$ for the LSTM, $n = 1 2 0$ for the Full-Capacity uRNN, and $n = 9 5 0$ hidden units for the restricted-capacity uRNN. The test set
|
| 157 |
+
|
| 158 |
+

|
| 159 |
+
Figure 2: Test set MSE for each machine on the adding problem with sequence lengths of $T = 2 0 0$ (top), $T = 4 0 0$ (middle), and $T = 7 5 0$ (bottom).
|
| 160 |
+
|
| 161 |
+
MSE results for sequence lengths $T = 2 0 0$ , $T = 4 0 0$ , and $T = 7 5 0$ can be found in Figure 2. A training set size of 100,000 and a testing set size of 10,000 were used for each sequence length. For each case, the networks start at or near the baseline MSE and drop towards zero after a few epochs. As the sequence length increases, the number of epochs before the drop increases. We found the best settings for the scoRNN were $\rho = n / 2$ for $T = 2 0 0$ and $\rho = 7 n / 1 0$ for $T = 4 0 0$ and $T = 7 5 0$ . As can be seen, the LSTM error drops precipitously across the board before all other models, while the unitary and orthogonal RNNs descend more gradually. Although in some cases the full-capacity uRNN begins to drop below the baseline before scoRNN, the full-capacity uRNN does not drop as quickly and has a more irregular descent curve.
|
| 162 |
+
|
| 163 |
+
# 5.3 PIXEL-BY-PIXEL MNIST
|
| 164 |
+
|
| 165 |
+
We ran two experiments based around classifying samples from the well-known MNIST dataset (LeCun et al.). Following the implementation of Le et al. (2015), each pixel of the image is fed into the RNN sequentially, resulting in a single pixel sequence length of 784. In the first experiment, which we refer to as unpermuted MNIST, pixels are arranged in the sequence row-by-row. In the second, which we call permuted MNIST, a fixed permutation is applied to training and testing sequences.
|
| 166 |
+
|
| 167 |
+
All scoRNN machines were trained with the RMSProp optimization algorithm. Input and output weights used a learning rate of $1 0 ^ { - 3 }$ , while the recurrent parameters used a learning rate of $1 0 ^ { - 4 }$ (for $n = 1 7 0 ,$ ) or $1 0 ^ { - 5 }$ (for $n = 3 6 0$ and $n = 5 1 2$ ). For unpermuted MNIST, we found $\rho$ to be optimal at $n / 1 0$ , while the best value of $\rho$ for permuted MNIST was $n / 2$ . We suspect that the difference of these two values comes from the different types of dependencies in each: unpermuted MNIST has mostly local dependencies, while permuted MNIST requires learning many long-term dependencies, which appear to be more easily modeled when the diagonal of $D$ has a higher proportion of $- 1 \mathrm { s }$ .
|
| 168 |
+
|
| 169 |
+
Each experiment used a training set of 55,000 images and a test set of 10,000 testing images. Each machine was trained for 70 epochs, and test set accuracy, the percentage of test images classified correctly, was evaluated at the conclusion of each epoch. Figure 3 shows test set accuracy over time for each machine, and the best performance over all epochs by each machine is given in Table 1.
|
| 170 |
+
|
| 171 |
+
Table 1: Results for unpermuted and permuted pixel-by-pixel MNIST experiments. Evaluation accuracies are based on the best test accuracy at the end of every epoch.
|
| 172 |
+
|
| 173 |
+
<table><tr><td>Model</td><td>n</td><td># parameters</td><td>MNIST Test Accuracy</td><td>Permuted MNIST Test Accuracy</td></tr><tr><td>scoRNN</td><td>170</td><td>~16k</td><td>0.973</td><td>0.943</td></tr><tr><td>scoRNN</td><td>360</td><td>~69k</td><td>0.983</td><td>0.962</td></tr><tr><td>scoRNN</td><td>512</td><td>~137k</td><td>0.985</td><td>0.966</td></tr><tr><td>LSTM</td><td>128</td><td>~68k</td><td>0.987</td><td>0.920</td></tr><tr><td>LSTM</td><td>256</td><td>~ 270k</td><td>0.989</td><td>0.929</td></tr><tr><td>LSTM</td><td>512</td><td>≈1,058k</td><td>0.985</td><td>0.920</td></tr><tr><td>Restricted-capacity uRNN</td><td>512</td><td>~16k</td><td>0.976</td><td>0.945</td></tr><tr><td>Restricted-capacity uRNN</td><td>2170</td><td>~69k</td><td>0.984</td><td>0.953</td></tr><tr><td>Full-capacity uRNN</td><td>116</td><td>~16k</td><td>0.947</td><td>0.925</td></tr><tr><td>Full-capacity uRNN</td><td>512</td><td>~ 270k</td><td>0.974</td><td>0.947</td></tr></table>
|
| 174 |
+
|
| 175 |
+
In both experiments, the 170 hidden unit scoRNN gives similar performance to both of the 512 hidden unit uRNNs using a much smaller hidden dimension and, in the case of the full-capacity uRNN, an order of magnitude fewer parameters. Matching the number of parameters $( \approx 6 9 k )$ ), the 2170 restricted-capacity uRNN performance was comparable to the 360 hidden unit scoRNN for unpermuted MNIST, but performed worse for permuted MNIST, and required a much larger hidden size and a significantly longer run time, see Appendix D. As in experiments presented in Arjovsky et al. (2016) and Wisdom et al. (2016), orthogonal and unitary RNNs are unable to outperform the LSTM in the unpermuted case. However, the 360 and 512 hidden unit scoRNNs outperform the unitary RNNs. On permuted MNIST, the 512 hidden unit scoRNN achieves a test-set accuracy of $9 6 . 6 \%$ , outperforming all of the uRNNs and LSTMs. We believe this is a state of the art result.
|
| 176 |
+
|
| 177 |
+
# 5.4 TIMIT SPEECH DATASET
|
| 178 |
+
|
| 179 |
+
To see how the models performed on audio data, speech prediction was performed on the TIMIT dataset (Garofolo et al., 1993), a collection of real-world speech recordings. Excluding the dialect SA sentences and using only the core test set, the dataset consisted of 3,696 training and 192 testing audio files. Similar to experiments in Wisdom et al. (2016), audio files were downsampled to ${ \mathrm { 8 k H z } }$ and a short-time Fourier transform (STFT) was applied with a Hann window of 256 samples and a window hop of 128 samples (16 milliseconds). The result is a set of frames, each with 129 complexvalued Fourier amplitudes. The log-magnitude of these amplitudes is used as the input data for the machines. Each frame was fed into the machine sequentially, and at each time step $t$ , the machine’s target output is to predict the $t + 1$ frame. For each model, the hidden layer sizes were adjusted such that each model had approximately equal numbers of trainable parameters. For scoRNN, we used the Adam optimizer with learning rate $1 0 ^ { - 3 }$ to train the input and output parameters, and RMSprop with a learning rate of $1 0 ^ { - 3 }$ (for $n = 2 2 4 ,$ ) or $1 0 ^ { - 4 }$ (for $n = 3 2 2$ and $n = 4 2 5$ ) to train the recurrent weight matrix. The number of negative eigenvalues used was $\rho = n / 1 0$ .
|
| 180 |
+
|
| 181 |
+

|
| 182 |
+
Figure 3: Test accuracy for unpermuted and permuted MNIST over time. All scoRNN models and only the best performing models for each other architectures are shown.
|
| 183 |
+
|
| 184 |
+
The loss function used for training was the mean squared error (MSE) between the predicted and actual log-magnitudes of the next time frame over the entire sequence. Table 2 contains the MSE on validation and testing sets, which shows that all scoRNN models achieve a smaller MSE than all LSTM and unitary RNN models. Similar to Wisdom et al. (2016), we reconstructed audio files using the predicted log-magnitudes from each machine and evaluated them on several audio metrics. We found that the scoRNN predictions achieved better scores on the signal-to-noise ratio metric SegSNR (Brookes et al., 1997), but performed slightly worse than the full-capacity uRNN predictions on the human intelligibility and perception metrics STOI (Taal et al., 2011) and PESQ (Rix et al., 2001).
|
| 185 |
+
|
| 186 |
+
Table 2: Results for the TIMIT speech dataset. Evaluation based on MSE and various audio metrics
|
| 187 |
+
|
| 188 |
+
<table><tr><td>Model</td><td>n</td><td># params</td><td>Valid. MSE</td><td>Eval. MSE</td><td>Model</td><td>n</td><td># params</td><td>Valid. MSE</td><td>Eval. MSE</td></tr><tr><td>scoRNN</td><td>224</td><td>~83k</td><td>9.26</td><td>8.50</td><td>Rest.uRNN</td><td>158</td><td>~83k</td><td>15.57</td><td>18.51</td></tr><tr><td>scoRNN</td><td>322</td><td>~135k</td><td>8.48</td><td>7.82</td><td>Rest.uRNN</td><td>256</td><td>~135k</td><td>15.90</td><td>15.31</td></tr><tr><td>scoRNN</td><td>425</td><td>~ 200k</td><td>7.97</td><td>7.36</td><td>Rest. uRNN</td><td>378</td><td>~ 200k</td><td>16.00</td><td>15.15</td></tr><tr><td>LSTM</td><td>84</td><td>~83k</td><td>18.43</td><td>17.18</td><td>Full uRNN</td><td>128</td><td>~83k</td><td>15.07</td><td>14.58</td></tr><tr><td>LSTM</td><td>120</td><td>~135k</td><td>17.05</td><td>15.91</td><td>Full uRNN</td><td>192</td><td>≈135k</td><td>15.10</td><td>14.50</td></tr><tr><td>LSTM</td><td>158</td><td>~ 200k</td><td>16.33</td><td>16.06</td><td>Full uRNN</td><td>256</td><td>~ 200k</td><td>14.96</td><td>14.69</td></tr></table>
|
| 189 |
+
|
| 190 |
+
# 6 CONCLUSION
|
| 191 |
+
|
| 192 |
+
There have been recent breakthroughs with RNN architectures using unitary recurrent weight matrices to address the vanishing/exploding gradient problem. These unitary RNNs are implemented with complex valued matrices and require additional complexity in computation. Unlike unitary RNNs, the scoRNN developed in this paper uses real valued orthogonal recurrent weight matrices with a simpler implementation scheme by parametrizing with a skew-symmetric matrix. The resulting model’s additive update step is in the direction of steepest descent with respect to this parametrization, and maintains the orthogonality of the recurrent weight matrix in the presence of roundoff errors. Results from our experiments show that scoRNN can achieve superior performance to unitary RNNs, in some cases with many fewer trainable parameters than other models.
|
| 193 |
+
|
| 194 |
+
# REFERENCES
|
| 195 |
+
|
| 196 |
+
Martin Arjovsky, Amar Shah, and Yoshua Bengio. Unitary evolution recurrent neural networks. In Proceedings of the 2016 International Conference on Machine Learning, volume 48, pp. 1120– 1128, New York, New York, USA, 2016. JMLR.
|
| 197 |
+
|
| 198 |
+
Yoshua Bengio, Paolo Frasconi, and Patrice Simard. The problem of learning long-term dependencies in recurrent networks. pp. 1183–1195, San Francisco, CA, USA, 1993. IEEE Press.
|
| 199 |
+
|
| 200 |
+
Mike Brookes et al. Voicebox: Speech processing toolbox for matlab. Software, available [Mar. 2011] from www. ee. ic. ac. uk/hp/staff/dmb/voicebox/voicebox. html, 47, 1997.
|
| 201 |
+
|
| 202 |
+
Kyunghyun Cho, Bart van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder-decoder approaches, 2014. URL https://arxiv. org/abs/1409.1259.
|
| 203 |
+
|
| 204 |
+
John Garofolo, Lori Lamel, William Fisher, Jonathan Fiscus, David Pallett, Nancy Dahlgren, and Victor Zue. Timit acoustic-phonetic continuous speech corpus ldc93s1. Technical report, Philadelphia: Linguistic Data Consortium, 1993.
|
| 205 |
+
|
| 206 |
+
Mikael Henaff, Arthur Szlam, and Yann LeCun. Recurrent orthogonal networks and long-memory tasks. In Proceedings of the 33rd International Conference on Machine Learning, volume 48, New York, NY, USA, 2017. JMLR: W&CP.
|
| 207 |
+
|
| 208 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. In ¨ Neural Computation 9(8), pp. 1735–1780, 1997.
|
| 209 |
+
|
| 210 |
+
Li Jing, Yichen Shen, Tena Dubcek, John Peurifoy, Scott Skirlo, Max Tegmark, and Marin Solja ˇ ciˇ c.´ Tunable efficient unitary neural networks (eunn) and their application to rnn. arXiv preprint arXiv:1612.05231, 2016.
|
| 211 |
+
|
| 212 |
+
Li Jing, C¸ alar Gulc¸ehre, John Peurifoy, Yichen Shen, Max Tegmark, Marin Solja ¨ ciˇ c, and Yoshua ´ Bengio. Gated orthogonal recurrent units: On learning to forget. 2017. URL https://arxiv. org/abs/1706.02761.
|
| 213 |
+
|
| 214 |
+
William Kahan. Is there a small skew cayley transform with zero diagonal? Linear algebra and its applications, 417(2-3):335–341, 2006.
|
| 215 |
+
|
| 216 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 217 |
+
|
| 218 |
+
Quoc V. Le, Navdeep Jaitly, and Geoffrey E. Hinton. A simple way to initialize recurrent networks of rectified linear units, 2015. URL https://arxiv.org/abs/1504.00941.
|
| 219 |
+
|
| 220 |
+
Yann LeCun, Corinna Cortes, and Christopher J.C. Burges. The mnist database. URL http: //yann.lecun.com/exdb/mnist/.
|
| 221 |
+
|
| 222 |
+
Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In 27th International Conference on Machine Learning, Haifa, Israel, 2010.
|
| 223 |
+
|
| 224 |
+
Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In 30th International Conference on Machine Learning, Atlanta, Georgia, USA, 2013.
|
| 225 |
+
|
| 226 |
+
Antony W Rix, John G Beerends, Michael P Hollier, and Andries P Hekstra. Perceptual evaluation of speech quality (pesq)-a new method for speech quality assessment of telephone networks and codecs. In Acoustics, Speech, and Signal Processing, 2001. Proceedings.(ICASSP’01). 2001 IEEE International Conference on, volume 2, pp. 749–752. IEEE, 2001.
|
| 227 |
+
|
| 228 |
+
Cees H Taal, Richard C Hendriks, Richard Heusdens, and Jesper Jensen. An algorithm for intelligibility prediction of time–frequency weighted noisy speech. IEEE Transactions on Audio, Speech, and Language Processing, 19(7):2125–2136, 2011.
|
| 229 |
+
|
| 230 |
+
Hemant D. Tagare. Notes on optimization on stiefel manifolds. Technical report, Yale University, 2011.
|
| 231 |
+
|
| 232 |
+
Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2):26– 31, 2012.
|
| 233 |
+
|
| 234 |
+
Eugene Vorontsov, Chiheb Trabelsi, Samuel Kadoury, and Chris Pal. On orthogonality and learning recurrent networks with long term dependencies. arXiv preprint arXiv:1702.00071, 2017.
|
| 235 |
+
|
| 236 |
+
Zaiwen Wen and Wotao Yin. A feasible method for optimization with orthogonality constraints. In Mathematical Programming, volume 142(1-2), pp. 397–434. 2013.
|
| 237 |
+
|
| 238 |
+
Scott Wisdom, Thomas Powers, John Hershey, Jonathan Le Roux, and Les Atlas. Full-capacity unitary recurrent neural networks. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett (eds.), Advances in Neural Information Processing Systems 29, pp. 4880–4888. Curran Associates, Inc., 2016.
|
| 239 |
+
|
| 240 |
+
# APPENDIX A: PROOF OF THEOREM 3.2
|
| 241 |
+
|
| 242 |
+
For completeness, we restate and prove Theorem 3.2.
|
| 243 |
+
|
| 244 |
+
Theorem 3.2 Let $L = L ( W ) : \mathbb { R } ^ { n \times n } \mathbb { R }$ be some differentiable loss function for an RNN with the recurrent weight matrix $W$ . Let $W = W ( A ) : = \left( I + A \right) ^ { - 1 } \left( I - A \right) D$ where $A \in \mathbb { R } ^ { n \times n }$ is skew-symmetric and $D \in \mathbb { R } ^ { n \times n }$ is a fixed diagonal matrix consisting of - $\mathbf { \xi } _ { l }$ and $I$ entries. Then the gradient of $L = L ( W ( A ) )$ with respect to $A$ is
|
| 245 |
+
|
| 246 |
+
$$
|
| 247 |
+
\frac { \partial L } { \partial A } = V ^ { T } - V
|
| 248 |
+
$$
|
| 249 |
+
|
| 250 |
+
where $\begin{array} { r } { V : = { ( I + A ) } ^ { - T } \frac { \partial L } { \partial W } \left( D + W ^ { T } \right) , \frac { \partial L } { \partial A } = \left[ \frac { \partial L } { \partial A _ { i , j } } \right] \in \mathbb { R } ^ { n \times n } , } \end{array}$ , and $\begin{array} { r } { \frac { \partial L } { \partial W } = \left[ \frac { \partial L } { \partial W _ { i , j } } \right] \in \mathbb { R } ^ { n \times n } } \end{array}$
|
| 251 |
+
|
| 252 |
+
Proof: Let $Z : = ( I + A ) ^ { - 1 } ( I - A )$ . We consider the $( i , j )$ entry of $\textstyle { \frac { \partial L } { \partial A } }$ . Taking the derivative with respect to $A _ { i , j }$ where $i \neq j$ we obtain:
|
| 253 |
+
|
| 254 |
+
$$
|
| 255 |
+
{ \frac { \partial L } { \partial A _ { i , j } } } = \sum _ { k , l = 1 } ^ { n } { \frac { \partial L } { \partial W _ { k , l } } } { \frac { \partial W _ { k , l } } { \partial A _ { i , j } } } = \sum _ { k , l = 1 } ^ { n } { \frac { \partial L } { \partial W _ { k , l } } } D _ { l , l } { \frac { \partial Z _ { k , l } } { \partial A _ { i , j } } } = \operatorname { t r } \left[ \left( { \frac { \partial L } { \partial W } } D \right) ^ { T } { \frac { \partial Z } { \partial A _ { i , j } } } \right]
|
| 256 |
+
$$
|
| 257 |
+
|
| 258 |
+
Using the identity $\left( I + A \right) Z = I - A$ and taking the derivative with respect to $A _ { i , j }$ to both sides we obtain:
|
| 259 |
+
|
| 260 |
+
$$
|
| 261 |
+
{ \frac { \partial Z } { \partial A _ { i , j } } } + { \frac { \partial A } { \partial A _ { i , j } } } Z + A { \frac { \partial Z } { \partial A _ { i , j } } } = - { \frac { \partial A } { \partial A _ { i , j } } }
|
| 262 |
+
$$
|
| 263 |
+
|
| 264 |
+
and rearranging we get:
|
| 265 |
+
|
| 266 |
+
$$
|
| 267 |
+
{ \frac { \partial Z } { \partial A _ { i , j } } } = - \left( I + A \right) ^ { - 1 } \left( { \frac { \partial A } { \partial A _ { i , j } } } + { \frac { \partial A } { \partial A _ { i , j } } } Z \right)
|
| 268 |
+
$$
|
| 269 |
+
|
| 270 |
+
Let $E _ { i , j }$ denote the matrix whose $( i , j )$ entry is 1 with all others being 0. Since $A$ is skew-symmetric, we have $\begin{array} { r } { \frac { \partial A } { \partial A _ { i , j } } = E _ { i , j } - E _ { j , i } } \end{array}$ . Combining everything, we have:
|
| 271 |
+
|
| 272 |
+
$$
|
| 273 |
+
\begin{array} { r l } & { \frac { \partial L } { \partial A _ { i , j } } = - \mathrm { u r } \left[ \left( \frac { \partial L } { \partial W } D \right) ^ { \boldsymbol { \mathsf { T } } } ( \boldsymbol { I } + \boldsymbol { A } ) ^ { - 1 } \left( E _ { s , j } - E _ { s , i } + E _ { i , j } \boldsymbol { Z } - E _ { s , i } \boldsymbol { Z } \right) \right] } \\ & { \qquad = - \mathrm { u r } \left[ \left( \frac { \partial L } { \partial W } D \right) ^ { \boldsymbol { \mathsf { T } } } ( \boldsymbol { I } + \boldsymbol { A } ) ^ { - 1 } E _ { s , j } \right] + \mathrm { t r } \left[ \left( \frac { \partial L } { \partial W } D \right) ^ { \boldsymbol { \mathsf { T } } } ( \boldsymbol { I } + \boldsymbol { A } ) ^ { - 1 } E _ { s , i } \right] } \\ & { \qquad - \mathrm { u r } \left[ \left( \frac { \partial L } { \partial W } D \right) ^ { \boldsymbol { \mathsf { T } } } ( \boldsymbol { I } + \boldsymbol { A } ) ^ { - 1 } E _ { s , j } \boldsymbol { Z } \right] + \mathrm { t r } \left[ \left( \frac { \partial L } { \partial W } D \right) ^ { \boldsymbol { \mathsf { T } } } ( \boldsymbol { I } + \boldsymbol { A } ) ^ { - 1 } E _ { s , i } \boldsymbol { Z } \right] } \\ & { \qquad = - \left[ \left( \left( \frac { \partial L } { \partial W } D \right) ^ { \boldsymbol { \mathsf { T } } } ( \boldsymbol { I } + \boldsymbol { A } ) ^ { - 1 } \right) ^ { \boldsymbol { \mathsf { T } } } \right] _ { i , j } + \left[ \left( \frac { \partial L } { \partial W } D \right) ^ { \boldsymbol { \mathsf { T } } } ( \boldsymbol { I } + \boldsymbol { A } ) ^ { - 1 } \right] _ { i , j } } \\ & { \qquad - \left[ \left( \left( \frac { \partial L } { \partial W } D \right) ^ { \boldsymbol { \mathsf { T } } } ( \boldsymbol { I } + \boldsymbol { A } ) ^ { - 1 } \right) ^ { \boldsymbol { \mathsf { T } } } \boldsymbol { Z } ^ { \boldsymbol { \mathsf { T } } } \right] _ { i , j } + \left[ \left( \frac { \partial L } { \partial W } D \right) ^ { \boldsymbol { \mathsf { T } } } ( \boldsymbol { I } + \boldsymbol { A } ) ^ { - 1 } \right] _ { i , j } } \end{array}
|
| 274 |
+
$$
|
| 275 |
+
|
| 276 |
+
$$
|
| 277 |
+
\begin{array} { r l } & { = \left[ \left( I + Z \right) \left( \frac { \partial L } { \partial W } D \right) ^ { T } \left( I + A \right) ^ { - 1 } \right] _ { i , j } - \left[ \left( \left( \frac { \partial L } { \partial W } D \right) ^ { T } \left( I + A \right) ^ { - 1 } \right) ^ { T } \left( I + Z ^ { T } \right) \right] _ { i , j } } \\ & { = \left[ \left( D + W \right) \left( \frac { \partial L } { \partial W } \right) ^ { T } \left( I + A \right) ^ { - 1 } \right] _ { i , j } - \left[ \left( I + A \right) ^ { - T } \frac { \partial L } { \partial W } \left( D + W ^ { T } \right) \right] _ { i , j } } \end{array}
|
| 278 |
+
$$
|
| 279 |
+
|
| 280 |
+
Using the above formulation, ∂L∂Aj,j $\begin{array} { r } { \frac { \partial L } { \partial A _ { j , j } } = 0 } \end{array}$ and $\begin{array} { r } { \frac { \partial L } { \partial A _ { i , j } } = - \frac { \partial L } { \partial A _ { j , i } } } \end{array}$ so that $\frac { \partial L } { \partial A }$ is a skew-symmetric matrix.
|
| 281 |
+
Finally, by the definition of $V$ we get the desired result.
|
| 282 |
+
|
| 283 |
+
# APPENDIX B: LOSS OF ORTHOGONALITY
|
| 284 |
+
|
| 285 |
+
In the scoRNN architecture, the recurrent weight matrix is parameterized with a skew-symmetric matrix through the Cayley transform. This ensures the computed recurrent weight matrix in floating point arithmetic is orthogonal to the order of machine precision after each update step. Unlike scoRNN, the full-capacity uRNN maintains a unitary recurrent weight matrix by a multiplicative update scheme. Due to the accumulation of rounding errors over a large number of repeated matrix multiplications, the recurrent weight may not remain unitary throughout training. To investigate this, we ran the scoRNN and full-capacity uRNN with equal hidden unit sizes of $n = 5 1 2$ on the unpermuted MNIST experiment and checked for loss of orthogonality at each epoch. The results of this experiment are shown in Figure 4. As can be seen, the recurrent weight matrix for the fullcapacity uRNN becomes less unitary over time, but the orthogonality recurrent weight matrix for scoRNN is not affected by roundoff errors.
|
| 286 |
+
|
| 287 |
+

|
| 288 |
+
Figure 4: Unitary scores $( \| W ^ { * } W - I \| _ { F } )$ for the full-capacity uRNN recurrent weight matrix and orthogonality scores $( \| W ^ { T } W - I \| _ { F } ) \cdot$ for the scoRNN recurrent weight matrix using a GPU on the pixel-by-pixel MNIST experiment.
|
| 289 |
+
|
| 290 |
+
# APPENDIX C: VANISHING GRADIENTS
|
| 291 |
+
|
| 292 |
+
As discussed in Arjovsky et al. (2016), the vanishing/exploding gradient problem is caused by rapid growth or decay of the gradient of the hidden state $\frac { \partial \dot { L } } { \partial h _ { t } }$ as we move earlier in the sequence (that is, as $t$ decreases). To see if vanishing/exploding gradients affect the scoRNN model, we examined hidden state gradients in the scoRNN and LSTM models on the adding problem experiment (see section 5.2) with sequence length $T = 5 0 0$ .
|
| 293 |
+
|
| 294 |
+
The norms of these gradients are shown at two different points in time during training in Figure 5. As can be seen, LSTM gradient norms decrease steadily as we move away from the end of the sequence. The right half of Figure 5 shows that this vanishing effect is exacerbated by training after 300 iterations.
|
| 295 |
+
|
| 296 |
+
In contrast, scoRNN gradients decay by less than an order of magnitude at the beginning of training, remaining near $1 0 ^ { - 2 }$ for all timesteps. Even after 300 iterations of training, scoRNN hidden state gradients decay only slightly, from $1 0 ^ { - 3 }$ at $t = 5 0 0$ to $1 0 ^ { - 4 }$ at $t = 0$ . This allows information to easily propagate from the beginning of the sequence to the end.
|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
Figure 5: Gradient norms $\parallel \frac { \partial L } { \partial h _ { t } } \parallel$ for scoRNN and LSTM models during training on the adding problem. The $x$ -axis shows different values of $t$ . The left plot shows gradients at the beginning of training, and the right shows gradients after 300 training iterations.
|
| 300 |
+
|
| 301 |
+
# APPENDIX D: COMPLEXITY AND SPEED
|
| 302 |
+
|
| 303 |
+
The scoRNN architecture is similar in complexity and memory usage to a standard RNN except for the additional memory requirement of storing the $n ( n - 1 ) / 2$ entries of the skew-symmetric matrix $A$ and the additional complexity of forming the recurrent weight matrix $W$ from $A$ with the scaled Cayley transform. We note that the recurrent weight matrix is generated from the skew-symmetric $A$ matrix only once per training iteration; this computational cost is small compared to the cost of the forward and backward propagations through all time steps in a training batch for a standard RNN.
|
| 304 |
+
|
| 305 |
+
Table 3: Timing results for the unpermuted MNIST dataset.
|
| 306 |
+
|
| 307 |
+
<table><tr><td>Model</td><td>n</td><td># params</td><td>Minutes Per Epoch</td></tr><tr><td>scoRNN</td><td>170</td><td>~16k</td><td>5.3</td></tr><tr><td>Rest.uRNN</td><td>512</td><td>~16k</td><td>8.2</td></tr><tr><td>Full uRNN</td><td>116</td><td>~ 16k</td><td>10.8</td></tr><tr><td>LSTM</td><td>128</td><td>~ 68k</td><td>5.0</td></tr><tr><td>scoRNN</td><td>360</td><td>~ 69k</td><td>7.4</td></tr><tr><td>Rest.uRNN</td><td>2,170</td><td>~ 69k</td><td>50.1</td></tr><tr><td>scoRNN</td><td>512</td><td>~ 137k</td><td>11.2</td></tr><tr><td>Full uRNN</td><td>360</td><td>≈137k</td><td>25.8</td></tr><tr><td>LSTM</td><td>256</td><td>~ 270k</td><td>5.2</td></tr><tr><td>Full uRNN</td><td>512</td><td>~ 270k</td><td>27.9</td></tr><tr><td>LSTM</td><td>512</td><td>~1,058k</td><td>5.6</td></tr></table>
|
| 308 |
+
|
| 309 |
+
To experimentally quantify potential differences between scoRNN and the other models, the real run-time for the models on the unpermuted MNIST experiment were recorded and are included in Table 3. All models were run on the same machine, which has an Intel Core i5-7400 processor and an nVidia GeForce GTX 1080 GPU. The scoRNN and LSTM models were run in Tensorflow, while the full and restricted capacity uRNNs were run using code provided in Wisdom et al. (2016).
|
| 310 |
+
|
| 311 |
+
The LSTM model was fastest, and hidden sizes largely did not affect time taken per epoch; we suspect this is because the LSTM model we used was built in to Tensorflow. The LSTMs are of simialr speed to the $n = 1 7 0$ scoRNN, while they are approximately twice as fast as the $n =$ 512 scoRNN. Matching the number of hidden parameters, the scoRNN model with $n = 1 7 0$ is approximately 1.5 times faster than the restricted-capacity uRNN with $n = 5 1 2$ , and twice as fast as the full-capacity uRNN with $n = 1 1 6$ . This relationship can also be seen in the scoRNN and full-capacity uRNN models with $\approx 1 3 7 k$ parameters, where the scoRNN takes 11.2 minutes per epoch as compared to 25.8 minutes for the scoRNN.
|
parse/train/HyEi7bWR-/HyEi7bWR-_content_list.json
ADDED
|
@@ -0,0 +1,1610 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "ORTHOGONAL RECURRENT NEURAL NETWORKS WITH SCALED CAYLEY TRANSFORM ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
176,
|
| 8 |
+
98,
|
| 9 |
+
823,
|
| 10 |
+
146
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 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": "Recurrent Neural Networks (RNNs) are designed to handle sequential data but suffer from vanishing or exploding gradients. Recent work on Unitary Recurrent Neural Networks (uRNNs) have been used to address this issue and in some cases, exceed the capabilities of Long Short-Term Memory networks (LSTMs). We propose a simpler and novel update scheme to maintain orthogonal recurrent weight matrices without using complex valued matrices. This is done by parametrizing with a skew-symmetric matrix using the Cayley transform. Such a parametrization is unable to represent matrices with negative one eigenvalues, but this limitation is overcome by scaling the recurrent weight matrix by a diagonal matrix consisting of ones and negative ones. The proposed training scheme involves a straightforward gradient calculation and update step. In several experiments, the proposed scaled Cayley orthogonal recurrent neural network (scoRNN) achieves superior results with fewer trainable parameters than other unitary RNNs. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
265,
|
| 43 |
+
766,
|
| 44 |
+
444
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
468,
|
| 55 |
+
336,
|
| 56 |
+
484
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Deep neural networks have been used to solve numerical problems of varying complexity. RNNs have parameters that are reused at each time step of a sequential data point and have achieved state of the art performance on many sequential learning tasks. Nearly all optimization algorithms for neural networks involve some variant of gradient descent. One major obstacle to training RNNs with gradient descent is due to vanishing or exploding gradients, as described in Bengio et al. (1993) and Pascanu et al. (2013). This problem refers to the tendency of gradients to grow or decay exponentially in size, resulting in gradient descent steps that are too small to be effective or so large that the network oversteps the local minimum. This issue significantly diminishes RNNs’ ability to learn time-based dependencies, particularly in problems with long input sequences. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
174,
|
| 65 |
+
498,
|
| 66 |
+
825,
|
| 67 |
+
625
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "A variety of architectures have been introduced to overcome this difficulty. The current preferred RNN architectures are those that introduce gating mechanisms to control when information is retained or discarded, such as LSTMs (Hochreiter & Schmidhuber, 1997) and GRUs (Cho et al., 2014), at the cost of additional trainable parameters. More recently, the unitary evolution RNN (uRNN) (Arjovsky et al., 2016) uses a parametrization that forces the recurrent weight matrix to remain unitary throughout training, and exhibits superior performance to LSTMs on a variety of synthetic and real-world tasks. For clarity, we follow the convention of Wisdom et al. (2016) and refer to this network as the restricted-capacity uRNN. ",
|
| 74 |
+
"bbox": [
|
| 75 |
+
174,
|
| 76 |
+
631,
|
| 77 |
+
825,
|
| 78 |
+
742
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "text",
|
| 84 |
+
"text": "Since the introduction of uRNNs, orthogonal and unitary RNN schemes have increased in both popularity and complexity. Wisdom et al. (2016) use a multiplicative update method detailed in Tagare (2011) and Wen & Yin (2013) to expand uRNNs’ capacity to include all unitary matrices. These networks are referred to as full-capacity uRNNs. Jing et al. (2016)’s EURNN parametrizes this same space with Givens rotations, while Jing et al. (2017)’s GORU introduces a gating mechanism for unitary RNNs to enable short term memory. Vorontsov et al. (2017) introduced modified optimization and regularization methods that restrict singular values of the recurrent matrix to an interval around 1. Each of these methods involve complex valued recurrent weights. For other work in addressing the vanishing and exploding gradient problem, see Henaff et al. (2017) and Le et al. (2015). ",
|
| 85 |
+
"bbox": [
|
| 86 |
+
174,
|
| 87 |
+
750,
|
| 88 |
+
825,
|
| 89 |
+
875
|
| 90 |
+
],
|
| 91 |
+
"page_idx": 0
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"type": "text",
|
| 95 |
+
"text": "In this paper, we consider RNNs with a recurrent weight matrix taken from the set of all orthogonal matrices. To construct the orthognal weight matrix, we parametrize it with a skew-symmetric matrix through a scaled Cayley transform. This scaling allows us to avoid the singularity issue occuring for $- 1$ eigenvalues that may arise in the standard Cayley transform. With the parameterization, the network optimization involves a relatively simple gradient descent update. The resulting method achieves superior performance on sequential data tasks with a smaller number of trainable parameters and hidden sizes than other unitary RNNs and LSTMs. ",
|
| 96 |
+
"bbox": [
|
| 97 |
+
176,
|
| 98 |
+
882,
|
| 99 |
+
823,
|
| 100 |
+
924
|
| 101 |
+
],
|
| 102 |
+
"page_idx": 0
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "",
|
| 107 |
+
"bbox": [
|
| 108 |
+
174,
|
| 109 |
+
103,
|
| 110 |
+
823,
|
| 111 |
+
159
|
| 112 |
+
],
|
| 113 |
+
"page_idx": 1
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "The method we present in this paper works entirely with real matrices, and as such, our results deal only with orthogonal and skew-symmetric matrices. However, the method and all related theory remain valid for unitary and skew-Hermitian matrices in the complex case. The experimental results in this paper indicate that state of the art performance can be achieved without the increased complexity of optimization along the Stiefel manifold and using complex matrices. ",
|
| 118 |
+
"bbox": [
|
| 119 |
+
173,
|
| 120 |
+
166,
|
| 121 |
+
825,
|
| 122 |
+
237
|
| 123 |
+
],
|
| 124 |
+
"page_idx": 1
|
| 125 |
+
},
|
| 126 |
+
{
|
| 127 |
+
"type": "text",
|
| 128 |
+
"text": "2 BACKGROUND ",
|
| 129 |
+
"text_level": 1,
|
| 130 |
+
"bbox": [
|
| 131 |
+
174,
|
| 132 |
+
261,
|
| 133 |
+
326,
|
| 134 |
+
277
|
| 135 |
+
],
|
| 136 |
+
"page_idx": 1
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "text",
|
| 140 |
+
"text": "2.1 RECURRENT NEURAL NETWORKS",
|
| 141 |
+
"text_level": 1,
|
| 142 |
+
"bbox": [
|
| 143 |
+
174,
|
| 144 |
+
295,
|
| 145 |
+
450,
|
| 146 |
+
309
|
| 147 |
+
],
|
| 148 |
+
"page_idx": 1
|
| 149 |
+
},
|
| 150 |
+
{
|
| 151 |
+
"type": "text",
|
| 152 |
+
"text": "A recurrent neural network (RNN) is a function with input parameters $U \\in \\mathbb { R } ^ { n \\times m }$ , recurrent parameters $W \\in \\mathbb { R } ^ { n \\times n }$ , recurrent bias $b \\in \\mathbb { R } ^ { n }$ , output parameters $V \\in \\mathbb { R } ^ { p \\times n }$ , and output bias $c \\in \\mathbb { R } ^ { p }$ where $m$ is the data input size, $n$ is the number of hidden units, and $p$ is the output data size. From an input sequence ${ \\boldsymbol { x } } = ( x _ { 1 } , x _ { 2 } , . . . , x _ { T } )$ where $x _ { i } \\in \\mathbb { R } ^ { m }$ , the RNN returns an output sequence $y = ( y _ { 1 } , y _ { 2 } , . . . , y _ { T } )$ where each $y _ { i } \\in \\mathbb { R } ^ { p }$ is given recursively by ",
|
| 153 |
+
"bbox": [
|
| 154 |
+
173,
|
| 155 |
+
321,
|
| 156 |
+
825,
|
| 157 |
+
393
|
| 158 |
+
],
|
| 159 |
+
"page_idx": 1
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"type": "equation",
|
| 163 |
+
"img_path": "images/c51fc12dd66b662d3ef4a59529799078ee4d3358c1af56b6462aa54aa97071a3.jpg",
|
| 164 |
+
"text": "$$\n\\begin{array} { l } { { h _ { t } = \\sigma \\left( U { { x _ { t } } } + W { { h _ { t - 1 } } } + b \\right) } } \\\\ { { y _ { t } = V { { h _ { t } } } + c } } \\end{array} \\quad\n$$",
|
| 165 |
+
"text_format": "latex",
|
| 166 |
+
"bbox": [
|
| 167 |
+
403,
|
| 168 |
+
402,
|
| 169 |
+
594,
|
| 170 |
+
439
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 1
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "text",
|
| 176 |
+
"text": "where $h = ( h _ { 0 } , \\ldots , h _ { T - 1 } )$ , $\\boldsymbol { h } _ { i } \\in \\mathbb { R } ^ { n }$ is the hidden layer state at time $i$ and $\\sigma ( \\cdot )$ is the activation function, which is often a pointwise nonlinearity such as a hyperbolic tangent function or rectified linear unit (Nair & Hinton, 2010). ",
|
| 177 |
+
"bbox": [
|
| 178 |
+
174,
|
| 179 |
+
448,
|
| 180 |
+
825,
|
| 181 |
+
491
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 1
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "2.2 UNITARY RNNS ",
|
| 188 |
+
"text_level": 1,
|
| 189 |
+
"bbox": [
|
| 190 |
+
176,
|
| 191 |
+
512,
|
| 192 |
+
328,
|
| 193 |
+
526
|
| 194 |
+
],
|
| 195 |
+
"page_idx": 1
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "A real matrix $W$ is orthogonal if it satisfies $W ^ { T } W = I$ . The complex analog of orthogonal matrices are unitary matrices, which satisfy $W ^ { * } W = I$ , where $^ *$ denotes the conjugate transpose. Orthogonal and unitary matrices have the desirable property that $\\| W x \\| _ { 2 } = \\| x \\| _ { 2 }$ for any vector $x$ . This property motivates the use of orthogonal or unitary matrices in RNNs to avoid vanishing and exploding gradients, as detailed in Arjovsky et al. (2016). ",
|
| 200 |
+
"bbox": [
|
| 201 |
+
174,
|
| 202 |
+
539,
|
| 203 |
+
825,
|
| 204 |
+
609
|
| 205 |
+
],
|
| 206 |
+
"page_idx": 1
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"type": "text",
|
| 210 |
+
"text": "Arjovsky et al. (2016) follow the framework of the previous section for their restricted-capacity uRNN, but introduce a parametrization of the recurrent matrix $W$ using a product of simpler matrices. This parameterization is given by a product consisting of diagonal matrices with complex norm 1, complex Householder reflection matrices, discrete Fourier transform matrices, and a fixed permutation matrix with the resulting product being unitary. ",
|
| 211 |
+
"bbox": [
|
| 212 |
+
174,
|
| 213 |
+
616,
|
| 214 |
+
825,
|
| 215 |
+
686
|
| 216 |
+
],
|
| 217 |
+
"page_idx": 1
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"type": "text",
|
| 221 |
+
"text": "Wisdom et al. (2016) note that this representation has only $_ { 7 n }$ parameters, which is insufficient to represent all unitary matrices for $n > 7$ . In response, they present the full-capacity uRNN, which uses a multiplicative update step that is able to reach all unitary matrices of order $n$ . ",
|
| 222 |
+
"bbox": [
|
| 223 |
+
174,
|
| 224 |
+
693,
|
| 225 |
+
825,
|
| 226 |
+
736
|
| 227 |
+
],
|
| 228 |
+
"page_idx": 1
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"type": "text",
|
| 232 |
+
"text": "The full-capacity uRNN aims to construct a unitary matrix $W ^ { ( k + 1 ) }$ from $W ^ { ( k ) }$ by moving along a curve on the Stiefel manifold $\\{ W \\in \\mathbb { C } ^ { n \\times n } \\mid \\dot { W } ^ { * } W = I \\}$ . For the network optimization, it is necessary to use a curve that is in a descent direction of the cost function $L : = L ( W )$ . In Tagare (2011), Wen & Yin (2013), and Wisdom et al. (2016), a descent direction is constructed as $B ^ { ( k ) } W ^ { ( k ) }$ , which is a representation of the derivative operator $D L ( W ^ { ( k ) } )$ in the tangent space of the Stiefel manifold at $W ^ { ( k ) }$ . Then, with $B ^ { ( k ) } W ^ { ( k ) }$ defining the direction of a descent curve, an update along the Stiefel manifold is obtained as ",
|
| 233 |
+
"bbox": [
|
| 234 |
+
173,
|
| 235 |
+
742,
|
| 236 |
+
825,
|
| 237 |
+
844
|
| 238 |
+
],
|
| 239 |
+
"page_idx": 1
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
"type": "equation",
|
| 243 |
+
"img_path": "images/a36b17d7de6117c7cc0da4e846b4597621cd0da725866d8843425075a8ee97de.jpg",
|
| 244 |
+
"text": "$$\nW ^ { ( k + 1 ) } = \\left( I + { \\frac { \\lambda } { 2 } } B ^ { ( k ) } \\right) ^ { - 1 } \\left( I - { \\frac { \\lambda } { 2 } } B ^ { ( k ) } \\right) W ^ { ( k ) }\n$$",
|
| 245 |
+
"text_format": "latex",
|
| 246 |
+
"bbox": [
|
| 247 |
+
333,
|
| 248 |
+
854,
|
| 249 |
+
665,
|
| 250 |
+
892
|
| 251 |
+
],
|
| 252 |
+
"page_idx": 1
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"type": "text",
|
| 256 |
+
"text": "where $\\lambda$ is the learning rate. ",
|
| 257 |
+
"bbox": [
|
| 258 |
+
174,
|
| 259 |
+
909,
|
| 260 |
+
357,
|
| 261 |
+
924
|
| 262 |
+
],
|
| 263 |
+
"page_idx": 1
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"type": "text",
|
| 267 |
+
"text": "3 SCALED CAYLEY ORTHOGONAL RNN ",
|
| 268 |
+
"text_level": 1,
|
| 269 |
+
"bbox": [
|
| 270 |
+
174,
|
| 271 |
+
101,
|
| 272 |
+
524,
|
| 273 |
+
118
|
| 274 |
+
],
|
| 275 |
+
"page_idx": 2
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
"type": "text",
|
| 279 |
+
"text": "3.1 CAYLEY TRANSFORM ",
|
| 280 |
+
"text_level": 1,
|
| 281 |
+
"bbox": [
|
| 282 |
+
174,
|
| 283 |
+
133,
|
| 284 |
+
367,
|
| 285 |
+
148
|
| 286 |
+
],
|
| 287 |
+
"page_idx": 2
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"type": "text",
|
| 291 |
+
"text": "The Cayley transform gives a bijection between the set of orthogonal matrices without $- 1$ eigenvalues and the set of skew-symmetric matrices (i.e., matrices where $A ^ { T } = - A$ ): ",
|
| 292 |
+
"bbox": [
|
| 293 |
+
173,
|
| 294 |
+
159,
|
| 295 |
+
823,
|
| 296 |
+
188
|
| 297 |
+
],
|
| 298 |
+
"page_idx": 2
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"type": "equation",
|
| 302 |
+
"img_path": "images/85e57c9eef65a9136b959d0de1118386a3b369fb6e3f3267c88f94536f644910.jpg",
|
| 303 |
+
"text": "$$\nW = \\left( I + A \\right) ^ { - 1 } \\left( I - A \\right) , \\qquad A = \\left( I + W \\right) ^ { - 1 } \\left( I - W \\right) .\n$$",
|
| 304 |
+
"text_format": "latex",
|
| 305 |
+
"bbox": [
|
| 306 |
+
289,
|
| 307 |
+
194,
|
| 308 |
+
707,
|
| 309 |
+
213
|
| 310 |
+
],
|
| 311 |
+
"page_idx": 2
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"type": "text",
|
| 315 |
+
"text": "We can use this bijection to parametrize the set of orthogonal matrices without $- 1$ eigenvalues using skew-symmetric matrices. This parametrization is attractive from a machine learning perspective because it is closed under addition: the sum or difference of two skew-symmetric matrices is also skew-symmetric, so we can use gradient descent algorithms like RMSprop (Tieleman $\\&$ Hinton, 2012) or Adam (Kingma & Ba, 2014) to train parameters. ",
|
| 316 |
+
"bbox": [
|
| 317 |
+
173,
|
| 318 |
+
219,
|
| 319 |
+
825,
|
| 320 |
+
290
|
| 321 |
+
],
|
| 322 |
+
"page_idx": 2
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"type": "text",
|
| 326 |
+
"text": "However, this parametrization cannot represent orthogonal matrices with $- 1$ eigenvalues, since in this case $I + W$ , is not invertible. Theoretically, we can still represent matrices with eigenvalues that are arbitrarily close to $- 1$ ; however, it can require large entries of $A$ . For example, a $2 \\mathbf { x } 2$ orthogonal matrix $W$ with eigenvalues $\\approx - 0 . 9 9 9 9 9 \\pm 0 . 0 0 4 4 7 i$ and its parametrization $A$ by the Cayley transform is given below. ",
|
| 327 |
+
"bbox": [
|
| 328 |
+
173,
|
| 329 |
+
296,
|
| 330 |
+
826,
|
| 331 |
+
367
|
| 332 |
+
],
|
| 333 |
+
"page_idx": 2
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"type": "equation",
|
| 337 |
+
"img_path": "images/78b2de0db8fd066b9cb54708ce400ccd509510af94ed3bda9bc687660bbf357e.jpg",
|
| 338 |
+
"text": "$$\nW = \\left[ \\begin{array} { c c } { { - 0 . 9 9 9 9 } } & { { - \\sqrt { 1 - 0 . 9 9 9 9 ^ { 2 } } } } \\\\ { { \\sqrt { 1 - 0 . 9 9 9 9 ^ { 2 } } } } & { { - 0 . 9 9 9 9 9 } } \\end{array} \\right] \\qquad A \\approx \\left[ \\begin{array} { c c } { { 0 } } & { { 4 4 7 . 2 1 2 } } \\\\ { { - 4 4 7 . 2 1 2 } } & { { 0 } } \\end{array} \\right]\n$$",
|
| 339 |
+
"text_format": "latex",
|
| 340 |
+
"bbox": [
|
| 341 |
+
210,
|
| 342 |
+
372,
|
| 343 |
+
787,
|
| 344 |
+
409
|
| 345 |
+
],
|
| 346 |
+
"page_idx": 2
|
| 347 |
+
},
|
| 348 |
+
{
|
| 349 |
+
"type": "text",
|
| 350 |
+
"text": "Gradient descent algorithms will learn this $A$ matrix very slowly, if at all. This difficulty can be overcome through a suitable diagonal scaling according to results from Kahan (2006). ",
|
| 351 |
+
"bbox": [
|
| 352 |
+
173,
|
| 353 |
+
414,
|
| 354 |
+
825,
|
| 355 |
+
443
|
| 356 |
+
],
|
| 357 |
+
"page_idx": 2
|
| 358 |
+
},
|
| 359 |
+
{
|
| 360 |
+
"type": "text",
|
| 361 |
+
"text": "Theorem 3.1 Every orthogonal matrix $W$ can be expressed as ",
|
| 362 |
+
"bbox": [
|
| 363 |
+
173,
|
| 364 |
+
449,
|
| 365 |
+
584,
|
| 366 |
+
464
|
| 367 |
+
],
|
| 368 |
+
"page_idx": 2
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"type": "equation",
|
| 372 |
+
"img_path": "images/c418a84621a05eb85ec4a6131c1a795831c4b036b405011be580e5ae40b42c45.jpg",
|
| 373 |
+
"text": "$$\nW = ( I + A ) ^ { - 1 } ( I - A ) D\n$$",
|
| 374 |
+
"text_format": "latex",
|
| 375 |
+
"bbox": [
|
| 376 |
+
408,
|
| 377 |
+
468,
|
| 378 |
+
589,
|
| 379 |
+
488
|
| 380 |
+
],
|
| 381 |
+
"page_idx": 2
|
| 382 |
+
},
|
| 383 |
+
{
|
| 384 |
+
"type": "text",
|
| 385 |
+
"text": "where $A = [ a _ { i j } ]$ is real-valued, skew-symmetric with $| a _ { i j } | \\leq 1$ , and $D$ is diagonal with all nonzero entries equal $t o \\pm 1$ . ",
|
| 386 |
+
"bbox": [
|
| 387 |
+
171,
|
| 388 |
+
493,
|
| 389 |
+
825,
|
| 390 |
+
522
|
| 391 |
+
],
|
| 392 |
+
"page_idx": 2
|
| 393 |
+
},
|
| 394 |
+
{
|
| 395 |
+
"type": "text",
|
| 396 |
+
"text": "We call the transform in Theorem 3.1 the scaled Cayley transform. Then, with an appropriate choice of $D$ , the scaled Cayley transform can reach any orthogonal matrix including those with $- 1$ eigenvalues. Further, it ensures that the skew-symmetric matrix $A$ that generates the orthogonal matrix will be bounded. ",
|
| 397 |
+
"bbox": [
|
| 398 |
+
173,
|
| 399 |
+
529,
|
| 400 |
+
825,
|
| 401 |
+
585
|
| 402 |
+
],
|
| 403 |
+
"page_idx": 2
|
| 404 |
+
},
|
| 405 |
+
{
|
| 406 |
+
"type": "text",
|
| 407 |
+
"text": "Our proposed network, the scaled Cayley orthogonal recurrent neural network (scoRNN), is based on this theorem. We parametrize the recurrent weight matrix $W$ through a skew-symmetric matrix $A$ , which results in $\\frac { n ( \\bar { n } - 1 ) } { 2 }$ trainable weights. The recurrent matrix $W$ is formed by the scaled Cayley transform: $W = ( I + A ) ^ { - 1 } ( I - A ) D$ . The scoRNN then operates identically to the set of equations given in Section 2.1, but during training we update the skew-symmetric matrix $A$ using gradient descent, while $D$ is fixed throughout the training process. The number of $- 1 \\mathrm { s }$ on the diagonal of $D$ , which we call $\\rho$ , is considered a hyperparameter in this work and is manually chosen based on the task. ",
|
| 408 |
+
"bbox": [
|
| 409 |
+
173,
|
| 410 |
+
592,
|
| 411 |
+
826,
|
| 412 |
+
708
|
| 413 |
+
],
|
| 414 |
+
"page_idx": 2
|
| 415 |
+
},
|
| 416 |
+
{
|
| 417 |
+
"type": "text",
|
| 418 |
+
"text": "3.2 UPDATE SCHEME ",
|
| 419 |
+
"text_level": 1,
|
| 420 |
+
"bbox": [
|
| 421 |
+
174,
|
| 422 |
+
724,
|
| 423 |
+
336,
|
| 424 |
+
739
|
| 425 |
+
],
|
| 426 |
+
"page_idx": 2
|
| 427 |
+
},
|
| 428 |
+
{
|
| 429 |
+
"type": "text",
|
| 430 |
+
"text": "To update the recurrent parameter matrix $A$ as described in Section 3.1, we must find the gradients of $A$ by backpropagating through the Cayley transform. The following theorem describes these gradients. A proof is given in Appendix A. ",
|
| 431 |
+
"bbox": [
|
| 432 |
+
173,
|
| 433 |
+
751,
|
| 434 |
+
825,
|
| 435 |
+
794
|
| 436 |
+
],
|
| 437 |
+
"page_idx": 2
|
| 438 |
+
},
|
| 439 |
+
{
|
| 440 |
+
"type": "text",
|
| 441 |
+
"text": "Theorem 3.2 Let $L = L ( W ) : \\mathbb { R } ^ { n \\times n } \\mathbb { R }$ be some differentiable loss function for an RNN with the recurrent weight matrix $W$ . Let $W = W ( A ) : = \\left( I + A \\right) ^ { - 1 } \\left( I - A \\right) D$ where $A \\in \\mathbb { R } ^ { n \\times n }$ is skew-symmetric and $D \\in \\mathbb { R } ^ { n \\times n }$ is a fixed diagonal matrix consisting of - $\\mathbf { \\xi } _ { l }$ and $I$ entries. Then the gradient of $L = L ( W ( A ) )$ with respect to $A$ is ",
|
| 442 |
+
"bbox": [
|
| 443 |
+
173,
|
| 444 |
+
799,
|
| 445 |
+
825,
|
| 446 |
+
859
|
| 447 |
+
],
|
| 448 |
+
"page_idx": 2
|
| 449 |
+
},
|
| 450 |
+
{
|
| 451 |
+
"type": "equation",
|
| 452 |
+
"img_path": "images/7d349911ba6545c99a04981636690176c117744c3fe08f4883ab1d2d94fd55eb.jpg",
|
| 453 |
+
"text": "$$\n\\frac { \\partial L } { \\partial A } = V ^ { T } - V\n$$",
|
| 454 |
+
"text_format": "latex",
|
| 455 |
+
"bbox": [
|
| 456 |
+
446,
|
| 457 |
+
866,
|
| 458 |
+
553,
|
| 459 |
+
896
|
| 460 |
+
],
|
| 461 |
+
"page_idx": 2
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "text",
|
| 465 |
+
"text": "At each training step of scoRNN, we first use the standard backpropagation algorithm to compute $\\textstyle { \\frac { \\partial L } { \\partial W } }$ and then use Theorem 3.2 to compute $\\textstyle { \\frac { \\partial L } { \\partial A } }$ . We then update $A$ with gradient descent (or a related optimization method), and reconstruct $W$ as follows: ",
|
| 466 |
+
"bbox": [
|
| 467 |
+
174,
|
| 468 |
+
103,
|
| 469 |
+
825,
|
| 470 |
+
146
|
| 471 |
+
],
|
| 472 |
+
"page_idx": 3
|
| 473 |
+
},
|
| 474 |
+
{
|
| 475 |
+
"type": "equation",
|
| 476 |
+
"img_path": "images/d7af680cc2fcc51feb0b7ab61b1a1d02d7dbfac44b3592c255bea09daae5b5e3.jpg",
|
| 477 |
+
"text": "$$\n\\begin{array} { l } { { A ^ { ( k + 1 ) } = A ^ { ( k ) } - \\lambda \\frac { \\partial { \\cal { L } } ( W ( A ^ { ( k ) } ) ) } { \\partial A } } } \\\\ { { W ^ { ( k + 1 ) } = \\left( I + A ^ { ( k + 1 ) } \\right) ^ { - 1 } \\left( I - A ^ { ( k + 1 ) } \\right) D } } \\end{array}\n$$",
|
| 478 |
+
"text_format": "latex",
|
| 479 |
+
"bbox": [
|
| 480 |
+
348,
|
| 481 |
+
151,
|
| 482 |
+
651,
|
| 483 |
+
217
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 3
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "text",
|
| 489 |
+
"text": "The skew-symmetry of $\\textstyle { \\frac { \\partial L } { \\partial A } }$ ensures that $A ^ { ( k + 1 ) }$ will be skew-symmetric and, in turn, $W ^ { ( k + 1 ) }$ will be orthogonal. ",
|
| 490 |
+
"bbox": [
|
| 491 |
+
176,
|
| 492 |
+
220,
|
| 493 |
+
823,
|
| 494 |
+
251
|
| 495 |
+
],
|
| 496 |
+
"page_idx": 3
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"type": "text",
|
| 500 |
+
"text": "The scoRNN and the full-capacity uRNN from Section 2.2 both have the capacity to optimize an orthogonal or unitary recurrent matrix $W$ , but they use different update schemes. The full-capacity uRNN performs a multiplicative update that moves $W$ along the tangent space of the Stiefel manifold, which can be shown to be a descent direction, but not necessarily the steepest one. In contrast, scoRNN performs an additive update in the direction of steepest descent with respect to its parametrization. The scoRNN update proves to be much more resistant to loss of orthogonality during training; see Appendix B. It also maintains stable hidden state gradients in the sense that the gradient norm does not change significantly in time; see Appendix C for experimental results. This is achieved with very little overhead computational costs over the standard RNN; see Appendix D for experiments comparing computational speeds. ",
|
| 501 |
+
"bbox": [
|
| 502 |
+
173,
|
| 503 |
+
257,
|
| 504 |
+
825,
|
| 505 |
+
397
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 3
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "text",
|
| 511 |
+
"text": "4 OTHER ARCHITECTURE DETAILS ",
|
| 512 |
+
"text_level": 1,
|
| 513 |
+
"bbox": [
|
| 514 |
+
176,
|
| 515 |
+
416,
|
| 516 |
+
482,
|
| 517 |
+
433
|
| 518 |
+
],
|
| 519 |
+
"page_idx": 3
|
| 520 |
+
},
|
| 521 |
+
{
|
| 522 |
+
"type": "text",
|
| 523 |
+
"text": "The basic architecture of scoRNN is very similar to the standard RNN as presented in Section 2.1. From a network layer perspective, one can think of the application of the recurrent weight in a three layer process. Let $\\boldsymbol { h } _ { t } \\in \\mathbb { R } ^ { n }$ be the current state of the scoRNN at a particular time step, $t$ . We then pass $h _ { t }$ through the following layers: ",
|
| 524 |
+
"bbox": [
|
| 525 |
+
173,
|
| 526 |
+
448,
|
| 527 |
+
825,
|
| 528 |
+
503
|
| 529 |
+
],
|
| 530 |
+
"page_idx": 3
|
| 531 |
+
},
|
| 532 |
+
{
|
| 533 |
+
"type": "text",
|
| 534 |
+
"text": "Note that the above scheme is the same as taking $h _ { t } W h _ { t }$ as discussed previously. ",
|
| 535 |
+
"bbox": [
|
| 536 |
+
173,
|
| 537 |
+
558,
|
| 538 |
+
730,
|
| 539 |
+
570
|
| 540 |
+
],
|
| 541 |
+
"page_idx": 3
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"type": "text",
|
| 545 |
+
"text": "4.1 MODRELU ACTIVATION FUNCTION ",
|
| 546 |
+
"text_level": 1,
|
| 547 |
+
"bbox": [
|
| 548 |
+
176,
|
| 549 |
+
587,
|
| 550 |
+
470,
|
| 551 |
+
602
|
| 552 |
+
],
|
| 553 |
+
"page_idx": 3
|
| 554 |
+
},
|
| 555 |
+
{
|
| 556 |
+
"type": "text",
|
| 557 |
+
"text": "The modReLU function was first implemented by Arjovsky et al. (2016) to handle complex valued functions and weights. Unlike previous methods, our method only uses real-valued functions and weights. Nevertheless, we have found that the modReLU function in the real case also performed better than other activation functions. The function is defined as ",
|
| 558 |
+
"bbox": [
|
| 559 |
+
174,
|
| 560 |
+
613,
|
| 561 |
+
825,
|
| 562 |
+
669
|
| 563 |
+
],
|
| 564 |
+
"page_idx": 3
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"type": "equation",
|
| 568 |
+
"img_path": "images/19cda80efa131a2a3451f1ec36bd76f89a0ce7569d46a7434b87e537a666c3dd.jpg",
|
| 569 |
+
"text": "$$\n\\sigma _ { \\mathrm { m o d R e L U } } ( z ) = { \\frac { z } { | z | } } \\sigma _ { \\mathrm { R e L U } } \\left( | z | + b \\right) = { \\left\\{ \\begin{array} { l l } { { \\frac { z } { | z | } } \\left( | z | + b \\right) } & { { \\mathrm { i f ~ } } | z | + b \\geq 0 } \\\\ { 0 } & { { \\mathrm { i f ~ } } | z | + b < 0 } \\end{array} \\right. }\n$$",
|
| 570 |
+
"text_format": "latex",
|
| 571 |
+
"bbox": [
|
| 572 |
+
276,
|
| 573 |
+
672,
|
| 574 |
+
723,
|
| 575 |
+
715
|
| 576 |
+
],
|
| 577 |
+
"page_idx": 3
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"text": "where $b$ is a trainable bias. In the real case, this simplifies to $\\mathrm { s i g n } ( z ) \\sigma _ { \\mathrm { R e L U } } ( | z | + b )$ . To implement this activation function in scoRNN, we replace the computation of $h _ { t }$ in Section 2.1 with ",
|
| 582 |
+
"bbox": [
|
| 583 |
+
176,
|
| 584 |
+
720,
|
| 585 |
+
823,
|
| 586 |
+
750
|
| 587 |
+
],
|
| 588 |
+
"page_idx": 3
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"type": "equation",
|
| 592 |
+
"img_path": "images/fcd7b4fc609a1c229ba989fa0adbe6d851084624a510b576254da909cd634ddc.jpg",
|
| 593 |
+
"text": "$$\n\\begin{array} { l } { { z _ { t } = U x _ { t } + W h _ { t - 1 } } } \\\\ { { h _ { t } = \\sigma _ { \\operatorname { m o d R e L U } } ( z _ { t } ) } } \\end{array}\n$$",
|
| 594 |
+
"text_format": "latex",
|
| 595 |
+
"bbox": [
|
| 596 |
+
429,
|
| 597 |
+
755,
|
| 598 |
+
568,
|
| 599 |
+
791
|
| 600 |
+
],
|
| 601 |
+
"page_idx": 3
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"type": "text",
|
| 605 |
+
"text": "We believe that the improved performance of the modReLU over other activation functions, such as ReLU, is because it admits both positive and negative activation values, which appears to be important for the state transition in orthogonal RNNs. This is similar to the hyperbolic tangent function but does not have vanishing gradient issues. ",
|
| 606 |
+
"bbox": [
|
| 607 |
+
173,
|
| 608 |
+
796,
|
| 609 |
+
825,
|
| 610 |
+
853
|
| 611 |
+
],
|
| 612 |
+
"page_idx": 3
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "text",
|
| 616 |
+
"text": "4.2 INITIALIZATION ",
|
| 617 |
+
"text_level": 1,
|
| 618 |
+
"bbox": [
|
| 619 |
+
174,
|
| 620 |
+
869,
|
| 621 |
+
326,
|
| 622 |
+
883
|
| 623 |
+
],
|
| 624 |
+
"page_idx": 3
|
| 625 |
+
},
|
| 626 |
+
{
|
| 627 |
+
"type": "text",
|
| 628 |
+
"text": "Modifying the initialization of our parameter matrices, in particular our recurrent parameter matrix $A$ , had a significant effect on performance. The most effective initialization method we found uses ",
|
| 629 |
+
"bbox": [
|
| 630 |
+
174,
|
| 631 |
+
895,
|
| 632 |
+
823,
|
| 633 |
+
924
|
| 634 |
+
],
|
| 635 |
+
"page_idx": 3
|
| 636 |
+
},
|
| 637 |
+
{
|
| 638 |
+
"type": "text",
|
| 639 |
+
"text": "a technique inspired by Henaff et al. (2017). We initialize all of the entries of $A$ to be 0 except for $2 \\mathbf { x } 2$ blocks along the diagonal, which are given as ",
|
| 640 |
+
"bbox": [
|
| 641 |
+
169,
|
| 642 |
+
102,
|
| 643 |
+
823,
|
| 644 |
+
132
|
| 645 |
+
],
|
| 646 |
+
"page_idx": 4
|
| 647 |
+
},
|
| 648 |
+
{
|
| 649 |
+
"type": "equation",
|
| 650 |
+
"img_path": "images/b9ae0eee9c76b4b852c26d058b3e8d7c4732f5fca91bf4a8d57559d6fe530bf6.jpg",
|
| 651 |
+
"text": "$$\nA = \\left[ \\begin{array} { c c c c } { { B _ { 1 } } } & { { } } & { { } } & { { } } \\\\ { { } } & { { \\ddots } } & { { } } & { { } } \\\\ { { } } & { { } } & { { B _ { \\lfloor n / 2 \\rfloor } } } \\end{array} \\right] \\quad \\mathrm { w h e r e } \\quad B _ { j } = \\left[ \\begin{array} { c c } { { 0 } } & { { s _ { j } } } \\\\ { { - s _ { j } } } & { { 0 } } \\end{array} \\right]\n$$",
|
| 652 |
+
"text_format": "latex",
|
| 653 |
+
"bbox": [
|
| 654 |
+
316,
|
| 655 |
+
133,
|
| 656 |
+
679,
|
| 657 |
+
193
|
| 658 |
+
],
|
| 659 |
+
"page_idx": 4
|
| 660 |
+
},
|
| 661 |
+
{
|
| 662 |
+
"type": "text",
|
| 663 |
+
"text": "with $\\begin{array} { r } { s _ { j } = \\sqrt { \\frac { 1 - \\cos { ( t _ { j } ) } } { 1 + \\cos { ( t _ { j } ) } } } } \\end{array}$ and $t _ { j }$ is sampled uniformly from $[ 0 , \\frac { \\pi } { 2 } ]$ . The Cayley transform of this $A$ will have eigenvalues equal to $\\pm e ^ { i t _ { j } }$ for each $j$ , which will be distributed uniformly along the right unit half-circle. Multiplication by the scaling matrix $D$ will reflect $\\rho$ of these eigenvalues across the imaginary axis. We use this method to initialize scoRNN’s $A$ matrix in all of the experiments listed in section 5. ",
|
| 664 |
+
"bbox": [
|
| 665 |
+
173,
|
| 666 |
+
196,
|
| 667 |
+
826,
|
| 668 |
+
276
|
| 669 |
+
],
|
| 670 |
+
"page_idx": 4
|
| 671 |
+
},
|
| 672 |
+
{
|
| 673 |
+
"type": "text",
|
| 674 |
+
"text": "5 EXPERIMENTS ",
|
| 675 |
+
"text_level": 1,
|
| 676 |
+
"bbox": [
|
| 677 |
+
174,
|
| 678 |
+
296,
|
| 679 |
+
328,
|
| 680 |
+
313
|
| 681 |
+
],
|
| 682 |
+
"page_idx": 4
|
| 683 |
+
},
|
| 684 |
+
{
|
| 685 |
+
"type": "text",
|
| 686 |
+
"text": "For each experiment, we found optimal hyperparameters for scoRNN using a grid search. For other models, we used the best hyperparameters settings as reported in Wisdom et al. (2016) and Arjovsky et al. (2016). If not available, we performed a grid search to find the best hyperparameters. ",
|
| 687 |
+
"bbox": [
|
| 688 |
+
173,
|
| 689 |
+
327,
|
| 690 |
+
826,
|
| 691 |
+
369
|
| 692 |
+
],
|
| 693 |
+
"page_idx": 4
|
| 694 |
+
},
|
| 695 |
+
{
|
| 696 |
+
"type": "text",
|
| 697 |
+
"text": "5.1 COPYING PROBLEM ",
|
| 698 |
+
"text_level": 1,
|
| 699 |
+
"bbox": [
|
| 700 |
+
174,
|
| 701 |
+
386,
|
| 702 |
+
352,
|
| 703 |
+
400
|
| 704 |
+
],
|
| 705 |
+
"page_idx": 4
|
| 706 |
+
},
|
| 707 |
+
{
|
| 708 |
+
"type": "text",
|
| 709 |
+
"text": "This experiment follows descriptions found in Arjovsky et al. (2016) and Wisdom et al. (2016), and tests an RNN’s ability to reproduce a sequence seen many timesteps earlier. In the problem setup, there are 10 input classes, which we denote using the digits 0-9, with 0 being used as a ’blank’ class and 9 being used as a ’marker’ class. The RNN receives an input sequence of length $T + 2 0$ . This sequence consists of entirely zeros, except for the first ten elements, which are uniformly sampled from classes 1-8, and a 9 placed ten timesteps from the end. The goal for the machine is to output zeros until it sees a 9, at which point it should output the ten elements from the beginning of the input sequence. Thus, information must propagate from the beginning to the end of the sequence for a machine to successfully learn this task, making it critical to avoid vanishing/exploding gradients. ",
|
| 710 |
+
"bbox": [
|
| 711 |
+
174,
|
| 712 |
+
411,
|
| 713 |
+
825,
|
| 714 |
+
537
|
| 715 |
+
],
|
| 716 |
+
"page_idx": 4
|
| 717 |
+
},
|
| 718 |
+
{
|
| 719 |
+
"type": "text",
|
| 720 |
+
"text": "A baseline strategy with which to compare machine performance is that of outputting 0 until the machine sees a 9, and then outputting 10 elements randomly sampled from classes 1-8. The expected cross-entropy for such a strategy is 10 log (8)T +20 . In practice, it is common to see gated RNNs such as LSTMs converge to this local minimum. ",
|
| 721 |
+
"bbox": [
|
| 722 |
+
174,
|
| 723 |
+
544,
|
| 724 |
+
825,
|
| 725 |
+
604
|
| 726 |
+
],
|
| 727 |
+
"page_idx": 4
|
| 728 |
+
},
|
| 729 |
+
{
|
| 730 |
+
"type": "image",
|
| 731 |
+
"img_path": "images/2b25fac248896e01bd8bb6076751690a9d24a4e74c24a53ca2c49d529ad08c37.jpg",
|
| 732 |
+
"image_caption": [
|
| 733 |
+
"Figure 1: Cross entropy of each machine on the copying problem with $T = 1 0 0 0$ (left) and $T =$ 2000 (right). "
|
| 734 |
+
],
|
| 735 |
+
"image_footnote": [],
|
| 736 |
+
"bbox": [
|
| 737 |
+
194,
|
| 738 |
+
625,
|
| 739 |
+
790,
|
| 740 |
+
796
|
| 741 |
+
],
|
| 742 |
+
"page_idx": 4
|
| 743 |
+
},
|
| 744 |
+
{
|
| 745 |
+
"type": "text",
|
| 746 |
+
"text": "We vary the number of hidden units of the machines to match the number of parameters, approximately 22k each. This results in an LSTM with $n = 6 8$ , a restricted-capacity uRNN with $n = 4 7 0$ , a full-capacity uRNN with $n = 1 2 8$ , and a scoRNN with $n = 1 9 0$ . We found the best performance with the scoRNN came from $\\rho = n / 2$ , which gives an initial $W$ with eigenvalues distributed uniformly on the entire unit circle. ",
|
| 747 |
+
"bbox": [
|
| 748 |
+
174,
|
| 749 |
+
854,
|
| 750 |
+
823,
|
| 751 |
+
924
|
| 752 |
+
],
|
| 753 |
+
"page_idx": 4
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"type": "text",
|
| 757 |
+
"text": "Figure 1 compares each model’s performance for $T = 1 0 0 0$ and $T \\ : = \\ : 2 0 0 0$ , with the baseline cross-entropy given as a dashed line. In both cases, cross-entropy for the restricted-capacity uRNN and LSTM never drop below the baseline. For the $T = 1 0 0 0$ test, the full-capacity uRNN and scoRNN converge immediately to zero entropy solutions, with the full-capacity uRNN converging slightly faster. For $T = 2 0 0 0$ , the full-capacity uRNN remains at the baseline for several thousand iterations, but is eventually able to find a correct solution. In contrast, the scoRNN error has a smooth convergence that bypasses the baseline, but does so more slowly than the full-capacity uRNN. ",
|
| 758 |
+
"bbox": [
|
| 759 |
+
173,
|
| 760 |
+
103,
|
| 761 |
+
825,
|
| 762 |
+
202
|
| 763 |
+
],
|
| 764 |
+
"page_idx": 5
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"type": "text",
|
| 768 |
+
"text": "5.2 ADDING PROBLEM ",
|
| 769 |
+
"text_level": 1,
|
| 770 |
+
"bbox": [
|
| 771 |
+
176,
|
| 772 |
+
234,
|
| 773 |
+
346,
|
| 774 |
+
250
|
| 775 |
+
],
|
| 776 |
+
"page_idx": 5
|
| 777 |
+
},
|
| 778 |
+
{
|
| 779 |
+
"type": "text",
|
| 780 |
+
"text": "We examined a variation of the adding problem as proposed by Arjovsky et al. (2016) which is based on the work of Hochreiter & Schmidhuber (1997). This variation involves passing two sequences concurrently into the RNN, each of length $T$ . The first sequence is a sequence of digits sampled uniformly with values ranging in a half-open interval, $\\mathcal { U } [ 0 , 1 )$ . The second sequence is a marker sequence consisting of all zeros except for two entries that are marked by one. The first 1 is located uniformly within the interval $[ 1 , \\frac { T } { 2 } )$ of the sequence and the second 1 is located uniformly within the interval $[ \\textstyle { \\frac { T } { 2 } } , T )$ of the sequence. The label for each pair of sequences is the sum of the two entries that are marked by one, which forces the machine to identify relevant information in the first sequence among noise. As the sequence length increases, it becomes more crucial to avoid vanishing/exploding gradients. Naively predicting one regardless of the sequence gives an expected mean squared error (MSE) of approximately 0.167. This will be considered as the baseline. ",
|
| 781 |
+
"bbox": [
|
| 782 |
+
173,
|
| 783 |
+
266,
|
| 784 |
+
825,
|
| 785 |
+
424
|
| 786 |
+
],
|
| 787 |
+
"page_idx": 5
|
| 788 |
+
},
|
| 789 |
+
{
|
| 790 |
+
"type": "text",
|
| 791 |
+
"text": "The number of hidden units for each network was adjusted so that each had approximately $1 4 \\mathrm { k }$ trainable parameters. This results in $n = 1 7 0$ for the scoRNN, $n = 6 0$ for the LSTM, $n = 1 2 0$ for the Full-Capacity uRNN, and $n = 9 5 0$ hidden units for the restricted-capacity uRNN. The test set ",
|
| 792 |
+
"bbox": [
|
| 793 |
+
176,
|
| 794 |
+
430,
|
| 795 |
+
825,
|
| 796 |
+
472
|
| 797 |
+
],
|
| 798 |
+
"page_idx": 5
|
| 799 |
+
},
|
| 800 |
+
{
|
| 801 |
+
"type": "image",
|
| 802 |
+
"img_path": "images/3a3c70abacdf42020d540103ff90c4bcfd569095b3935bb90f2e9e746f6ca408.jpg",
|
| 803 |
+
"image_caption": [
|
| 804 |
+
"Figure 2: Test set MSE for each machine on the adding problem with sequence lengths of $T = 2 0 0$ (top), $T = 4 0 0$ (middle), and $T = 7 5 0$ (bottom). "
|
| 805 |
+
],
|
| 806 |
+
"image_footnote": [],
|
| 807 |
+
"bbox": [
|
| 808 |
+
316,
|
| 809 |
+
505,
|
| 810 |
+
681,
|
| 811 |
+
714
|
| 812 |
+
],
|
| 813 |
+
"page_idx": 5
|
| 814 |
+
},
|
| 815 |
+
{
|
| 816 |
+
"type": "text",
|
| 817 |
+
"text": "MSE results for sequence lengths $T = 2 0 0$ , $T = 4 0 0$ , and $T = 7 5 0$ can be found in Figure 2. A training set size of 100,000 and a testing set size of 10,000 were used for each sequence length. For each case, the networks start at or near the baseline MSE and drop towards zero after a few epochs. As the sequence length increases, the number of epochs before the drop increases. We found the best settings for the scoRNN were $\\rho = n / 2$ for $T = 2 0 0$ and $\\rho = 7 n / 1 0$ for $T = 4 0 0$ and $T = 7 5 0$ . As can be seen, the LSTM error drops precipitously across the board before all other models, while the unitary and orthogonal RNNs descend more gradually. Although in some cases the full-capacity uRNN begins to drop below the baseline before scoRNN, the full-capacity uRNN does not drop as quickly and has a more irregular descent curve. ",
|
| 818 |
+
"bbox": [
|
| 819 |
+
173,
|
| 820 |
+
797,
|
| 821 |
+
825,
|
| 822 |
+
924
|
| 823 |
+
],
|
| 824 |
+
"page_idx": 5
|
| 825 |
+
},
|
| 826 |
+
{
|
| 827 |
+
"type": "text",
|
| 828 |
+
"text": "5.3 PIXEL-BY-PIXEL MNIST ",
|
| 829 |
+
"text_level": 1,
|
| 830 |
+
"bbox": [
|
| 831 |
+
174,
|
| 832 |
+
103,
|
| 833 |
+
390,
|
| 834 |
+
117
|
| 835 |
+
],
|
| 836 |
+
"page_idx": 6
|
| 837 |
+
},
|
| 838 |
+
{
|
| 839 |
+
"type": "text",
|
| 840 |
+
"text": "We ran two experiments based around classifying samples from the well-known MNIST dataset (LeCun et al.). Following the implementation of Le et al. (2015), each pixel of the image is fed into the RNN sequentially, resulting in a single pixel sequence length of 784. In the first experiment, which we refer to as unpermuted MNIST, pixels are arranged in the sequence row-by-row. In the second, which we call permuted MNIST, a fixed permutation is applied to training and testing sequences. ",
|
| 841 |
+
"bbox": [
|
| 842 |
+
174,
|
| 843 |
+
128,
|
| 844 |
+
825,
|
| 845 |
+
199
|
| 846 |
+
],
|
| 847 |
+
"page_idx": 6
|
| 848 |
+
},
|
| 849 |
+
{
|
| 850 |
+
"type": "text",
|
| 851 |
+
"text": "All scoRNN machines were trained with the RMSProp optimization algorithm. Input and output weights used a learning rate of $1 0 ^ { - 3 }$ , while the recurrent parameters used a learning rate of $1 0 ^ { - 4 }$ (for $n = 1 7 0 ,$ ) or $1 0 ^ { - 5 }$ (for $n = 3 6 0$ and $n = 5 1 2$ ). For unpermuted MNIST, we found $\\rho$ to be optimal at $n / 1 0$ , while the best value of $\\rho$ for permuted MNIST was $n / 2$ . We suspect that the difference of these two values comes from the different types of dependencies in each: unpermuted MNIST has mostly local dependencies, while permuted MNIST requires learning many long-term dependencies, which appear to be more easily modeled when the diagonal of $D$ has a higher proportion of $- 1 \\mathrm { s }$ . ",
|
| 852 |
+
"bbox": [
|
| 853 |
+
174,
|
| 854 |
+
207,
|
| 855 |
+
825,
|
| 856 |
+
304
|
| 857 |
+
],
|
| 858 |
+
"page_idx": 6
|
| 859 |
+
},
|
| 860 |
+
{
|
| 861 |
+
"type": "text",
|
| 862 |
+
"text": "Each experiment used a training set of 55,000 images and a test set of 10,000 testing images. Each machine was trained for 70 epochs, and test set accuracy, the percentage of test images classified correctly, was evaluated at the conclusion of each epoch. Figure 3 shows test set accuracy over time for each machine, and the best performance over all epochs by each machine is given in Table 1. ",
|
| 863 |
+
"bbox": [
|
| 864 |
+
174,
|
| 865 |
+
310,
|
| 866 |
+
825,
|
| 867 |
+
367
|
| 868 |
+
],
|
| 869 |
+
"page_idx": 6
|
| 870 |
+
},
|
| 871 |
+
{
|
| 872 |
+
"type": "table",
|
| 873 |
+
"img_path": "images/4041e39511113af6e3676600c3466528f5222879051729cd1e6605d00f7e630c.jpg",
|
| 874 |
+
"table_caption": [
|
| 875 |
+
"Table 1: Results for unpermuted and permuted pixel-by-pixel MNIST experiments. Evaluation accuracies are based on the best test accuracy at the end of every epoch. "
|
| 876 |
+
],
|
| 877 |
+
"table_footnote": [],
|
| 878 |
+
"table_body": "<table><tr><td>Model</td><td>n</td><td># parameters</td><td>MNIST Test Accuracy</td><td>Permuted MNIST Test Accuracy</td></tr><tr><td>scoRNN</td><td>170</td><td>~16k</td><td>0.973</td><td>0.943</td></tr><tr><td>scoRNN</td><td>360</td><td>~69k</td><td>0.983</td><td>0.962</td></tr><tr><td>scoRNN</td><td>512</td><td>~137k</td><td>0.985</td><td>0.966</td></tr><tr><td>LSTM</td><td>128</td><td>~68k</td><td>0.987</td><td>0.920</td></tr><tr><td>LSTM</td><td>256</td><td>~ 270k</td><td>0.989</td><td>0.929</td></tr><tr><td>LSTM</td><td>512</td><td>≈1,058k</td><td>0.985</td><td>0.920</td></tr><tr><td>Restricted-capacity uRNN</td><td>512</td><td>~16k</td><td>0.976</td><td>0.945</td></tr><tr><td>Restricted-capacity uRNN</td><td>2170</td><td>~69k</td><td>0.984</td><td>0.953</td></tr><tr><td>Full-capacity uRNN</td><td>116</td><td>~16k</td><td>0.947</td><td>0.925</td></tr><tr><td>Full-capacity uRNN</td><td>512</td><td>~ 270k</td><td>0.974</td><td>0.947</td></tr></table>",
|
| 879 |
+
"bbox": [
|
| 880 |
+
197,
|
| 881 |
+
424,
|
| 882 |
+
800,
|
| 883 |
+
612
|
| 884 |
+
],
|
| 885 |
+
"page_idx": 6
|
| 886 |
+
},
|
| 887 |
+
{
|
| 888 |
+
"type": "text",
|
| 889 |
+
"text": "In both experiments, the 170 hidden unit scoRNN gives similar performance to both of the 512 hidden unit uRNNs using a much smaller hidden dimension and, in the case of the full-capacity uRNN, an order of magnitude fewer parameters. Matching the number of parameters $( \\approx 6 9 k )$ ), the 2170 restricted-capacity uRNN performance was comparable to the 360 hidden unit scoRNN for unpermuted MNIST, but performed worse for permuted MNIST, and required a much larger hidden size and a significantly longer run time, see Appendix D. As in experiments presented in Arjovsky et al. (2016) and Wisdom et al. (2016), orthogonal and unitary RNNs are unable to outperform the LSTM in the unpermuted case. However, the 360 and 512 hidden unit scoRNNs outperform the unitary RNNs. On permuted MNIST, the 512 hidden unit scoRNN achieves a test-set accuracy of $9 6 . 6 \\%$ , outperforming all of the uRNNs and LSTMs. We believe this is a state of the art result. ",
|
| 890 |
+
"bbox": [
|
| 891 |
+
173,
|
| 892 |
+
631,
|
| 893 |
+
825,
|
| 894 |
+
770
|
| 895 |
+
],
|
| 896 |
+
"page_idx": 6
|
| 897 |
+
},
|
| 898 |
+
{
|
| 899 |
+
"type": "text",
|
| 900 |
+
"text": "5.4 TIMIT SPEECH DATASET ",
|
| 901 |
+
"text_level": 1,
|
| 902 |
+
"bbox": [
|
| 903 |
+
174,
|
| 904 |
+
786,
|
| 905 |
+
392,
|
| 906 |
+
800
|
| 907 |
+
],
|
| 908 |
+
"page_idx": 6
|
| 909 |
+
},
|
| 910 |
+
{
|
| 911 |
+
"type": "text",
|
| 912 |
+
"text": "To see how the models performed on audio data, speech prediction was performed on the TIMIT dataset (Garofolo et al., 1993), a collection of real-world speech recordings. Excluding the dialect SA sentences and using only the core test set, the dataset consisted of 3,696 training and 192 testing audio files. Similar to experiments in Wisdom et al. (2016), audio files were downsampled to ${ \\mathrm { 8 k H z } }$ and a short-time Fourier transform (STFT) was applied with a Hann window of 256 samples and a window hop of 128 samples (16 milliseconds). The result is a set of frames, each with 129 complexvalued Fourier amplitudes. The log-magnitude of these amplitudes is used as the input data for the machines. Each frame was fed into the machine sequentially, and at each time step $t$ , the machine’s target output is to predict the $t + 1$ frame. For each model, the hidden layer sizes were adjusted such that each model had approximately equal numbers of trainable parameters. For scoRNN, we used the Adam optimizer with learning rate $1 0 ^ { - 3 }$ to train the input and output parameters, and RMSprop with a learning rate of $1 0 ^ { - 3 }$ (for $n = 2 2 4 ,$ ) or $1 0 ^ { - 4 }$ (for $n = 3 2 2$ and $n = 4 2 5$ ) to train the recurrent weight matrix. The number of negative eigenvalues used was $\\rho = n / 1 0$ . ",
|
| 913 |
+
"bbox": [
|
| 914 |
+
174,
|
| 915 |
+
811,
|
| 916 |
+
825,
|
| 917 |
+
924
|
| 918 |
+
],
|
| 919 |
+
"page_idx": 6
|
| 920 |
+
},
|
| 921 |
+
{
|
| 922 |
+
"type": "image",
|
| 923 |
+
"img_path": "images/62fa3d7581d62db2c86a17a5ae3f594e3967814bafe4096644811c3384cb844b.jpg",
|
| 924 |
+
"image_caption": [
|
| 925 |
+
"Figure 3: Test accuracy for unpermuted and permuted MNIST over time. All scoRNN models and only the best performing models for each other architectures are shown. "
|
| 926 |
+
],
|
| 927 |
+
"image_footnote": [],
|
| 928 |
+
"bbox": [
|
| 929 |
+
196,
|
| 930 |
+
109,
|
| 931 |
+
785,
|
| 932 |
+
280
|
| 933 |
+
],
|
| 934 |
+
"page_idx": 7
|
| 935 |
+
},
|
| 936 |
+
{
|
| 937 |
+
"type": "text",
|
| 938 |
+
"text": "",
|
| 939 |
+
"bbox": [
|
| 940 |
+
173,
|
| 941 |
+
351,
|
| 942 |
+
825,
|
| 943 |
+
421
|
| 944 |
+
],
|
| 945 |
+
"page_idx": 7
|
| 946 |
+
},
|
| 947 |
+
{
|
| 948 |
+
"type": "text",
|
| 949 |
+
"text": "The loss function used for training was the mean squared error (MSE) between the predicted and actual log-magnitudes of the next time frame over the entire sequence. Table 2 contains the MSE on validation and testing sets, which shows that all scoRNN models achieve a smaller MSE than all LSTM and unitary RNN models. Similar to Wisdom et al. (2016), we reconstructed audio files using the predicted log-magnitudes from each machine and evaluated them on several audio metrics. We found that the scoRNN predictions achieved better scores on the signal-to-noise ratio metric SegSNR (Brookes et al., 1997), but performed slightly worse than the full-capacity uRNN predictions on the human intelligibility and perception metrics STOI (Taal et al., 2011) and PESQ (Rix et al., 2001). ",
|
| 950 |
+
"bbox": [
|
| 951 |
+
173,
|
| 952 |
+
428,
|
| 953 |
+
825,
|
| 954 |
+
540
|
| 955 |
+
],
|
| 956 |
+
"page_idx": 7
|
| 957 |
+
},
|
| 958 |
+
{
|
| 959 |
+
"type": "table",
|
| 960 |
+
"img_path": "images/a67286b51846f9c59b91811b0c43be5e021aee9904240f5133f93806dc513c5f.jpg",
|
| 961 |
+
"table_caption": [
|
| 962 |
+
"Table 2: Results for the TIMIT speech dataset. Evaluation based on MSE and various audio metrics "
|
| 963 |
+
],
|
| 964 |
+
"table_footnote": [],
|
| 965 |
+
"table_body": "<table><tr><td>Model</td><td>n</td><td># params</td><td>Valid. MSE</td><td>Eval. MSE</td><td>Model</td><td>n</td><td># params</td><td>Valid. MSE</td><td>Eval. MSE</td></tr><tr><td>scoRNN</td><td>224</td><td>~83k</td><td>9.26</td><td>8.50</td><td>Rest.uRNN</td><td>158</td><td>~83k</td><td>15.57</td><td>18.51</td></tr><tr><td>scoRNN</td><td>322</td><td>~135k</td><td>8.48</td><td>7.82</td><td>Rest.uRNN</td><td>256</td><td>~135k</td><td>15.90</td><td>15.31</td></tr><tr><td>scoRNN</td><td>425</td><td>~ 200k</td><td>7.97</td><td>7.36</td><td>Rest. uRNN</td><td>378</td><td>~ 200k</td><td>16.00</td><td>15.15</td></tr><tr><td>LSTM</td><td>84</td><td>~83k</td><td>18.43</td><td>17.18</td><td>Full uRNN</td><td>128</td><td>~83k</td><td>15.07</td><td>14.58</td></tr><tr><td>LSTM</td><td>120</td><td>~135k</td><td>17.05</td><td>15.91</td><td>Full uRNN</td><td>192</td><td>≈135k</td><td>15.10</td><td>14.50</td></tr><tr><td>LSTM</td><td>158</td><td>~ 200k</td><td>16.33</td><td>16.06</td><td>Full uRNN</td><td>256</td><td>~ 200k</td><td>14.96</td><td>14.69</td></tr></table>",
|
| 966 |
+
"bbox": [
|
| 967 |
+
173,
|
| 968 |
+
593,
|
| 969 |
+
828,
|
| 970 |
+
727
|
| 971 |
+
],
|
| 972 |
+
"page_idx": 7
|
| 973 |
+
},
|
| 974 |
+
{
|
| 975 |
+
"type": "text",
|
| 976 |
+
"text": "6 CONCLUSION ",
|
| 977 |
+
"text_level": 1,
|
| 978 |
+
"bbox": [
|
| 979 |
+
174,
|
| 980 |
+
767,
|
| 981 |
+
318,
|
| 982 |
+
782
|
| 983 |
+
],
|
| 984 |
+
"page_idx": 7
|
| 985 |
+
},
|
| 986 |
+
{
|
| 987 |
+
"type": "text",
|
| 988 |
+
"text": "There have been recent breakthroughs with RNN architectures using unitary recurrent weight matrices to address the vanishing/exploding gradient problem. These unitary RNNs are implemented with complex valued matrices and require additional complexity in computation. Unlike unitary RNNs, the scoRNN developed in this paper uses real valued orthogonal recurrent weight matrices with a simpler implementation scheme by parametrizing with a skew-symmetric matrix. The resulting model’s additive update step is in the direction of steepest descent with respect to this parametrization, and maintains the orthogonality of the recurrent weight matrix in the presence of roundoff errors. Results from our experiments show that scoRNN can achieve superior performance to unitary RNNs, in some cases with many fewer trainable parameters than other models. ",
|
| 989 |
+
"bbox": [
|
| 990 |
+
173,
|
| 991 |
+
797,
|
| 992 |
+
825,
|
| 993 |
+
924
|
| 994 |
+
],
|
| 995 |
+
"page_idx": 7
|
| 996 |
+
},
|
| 997 |
+
{
|
| 998 |
+
"type": "text",
|
| 999 |
+
"text": "REFERENCES ",
|
| 1000 |
+
"text_level": 1,
|
| 1001 |
+
"bbox": [
|
| 1002 |
+
174,
|
| 1003 |
+
102,
|
| 1004 |
+
287,
|
| 1005 |
+
117
|
| 1006 |
+
],
|
| 1007 |
+
"page_idx": 8
|
| 1008 |
+
},
|
| 1009 |
+
{
|
| 1010 |
+
"type": "text",
|
| 1011 |
+
"text": "Martin Arjovsky, Amar Shah, and Yoshua Bengio. Unitary evolution recurrent neural networks. In Proceedings of the 2016 International Conference on Machine Learning, volume 48, pp. 1120– 1128, New York, New York, USA, 2016. JMLR. ",
|
| 1012 |
+
"bbox": [
|
| 1013 |
+
176,
|
| 1014 |
+
126,
|
| 1015 |
+
823,
|
| 1016 |
+
169
|
| 1017 |
+
],
|
| 1018 |
+
"page_idx": 8
|
| 1019 |
+
},
|
| 1020 |
+
{
|
| 1021 |
+
"type": "text",
|
| 1022 |
+
"text": "Yoshua Bengio, Paolo Frasconi, and Patrice Simard. The problem of learning long-term dependencies in recurrent networks. pp. 1183–1195, San Francisco, CA, USA, 1993. IEEE Press. ",
|
| 1023 |
+
"bbox": [
|
| 1024 |
+
171,
|
| 1025 |
+
176,
|
| 1026 |
+
821,
|
| 1027 |
+
207
|
| 1028 |
+
],
|
| 1029 |
+
"page_idx": 8
|
| 1030 |
+
},
|
| 1031 |
+
{
|
| 1032 |
+
"type": "text",
|
| 1033 |
+
"text": "Mike Brookes et al. Voicebox: Speech processing toolbox for matlab. Software, available [Mar. 2011] from www. ee. ic. ac. uk/hp/staff/dmb/voicebox/voicebox. html, 47, 1997. ",
|
| 1034 |
+
"bbox": [
|
| 1035 |
+
171,
|
| 1036 |
+
215,
|
| 1037 |
+
821,
|
| 1038 |
+
244
|
| 1039 |
+
],
|
| 1040 |
+
"page_idx": 8
|
| 1041 |
+
},
|
| 1042 |
+
{
|
| 1043 |
+
"type": "text",
|
| 1044 |
+
"text": "Kyunghyun Cho, Bart van Merrienboer, Dzmitry Bahdanau, and Yoshua Bengio. On the properties of neural machine translation: Encoder-decoder approaches, 2014. URL https://arxiv. org/abs/1409.1259. ",
|
| 1045 |
+
"bbox": [
|
| 1046 |
+
173,
|
| 1047 |
+
253,
|
| 1048 |
+
821,
|
| 1049 |
+
296
|
| 1050 |
+
],
|
| 1051 |
+
"page_idx": 8
|
| 1052 |
+
},
|
| 1053 |
+
{
|
| 1054 |
+
"type": "text",
|
| 1055 |
+
"text": "John Garofolo, Lori Lamel, William Fisher, Jonathan Fiscus, David Pallett, Nancy Dahlgren, and Victor Zue. Timit acoustic-phonetic continuous speech corpus ldc93s1. Technical report, Philadelphia: Linguistic Data Consortium, 1993. ",
|
| 1056 |
+
"bbox": [
|
| 1057 |
+
176,
|
| 1058 |
+
304,
|
| 1059 |
+
821,
|
| 1060 |
+
348
|
| 1061 |
+
],
|
| 1062 |
+
"page_idx": 8
|
| 1063 |
+
},
|
| 1064 |
+
{
|
| 1065 |
+
"type": "text",
|
| 1066 |
+
"text": "Mikael Henaff, Arthur Szlam, and Yann LeCun. Recurrent orthogonal networks and long-memory tasks. In Proceedings of the 33rd International Conference on Machine Learning, volume 48, New York, NY, USA, 2017. JMLR: W&CP. ",
|
| 1067 |
+
"bbox": [
|
| 1068 |
+
174,
|
| 1069 |
+
356,
|
| 1070 |
+
823,
|
| 1071 |
+
400
|
| 1072 |
+
],
|
| 1073 |
+
"page_idx": 8
|
| 1074 |
+
},
|
| 1075 |
+
{
|
| 1076 |
+
"type": "text",
|
| 1077 |
+
"text": "Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. In ¨ Neural Computation 9(8), pp. 1735–1780, 1997. ",
|
| 1078 |
+
"bbox": [
|
| 1079 |
+
173,
|
| 1080 |
+
409,
|
| 1081 |
+
821,
|
| 1082 |
+
438
|
| 1083 |
+
],
|
| 1084 |
+
"page_idx": 8
|
| 1085 |
+
},
|
| 1086 |
+
{
|
| 1087 |
+
"type": "text",
|
| 1088 |
+
"text": "Li Jing, Yichen Shen, Tena Dubcek, John Peurifoy, Scott Skirlo, Max Tegmark, and Marin Solja ˇ ciˇ c.´ Tunable efficient unitary neural networks (eunn) and their application to rnn. arXiv preprint arXiv:1612.05231, 2016. ",
|
| 1089 |
+
"bbox": [
|
| 1090 |
+
173,
|
| 1091 |
+
445,
|
| 1092 |
+
825,
|
| 1093 |
+
489
|
| 1094 |
+
],
|
| 1095 |
+
"page_idx": 8
|
| 1096 |
+
},
|
| 1097 |
+
{
|
| 1098 |
+
"type": "text",
|
| 1099 |
+
"text": "Li Jing, C¸ alar Gulc¸ehre, John Peurifoy, Yichen Shen, Max Tegmark, Marin Solja ¨ ciˇ c, and Yoshua ´ Bengio. Gated orthogonal recurrent units: On learning to forget. 2017. URL https://arxiv. org/abs/1706.02761. ",
|
| 1100 |
+
"bbox": [
|
| 1101 |
+
173,
|
| 1102 |
+
497,
|
| 1103 |
+
825,
|
| 1104 |
+
541
|
| 1105 |
+
],
|
| 1106 |
+
"page_idx": 8
|
| 1107 |
+
},
|
| 1108 |
+
{
|
| 1109 |
+
"type": "text",
|
| 1110 |
+
"text": "William Kahan. Is there a small skew cayley transform with zero diagonal? Linear algebra and its applications, 417(2-3):335–341, 2006. ",
|
| 1111 |
+
"bbox": [
|
| 1112 |
+
173,
|
| 1113 |
+
550,
|
| 1114 |
+
823,
|
| 1115 |
+
579
|
| 1116 |
+
],
|
| 1117 |
+
"page_idx": 8
|
| 1118 |
+
},
|
| 1119 |
+
{
|
| 1120 |
+
"type": "text",
|
| 1121 |
+
"text": "Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ",
|
| 1122 |
+
"bbox": [
|
| 1123 |
+
173,
|
| 1124 |
+
587,
|
| 1125 |
+
823,
|
| 1126 |
+
617
|
| 1127 |
+
],
|
| 1128 |
+
"page_idx": 8
|
| 1129 |
+
},
|
| 1130 |
+
{
|
| 1131 |
+
"type": "text",
|
| 1132 |
+
"text": "Quoc V. Le, Navdeep Jaitly, and Geoffrey E. Hinton. A simple way to initialize recurrent networks of rectified linear units, 2015. URL https://arxiv.org/abs/1504.00941. ",
|
| 1133 |
+
"bbox": [
|
| 1134 |
+
173,
|
| 1135 |
+
626,
|
| 1136 |
+
823,
|
| 1137 |
+
655
|
| 1138 |
+
],
|
| 1139 |
+
"page_idx": 8
|
| 1140 |
+
},
|
| 1141 |
+
{
|
| 1142 |
+
"type": "text",
|
| 1143 |
+
"text": "Yann LeCun, Corinna Cortes, and Christopher J.C. Burges. The mnist database. URL http: //yann.lecun.com/exdb/mnist/. ",
|
| 1144 |
+
"bbox": [
|
| 1145 |
+
173,
|
| 1146 |
+
664,
|
| 1147 |
+
821,
|
| 1148 |
+
693
|
| 1149 |
+
],
|
| 1150 |
+
"page_idx": 8
|
| 1151 |
+
},
|
| 1152 |
+
{
|
| 1153 |
+
"type": "text",
|
| 1154 |
+
"text": "Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In 27th International Conference on Machine Learning, Haifa, Israel, 2010. ",
|
| 1155 |
+
"bbox": [
|
| 1156 |
+
171,
|
| 1157 |
+
702,
|
| 1158 |
+
821,
|
| 1159 |
+
731
|
| 1160 |
+
],
|
| 1161 |
+
"page_idx": 8
|
| 1162 |
+
},
|
| 1163 |
+
{
|
| 1164 |
+
"type": "text",
|
| 1165 |
+
"text": "Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. In 30th International Conference on Machine Learning, Atlanta, Georgia, USA, 2013. ",
|
| 1166 |
+
"bbox": [
|
| 1167 |
+
171,
|
| 1168 |
+
739,
|
| 1169 |
+
823,
|
| 1170 |
+
770
|
| 1171 |
+
],
|
| 1172 |
+
"page_idx": 8
|
| 1173 |
+
},
|
| 1174 |
+
{
|
| 1175 |
+
"type": "text",
|
| 1176 |
+
"text": "Antony W Rix, John G Beerends, Michael P Hollier, and Andries P Hekstra. Perceptual evaluation of speech quality (pesq)-a new method for speech quality assessment of telephone networks and codecs. In Acoustics, Speech, and Signal Processing, 2001. Proceedings.(ICASSP’01). 2001 IEEE International Conference on, volume 2, pp. 749–752. IEEE, 2001. ",
|
| 1177 |
+
"bbox": [
|
| 1178 |
+
173,
|
| 1179 |
+
777,
|
| 1180 |
+
825,
|
| 1181 |
+
834
|
| 1182 |
+
],
|
| 1183 |
+
"page_idx": 8
|
| 1184 |
+
},
|
| 1185 |
+
{
|
| 1186 |
+
"type": "text",
|
| 1187 |
+
"text": "Cees H Taal, Richard C Hendriks, Richard Heusdens, and Jesper Jensen. An algorithm for intelligibility prediction of time–frequency weighted noisy speech. IEEE Transactions on Audio, Speech, and Language Processing, 19(7):2125–2136, 2011. ",
|
| 1188 |
+
"bbox": [
|
| 1189 |
+
173,
|
| 1190 |
+
843,
|
| 1191 |
+
821,
|
| 1192 |
+
886
|
| 1193 |
+
],
|
| 1194 |
+
"page_idx": 8
|
| 1195 |
+
},
|
| 1196 |
+
{
|
| 1197 |
+
"type": "text",
|
| 1198 |
+
"text": "Hemant D. Tagare. Notes on optimization on stiefel manifolds. Technical report, Yale University, 2011. ",
|
| 1199 |
+
"bbox": [
|
| 1200 |
+
174,
|
| 1201 |
+
895,
|
| 1202 |
+
821,
|
| 1203 |
+
924
|
| 1204 |
+
],
|
| 1205 |
+
"page_idx": 8
|
| 1206 |
+
},
|
| 1207 |
+
{
|
| 1208 |
+
"type": "text",
|
| 1209 |
+
"text": "Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2):26– 31, 2012. ",
|
| 1210 |
+
"bbox": [
|
| 1211 |
+
174,
|
| 1212 |
+
103,
|
| 1213 |
+
825,
|
| 1214 |
+
145
|
| 1215 |
+
],
|
| 1216 |
+
"page_idx": 9
|
| 1217 |
+
},
|
| 1218 |
+
{
|
| 1219 |
+
"type": "text",
|
| 1220 |
+
"text": "Eugene Vorontsov, Chiheb Trabelsi, Samuel Kadoury, and Chris Pal. On orthogonality and learning recurrent networks with long term dependencies. arXiv preprint arXiv:1702.00071, 2017. ",
|
| 1221 |
+
"bbox": [
|
| 1222 |
+
173,
|
| 1223 |
+
155,
|
| 1224 |
+
823,
|
| 1225 |
+
184
|
| 1226 |
+
],
|
| 1227 |
+
"page_idx": 9
|
| 1228 |
+
},
|
| 1229 |
+
{
|
| 1230 |
+
"type": "text",
|
| 1231 |
+
"text": "Zaiwen Wen and Wotao Yin. A feasible method for optimization with orthogonality constraints. In Mathematical Programming, volume 142(1-2), pp. 397–434. 2013. ",
|
| 1232 |
+
"bbox": [
|
| 1233 |
+
171,
|
| 1234 |
+
193,
|
| 1235 |
+
823,
|
| 1236 |
+
222
|
| 1237 |
+
],
|
| 1238 |
+
"page_idx": 9
|
| 1239 |
+
},
|
| 1240 |
+
{
|
| 1241 |
+
"type": "text",
|
| 1242 |
+
"text": "Scott Wisdom, Thomas Powers, John Hershey, Jonathan Le Roux, and Les Atlas. Full-capacity unitary recurrent neural networks. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett (eds.), Advances in Neural Information Processing Systems 29, pp. 4880–4888. Curran Associates, Inc., 2016. ",
|
| 1243 |
+
"bbox": [
|
| 1244 |
+
174,
|
| 1245 |
+
231,
|
| 1246 |
+
825,
|
| 1247 |
+
286
|
| 1248 |
+
],
|
| 1249 |
+
"page_idx": 9
|
| 1250 |
+
},
|
| 1251 |
+
{
|
| 1252 |
+
"type": "text",
|
| 1253 |
+
"text": "APPENDIX A: PROOF OF THEOREM 3.2 ",
|
| 1254 |
+
"text_level": 1,
|
| 1255 |
+
"bbox": [
|
| 1256 |
+
174,
|
| 1257 |
+
101,
|
| 1258 |
+
501,
|
| 1259 |
+
118
|
| 1260 |
+
],
|
| 1261 |
+
"page_idx": 10
|
| 1262 |
+
},
|
| 1263 |
+
{
|
| 1264 |
+
"type": "text",
|
| 1265 |
+
"text": "For completeness, we restate and prove Theorem 3.2. ",
|
| 1266 |
+
"bbox": [
|
| 1267 |
+
174,
|
| 1268 |
+
133,
|
| 1269 |
+
524,
|
| 1270 |
+
148
|
| 1271 |
+
],
|
| 1272 |
+
"page_idx": 10
|
| 1273 |
+
},
|
| 1274 |
+
{
|
| 1275 |
+
"type": "text",
|
| 1276 |
+
"text": "Theorem 3.2 Let $L = L ( W ) : \\mathbb { R } ^ { n \\times n } \\mathbb { R }$ be some differentiable loss function for an RNN with the recurrent weight matrix $W$ . Let $W = W ( A ) : = \\left( I + A \\right) ^ { - 1 } \\left( I - A \\right) D$ where $A \\in \\mathbb { R } ^ { n \\times n }$ is skew-symmetric and $D \\in \\mathbb { R } ^ { n \\times n }$ is a fixed diagonal matrix consisting of - $\\mathbf { \\xi } _ { l }$ and $I$ entries. Then the gradient of $L = L ( W ( A ) )$ with respect to $A$ is ",
|
| 1277 |
+
"bbox": [
|
| 1278 |
+
173,
|
| 1279 |
+
154,
|
| 1280 |
+
826,
|
| 1281 |
+
215
|
| 1282 |
+
],
|
| 1283 |
+
"page_idx": 10
|
| 1284 |
+
},
|
| 1285 |
+
{
|
| 1286 |
+
"type": "equation",
|
| 1287 |
+
"img_path": "images/7120125763682372d7a0cb2dcc4b9680f12de56125390afcbe4d14188fb345f0.jpg",
|
| 1288 |
+
"text": "$$\n\\frac { \\partial L } { \\partial A } = V ^ { T } - V\n$$",
|
| 1289 |
+
"text_format": "latex",
|
| 1290 |
+
"bbox": [
|
| 1291 |
+
444,
|
| 1292 |
+
231,
|
| 1293 |
+
553,
|
| 1294 |
+
262
|
| 1295 |
+
],
|
| 1296 |
+
"page_idx": 10
|
| 1297 |
+
},
|
| 1298 |
+
{
|
| 1299 |
+
"type": "text",
|
| 1300 |
+
"text": "where $\\begin{array} { r } { V : = { ( I + A ) } ^ { - T } \\frac { \\partial L } { \\partial W } \\left( D + W ^ { T } \\right) , \\frac { \\partial L } { \\partial A } = \\left[ \\frac { \\partial L } { \\partial A _ { i , j } } \\right] \\in \\mathbb { R } ^ { n \\times n } , } \\end{array}$ , and $\\begin{array} { r } { \\frac { \\partial L } { \\partial W } = \\left[ \\frac { \\partial L } { \\partial W _ { i , j } } \\right] \\in \\mathbb { R } ^ { n \\times n } } \\end{array}$ ",
|
| 1301 |
+
"bbox": [
|
| 1302 |
+
171,
|
| 1303 |
+
272,
|
| 1304 |
+
799,
|
| 1305 |
+
299
|
| 1306 |
+
],
|
| 1307 |
+
"page_idx": 10
|
| 1308 |
+
},
|
| 1309 |
+
{
|
| 1310 |
+
"type": "text",
|
| 1311 |
+
"text": "Proof: Let $Z : = ( I + A ) ^ { - 1 } ( I - A )$ . We consider the $( i , j )$ entry of $\\textstyle { \\frac { \\partial L } { \\partial A } }$ . Taking the derivative with respect to $A _ { i , j }$ where $i \\neq j$ we obtain: ",
|
| 1312 |
+
"bbox": [
|
| 1313 |
+
173,
|
| 1314 |
+
305,
|
| 1315 |
+
821,
|
| 1316 |
+
337
|
| 1317 |
+
],
|
| 1318 |
+
"page_idx": 10
|
| 1319 |
+
},
|
| 1320 |
+
{
|
| 1321 |
+
"type": "equation",
|
| 1322 |
+
"img_path": "images/2125fd0128617989df32f2b070059b6033b0d411b72fe118b6b16fcd683e0bad.jpg",
|
| 1323 |
+
"text": "$$\n{ \\frac { \\partial L } { \\partial A _ { i , j } } } = \\sum _ { k , l = 1 } ^ { n } { \\frac { \\partial L } { \\partial W _ { k , l } } } { \\frac { \\partial W _ { k , l } } { \\partial A _ { i , j } } } = \\sum _ { k , l = 1 } ^ { n } { \\frac { \\partial L } { \\partial W _ { k , l } } } D _ { l , l } { \\frac { \\partial Z _ { k , l } } { \\partial A _ { i , j } } } = \\operatorname { t r } \\left[ \\left( { \\frac { \\partial L } { \\partial W } } D \\right) ^ { T } { \\frac { \\partial Z } { \\partial A _ { i , j } } } \\right]\n$$",
|
| 1324 |
+
"text_format": "latex",
|
| 1325 |
+
"bbox": [
|
| 1326 |
+
230,
|
| 1327 |
+
361,
|
| 1328 |
+
767,
|
| 1329 |
+
405
|
| 1330 |
+
],
|
| 1331 |
+
"page_idx": 10
|
| 1332 |
+
},
|
| 1333 |
+
{
|
| 1334 |
+
"type": "text",
|
| 1335 |
+
"text": "Using the identity $\\left( I + A \\right) Z = I - A$ and taking the derivative with respect to $A _ { i , j }$ to both sides we obtain: ",
|
| 1336 |
+
"bbox": [
|
| 1337 |
+
173,
|
| 1338 |
+
420,
|
| 1339 |
+
823,
|
| 1340 |
+
449
|
| 1341 |
+
],
|
| 1342 |
+
"page_idx": 10
|
| 1343 |
+
},
|
| 1344 |
+
{
|
| 1345 |
+
"type": "equation",
|
| 1346 |
+
"img_path": "images/9a01244ec4a458bb0cd01e7f4ac09036617e3b1ee49f4086924d6547450737a6.jpg",
|
| 1347 |
+
"text": "$$\n{ \\frac { \\partial Z } { \\partial A _ { i , j } } } + { \\frac { \\partial A } { \\partial A _ { i , j } } } Z + A { \\frac { \\partial Z } { \\partial A _ { i , j } } } = - { \\frac { \\partial A } { \\partial A _ { i , j } } }\n$$",
|
| 1348 |
+
"text_format": "latex",
|
| 1349 |
+
"bbox": [
|
| 1350 |
+
366,
|
| 1351 |
+
474,
|
| 1352 |
+
632,
|
| 1353 |
+
510
|
| 1354 |
+
],
|
| 1355 |
+
"page_idx": 10
|
| 1356 |
+
},
|
| 1357 |
+
{
|
| 1358 |
+
"type": "text",
|
| 1359 |
+
"text": "and rearranging we get: ",
|
| 1360 |
+
"bbox": [
|
| 1361 |
+
173,
|
| 1362 |
+
523,
|
| 1363 |
+
331,
|
| 1364 |
+
537
|
| 1365 |
+
],
|
| 1366 |
+
"page_idx": 10
|
| 1367 |
+
},
|
| 1368 |
+
{
|
| 1369 |
+
"type": "equation",
|
| 1370 |
+
"img_path": "images/0ea8d6a27bec04ecf2af7665792d58a9e70286c95e601109a98c7147f301f1ee.jpg",
|
| 1371 |
+
"text": "$$\n{ \\frac { \\partial Z } { \\partial A _ { i , j } } } = - \\left( I + A \\right) ^ { - 1 } \\left( { \\frac { \\partial A } { \\partial A _ { i , j } } } + { \\frac { \\partial A } { \\partial A _ { i , j } } } Z \\right)\n$$",
|
| 1372 |
+
"text_format": "latex",
|
| 1373 |
+
"bbox": [
|
| 1374 |
+
352,
|
| 1375 |
+
564,
|
| 1376 |
+
645,
|
| 1377 |
+
599
|
| 1378 |
+
],
|
| 1379 |
+
"page_idx": 10
|
| 1380 |
+
},
|
| 1381 |
+
{
|
| 1382 |
+
"type": "text",
|
| 1383 |
+
"text": "Let $E _ { i , j }$ denote the matrix whose $( i , j )$ entry is 1 with all others being 0. Since $A$ is skew-symmetric, we have $\\begin{array} { r } { \\frac { \\partial A } { \\partial A _ { i , j } } = E _ { i , j } - E _ { j , i } } \\end{array}$ . Combining everything, we have: ",
|
| 1384 |
+
"bbox": [
|
| 1385 |
+
171,
|
| 1386 |
+
613,
|
| 1387 |
+
823,
|
| 1388 |
+
646
|
| 1389 |
+
],
|
| 1390 |
+
"page_idx": 10
|
| 1391 |
+
},
|
| 1392 |
+
{
|
| 1393 |
+
"type": "equation",
|
| 1394 |
+
"img_path": "images/3ddc52457687d48279cc195c5012b61acaaf1a40745baa23f0f275b3a450c740.jpg",
|
| 1395 |
+
"text": "$$\n\\begin{array} { r l } & { \\frac { \\partial L } { \\partial A _ { i , j } } = - \\mathrm { u r } \\left[ \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { \\boldsymbol { \\mathsf { T } } } ( \\boldsymbol { I } + \\boldsymbol { A } ) ^ { - 1 } \\left( E _ { s , j } - E _ { s , i } + E _ { i , j } \\boldsymbol { Z } - E _ { s , i } \\boldsymbol { Z } \\right) \\right] } \\\\ & { \\qquad = - \\mathrm { u r } \\left[ \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { \\boldsymbol { \\mathsf { T } } } ( \\boldsymbol { I } + \\boldsymbol { A } ) ^ { - 1 } E _ { s , j } \\right] + \\mathrm { t r } \\left[ \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { \\boldsymbol { \\mathsf { T } } } ( \\boldsymbol { I } + \\boldsymbol { A } ) ^ { - 1 } E _ { s , i } \\right] } \\\\ & { \\qquad - \\mathrm { u r } \\left[ \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { \\boldsymbol { \\mathsf { T } } } ( \\boldsymbol { I } + \\boldsymbol { A } ) ^ { - 1 } E _ { s , j } \\boldsymbol { Z } \\right] + \\mathrm { t r } \\left[ \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { \\boldsymbol { \\mathsf { T } } } ( \\boldsymbol { I } + \\boldsymbol { A } ) ^ { - 1 } E _ { s , i } \\boldsymbol { Z } \\right] } \\\\ & { \\qquad = - \\left[ \\left( \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { \\boldsymbol { \\mathsf { T } } } ( \\boldsymbol { I } + \\boldsymbol { A } ) ^ { - 1 } \\right) ^ { \\boldsymbol { \\mathsf { T } } } \\right] _ { i , j } + \\left[ \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { \\boldsymbol { \\mathsf { T } } } ( \\boldsymbol { I } + \\boldsymbol { A } ) ^ { - 1 } \\right] _ { i , j } } \\\\ & { \\qquad - \\left[ \\left( \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { \\boldsymbol { \\mathsf { T } } } ( \\boldsymbol { I } + \\boldsymbol { A } ) ^ { - 1 } \\right) ^ { \\boldsymbol { \\mathsf { T } } } \\boldsymbol { Z } ^ { \\boldsymbol { \\mathsf { T } } } \\right] _ { i , j } + \\left[ \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { \\boldsymbol { \\mathsf { T } } } ( \\boldsymbol { I } + \\boldsymbol { A } ) ^ { - 1 } \\right] _ { i , j } } \\end{array}\n$$",
|
| 1396 |
+
"text_format": "latex",
|
| 1397 |
+
"bbox": [
|
| 1398 |
+
222,
|
| 1399 |
+
670,
|
| 1400 |
+
776,
|
| 1401 |
+
905
|
| 1402 |
+
],
|
| 1403 |
+
"page_idx": 10
|
| 1404 |
+
},
|
| 1405 |
+
{
|
| 1406 |
+
"type": "equation",
|
| 1407 |
+
"img_path": "images/b3c86073a7cba6659323915444f21c664c37249a395fe2ef68e4aa59f96e48c2.jpg",
|
| 1408 |
+
"text": "$$\n\\begin{array} { r l } & { = \\left[ \\left( I + Z \\right) \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { T } \\left( I + A \\right) ^ { - 1 } \\right] _ { i , j } - \\left[ \\left( \\left( \\frac { \\partial L } { \\partial W } D \\right) ^ { T } \\left( I + A \\right) ^ { - 1 } \\right) ^ { T } \\left( I + Z ^ { T } \\right) \\right] _ { i , j } } \\\\ & { = \\left[ \\left( D + W \\right) \\left( \\frac { \\partial L } { \\partial W } \\right) ^ { T } \\left( I + A \\right) ^ { - 1 } \\right] _ { i , j } - \\left[ \\left( I + A \\right) ^ { - T } \\frac { \\partial L } { \\partial W } \\left( D + W ^ { T } \\right) \\right] _ { i , j } } \\end{array}\n$$",
|
| 1409 |
+
"text_format": "latex",
|
| 1410 |
+
"bbox": [
|
| 1411 |
+
212,
|
| 1412 |
+
99,
|
| 1413 |
+
790,
|
| 1414 |
+
198
|
| 1415 |
+
],
|
| 1416 |
+
"page_idx": 11
|
| 1417 |
+
},
|
| 1418 |
+
{
|
| 1419 |
+
"type": "text",
|
| 1420 |
+
"text": "Using the above formulation, ∂L∂Aj,j $\\begin{array} { r } { \\frac { \\partial L } { \\partial A _ { j , j } } = 0 } \\end{array}$ and $\\begin{array} { r } { \\frac { \\partial L } { \\partial A _ { i , j } } = - \\frac { \\partial L } { \\partial A _ { j , i } } } \\end{array}$ so that $\\frac { \\partial L } { \\partial A }$ is a skew-symmetric matrix. \nFinally, by the definition of $V$ we get the desired result. ",
|
| 1421 |
+
"bbox": [
|
| 1422 |
+
174,
|
| 1423 |
+
207,
|
| 1424 |
+
821,
|
| 1425 |
+
241
|
| 1426 |
+
],
|
| 1427 |
+
"page_idx": 11
|
| 1428 |
+
},
|
| 1429 |
+
{
|
| 1430 |
+
"type": "text",
|
| 1431 |
+
"text": "APPENDIX B: LOSS OF ORTHOGONALITY ",
|
| 1432 |
+
"text_level": 1,
|
| 1433 |
+
"bbox": [
|
| 1434 |
+
176,
|
| 1435 |
+
260,
|
| 1436 |
+
517,
|
| 1437 |
+
276
|
| 1438 |
+
],
|
| 1439 |
+
"page_idx": 11
|
| 1440 |
+
},
|
| 1441 |
+
{
|
| 1442 |
+
"type": "text",
|
| 1443 |
+
"text": "In the scoRNN architecture, the recurrent weight matrix is parameterized with a skew-symmetric matrix through the Cayley transform. This ensures the computed recurrent weight matrix in floating point arithmetic is orthogonal to the order of machine precision after each update step. Unlike scoRNN, the full-capacity uRNN maintains a unitary recurrent weight matrix by a multiplicative update scheme. Due to the accumulation of rounding errors over a large number of repeated matrix multiplications, the recurrent weight may not remain unitary throughout training. To investigate this, we ran the scoRNN and full-capacity uRNN with equal hidden unit sizes of $n = 5 1 2$ on the unpermuted MNIST experiment and checked for loss of orthogonality at each epoch. The results of this experiment are shown in Figure 4. As can be seen, the recurrent weight matrix for the fullcapacity uRNN becomes less unitary over time, but the orthogonality recurrent weight matrix for scoRNN is not affected by roundoff errors. ",
|
| 1444 |
+
"bbox": [
|
| 1445 |
+
173,
|
| 1446 |
+
290,
|
| 1447 |
+
825,
|
| 1448 |
+
444
|
| 1449 |
+
],
|
| 1450 |
+
"page_idx": 11
|
| 1451 |
+
},
|
| 1452 |
+
{
|
| 1453 |
+
"type": "image",
|
| 1454 |
+
"img_path": "images/7cc6bf9b736720a6abfbdc3a1729e517cc2c6481311ceb14eb96c8bd5f11e7bc.jpg",
|
| 1455 |
+
"image_caption": [
|
| 1456 |
+
"Figure 4: Unitary scores $( \\| W ^ { * } W - I \\| _ { F } )$ for the full-capacity uRNN recurrent weight matrix and orthogonality scores $( \\| W ^ { T } W - I \\| _ { F } ) \\cdot$ for the scoRNN recurrent weight matrix using a GPU on the pixel-by-pixel MNIST experiment. "
|
| 1457 |
+
],
|
| 1458 |
+
"image_footnote": [],
|
| 1459 |
+
"bbox": [
|
| 1460 |
+
352,
|
| 1461 |
+
465,
|
| 1462 |
+
627,
|
| 1463 |
+
636
|
| 1464 |
+
],
|
| 1465 |
+
"page_idx": 11
|
| 1466 |
+
},
|
| 1467 |
+
{
|
| 1468 |
+
"type": "text",
|
| 1469 |
+
"text": "APPENDIX C: VANISHING GRADIENTS ",
|
| 1470 |
+
"text_level": 1,
|
| 1471 |
+
"bbox": [
|
| 1472 |
+
174,
|
| 1473 |
+
723,
|
| 1474 |
+
495,
|
| 1475 |
+
739
|
| 1476 |
+
],
|
| 1477 |
+
"page_idx": 11
|
| 1478 |
+
},
|
| 1479 |
+
{
|
| 1480 |
+
"type": "text",
|
| 1481 |
+
"text": "As discussed in Arjovsky et al. (2016), the vanishing/exploding gradient problem is caused by rapid growth or decay of the gradient of the hidden state $\\frac { \\partial \\dot { L } } { \\partial h _ { t } }$ as we move earlier in the sequence (that is, as $t$ decreases). To see if vanishing/exploding gradients affect the scoRNN model, we examined hidden state gradients in the scoRNN and LSTM models on the adding problem experiment (see section 5.2) with sequence length $T = 5 0 0$ . ",
|
| 1482 |
+
"bbox": [
|
| 1483 |
+
174,
|
| 1484 |
+
753,
|
| 1485 |
+
825,
|
| 1486 |
+
827
|
| 1487 |
+
],
|
| 1488 |
+
"page_idx": 11
|
| 1489 |
+
},
|
| 1490 |
+
{
|
| 1491 |
+
"type": "text",
|
| 1492 |
+
"text": "The norms of these gradients are shown at two different points in time during training in Figure 5. As can be seen, LSTM gradient norms decrease steadily as we move away from the end of the sequence. The right half of Figure 5 shows that this vanishing effect is exacerbated by training after 300 iterations. ",
|
| 1493 |
+
"bbox": [
|
| 1494 |
+
174,
|
| 1495 |
+
832,
|
| 1496 |
+
823,
|
| 1497 |
+
888
|
| 1498 |
+
],
|
| 1499 |
+
"page_idx": 11
|
| 1500 |
+
},
|
| 1501 |
+
{
|
| 1502 |
+
"type": "text",
|
| 1503 |
+
"text": "In contrast, scoRNN gradients decay by less than an order of magnitude at the beginning of training, remaining near $1 0 ^ { - 2 }$ for all timesteps. Even after 300 iterations of training, scoRNN hidden state gradients decay only slightly, from $1 0 ^ { - 3 }$ at $t = 5 0 0$ to $1 0 ^ { - 4 }$ at $t = 0$ . This allows information to easily propagate from the beginning of the sequence to the end. ",
|
| 1504 |
+
"bbox": [
|
| 1505 |
+
173,
|
| 1506 |
+
895,
|
| 1507 |
+
821,
|
| 1508 |
+
924
|
| 1509 |
+
],
|
| 1510 |
+
"page_idx": 11
|
| 1511 |
+
},
|
| 1512 |
+
{
|
| 1513 |
+
"type": "text",
|
| 1514 |
+
"text": "",
|
| 1515 |
+
"bbox": [
|
| 1516 |
+
171,
|
| 1517 |
+
102,
|
| 1518 |
+
823,
|
| 1519 |
+
132
|
| 1520 |
+
],
|
| 1521 |
+
"page_idx": 12
|
| 1522 |
+
},
|
| 1523 |
+
{
|
| 1524 |
+
"type": "image",
|
| 1525 |
+
"img_path": "images/414ce683611b853b5b0f2907a663cb8cadc39853031da9b5360e73cc0b90b827.jpg",
|
| 1526 |
+
"image_caption": [
|
| 1527 |
+
"Figure 5: Gradient norms $\\parallel \\frac { \\partial L } { \\partial h _ { t } } \\parallel$ for scoRNN and LSTM models during training on the adding problem. The $x$ -axis shows different values of $t$ . The left plot shows gradients at the beginning of training, and the right shows gradients after 300 training iterations. "
|
| 1528 |
+
],
|
| 1529 |
+
"image_footnote": [],
|
| 1530 |
+
"bbox": [
|
| 1531 |
+
243,
|
| 1532 |
+
148,
|
| 1533 |
+
738,
|
| 1534 |
+
362
|
| 1535 |
+
],
|
| 1536 |
+
"page_idx": 12
|
| 1537 |
+
},
|
| 1538 |
+
{
|
| 1539 |
+
"type": "text",
|
| 1540 |
+
"text": "APPENDIX D: COMPLEXITY AND SPEED ",
|
| 1541 |
+
"text_level": 1,
|
| 1542 |
+
"bbox": [
|
| 1543 |
+
176,
|
| 1544 |
+
450,
|
| 1545 |
+
509,
|
| 1546 |
+
467
|
| 1547 |
+
],
|
| 1548 |
+
"page_idx": 12
|
| 1549 |
+
},
|
| 1550 |
+
{
|
| 1551 |
+
"type": "text",
|
| 1552 |
+
"text": "The scoRNN architecture is similar in complexity and memory usage to a standard RNN except for the additional memory requirement of storing the $n ( n - 1 ) / 2$ entries of the skew-symmetric matrix $A$ and the additional complexity of forming the recurrent weight matrix $W$ from $A$ with the scaled Cayley transform. We note that the recurrent weight matrix is generated from the skew-symmetric $A$ matrix only once per training iteration; this computational cost is small compared to the cost of the forward and backward propagations through all time steps in a training batch for a standard RNN. ",
|
| 1553 |
+
"bbox": [
|
| 1554 |
+
173,
|
| 1555 |
+
482,
|
| 1556 |
+
825,
|
| 1557 |
+
566
|
| 1558 |
+
],
|
| 1559 |
+
"page_idx": 12
|
| 1560 |
+
},
|
| 1561 |
+
{
|
| 1562 |
+
"type": "table",
|
| 1563 |
+
"img_path": "images/b4cbeeb5fa39a018b3eacac9018b914fbcde98cb24ed4596302a45c7d387596f.jpg",
|
| 1564 |
+
"table_caption": [
|
| 1565 |
+
"Table 3: Timing results for the unpermuted MNIST dataset. "
|
| 1566 |
+
],
|
| 1567 |
+
"table_footnote": [],
|
| 1568 |
+
"table_body": "<table><tr><td>Model</td><td>n</td><td># params</td><td>Minutes Per Epoch</td></tr><tr><td>scoRNN</td><td>170</td><td>~16k</td><td>5.3</td></tr><tr><td>Rest.uRNN</td><td>512</td><td>~16k</td><td>8.2</td></tr><tr><td>Full uRNN</td><td>116</td><td>~ 16k</td><td>10.8</td></tr><tr><td>LSTM</td><td>128</td><td>~ 68k</td><td>5.0</td></tr><tr><td>scoRNN</td><td>360</td><td>~ 69k</td><td>7.4</td></tr><tr><td>Rest.uRNN</td><td>2,170</td><td>~ 69k</td><td>50.1</td></tr><tr><td>scoRNN</td><td>512</td><td>~ 137k</td><td>11.2</td></tr><tr><td>Full uRNN</td><td>360</td><td>≈137k</td><td>25.8</td></tr><tr><td>LSTM</td><td>256</td><td>~ 270k</td><td>5.2</td></tr><tr><td>Full uRNN</td><td>512</td><td>~ 270k</td><td>27.9</td></tr><tr><td>LSTM</td><td>512</td><td>~1,058k</td><td>5.6</td></tr></table>",
|
| 1569 |
+
"bbox": [
|
| 1570 |
+
303,
|
| 1571 |
+
611,
|
| 1572 |
+
692,
|
| 1573 |
+
799
|
| 1574 |
+
],
|
| 1575 |
+
"page_idx": 12
|
| 1576 |
+
},
|
| 1577 |
+
{
|
| 1578 |
+
"type": "text",
|
| 1579 |
+
"text": "To experimentally quantify potential differences between scoRNN and the other models, the real run-time for the models on the unpermuted MNIST experiment were recorded and are included in Table 3. All models were run on the same machine, which has an Intel Core i5-7400 processor and an nVidia GeForce GTX 1080 GPU. The scoRNN and LSTM models were run in Tensorflow, while the full and restricted capacity uRNNs were run using code provided in Wisdom et al. (2016). ",
|
| 1580 |
+
"bbox": [
|
| 1581 |
+
173,
|
| 1582 |
+
819,
|
| 1583 |
+
825,
|
| 1584 |
+
888
|
| 1585 |
+
],
|
| 1586 |
+
"page_idx": 12
|
| 1587 |
+
},
|
| 1588 |
+
{
|
| 1589 |
+
"type": "text",
|
| 1590 |
+
"text": "The LSTM model was fastest, and hidden sizes largely did not affect time taken per epoch; we suspect this is because the LSTM model we used was built in to Tensorflow. The LSTMs are of simialr speed to the $n = 1 7 0$ scoRNN, while they are approximately twice as fast as the $n =$ 512 scoRNN. Matching the number of hidden parameters, the scoRNN model with $n = 1 7 0$ is approximately 1.5 times faster than the restricted-capacity uRNN with $n = 5 1 2$ , and twice as fast as the full-capacity uRNN with $n = 1 1 6$ . This relationship can also be seen in the scoRNN and full-capacity uRNN models with $\\approx 1 3 7 k$ parameters, where the scoRNN takes 11.2 minutes per epoch as compared to 25.8 minutes for the scoRNN. ",
|
| 1591 |
+
"bbox": [
|
| 1592 |
+
173,
|
| 1593 |
+
895,
|
| 1594 |
+
823,
|
| 1595 |
+
924
|
| 1596 |
+
],
|
| 1597 |
+
"page_idx": 12
|
| 1598 |
+
},
|
| 1599 |
+
{
|
| 1600 |
+
"type": "text",
|
| 1601 |
+
"text": "",
|
| 1602 |
+
"bbox": [
|
| 1603 |
+
174,
|
| 1604 |
+
103,
|
| 1605 |
+
825,
|
| 1606 |
+
186
|
| 1607 |
+
],
|
| 1608 |
+
"page_idx": 13
|
| 1609 |
+
}
|
| 1610 |
+
]
|
parse/train/HyEi7bWR-/HyEi7bWR-_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/HyEi7bWR-/HyEi7bWR-_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1genAVKPB/r1genAVKPB.md
ADDED
|
@@ -0,0 +1,475 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# IS A GOOD REPRESENTATION SUFFICIENT FOR SAMPLE EFFICIENT REINFORCEMENT LEARNING?
|
| 2 |
+
|
| 3 |
+
Simon S. Du
|
| 4 |
+
Institute for Advanced Study
|
| 5 |
+
ssdu@ias.edu
|
| 6 |
+
|
| 7 |
+
Sham M. Kakade University of Washington, Seattle sham@cs.washington.edu
|
| 8 |
+
|
| 9 |
+
Ruosong Wang Carnegie Mellon University ruosongw@andrew.cmu.edu
|
| 10 |
+
|
| 11 |
+
Lin F. Yang University of California, Los Angles linyang@ee.ucla.edu
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
Modern deep learning methods provide effective means to learn good representations. However, is a good representation itself sufficient for sample efficient reinforcement learning? This question has largely been studied only with respect to (worst-case) approximation error, in the more classical approximate dynamic programming literature. With regards to the statistical viewpoint, this question is largely unexplored, and the extant body of literature mainly focuses on conditions which permit sample efficient reinforcement learning with little understanding of what are necessary conditions for efficient reinforcement learning.
|
| 16 |
+
|
| 17 |
+
This work shows that, from the statistical viewpoint, the situation is far subtler than suggested by the more traditional approximation viewpoint, where the requirements on the representation that suffice for sample efficient RL are even more stringent. Our main results provide sharp thresholds for reinforcement learning methods, showing that there are hard limitations on what constitutes good function approximation (in terms of the dimensionality of the representation), where we focus on natural representational conditions relevant to value-based, model-based, and policy-based learning. These lower bounds highlight that having a good (valuebased, model-based, or policy-based) representation in and of itself is insufficient for efficient reinforcement learning, unless the quality of this approximation passes certain hard thresholds. Furthermore, our lower bounds also imply exponential separations on the sample complexity between 1) value-based learning with perfect representation and value-based learning with a good-but-not-perfect representation, 2) value-based learning and policy-based learning, 3) policy-based learning and supervised learning and 4) reinforcement learning and imitation learning.
|
| 18 |
+
|
| 19 |
+
# 1 INTRODUCTION
|
| 20 |
+
|
| 21 |
+
Modern reinforcement learning (RL) problems are often challenging due to the huge state space. To tackle this challenge, function approximation schemes are often employed to provide a compact representation, so that reinforcement learning can generalize across states. A common paradigm is to first use a feature extractor to transform the raw input to features (a succinct representation) and then apply a linear predictor on top of the features. Traditionally, the feature extractor is often handcrafted (Sutton & Barto, 2018), while more modern methods often train a deep neural network to extract features. The hope of this paradigm is that, if there exists a good low dimensional (linear) representation, then efficient reinforcement learning is possible.
|
| 22 |
+
|
| 23 |
+
Empirically, combining various RL function approximation algorithms with neural networks for feature extraction has lead to tremendous successes on various tasks (Mnih et al., 2015; Schulman et al., 2015; 2017). A major problem, however, is that these methods often require a large amount of samples to learn a good policy. For example, deep $Q$ -network requires millions of samples to solve certain Atari games (Mnih et al., 2015). Here, one may wonder if there are fundamental statistical limitations on such methods, and, if so, under what conditions it would be possible to efficiently learn a good policy?
|
| 24 |
+
|
| 25 |
+
In the supervised learning context, it is well-known that empirical risk minimization is a statistically efficient method when using a low-complexity hypothesis space (Shalev-Shwartz & Ben-David, 2014), e.g. a hypothesis space with bounded VC dimension. For example, polynomial number of samples suffice for learning a near-optimal $d$ -dimensional linear classifier, even in the agnostic setting1. In contrast, in the more challenging RL setting, we seek to understand if efficient learning is possible (say from a sample complexity perspective) when we have access to an accurate (and compact) parametric representation — e.g. our policy class contains a near-optimal policy or our hypothesis class accurately approximates the optimal value function. In particular, this work focuses on the following question:
|
| 26 |
+
|
| 27 |
+
# Is a good representation sufficient for sample-efficient reinforcement learning?
|
| 28 |
+
|
| 29 |
+
This question has largely been studied only with respect to approximation error in the more classical approximate dynamic programming literature, where it is known that algorithms are stable to certain worst-case approximation errors. With regards to sample efficiency, this question is largely unexplored, where the extant body of literature mainly focuses on conditions which are sufficient for efficient reinforcement learning though there is little understanding of what are necessary conditions for efficient reinforcement learning. In reinforcement learning, there is no direct analogue of empirical risk minimization as in the supervised learning context, and it is not evident what are the statistical limits of learning based on properties of our underlying hypothesis class (which may be value-based, policy-based, or model-based).
|
| 30 |
+
|
| 31 |
+
Many recent works have provided polynomial upper bounds under various sufficient conditions, and in what follows we list a few examples. For value-based learning, the work of Wen & Van Roy (2013) showed that for deterministic systems2, if the optimal $Q$ -function can be perfectly predicted by linear functions of the given features, then the agent can learn the optimal policy exactly with polynomial number of samples. Recent work (Jiang et al., 2017) further showed that if certain complexity measure called Bellman rank is bounded, then the agent can learn a near-optimal policy efficiently. For policy-based learning, Agarwal et al. (2019) gave polynomial upper bounds which depend on a parameter that measures the difference between the initial distribution and the distribution induced by the optimal policy.
|
| 32 |
+
|
| 33 |
+
Our Contributions. This paper gives, perhaps surprisingly, strong negative results to this question. The main results are exponential lower bounds in terms of planning horizon $H$ for value-based, modelbased, and policy-based algorithms with given good representations3. Notably, the requirements on the representation that suffice for sample efficient RL are even more stringent than the more traditional approximation viewpoint. A comprehensive summary of previous upper bounds and our lower bounds is given in Table 1, and here we briefly summarize our hardness results.
|
| 34 |
+
|
| 35 |
+
1. For value-based learning, we show even if $Q$ -functions of all policies can be approximated by linear functions of the given representation with approximation error $\delta = \Omega \left( { \sqrt { \frac { H } { d } } } \right)$ where $d$ is the dimension of the representation and $H$ is the planning horizon, then the agent still needs to sample exponential number of trajectories to find a near-optimal policy.
|
| 36 |
+
2. For model-based learning, we show even if the transition matrix and the reward function can be approximated by linear functions of the given representation with approximation error $\delta = \Omega \left( { \sqrt { \frac { H } { d } } } \right)$ (in $\ell _ { \infty }$ sense), the agent still needs to sample exponential number of trajectories to find a near-optimal policy.
|
| 37 |
+
3. We show even if optimal policy can be perfectly predicted by a linear function of the given representation with a strictly positive margin, the agent still requires exponential number of trajectories to find a near-optimal policy.
|
| 38 |
+
|
| 39 |
+
These lower bounds hold even in deterministic systems and even if the agent knows the transition model. Note these negative results apply to the case where the $Q$ -function, the model, or the optimal policy can be predicted well by a linear function of the given representation. Since the class of linear functions is a strict subset of many more complicated function classes, including neural networks in particular, our negative results imply lower bounds for these more complex function classes as well. Our results highlight the following conceptual insights:
|
| 40 |
+
|
| 41 |
+
• The requirements on the representation that suffice for sample efficient RL are significantly more stringent than the more traditional approximation viewpoint; our statistical lower bounds show that there are hard thresholds on the worst-case approximation quality of the representation which are not necessary from the approximation viewpoint.
|
| 42 |
+
• Since our lower bounds apply even when the agent knows the transition model, the hardness is not due to the difficulty of exploration in the standard sense. The unknown reward function is sufficient to make the problem exponentially difficult.
|
| 43 |
+
• Our lower bounds are not due to the agent’s inability to perform efficient supervised learning, since our assumptions do admit polynomial sample complexity upper bounds if the data distribution is fixed.
|
| 44 |
+
Our lower bounds are not pathological in nature and suggest that these concerns may arise in practice. In a precise sense, almost all feature extractors induce a hard MDP instance in our construction (see Section 4.4).
|
| 45 |
+
|
| 46 |
+
Instead, one interpretation is that the hardness is due to a distribution mismatch in the following sense: the agent does not know which distribution to use for minimizing a (supervised) learning error (see Kakade (2003) for discussion), and even a known transition model is not information-theoretically sufficient to reduce the sample complexity.
|
| 47 |
+
|
| 48 |
+
Furthermore, our work implies several interesting exponential separations on the sample complexity between: 1) value-based learning with perfect representation and value-based learning with a goodbut-not-perfect representation, 2) value-based learning and policy-based learning, 3) policy-based learning and supervised learning and 4) reinforcement learning and imitation learning. We provide more details in Section 5.
|
| 49 |
+
|
| 50 |
+
# 2 RELATED WORK
|
| 51 |
+
|
| 52 |
+
A summary of previous upper bounds, together with lower bounds proved in this paper, is provided in Table 1. Some key assumptions are formally stated in Section 3 and Section 4. Our lower bounds highlight that classical complexity measures in supervised learning including small approximation error and margin, and standard assumptions in reinforcement learning including optimality gap and deterministic systems, are not enough for efficient RL with function approximation. We need additional assumptions, e.g., ones used in previous upper bounds, for efficient RL.
|
| 53 |
+
|
| 54 |
+
# 2.1 PREVIOUS LOWER BOUNDS
|
| 55 |
+
|
| 56 |
+
Existing exponential lower bounds, to our knowledge, construct unstructured MDPs with an exponentially large state space and reduce a bandit problem with exponentially many arms to an MDP (Krishnamurthy et al., 2016; Sun et al., 2017). However, these lower bounds cannot apply to MDPs whose transition models, value functions, or policies can be approximated with some natural function classes, e.g., linear functions, neural networks, etc. The current paper gives the first set of lower bounds for RL with linear function approximation (and thus also hold for super classes of linear functions such as neural networks).
|
| 57 |
+
|
| 58 |
+
# 2.2 PREVIOUS UPPER BOUNDS
|
| 59 |
+
|
| 60 |
+
We divide previous algorithms (with provable guarantees) into three classes: those that utilize uncertainty-based bonuses (e.g. UCB variants or Thompson sampling variants); approximate dynamic programming variants (which often make assumptions with respect to concentrability coefficients); and direct policy search-based methods (such as conserve policy iteration (CPI, see Kakade (2003)) or policy gradient methods, which make assumptions with respect to distribution mismatch coefficients).
|
| 61 |
+
|
| 62 |
+
<table><tr><td rowspan=1 colspan=1>Query Oracle</td><td rowspan=1 colspan=1>RL</td><td rowspan=1 colspan=1>Generative Model</td><td rowspan=1 colspan=1>Known Transition</td></tr><tr><td rowspan=1 colspan=4>Previous Upper Bounds</td></tr><tr><td rowspan=1 colspan=1>Exact linear Q* + DetMDP(Wen & Van Roy,2013)</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>Exact linear Q* + Bellman-Rank (Jiang et al.,2017)</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>Exact Linear Q* + Low Var + Gap (Du et al.,2019a)</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>Exact Linear Q* + Gap (Open Problem /Theorem C.1)</td><td rowspan=1 colspan=1>?</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>Exact Linear Q" for all π (Open Problem /Theorem D.1)</td><td rowspan=1 colspan=1>?</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>Approx.Linear Q for all π+Concentratability (Munos,2005; Antos et al.,2008)</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=1>Approx.Linear Q" for all π+Bounded Dist Mismatch Coeff (Kakade & Langford, 2002)</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=1>√</td></tr><tr><td rowspan=1 colspan=3>Lower Bounds (this work)</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=1 colspan=1>Approx Linear Q* (Theorem 4.1)</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td></tr><tr><td rowspan=1 colspan=1>Approx Linear Q" for all π (Theorem 4.1)</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td></tr><tr><td rowspan=1 colspan=1>lApprox Linear MDP (Theorem 4.2)</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td></tr><tr><td rowspan=1 colspan=1>Exact Linear π* + Margin + Gap + DetMDP (Theorem 4.3)</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td><td rowspan=1 colspan=1>×</td></tr><tr><td rowspan=1 colspan=1>Exact Linear Q*(Open Problem)</td><td rowspan=1 colspan=1>?</td><td rowspan=1 colspan=1>?</td><td rowspan=1 colspan=1>?</td></tr></table>
|
| 63 |
+
|
| 64 |
+
Table 1: Summary of theoretical results on reinforcement learning with linear function approximation. See Section 2 for discussion on this table. RL, Generative Model, Known Transition are defined in Section 3.3. Exact linear $Q ^ { * }$ : Assumption 4.1 with $\delta = 0$ . Approx linear $Q ^ { * }$ : Assumption 4.1 with $\delta = \Omega \left( { \sqrt { \frac { H } { d } } } \right)$ . Exact linear $\pi ^ { * }$ : Assumption 4.4. Margin: Assumption 4.5. Exact Linear $Q ^ { \pi }$ for all $\pi$ : Assumption 4.2 with $\delta = 0$ . Approximate Linear $Q ^ { \pi }$ for all $\pi$ : Assumption 4.2 with $\delta = \Omega \left( { \sqrt { \frac { H } { d } } } \right)$ . DetMDP: deterministic system defined in Section 3.1. Bellman-rank: Definition 5 in Jiang et al. (2017). Low Var: Assumption 1 in Du et al. (2019b). Gap: Assumption 3.1. Bounded Distribution Mismatch Coefficient: Definition 3.3 in Agarwal et al. (2019). $\ell _ { \infty }$ Approx Linear MDP: Assumption 4.3 with $\delta = \Omega \left( { \sqrt { \frac { H } { d } } } \right)$ . $\checkmark$ : there exists an algorithm with polynomial sample complexity to find a near-optimal policy. $\checkmark$ : requires certain condition on the initial distribution. $\times$ : exponential number of samples is required. ?: open problem.
|
| 65 |
+
|
| 66 |
+
The first class of methods include those based on witness rank, Belman rank, and the Eluder dimension, while the latter two classes of algorithms make assumptions either on concentrability coefficients or on distribution mismatch coefficients (see Agarwal et al. (2019); Scherrer (2014) for discussions).
|
| 67 |
+
|
| 68 |
+
Uncertainty bonus-based algorithms. Now we discuss existing theoretical results on value-based learning with function approximation. The most relevant work is Wen & Van Roy (2013) which showed in deterministic systems, if the optimal $Q$ -function is within a pre-specified function class which has bounded Eluder dimension, for which the class of linear functions is a special case, then the agent can learn the optimal policy using polynomial number of samples. This result has recently been generalized by Du et al. (2019a) which can deal with stochastic reward and low variance transition but requires strictly positive optimality gap. As we listed in Table 1, it is an open problem whether the condition that the optimal $Q$ -function is linear itself is sufficient for efficient RL.
|
| 69 |
+
|
| 70 |
+
Li et al. (2011) proposed a $Q$ -learning algorithm which requires the Know-What-It-Knows oracle. However, it is in general unknown how to implement such oracle in practice. Jiang et al. (2017) proposed the concept of Bellman Rank to characterize the sample complexity of value-based learning methods and gave an algorithm that has polynomial sample complexity in terms of the Bellman Rank, though the proposed algorithm is not computationally efficient. Bellman rank is bounded for a wide range of problems, including MDP with small number of hidden states, linear MDP, LQR, etc. Later work gave computationally efficient algorithms for certain special cases (Dann et al., 2018; Du et al., 2019a; Yang & Wang, 2019b; Jin et al., 2019). Recently, Witness rank, a generalization of Bellman rank to model-based methods, is studied in Sun et al. (2019).
|
| 71 |
+
|
| 72 |
+
Approximate dynamic programming-based algorithms. We now discuss approximate dynamic programming-based results characterized in terms of the concentrability coefficient. While classical approximate dynamic programming results typically require $\ell _ { \infty }$ -bounded errors, the notion of concentrability (originally due to (Munos, 2005)) permits sharper bounds in terms of average-case function approximation error, provided that the concentrability coefficient is bounded (e.g. see Munos (2005); Szepesvari & Munos (2005); Antos et al. (2008); Geist et al. (2019)). Under the ´ assumption that this problem-dependent parameter is bounded, Munos (2005); Szepesvari & Munos ´ (2005) and Antos et al. (2008) proved sample complexity and error bounds for approximate dynamic programming methods when there is a data collection policy (under which value-function fitting occurs) that induces a finite concentrability coefficient. The assumption that the concentrability coefficient is finite is in fact quite limiting. See Chen & Jiang (2019) which provides a more detailed discussion on this quantity.
|
| 73 |
+
|
| 74 |
+
Direct policy search-based algorithms. Stronger guarantees over approximate dynamic programming-based algrithm can be obtained with direct policy search-based methods, where instead of having a bounded concentrability coefficient, one only needs to have a bounded distribution mismatch coefficient. The latter assumption requires the agent to have access to a “good” initial state distribution (e.g. a measure which has coverage over where an optimal policy tends to visit); note that this assumption does not make restrictions over the class of MDPs. There are two classes of algorithms that fall into this category. First, there is Conservative Policy Iteration (Kakade & Langford, 2002), along with Policy Search by Dynamic Programming (PSDP) (Bagnell et al., 2004), and other boosting-style of policy search-based methods Scherrer & Geist (2014); Scherrer (2014), which have guarantees in terms of bounded distribution mismatch ratio. Second, more recently, Agarwal et al. (2019) showed that policy gradient styles of algorithms also have comparable guarantees.
|
| 75 |
+
|
| 76 |
+
Recent extensions. Subsequent to this work, the work by Van Roy & Dong (2019) and Lattimore & Szepesvari (2019) made notable contributions to the misspecified linear bandit problem. In particular, both papers found that Theorem 4.1 in our paper can be extended to the misspecified linear bandit problem and gave upper bounds for this problem showing that our lower bound has tight dependency on $\delta$ and $d$ . Lattimore & Szepesvari (2019) further gave an upper bound for the setting where the $Q$ -functions of all policies can be approximated by linear functions with small approximation errors and the agent can interact with the environment using a generative model. This upper bound also demonstrates that our lower bound has tight dependency on $\delta$ and $d$ .
|
| 77 |
+
|
| 78 |
+
# 3 PRELIMINARIES
|
| 79 |
+
|
| 80 |
+
Throughout this paper, for a given integer $H$ , we use $[ H ]$ to denote the set $\{ 0 , 1 , \ldots , H - 1 \}$
|
| 81 |
+
|
| 82 |
+
# 3.1 EPISODIC REINFORCEMENT LEARNING
|
| 83 |
+
|
| 84 |
+
Let $\mathcal { M } = ( \mathcal { S } , \mathcal { A } , H , P , R )$ be an Markov Decision Process (MDP) where $s$ is the state space, $\mathcal { A }$ is the action space whose size is bounded by a constant, $H \in \mathbb { Z } _ { + }$ is the planning horizon, $P : \mathcal { S } \times \mathcal { A } \bigtriangleup ( \mathcal { S } )$ is the transition function which takes a state-action pair and returns a distribution over states and $R : \mathcal { S } \times \mathcal { A } \bigtriangleup ( \mathbb { R } )$ is the reward distribution. Without loss of generality, we assume a fixed initial state ${ s _ { 0 } } ^ { 4 }$ . A policy $\pi : { \mathcal { S } } \to \triangle ( { \mathcal { A } } )$ prescribes a distribution over actions for each state. The policy $\pi$ induces a (random) trajectory $s _ { 0 } , a _ { 0 } , r _ { 0 } , s _ { 1 } , a _ { 1 } , r _ { 1 } , \ldots , s _ { H - 1 } , a _ { H - 1 } , r _ { H - 1 }$ where $a _ { 0 } \sim \pi ( s _ { 0 } )$ , $r _ { 0 } \sim R ( s _ { 0 } , a _ { 0 } )$ , $s _ { 1 } \sim P ( s _ { 0 } , a _ { 0 } )$ , $a _ { 1 } \sim \pi ( s _ { 1 } )$ , etc. To streamline our analysis, for each $h \in [ H ]$ , we use $S _ { h } \subseteq S$ to denote the set of states at level $h$ , and we assume $S _ { h }$ do not intersect with each other. We also assume $\textstyle \sum _ { h = 0 } ^ { H - 1 } r _ { h } \in [ 0 , 1 ]$ almost surely. Our goal is to find a policy $\pi$ that maximizes the expected total reward E $\textstyle : \left[ \sum _ { h = 0 } ^ { H - 1 } r _ { h } \mid \pi \right]$ . We use $\pi ^ { * }$ to denote the optimal policy. We say a policy $\pi$ is $\varepsilon$ -optimal if $\begin{array} { r } { \mathbb { E } \left[ \sum _ { h = 0 } ^ { H - 1 ^ { - } } r _ { h } \mid \pi \right] \ge \mathbb { E } \left[ \sum _ { h = 0 } ^ { H - 1 } r _ { h } \mid \pi ^ { * } \right] - \varepsilon . } \end{array}$
|
| 85 |
+
|
| 86 |
+
In this paper we prove lower bounds for deterministic systems, i.e., MDPs with deterministic transition $P$ , deterministic reward $R$ . In this setting, $P$ and $R$ can be regarded as functions instead of distributions. Since deterministic systems are special cases of general stochastic MDPs, lower bounds proved in this paper still hold for more general MDPs.
|
| 87 |
+
|
| 88 |
+
# 3.2 $Q$ -FUNCTION AND OPTIMALITY GAP
|
| 89 |
+
|
| 90 |
+
An important concept in RL is the $Q$ -function. Given a policy $\pi$ , a level $h \in [ H ]$ and a state-action pair $( s , a ) \in S _ { h } \times \mathcal { A }$ , the $Q$ -function is defined as $\begin{array} { r } { Q _ { h } ^ { \pi } ( s , a ) = \mathbb { E } \left[ \sum _ { h ^ { \prime } = h } ^ { H - 1 } r _ { h ^ { \prime } } \ | \ s _ { h } = s , a _ { h } = a , \pi \right] } \end{array}$ . For simplicity, we denote $Q _ { h } ^ { * } ( s , a ) = Q _ { h } ^ { \pi ^ { * } } ( s , a )$ . In addition to these definitions, we list below an important assumption, the optimality gap assumption, which is widely used in reinforcement learning and bandit literature. To state the assumption, we first define the function $\operatorname { g a p } : \mathcal { S } \times \mathcal { A } \mathbb { R }$ as $\begin{array} { r } { \mathrm { g a p } ( s , a ) = \arg \operatorname* { m a x } _ { a ^ { \prime } \in \mathcal { A } } Q ^ { * } ( s , a ^ { \prime } ) - Q ^ { * } ( s , a ) } \end{array}$ . Now we formally state the assumption.
|
| 91 |
+
|
| 92 |
+
Assumption 3.1 (Optimality Gap). There exists $\rho > 0$ such that $\rho \leq \operatorname { g a p } ( s , a )$ for all $( s , a ) \in S \times \mathcal { A }$ with $\mathrm { g a p } ( s , a ) > 0$ .
|
| 93 |
+
|
| 94 |
+
Here, $\rho$ is the smallest reward-to-go difference between the best set of actions and the rest. Recently, Du et al. (2019b) gave a provably efficient $Q$ -learning algorithm based on this assumption and Simchowitz & Jamieson (2019) showed that with this condition, the agent only incurs logarithmic regret in the tabular setting.
|
| 95 |
+
|
| 96 |
+
# 3.3 QUERY MODELS
|
| 97 |
+
|
| 98 |
+
Here we discuss three possible query oracles interacting with the MDP.
|
| 99 |
+
|
| 100 |
+
• RL: The most basic and weakest query oracle for MDP is the standard reinforcement learning query oracle where the agent can only interact with the MDP by choosing actions and observe the next state and the reward.
|
| 101 |
+
• Generative Model: A stronger query model assumes the agent can transit to any state (Kearns & Singh, 2002; Kakade, 2003; Sidford et al., 2018). This query model is available in certain robotic applications where one can control the robot to reach the target state.
|
| 102 |
+
Known Transition: The strongest query model considered is that the agent can not only transit to any state, but also knows the whole transition function. In this model, only the reward is unknown.
|
| 103 |
+
|
| 104 |
+
In this paper, we will prove lower bounds for the strongest Known Transition query oracle. Therefore, our lower bounds also apply to $\mathsf { R L }$ and Generative Model query oracles.
|
| 105 |
+
|
| 106 |
+
# 4 MAIN RESULTS
|
| 107 |
+
|
| 108 |
+
In this section we formally present our lower bounds. We also discuss proof ideas in Section 4.4.
|
| 109 |
+
|
| 110 |
+
# 4.1 LOWER BOUND FOR VALUE-BASED LEARNING
|
| 111 |
+
|
| 112 |
+
We first present our lower bound for value-based learning. A common assumption is that the $Q$ - function can be predicted well by a linear function of the given features (representation) (Bertsekas & Tsitsiklis, 1996). Formally, the agent is given a feature extractor $\phi : \mathcal { S } \overset { } { \times } \mathcal { A } \overset { } { } \mathbb { R } ^ { d }$ which can be hand-crafted or a pre-trained neural network that transforms a state-action pair to a $d$ -dimensional embedding. The following assumption states that the given feature extractor can be used to predict the $Q$ -function with approximation error at most $\delta$ using a linear function.
|
| 113 |
+
|
| 114 |
+
Assumption 4.1. There exists $\delta > 0$ and $\theta _ { 0 } , \theta _ { 1 } , \dots , \theta _ { H - 1 } \in { \mathbb { R } } ^ { d }$ such that for any $h \in [ H ]$ and any $( s , a ) \in \sigma _ { h } \times \mathcal { A }$ , $\left| Q _ { h } ^ { * } \left( s , a \right) - \left. \theta _ { h } , \phi \left( s , a \right) \right. \right| \leq \delta$ .
|
| 115 |
+
|
| 116 |
+
Here $\delta$ is the approximation error, which indicates the quality of the representation. If $\delta = 0$ , then $Q$ -function can be perfectly predicted by a linear function of $\phi \left( \cdot , \cdot \right)$ . In general, $\delta$ becomes smaller as we increase the dimension of $\phi$ , since larger dimension usually has more expressive power. When the feature extractor is strong enough, previous papers (Chen $\&$ Jiang, 2019; Farahmand, 2011) assume that linear functions of $\phi$ can approximate the $Q$ -function of any policy.
|
| 117 |
+
|
| 118 |
+
Assumption 4.2 (Policy Completeness). There exists $\delta > 0$ , such that for any $h \in [ H ]$ and any policy $\pi$ , there exists $\theta _ { h } ^ { \dot { \pi } } \in \mathbb { R } ^ { d }$ such that for any $( s , a ) \in S _ { h } \times \mathcal { A }$ , $| Q _ { h } ^ { \pi } \left( s , a \right) - \langle \theta _ { h } , \phi \left( s , a \right) \rangle | \leq \delta$ .
|
| 119 |
+
|
| 120 |
+
In the theoretical reinforcement learning literature, Assumption 4.2 is often called the (approximate) policy completeness assumption. This assumption is crucial in proving polynomial sample complexity guarantee for value iteration type of algorithms (Chen & Jiang, 2019; Farahmand, 2011).
|
| 121 |
+
|
| 122 |
+
The following theorem shows when $\delta = \Omega \left( { \sqrt { \frac { H } { d } } } \right)$ , the agent needs to sample exponential number of trajectories to find a near-optimal policy.
|
| 123 |
+
|
| 124 |
+
Theorem 4.1 (Exponential Lower Bound for Value-based Learning). There exists a family of MDPs with $| { \mathcal { A } } | = 2$ and a feature extractor $\phi$ that satisfy Assumption 4.2, such that any algorithm that returns a $1 / 2$ -optimal policy with probability 0.9 needs to sample $\Omega \left( { \operatorname* { m i n } \{ | \cal { S } | , 2 ^ { H } , \exp ( d \delta ^ { 2 } / 1 6 ) \} } \right)$ trajectories.
|
| 125 |
+
|
| 126 |
+
Note this lower bound also applies to MDPs that satisfy Assumption 4.1, since Assumption 4.2 is strictly stronger. We would like to emphasize that since linear functions is a subclass of more complicated function classes, e.g., neural networks, our lower bound also holds for these function classes. Moreover, in many scenarios, the feature extractor $\phi$ is the last layer of a neural network. Modern neural networks are often over-parameterized, which makes $d$ large. In this case, $d$ is much larger than $H$ . Thus, our lower bound holds even if the representation has small approximation error. Furthermore, the assumption that $| { \mathcal { A } } | = 2$ is only for simplicity. Our lower bound can be easily generalized to the case that $| { \mathcal { A } } | > 2$ , in which case the sample complexity lower bound is $\Omega \left( \operatorname* { m i n } \{ \lvert S \rvert , \lvert A \rvert ^ { H } , \exp ( d \delta ^ { 2 } / 1 6 ) \} \right)$ .
|
| 127 |
+
|
| 128 |
+
# 4.2 LOWER BOUND FOR MODEL-BASED LEARNING
|
| 129 |
+
|
| 130 |
+
Here we present our lower bound for model-based learning. Recently, Yang & Wang (2019b) proposed the linear transition assumption which was later studied in Yang & Wang (2019a); Jin et al. (2019). Again, we assume the agent is given a feature extractor $\phi : \mathcal { S } \times \mathcal { A } \mathbb { R } ^ { d }$ , and now we state the assumption formally as follow.
|
| 131 |
+
|
| 132 |
+
Assumption 4.3 (Approximate Linear MDP). There exists $\delta \ > \ 0 , \ \beta _ { 0 } , \beta _ { 1 } , \ldots , \beta _ { H - 1 } \ \in \ \mathbb { R } ^ { d }$ and $\psi : \mathcal { S } \ \to \ \mathbb { R } ^ { \hat { d } }$ such that for any $h \in [ H \mathrm { ~ - ~ } 1 ] , ( s , a ) \in \mathcal { S } _ { h } \times \mathcal { A }$ and $s ^ { \prime } \in \ S _ { h + 1 }$ $| P \left( s ^ { \prime } \mid s , a \right) - \left. \psi ( s ^ { \prime } ) , \phi \left( s , a \right) \right. | \leq \delta$ and $| \mathbb { E } [ R ( s , a ) ] - \langle \beta _ { h } , \phi ( s , a ) \rangle | \le \delta$ .
|
| 133 |
+
|
| 134 |
+
It has been shown in Yang & Wang (2019b;a); Jin et al. (2019) if $\| P \left( \cdot \mid s , a \right) - \langle \psi ( \cdot ) , \phi \left( s , a \right) \rangle \| _ { 1 }$ is bounded, then the problem admits an algorithm with polynomial sample complexity. Now we show that when $\delta = \Omega \left( { \sqrt { \frac { H } { d } } } \right)$ in Assumption 4.3, the agent needs exponential number of samples to find a near-optimal policy.
|
| 135 |
+
|
| 136 |
+
Theorem 4.2 (Exponential Lower Bound for Linear Transition Model). There exists a family of MDPs with $| { \mathcal { A } } | = 2$ and a feature extractor $\phi$ that satisfy Assumption 4.3, such that any algorithm that returns a $1 / 2$ -optimal policy with probability 0.9 needs to sample $\Omega \left( { \operatorname* { m i n } \{ | S | , 2 ^ { H } , \exp ( d \delta ^ { 2 } / 1 6 ) \} } \right)$ trajectories.
|
| 137 |
+
|
| 138 |
+
Again, our lower bound can be easily generalized to the case that $| { \mathcal { A } } | > 2$ .
|
| 139 |
+
|
| 140 |
+
We do note that an $\ell _ { \infty }$ approximation for a transition matrix may be a weak condition. Under the stronger condition that the transition matrix can be approximated well under the total variational distance, there exists polynomial sample complexity upper bounds that can tolerate approximation errors (Yang & Wang, 2019b;a; Jin et al., 2019).
|
| 141 |
+
|
| 142 |
+
# 4.3 LOWER BOUND FOR POLICY-BASED LEARNING
|
| 143 |
+
|
| 144 |
+
Next we present our lower bound for policy-based learning. This class of methods use function approximation on the policy and use optimization techniques, e.g., policy gradient, to find the optimal policy. In this paper, we focus on linear policies on top of a given representation. A linear policy $\pi$ is a policy of the form $\begin{array} { r } { \pi ( s _ { h } ) = \arg \operatorname* { m a x } _ { a \in \mathcal { A } } \left. \theta _ { h } , \phi ( s _ { h } , a ) \right. } \end{array}$ where $s _ { h } \in S _ { h }$ , $\phi \left( \cdot , \cdot \right)$ is a given feature extractor and $\theta _ { h } \in \mathbb { R } ^ { d }$ is the linear coefficient. Note that applying policy gradient on softmax parameterization of the policy is indeed trying to find the optimal policy among linear policies.
|
| 145 |
+
|
| 146 |
+
Similar to value-based learning, a natural assumption for policy-based learning is that the optimal policy is realizable5, i.e., the optimal policy is linear.
|
| 147 |
+
|
| 148 |
+
Assumption 4.4. For any $h \in [ H ]$ , there exists $\theta _ { h } \in \mathbb { R } ^ { d }$ that satisfies for any $s \in S _ { h }$ , we have $\pi ^ { * } \left( s \right) \in \arg \operatorname* { m a x } _ { a } \left. \theta _ { h } , \phi \left( s , a \right) \right.$ .
|
| 149 |
+
|
| 150 |
+
Here we discuss another assumption. For learning a linear classifier in the supervised learning setting, one can reduce the sample complexity significantly if the optimal linear classifier has a margin.
|
| 151 |
+
|
| 152 |
+
Assumption 4.5. We assume $\phi \left( s , a \right) \in \mathbb { R } ^ { d }$ satisfies $\| \phi ( s , a ) \| _ { 2 } = 1$ for any $( s , a ) \in S \times A .$ . For any $h \in [ H ]$ , there exists $\theta _ { h } \in \mathbb { R } ^ { d }$ with $\| \theta _ { h } \| _ { 2 } = 1$ and $\triangle > 0$ such that for any $s \in S _ { h }$ , there is a unique optimal action $\pi ^ { * } ( s )$ , and for any $a \neq \pi ^ { * } ( s )$ , $\langle \theta _ { h } , \phi \left( s , \pi ^ { * } ( s ) \right) \rangle - \langle \theta _ { h } , \phi \left( s , a \right) \rangle \geq \triangle$ .
|
| 153 |
+
|
| 154 |
+
Here we restrict the linear coefficients and features to have unit norm for normalization. Note that Assumption 4.5 is strictly stronger than Assumption 4.4. Now we present our result for linear policy.
|
| 155 |
+
|
| 156 |
+
Theorem 4.3 (Exponential Lower Bound for Policy-based Learning). There exists an absolute constant $\triangle _ { 0 }$ , such that for any $\triangle \ \leq \ \triangle _ { 0 }$ , there exists a family of $M D P s$ with $| { \mathcal { A } } | = 2$ and $a$ feature extractor $\phi$ that satisfy Assumption 3.1 with $\rho = \frac { \mathrm { \bar { ~ } } _ { 1 } } { 2 \operatorname* { m i n } \{ H , d \} }$ and Assumption 4.5, such that any algorithm that returns a $1 / 4$ -optimal policy with probability at least 0.9 needs to sample $\Omega \left( \mathrm { m i n } \{ 2 ^ { H } , 2 ^ { d } \} \right)$ trajectories.
|
| 157 |
+
|
| 158 |
+
Again, our lower bound can be easily generalized to the case that $| { \mathcal { A } } | > 2$ .
|
| 159 |
+
|
| 160 |
+
Compared with Theorem 4.1, Theorem 4.3 is even more pessimistic, in the sense that even with perfect representation with benign properties (gap and margin), the agent still needs to sample exponential number of samples. It also suggests that policy-based learning could be very different from supervised learning.
|
| 161 |
+
|
| 162 |
+
# 4.4 PROOF IDEAS
|
| 163 |
+
|
| 164 |
+
The binary tree hard instance. All our lower bound are proved based on reductions from the following hard instance. In this instance, both the transition $P$ and the reward $R$ are deterministic. There are $H$ levels of states, which form a full binary tree of depth $H$ . There are $2 ^ { h }$ states in level $h$ , and thus $2 ^ { H } - 1$ states in total. Among all the $2 ^ { H - 1 }$ states in level $H - 1$ , there is only one state with reward $R = 1$ , and for all other states in the MDP, the corresponding reward value $R = 0$ . Intuitively, to find a $1 / 2$ -optimal policy for such MDPs, the agent must enumerate all possible states in level $H - 1$ to find the state with reward $R = 1$ . Doing so intrinsically induces a sample complexity of $\Omega ( 2 ^ { H } )$ . This intuition is formalized in Theorem A.1 using Yao’s minimax principle (Yao, 1977).
|
| 165 |
+
|
| 166 |
+
Lower bound for value-based and model-based learning We now show how to construct a set of features so that Assumption 4.1-4.3 hold. Our main idea is to the utilize the following fact regarding the identity matrix: $\dot { \varepsilon } { \mathrm { - r a n k } } ( I _ { 2 ^ { H } } ) \leq O ( H / \varepsilon ^ { 2 } )$ . Here for a matrix $A \in \mathbb { R } ^ { n \times n }$ , its $\varepsilon$ -rank (a.k.a approximate rank) is defined to be $\operatorname* { m i n } \{ { \mathrm { r a n k } } ( B ) : B \in \mathbb { R } ^ { n \times n } , \| A - B \| _ { \infty } \leq \varepsilon \}$ , where we use $\| \cdot \| _ { \infty }$ to denote the entry-wise $\ell _ { \infty }$ norm of a matrix. The upper bound $\varepsilon { \mathrm { - r a n k } } ( I _ { n } ) \leq O ( \log n / \varepsilon ^ { 2 } )$ was first proved in Alon (2009) using the Johnson-Lindenstrauss Lemma (Johnson & Lindenstrauss, 1984), and we also provide a proof in Lemma A.1. The concept of $\varepsilon$ -rank has wide applications in theoretical computer science (Alon, 2009; Barak et al., 2011; Alon et al., 2013; 2014; Chen & Wang, 2019), but to our knowledge, this is the first time that it appears in reinforcement learning.
|
| 167 |
+
|
| 168 |
+
This fact can be alternatively stated as follow: there exists $\Phi \in \mathbb { R } ^ { 2 ^ { H } \times O ( H / \varepsilon ^ { 2 } ) }$ such that $\Vert I _ { 2 ^ { H } } -$ $\Phi \Phi ^ { \top } \| _ { \infty } \leq \varepsilon$ . We interpret each row of $\Phi$ as the feature of a state in the binary tree. By construction of $\Phi$ , now features of states in the binary tree have a nice property that (i) each feature vector has approximately unit norm and (ii) different feature vector are nearly orthogonal. Using this set of features, we can now show that Assumption 4.1-4.3 hold. Here we prove Assumption 4.1 holds as an example and prove other assumptions also hold in the appendix. To prove Assumption 4.1, we note that in the binary tree hard instance, for each level $h$ , only a single state satisfies $Q ^ { * } = 1$ , and all other states satisfy $Q ^ { * } = 0$ . We simply take $\theta _ { h }$ to be the feature of the state with $Q ^ { * } = 1$ . Since all feature vectors are nearly orthogonal, Assumption 4.1 holds.
|
| 169 |
+
|
| 170 |
+
Since the above fact regarding the $\varepsilon$ -rank of the identity matrix can be proved by simply taking each row of $\Phi$ to be a random unit vector, our lower bound reveals another intriguing (yet pessimistic) aspect of Assumption 4.1-4.3: for the binary tree instance, almost all feature extractors induce a hard MDP instance. This again suggests that a good representation itself may not necessarily lead to efficient RL and additional assumptions (e.g. on the reward distribution) could be crucial.
|
| 171 |
+
|
| 172 |
+
Lower bound for policy-based learning. It is straightfoward to construct a set of feature vectors for the binary tree instance so that Assumption 4.4 holds, even if $d = 1$ . We set $\phi ( s , a )$ to be $+ 1$ if $a = a _ { 1 }$ and $- 1$ if $a = a _ { 2 }$ . For each level $h$ , for the unique state $s$ in level $h$ with $Q ^ { * } = 1$ , we set $\theta _ { h }$ to be 1 if $\pi ^ { * } ( s ) = a _ { 1 }$ and $- 1$ if $\pi ^ { * } ( s ) = a _ { 2 }$ . With this construction, Assumption 4.4 holds.
|
| 173 |
+
|
| 174 |
+
To prove that the lower bound under Assumption 4.5, we use a new reward function for states in level $H - 1$ in the binary tree instance above so that there exists a unique optimal action for each state in the MDP. See Figure 2 for an example with $H = 3$ levels of states. Another nice property of the new reward function is that for all states $s$ we always have $\pi ^ { * } ( s ) = a _ { 1 }$ . Now, we define $2 ^ { H - 1 }$ different new MDPs as follow: for each state in level $H - 1$ , we change its original reward (defined in Figure 2) to 1. An exponential sample complexity lower bound for these MDPs can be proved using the same argument as the original binary tree hard instance, and now we show this set of MDPs satisfy Assumption 4.5. We first show in Lemma A.2 that there exists a set $\mathcal { N } \subseteq \mathbb { S } ^ { d - 1 }$ with $| \mathcal { N } | = ( 1 / \triangle ) ^ { \hat { \Omega } ( d ) }$ , so that for each $p \in \mathcal N$ , there exists a hyperplane $L$ that separates $p$ and $\mathcal { N } \backslash \{ p \}$ and all vectors in $\mathcal { N }$ have distance at least $\bigtriangleup$ to $L$ . Equivalently, for each $p \in \mathcal N$ ,we can always define a linear function $f _ { p }$ so that $f _ { p } ( p ) \geq \Delta$ and $f _ { p } ( q ) \leq - \triangle$ for all $q \in \mathcal { N } \backslash \{ p \}$ . This can be proved using standard lower bounds on the size of $\varepsilon$ -nets. Now we simply use vectors in $\mathcal { N }$ as features of states. By construction of the reward function, for each level $h$ , there could only be two possible cases for the optimal policy $\pi ^ { * }$ . I.e., either $\pi ^ { * } ( s ) = a _ { 1 }$ for all states in level $h$ , or $\pi ^ { * } ( s ) = a _ { 2 }$ for a unique state $s$ and $\pi ^ { * } ( s ^ { \prime } ) = a _ { 1 }$ for all $s \neq s ^ { \prime }$ . In both cases, we can easily define a linear function with margin $\triangle$ to implement the optimal policy $\pi ^ { * }$ , and thus Assumption 4.5 holds. Notice that in this proof, we critically relies on $d = \Theta ( H )$ , so that we can utilize the curse of dimensionality to construct a large set of vectors as features.
|
| 175 |
+
|
| 176 |
+
# 5 SEPARATIONS
|
| 177 |
+
|
| 178 |
+
Perfect representation vs. good-but-not-perfect representation. For value-based learning in deterministic systems, Wen & Van Roy (2013) showed polynomial sample complexity upper bound when the representation can perfectly predict the $Q$ -function. In contrast, if the representation is only able to approximate the $Q$ -function, then the agent requires exponential number of trajectories. This exponential separation demonstrates a provable exponential benefit of better representation.
|
| 179 |
+
|
| 180 |
+
Value-based learning vs. policy-based learning. Note that if the optimal $Q$ -function can be perfectly predicted by the provided representation, then the optimal policy can also be perfectly predicted using the same representation. Since Wen & Van Roy (2013) showed polynomial sample complexity upper bound when the representation can perfectly predict the $Q$ -function, our lower bound on policy-based learning, which applies to perfect representations, thus demonstrates that the ability of predicting the $Q$ -function is much stronger than that of predicting the optimal policy.
|
| 181 |
+
|
| 182 |
+
Supervised learning vs. reinforcement learning. For policy-based learning, if the planning horizon $H = 1$ , the problem becomes learning a linear classifier, for which there are polynomial sample complexity upper bounds. For policy-based learning, the agent needs to learn $H$ linear classifiers sequentially. Our lower bound on policy-based learning shows the sample complexity dependency on $H$ is exponential.
|
| 183 |
+
|
| 184 |
+
Imitation learning vs. reinforcement learning. In imitation learning (IL), the agent can observe trajectories induced by the optimal policy (expert). If the optimal policy is linear in the given representation, it can be shown that the simple behavior cloning algorithm only requires polynomial number of samples to find a near-optimal policy (Ross et al., 2011). Our Theorem 4.3 shows if the agent cannot observe expert’s behavior, then it requires exponential number of samples. Therefore, our lower bound shows there is an exponential separation between policy-based $R L$ and $\cal { I L }$ when function approximation is used.
|
| 185 |
+
|
| 186 |
+
# 6 ACKNOWLEDGMENTS
|
| 187 |
+
|
| 188 |
+
The authors would like to thank Yuping Luo, Wenlong Mou, Martin Wainwright, Mengdi Wang and Yifan Wu for insightful discussions. Also, the authors would also like to gratefully acknowledge Benjamin Van Roy, Shi Dong, Tor Lattimore and Csaba Szepesvari for sharing a draft of their ´ work and their comments. Simon S. Du is supported by NSF grant DMS-1638352 and the Infosys Membership. Sham M. Kakade acknowledges funding from the Washington Research Foundation Fund for Innovation in Data-Intensive Discovery; the NSF award CCF 1740551; and the ONR award N00014-18-1-2247. Ruosong Wang is supported in part by NSF IIS1763562, AFRL CogDeCON FA875018C0014, and DARPA SAGAMORE HR00111990016. Part of this work was done while Simon S. Du was visiting Google Brain Princeton and Ruosong Wang was visiting Princeton University.
|
| 189 |
+
|
| 190 |
+
# REFERENCES
|
| 191 |
+
|
| 192 |
+
Alekh Agarwal, Sham M Kakade, Jason D Lee, and Gaurav Mahajan. Optimality and approximation with policy gradient methods in markov decision processes. arXiv preprint arXiv:1908.00261, 2019.
|
| 193 |
+
|
| 194 |
+
Noga Alon. Perturbed identity matrices have high rank: Proof and applications. Combinatorics, Probability and Computing, 18(1-2):3–15, 2009.
|
| 195 |
+
|
| 196 |
+
Noga Alon, Troy Lee, Adi Shraibman, and Santosh Vempala. The approximate rank of a matrix and its algorithmic applications: approximate rank. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing, pp. 675–684. ACM, 2013.
|
| 197 |
+
|
| 198 |
+
Noga Alon, Troy Lee, and Adi Shraibman. The cover number of a matrix and its algorithmic applications. Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, pp. 34, 2014.
|
| 199 |
+
|
| 200 |
+
Andras Antos, Csaba Szepesv ´ ari, and R ´ emi Munos. Learning near-optimal policies with bellman-´ residual minimization based fitted policy iteration and a single sample path. Machine Learning, 71 (1):89–129, 2008.
|
| 201 |
+
|
| 202 |
+
Baruch Awerbuch and Robert Kleinberg. Online linear optimization and adaptive routing. Journal of Computer and System Sciences, 74(1):97–114, 2008.
|
| 203 |
+
|
| 204 |
+
J. A. Bagnell, Sham M Kakade, Jeff G. Schneider, and Andrew Y. Ng. Policy search by dynamic programming. In S. Thrun, L. K. Saul, and B. Scholkopf (eds.), ¨ Advances in Neural Information Processing Systems 16, pp. 831–838. MIT Press, 2004.
|
| 205 |
+
|
| 206 |
+
Boaz Barak, Zeev Dvir, Amir Yehudayoff, and Avi Wigderson. Rank bounds for design matrices with applications to combinatorial geometry and locally correctable codes. In Proceedings of the forty-third annual ACM symposium on Theory of computing, pp. 519–528. ACM, 2011.
|
| 207 |
+
|
| 208 |
+
Dimitri P Bertsekas and John N Tsitsiklis. Neuro-dynamic programming, volume 5. Athena Scientific Belmont, MA, 1996.
|
| 209 |
+
|
| 210 |
+
Jinglin Chen and Nan Jiang. Information-theoretic considerations in batch reinforcement learning. arXiv preprint arXiv:1905.00360, 2019.
|
| 211 |
+
|
| 212 |
+
Lijie Chen and Ruosong Wang. Classical algorithms from quantum and arthur-merlin communication protocols. 10th Innovations in Theoretical Computer Science, 2019.
|
| 213 |
+
|
| 214 |
+
Christoph Dann, Nan Jiang, Akshay Krishnamurthy, Alekh Agarwal, John Langford, and Robert E Schapire. On polynomial time PAC reinforcement learning with rich observations. arXiv preprint arXiv:1803.00606, 2018.
|
| 215 |
+
|
| 216 |
+
Sanjoy Dasgupta and Anupam Gupta. An elementary proof of a theorem of johnson and lindenstrauss. Random Structures & Algorithms, 22(1):60–65, 2003.
|
| 217 |
+
|
| 218 |
+
Simon S Du, Akshay Krishnamurthy, Nan Jiang, Alekh Agarwal, Miroslav Dud´ık, and John Langford. Provably efficient RL with rich observations via latent state decoding. arXiv preprint arXiv:1901.09018, 2019a.
|
| 219 |
+
|
| 220 |
+
Simon S Du, Yuping Luo, Ruosong Wang, and Hanrui Zhang. Provably efficient $Q$ -learning with function approximation via distribution shift error checking oracle. arXiv preprint arXiv:1906.06321, 2019b.
|
| 221 |
+
|
| 222 |
+
Amir-massoud Farahmand. Regularization in reinforcement learning. 2011.
|
| 223 |
+
|
| 224 |
+
Matthieu Geist, Bruno Scherrer, and Olivier Pietquin. A theory of regularized markov decision processes. arXiv preprint arXiv:1901.11275, 2019.
|
| 225 |
+
|
| 226 |
+
Nan Jiang, Akshay Krishnamurthy, Alekh Agarwal, John Langford, and Robert E Schapire. Contextual decision processes with low bellman rank are PAC-learnable. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 1704–1713. JMLR. org, 2017.
|
| 227 |
+
|
| 228 |
+
Chi Jin, Zhuoran Yang, Zhaoran Wang, and Michael I Jordan. Provably efficient reinforcement learning with linear function approximation. arXiv preprint arXiv:1907.05388, 2019.
|
| 229 |
+
|
| 230 |
+
William B Johnson and Joram Lindenstrauss. Extensions of lipschitz mappings into a hilbert space. Contemporary mathematics, 26(189-206):1, 1984.
|
| 231 |
+
|
| 232 |
+
Sham Kakade and John Langford. Approximately optimal approximate reinforcement learning. In ICML, volume 2, pp. 267–274, 2002.
|
| 233 |
+
|
| 234 |
+
Sham Machandranath Kakade. On the sample complexity of reinforcement learning. PhD thesis, University of College London, 2003.
|
| 235 |
+
|
| 236 |
+
Michael Kearns and Satinder Singh. Near-optimal reinforcement learning in polynomial time. Mach. Learn., 49(2-3):209–232, November 2002. ISSN 0885-6125. doi: 10.1023/A:1017984413808. URL https://doi.org/10.1023/A:1017984413808.
|
| 237 |
+
|
| 238 |
+
Akshay Krishnamurthy, Alekh Agarwal, and John Langford. PAC reinforcement learning with rich observations. In Advances in Neural Information Processing Systems, pp. 1840–1848, 2016.
|
| 239 |
+
|
| 240 |
+
Tor Lattimore and Csaba Szepesvari. Learning with good feature representations in bandits and in rl with a generative model. arXiv preprint arXiv:1911.07676, 2019.
|
| 241 |
+
|
| 242 |
+
Lihong Li, Michael L Littman, Thomas J Walsh, and Alexander L Strehl. Knows what it knows: a framework for self-aware learning. Machine learning, 82(3):399–443, 2011.
|
| 243 |
+
|
| 244 |
+
GG Lorentz. Metric entropy and approximation. Bulletin of the American Mathematical Society, 72 (6):903–937, 1966.
|
| 245 |
+
|
| 246 |
+
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.
|
| 247 |
+
|
| 248 |
+
Remi Munos. Error bounds for approximate value iteration. In ´ Proceedings of the National Conference on Artificial Intelligence, volume 20, pp. 1006. Menlo Park, CA; Cambridge, MA; London; AAAI Press; MIT Press; 1999, 2005.
|
| 249 |
+
|
| 250 |
+
Stephane Ross, Geoffrey Gordon, and Drew Bagnell. A reduction of imitation learning and structured ´ prediction to no-regret online learning. In Proceedings of the fourteenth international conference on artificial intelligence and statistics, pp. 627–635, 2011.
|
| 251 |
+
|
| 252 |
+
Bruno Scherrer. Approximate policy iteration schemes: A comparison. In Proceedings of the 31st International Conference on International Conference on Machine Learning - Volume 32, ICML’14. JMLR.org, 2014.
|
| 253 |
+
|
| 254 |
+
Bruno Scherrer and Matthieu Geist. Local policy search in a convex space and conservative policy iteration as boosted policy search. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 35–50. Springer, 2014.
|
| 255 |
+
|
| 256 |
+
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In International conference on machine learning, pp. 1889–1897, 2015.
|
| 257 |
+
|
| 258 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 259 |
+
|
| 260 |
+
S. Shalev-Shwartz and S. Ben-David. Understanding Machine Learning: From Theory to Algorithms. Understanding Machine Learning: From Theory to Algorithms. Cambridge University Press, 2014. ISBN 9781107057135. URL https://books.google.com/books?id= ttJkAwAAQBAJ.
|
| 261 |
+
|
| 262 |
+
Aaron Sidford, Mengdi Wang, Xian Wu, Lin F Yang, and Yinyu Ye. Near-optimal time and sample complexities for solving discounted markov decision process with a generative model. arXiv preprint arXiv:1806.01492, 2018.
|
| 263 |
+
|
| 264 |
+
Max Simchowitz and Kevin Jamieson. Non-asymptotic gap-dependent regret bounds for tabular MDPs. 05 2019.
|
| 265 |
+
|
| 266 |
+
Wen Sun, Arun Venkatraman, Geoffrey J Gordon, Byron Boots, and J Andrew Bagnell. Deeply aggrevated: Differentiable imitation learning for sequential prediction. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3309–3318. JMLR. org, 2017.
|
| 267 |
+
|
| 268 |
+
Wen Sun, Nan Jiang, Akshay Krishnamurthy, Alekh Agarwal, and John Langford. Model-based rl in contextual decision processes: Pac bounds and exponential improvements over model-free approaches. In Conference on Learning Theory, pp. 2898–2933, 2019.
|
| 269 |
+
|
| 270 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
|
| 271 |
+
|
| 272 |
+
Csaba Szepesvari and R ´ emi Munos. Finite time bounds for sampling based fitted value iteration. In´ Proceedings of the 22nd international conference on Machine learning, pp. 880–887. ACM, 2005.
|
| 273 |
+
|
| 274 |
+
Benjamin Van Roy and Shi Dong. Comments on the du-kakade-wang-yang lower bounds. arXiv preprint arXiv:1911.07910, 2019.
|
| 275 |
+
|
| 276 |
+
Zheng Wen and Benjamin Van Roy. Efficient exploration and value function generalization in deterministic systems. In Advances in Neural Information Processing Systems, pp. 3021–3029, 2013.
|
| 277 |
+
|
| 278 |
+
Lin F. Yang and Mengdi Wang. Reinforcement leaning in feature space: Matrix bandit, kernels, and regret bound. arXiv preprint arXiv:1905.10389, 2019a.
|
| 279 |
+
|
| 280 |
+
Lin F. Yang and Mengdi Wang. Sample-optimal parametric q-learning using linearly additive features. In International Conference on Machine Learning, pp. 6995–7004, 2019b.
|
| 281 |
+
|
| 282 |
+
Andrew Chi-Chin Yao. Probabilistic computations: Toward a unified measure of complexity. In 18th Annual Symposium on Foundations of Computer Science (sfcs 1977), pp. 222–227. IEEE, 1977.
|
| 283 |
+
|
| 284 |
+
# A PROOFS OF LOWER BOUNDS
|
| 285 |
+
|
| 286 |
+
In this section we present our lower bounds. It will also be useful to define the value function of a given state $s \in S _ { h }$ as $\begin{array} { r } { V _ { h } ^ { \pi } ( s ) = \mathbb { E } \left[ \sum _ { h ^ { \prime } = h } ^ { H - 1 } r _ { h ^ { \prime } } \mid s _ { h } = s , \pi \right] } \end{array}$ . For simplicity, we denote $V _ { h } ^ { * } = V _ { h } ^ { \pi ^ { * } } ( s )$ . Throughout the appendix, for the $\bar { Q }$ -function $Q _ { h } ^ { \pi }$ and $Q _ { h } ^ { * }$ and the value function $V _ { h } ^ { \pi }$ and $V _ { h } ^ { * }$ , we may omit $h$ from the subscript when it is clear from the context.
|
| 287 |
+
|
| 288 |
+
We first introduce the INDEX-QUERY problem, which will be useful in our lower bound arguments.
|
| 289 |
+
|
| 290 |
+
Definition A.1 (INDEX-QUERY). In the ${ \mathsf { I N D Q } } _ { n }$ problem, there is an underlying integer $i ^ { * } \in [ n ]$ The algorithm sequentially (and adaptively) outputs guesses $i \in [ n ]$ and queries whether $i = i ^ { * }$ . The goal is to output $i ^ { * }$ , using as few queries as possible.
|
| 291 |
+
|
| 292 |
+
Definition A.2 $\delta$ -correct algorithms). For a real number $\delta \in ( 0 , 1 )$ , we say a randomized algorithm $\mathcal { A }$ is $\delta$ -correct for ${ \mathsf { I N D Q } } _ { n }$ , if for any underlying integer $i ^ { * } \in [ n ]$ , with probability at least $1 - \delta$ , $\mathcal { A }$ outputs $i ^ { * }$ .
|
| 293 |
+
|
| 294 |
+
The following theorem states the query complexity of ${ \mathsf { I N D Q } } _ { n }$ for 0.1-correct algorithms, whose proof is provided in Section B.1.
|
| 295 |
+
|
| 296 |
+
Theorem A.1. Any 0.1-correct algorithm A for ${ \mathsf { I N D Q } } _ { n }$ requires at least $0 . 9 n$ queries in the worst case.
|
| 297 |
+
|
| 298 |
+
A.1 PROOF OF LOWER BOUND FOR VALUE-BASED LEARNING
|
| 299 |
+
|
| 300 |
+
In this section we prove Theorem 4.1. We need the following existential result, whose proof is provided in Section B.2.
|
| 301 |
+
|
| 302 |
+
Lemma A.1. For any $n > 2 .$ , there exists a set of vectors $\mathcal { P } = \{ p _ { 0 } , p _ { 1 } , . . . , p _ { n - 1 } \} \subset \mathbb { R } ^ { d }$ with $d = \lceil 8 \ln n / \varepsilon ^ { 2 } \rceil$ such that
|
| 303 |
+
|
| 304 |
+
1. $\| p _ { i } \| _ { 2 } = 1$ for all $0 \leq i \leq n - 1$ ;
|
| 305 |
+
|
| 306 |
+
Now we give the construction of the hard MDP instances. We first define the transitions and the reward functions. In the hard instances, both the rewards and the transitions are deterministic. There are $H$ levels of states, and level $h \in [ H ]$ contains $2 ^ { h }$ distinct states. Thus we have $| S | = 2 ^ { H } - 1$ . If $| S | > 2 ^ { H } - 1$ we simply add dummy states to the state space $s$ . We use $s _ { 0 } , s _ { 1 } , \ldots , s _ { 2 ^ { H } - 2 }$ to name these states. Here, $s _ { 0 }$ is the unique state in level $h = 0$ , $s _ { 1 }$ and $s _ { 2 }$ are the two states in level $h = 1$ , $s _ { 3 } , s _ { 4 } , s _ { 5 }$ and $s _ { 6 }$ are the four states in level $h = 2$ , etc. There are two different actions, $a _ { 1 }$ and $a _ { 2 }$ , in the MDPs. For a state $s _ { i }$ in level $h$ with $h < H - 1$ , playing action $a _ { 1 }$ transits state $s _ { i }$ to state $s _ { 2 i + 1 }$ and playing action $a _ { 2 }$ transits state $s _ { i }$ to state $s _ { 2 i + 2 }$ , where $s _ { 2 i + 1 }$ and $s _ { 2 i + 2 }$ are both states in level $h + 1$ . See Figure 1 for an example with $H = 3$ .
|
| 307 |
+
|
| 308 |
+
In our hard instances, $r ( s , a ) = 0$ for all $( s , a )$ pairs except for a unique state $s$ in level $H - 2$ and a unique action $a \in \{ a _ { 1 } , a _ { 2 } \}$ . It is convenient to define ${ \overline { { r } } } ( s ^ { \prime } ) = r ( s , a )$ , if playing action $a$ transits $s$ to $s ^ { \prime }$ . For our hard instances, we have $\overline { { r } } ( s ) = 1$ for a unique node $s$ in level $H - 1$ and $\overline { { r } } ( s ) = 0$ for all other nodes.
|
| 309 |
+
|
| 310 |
+
Now we define the features map $\phi ( \cdot , \cdot )$ . Here we assume $d \ge 2 \cdot \lceil 8 \ln 2 \cdot H / \delta ^ { 2 } \rceil$ , and otherwise we can simply decrease the planning horizon so that $d \ge 2 \cdot \lceil 8 \ln 2 \cdot H / \delta ^ { 2 } \rceil$ . We invoke Lemma A.1 to get a set $\mathcal { P } = \{ p _ { 0 } , p _ { 1 } , \dots , p _ { 2 ^ { H } - 1 } \} \subset \mathbb { R } ^ { d / 2 }$ . For each state $s _ { i }$ , $\boldsymbol { \phi } ( s _ { i } , a _ { 1 } ) \in \mathbb { R } ^ { d }$ is defined to be $[ p _ { i } ; 0 ]$ and $\boldsymbol { \phi } ( s _ { i } , a _ { 2 } ) \in \mathbb { R } ^ { d }$ is defined to be $[ 0 ; p _ { i } ]$ . This finishes the definition of the MDPs. We now show that no matter which state $s$ in level $H - 1$ satisfies $\overline { { r } } ( s ) = 1$ , the resulting MDP always satisfies Assumption 4.2.
|
| 311 |
+
|
| 312 |
+
Verifying Assumption 4.2. By construction, for each level $h \in [ H ]$ , there is a unique state $s _ { h }$ in level $h$ and action $a _ { h } \in \{ a _ { 1 } , a _ { 2 } \}$ , such that $Q ^ { * } ( s _ { h } , a _ { h } ) = 1$ . For all other $( s , a )$ pairs such that $s \neq s _ { h }$ or $a \neq a _ { h }$ , it is satisfied that $Q ^ { * } ( s , a ) = 0$ . For a given level $h$ and policy $\pi$ , we take $\theta _ { h } ^ { \pi }$ to be $Q ^ { \pi } ( s _ { h } , a _ { h } ) \cdot \phi ( s _ { h } , a _ { h } )$ . Now we show that $| Q ^ { \pi } ( s , a ) - \langle \theta _ { h } ^ { \pi } , \phi ( s , a ) \rangle | \leq \delta$ for all states $s$ in level $h$ and $a \in \{ a _ { 1 } , a _ { 2 } \}$ .
|
| 313 |
+
|
| 314 |
+

|
| 315 |
+
Figure 1: An example with $H = 3$ . For this example, we have $\overline { { r } } ( s _ { 5 } ) = 1$ and $\overline { { r } } ( s ) = 0$ for all other states $s$ . The unique state $s _ { 5 }$ which satisfies $\overline { { r } } ( s ) = 1$ is marked as dash in the figure. The induced $Q ^ { * }$ function is marked on the edges.
|
| 316 |
+
|
| 317 |
+
Case I: $a \neq a _ { h }$ . In this case, we have $Q ^ { \pi } ( s , a ) = 0$ and $\langle \theta _ { h } ^ { \pi } , \phi ( s , a ) \rangle = 0$ , since $\theta _ { h } ^ { \pi }$ and $\phi ( s , a )$ do not have a common non-zero coordinate.
|
| 318 |
+
|
| 319 |
+
Case II: $a = a _ { h }$ and $s \neq s _ { h }$ . In this case, by the second property of $\mathcal { P }$ in Lemma A.1 and the fact that $Q ^ { \pi } ( s _ { h } , a _ { h } ) \leq 1$ , we have $| \langle { \theta } _ { h } ^ { \pi } , \phi ( s , a ) \rangle | \leq \delta$ . Meanwhile, we have $Q ^ { \pi } ( s , a ) = 0$ .
|
| 320 |
+
|
| 321 |
+
Case III: $a = a _ { h }$ and $s = s _ { h }$ . In this case, we have $\langle \theta _ { h } ^ { \pi } , \phi ( s , a ) \rangle = Q ^ { \pi } ( s _ { h } , a _ { h } )$ .
|
| 322 |
+
|
| 323 |
+
prove any algorithm th needs to sample at least to solving MDPs. Suppo $\frac { 9 } { 2 0 } \cdot 2 ^ { H }$ s these MDP instances and succeeds with probabilitytrajectories. We do so by providing a reduction fromave an algorithm for solving these MDPs, we show that ${ \mathsf { I N D Q } } _ { 2 H - 1 }$ such an algorithm can be transformed to solve ${ \mathsf { I N D Q } } _ { 2 ^ { H - 1 } }$ . For a specific choice of $i ^ { * }$ in $\mathsf { I N D Q } _ { 2 ^ { H - 1 } }$ , there is a corresponding MDP instance with
|
| 324 |
+
|
| 325 |
+
$$
|
| 326 |
+
\overline { { { r } } } ( s ) = \left\{ \begin{array} { l l } { 1 } & { \mathrm { i f } s = s _ { i ^ { * } + 2 ^ { H - 1 } - 1 } } \\ { 0 } & { \mathrm { o t h e r w i s e } } \end{array} \right. .
|
| 327 |
+
$$
|
| 328 |
+
|
| 329 |
+
Notice that for all MDPs that we are considering, the transition and features are always the same. Thus, the only thing that the learner needs to learn by interacting with the environment is the reward value. Since the reward value is non-zero only for states in level $H - 1$ , each time the algorithm for solving MDP samples a trajectory that ends at state $s _ { i }$ where $s _ { i }$ is a state in level $H - 1$ , we query whether $i ^ { * } = i - \dot { 2 } ^ { H - 1 } + \dot { 1 }$ or not in ${ \mathsf { I N D Q } } _ { 2 H - 1 }$ , and return reward value 1 if $i ^ { * } = i - 2 ^ { H - 1 } + \mathbf { \bar { l } }$ and 0 otherwise. If the algorithm is guaranteed to return a $1 / 2$ -optimal policy, then it must be able to find $i ^ { * }$ .
|
| 330 |
+
|
| 331 |
+
# A.2 PROOF OF LOWER BOUND FOR MODEL-BASED LEARNING
|
| 332 |
+
|
| 333 |
+
Proof of Theorem 4.2. We use the same construction as in the proof of Theorem 4.1. Note we just need to verify that the construction satisfies Assumption 4.3. By construction, for all $h \in$ $\{ 1 , 2 , \ldots , H - 1 \}$ , for each state $s ^ { \prime }$ in level $h$ , there exists a unique $( s , a )$ pair such that playing action $a$ transits $s$ to $s ^ { \prime }$ , and we take $\psi ( s ^ { \prime } ) = \phi ( s , a )$ . We also take $\beta _ { h } = 0$ for $h \in \{ 0 , 1 , \ldots , H - 4 , H - 3 \}$ and $\beta _ { H - 2 } = \phi ( s , a )$ where $( s , a )$ is the unique pair with $R ( s , a ) = 1$ . Now, according to the design of $\phi ( \cdot , \cdot )$ and Lemma A.1, Assumption 4.3 is satisfied. □
|
| 334 |
+
|
| 335 |
+
# A.3 PROOF OF LOWER BOUND FOR POLICY-BASED LEARNING
|
| 336 |
+
|
| 337 |
+
In this section, we present our hardness results for linear policy learning. We first prove a weaker lower bound which only satisfies Assumption 4.4, and then prove Theoerem 4.3.
|
| 338 |
+
|
| 339 |
+
Warmup: Lower Bound for Linear Policy Without Margin. To present the hardness results, we first give the construction of the hard instances. The transitions and rewards functions of these MDP instances are exactly the same as those in Section A.1. The main difference is in the definition of the feature map $\phi ( \cdot , \cdot )$ . For this lower bound, we define $\phi ( s , a ) = 1 \in \mathbb { R }$ if $a = a _ { 1 }$ and $\phi ( s , a ) = - 1$ if $a = a _ { 2 }$ . By construction, these MDPs satisfy Assumption 3.1 with $\rho = 1$ . We now show that no matter which state $s$ in level $H - 1$ satisfies $\overline { { r } } ( s ) \ : \doteq \ : 1 ^ { 6 }$ , the resulting MDP always satisfies Assumption 4.4.
|
| 340 |
+
|
| 341 |
+
Verifying Assumption 4.4. Recall that for each level $h \in [ H ]$ , there is a unique state $s _ { h }$ in level $h$ and action $a _ { h } \in \{ a _ { 1 } , a _ { 2 } \}$ , such that $Q ^ { * } ( s _ { h } , a _ { h } ) = 1$ . For all other $( s , a )$ pairs such that $s \neq s _ { h }$ or $a \neq a _ { h }$ , it is satisfied that $Q ^ { * } ( s , a ) = 0$ . We simply take $\theta _ { h }$ to be 1 if $a _ { h } = a _ { 1 }$ , and take $\theta _ { h }$ to be $- 1$ if $a _ { h } = a _ { 2 }$ .
|
| 342 |
+
|
| 343 |
+
Using the same lower bound argument (by reducing INDEX-QUERY to MDPs), we have the following theorem.
|
| 344 |
+
|
| 345 |
+
Theorem A.2. There exists a family of MDPs and a feature map $\phi \left( \cdot , \cdot \right)$ that satisfy Assumption 4.4 with $d = 1$ and Assumption 3.1 with $\rho = 1$ , such that any algorithm that returns a $1 / 2$ -optimal policy with probability at least 0.9 needs to sample $\Omega \left( 2 ^ { H } \right)$ trajectories.
|
| 346 |
+
|
| 347 |
+
Proof of Theoerem 4.3 Now we prove Theoerem 4.3. In order to prove Theoerem 4.3, we need the following geometric lemma whose proof is provided in Section B.3.
|
| 348 |
+
|
| 349 |
+
Lemma A.2. Let $d \in \mathbb { N } _ { + }$ be a positive integer and $\epsilon \in ( 0 , 1 )$ be a real number. Then there exists $a$ set of points $\mathcal { N } \subset \mathbb { S } ^ { d - 1 }$ with size $\vert \mathcal { N } \vert = \Omega ( 1 / \epsilon ^ { d / 2 } )$ such that for every point $x \in \mathcal N$ ,
|
| 350 |
+
|
| 351 |
+
$$
|
| 352 |
+
\operatorname* { i n f } _ { y \in \mathrm { c o n v } ( \mathcal { N } \backslash \{ x \} ) } \| x - y \| _ { 2 } \geq \epsilon / 2 .
|
| 353 |
+
$$
|
| 354 |
+
|
| 355 |
+
Now we are ready to prove Theorem 4.3. In the proof we assume $H = d$ , since otherwise we can take $H$ and $d$ to be $\operatorname* { m i n } \{ H , d \}$ by decreasing the planning horizon $H$ or adding dummy dimensions to the feature extractor $\phi$ .
|
| 356 |
+
|
| 357 |
+
Proof of Theorem 4.3. We define a set of $2 ^ { H - 1 }$ deterministic MDPs. The transitions of these hard instances are exactly the same as those in Section A.1. The main difference is in the definition of the feature map $\phi ( \cdot , \cdot )$ and the reward function. Again in the hard instances, $r ( s , a ) = 0$ for all $s$ in the first $H - 2$ levels. Using the terminology in Section A.1, we have $\overline { { r } } ( s ) = 0$ for all states in the first $H - 1$ levels. Now we define $\overline { { r } } ( s )$ for states $s$ in level $H - 1$ . We do so by recursively defining the optimal value function $V ^ { * } ( \cdot )$ . The initial state $s _ { 0 }$ in level 0 satisfies $V ^ { * } ( s _ { 0 } ) = 1 / 2$ . For each state $s _ { i }$ in the first $H - 2$ levels, we have $V ^ { * } ( s _ { 2 i + 1 } ) = V ^ { * } ( s _ { i } )$ and $V ^ { * } ( s _ { 2 i + 2 } ) = V ^ { * } ( s _ { i } ) - 1 / 2 H$ . For each state $s _ { i }$ in the level $h = H - 2$ , we have $\overline { { r } } ( s _ { 2 i + 1 } ) = V ^ { * } ( s _ { i } )$ and $\overline { { r } } ( s _ { 2 i + 2 } ) = V ^ { * } ( s _ { i } ) - 1 / 2 H$ . This implies that $\rho = 1 / 2 H$ . In fact, this implies a stronger property that each state has a unique optimal action. See Figure 2 for an example with $H = 3$ .
|
| 358 |
+
|
| 359 |
+
To define $2 ^ { H - 1 }$ different MDPs, for each state $s$ in level $H - 1$ of the MDP defined above, we define a new MDP by changing $\overline { { r } } ( s )$ from its original value to 1. This also affects the definition of the optimal $V$ function for states in the first $H - 1$ levels. In particular, for each level $i \in \{ 0 , 1 , 2 , \ldots , \bar { H ^ { - } } - 2 \}$ , we have changed the $V$ value of a unique state in level $i$ from its original value (at most $1 / 2 \rangle$ ) to 1. By doing so we have defined $2 ^ { H - 1 }$ different MDPs. See Figure 3 for an example with $H = 3$ .
|
| 360 |
+
|
| 361 |
+
Now we define the feature function $\phi ( \cdot , \cdot )$ . We invoke Lemma A.2 with $\epsilon = 8 \triangle$ and $d = H / 2 - 1$ . Since $\triangle$ is sufficiently small, we have $| { \mathcal { N } } | \geq 2 ^ { H }$ . We use $\mathcal { P } = \{ p _ { 0 } , p _ { 2 } , \dots , p _ { 2 ^ { H } - 1 } \} \subset \mathbb { R } ^ { H / 2 - 1 }$ to denote an arbitrary subset of $\mathcal { N }$ with cardinality $2 ^ { H }$ . By Lemma A.2, for any $p \in \mathcal P$ , the distance between $p$ and the convex hull of $\mathcal { P } \setminus \{ p \}$ is at least $4 \triangle$ . Thus, there exists a hyperplane $L$ which separates $p$ and $\mathcal { P } \setminus \{ p \}$ , and for all points $q \in \mathcal { P }$ , the distance between $q$ and $L$ is at least $2 \triangle$ . Equivalently, for each point $p \in \mathcal { P }$ , there exists $n _ { p } \in \mathbb { R } ^ { H / 2 - 1 }$ and $o _ { p } \in \mathbb { R }$ such that $\| n _ { p } \| _ { 2 } = 1$ , $| \bar { o _ { p } } | \le 1$ and the linear function $f _ { p } ( q ) = \left. q , n _ { p } \right. ^ { . } + o _ { p }$ satisfies $f _ { p } ( p ) \geq 2 \triangle$ and $f _ { p } ( q ) \stackrel { \textstyle \cdot } { \leq } - 2 \triangle$ for all $q \in { \mathcal { P } } \setminus \{ p \}$ . Given the set $\mathcal { P } = \{ p _ { 0 } , p _ { 2 } , \dotsc , p _ { 2 ^ { H } - 1 } \} \subset \mathbb { R } ^ { H / 2 - 1 }$ , we construct a new set $\overline { { \mathcal { P } } } = \{ \overline { { p } } _ { 0 } , \overline { { p } } _ { 2 } , \hdots , \overline { { p } } _ { 2 ^ { H } - 1 } \} \subset \mathbb { R } ^ { H / 2 }$ , where $\overline { { p } } _ { i } = [ p _ { i } ; 1 ] \in \mathbb { R } ^ { H / 2 }$ . Thus $\| \overline { { p } } _ { i } \| _ { 2 } = \sqrt { 2 }$ for all $\overline { { p } } _ { i } \in \overline { { \mathcal { P } } }$ . Clearly, for each $\overline { { p } } \in \overline { { \mathcal { P } } }$ , there exists a vector $\omega _ { \overline { { p } } } \in \mathbb { R } ^ { H / 2 }$ such that $\langle \omega _ { \overline { { p } } } , \overline { { p } } \rangle \geq 2 \triangle$ and $\langle \omega _ { \overline { { p } } } , \overline { { q } } \rangle \leq - 2 \triangle$ for all $\overline { { q } } \in \mathcal { F } \setminus \{ \overline { { p } } \}$ . It is also clear that $\| \omega _ { \overline { { p } } } \| _ { 2 } \le \sqrt { 2 }$ . We take $\phi ( s _ { i } , a _ { 1 } ) = [ 0 ; \overline { { p } } _ { i } ] \in \mathbb { R } ^ { H }$ and $\phi ( s _ { i } , a _ { 2 } ) = [ \overline { { p } } _ { i } ; 0 ] \in \mathbb { R } ^ { H }$ .
|
| 362 |
+
|
| 363 |
+

|
| 364 |
+
Figure 2: An example with $H = 3$
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
Figure 3: An example with $H = 3$ . Here we define a new MDP by changing $\overline { { r } } ( s _ { 5 } )$ from its original value $1 / 3$ to 1. This also affects the value of $V ( s _ { 2 } )$ and $V ( s _ { 0 } )$ .
|
| 368 |
+
|
| 369 |
+
We now show that all the $2 ^ { H - 1 }$ MDPs constructed above satisfy the linear policy assumption. Namely, we show that for any state $s$ in level $H - 1$ , after changing $\overline { { r } } ( s )$ to be 1, the resulting MDP satisfies the linear policy assumption. As in Section A.1, for each level $\dot { h } \in [ H ]$ , there is a unique state $s _ { h }$ in level $h$ and action $a _ { h } \in \{ a _ { 1 } , a _ { 2 } \}$ , such that $Q ^ { * } ( s _ { h } , a _ { h } ) = 1$ . For all other $( s , a )$ pairs such that $s \neq s _ { h }$ or $a \neq a _ { h }$ , it is satisfied that $\dot { Q } ^ { \ast } ( s , a ) = 0$ . For each level $h$ , if $a _ { h } = a _ { 1 }$ , then we take $( \theta _ { h } ) _ { H / 2 } = 1$ and $( \theta _ { h } ) _ { H } = - 1$ , and all other entries in $\theta _ { h }$ are zeros. If $a _ { h } = a _ { 2 }$ , we use $\overline { { p } }$ to denote the vector formed by the first $H / 2$ coordinates of $\phi ( s _ { h } , a _ { 2 } )$ . By construction, we have √ $\overline { { p } } \in \overline { { \mathcal { P } } }$ . We take $\theta _ { h } = [ \omega _ { \overline { { p } } } ; 0 ]$ in this case. In any case, we have $\lVert \theta _ { h } \rVert _ { 2 } \leq \sqrt { 2 }$ . Now for each level $h$ , if $a _ { h } = a _ { 1 }$ , then for all states $s$ in level $h$ , we have $\pi ^ { * } ( s ) = a _ { 1 }$ . In this case, $\langle \phi ( s , a _ { 1 } ) , \theta _ { h } \rangle = 1$ and $\langle \phi ( s , a _ { 2 } ) , \theta _ { h } \rangle = - 1$ for all states in level $h$ , and thus Assumption 4.5 is satisfied. If $a _ { h } = a _ { 2 }$ , then $\pi ^ { * } ( s _ { h } ) = a _ { 2 }$ and $\pi ^ { * } ( s ) = a _ { 1 }$ for all states $s \neq s _ { h }$ in level $h$ . By construction, we have $\langle \theta _ { h } , \phi ( s , a _ { 1 } ) \rangle = 0$ for all states $s$ in level $h$ , since $\theta _ { h }$ and $\phi ( s , a _ { 1 } )$ do not have a common non-zero entry. We also have $\langle \theta _ { h } , \phi ( s _ { h } , a _ { 2 } ) \rangle \geq 2 \triangle$ and $\langle \theta _ { h } , \phi ( s , a _ { 2 } ) \rangle \leq - 2 \triangle$ for all states $s \neq s _ { h }$ in level $h$ . Finally, we normalize all $\theta _ { h }$ and $\phi ( s , a )$ so that they all have unit norm. Since $\| \phi ( s , a ) \| _ { 2 } = \sqrt { 2 }$ for all $( s , a )$ pairs before normalization, Assumption 4.5 is still satisfied after normalization.
|
| 370 |
+
|
| 371 |
+
Finally, we prove any algorithm that solves these MDP instances and succeeds with probability at least 0.9 needs to sample at least $\Omega ( 2 ^ { H } )$ trajectories. We do so by providing a reduction from ${ \mathsf { I N D Q } } _ { 2 H - 1 }$ to solving MDPs. Suppose we have an algorithm for solving these MDPs, we show that such an algorithm can be transformed to solve ${ \mathsf { I N D Q } } _ { 2 ^ { H - 1 } }$ . For a specific choice of $i ^ { * }$ in $\mathsf { I N D Q } _ { 2 ^ { H - 1 } }$ , there is a corresponding MDP instance with
|
| 372 |
+
|
| 373 |
+
$$
|
| 374 |
+
\overline { { r } } ( s ) = \left\{ \begin{array} { l l } { 1 } & { \mathrm { i f ~ } s = s _ { i ^ { * } + 2 ^ { H - 1 } - 1 } } \\ { \mathrm { t h e ~ o r i g i n a l ~ ( r e c u r s i v e l y ~ d e f i n e d ) ~ v a l u e } } & { \mathrm { o t h e r w i s e } } \end{array} \right. .
|
| 375 |
+
$$
|
| 376 |
+
|
| 377 |
+
Notice that for all MDPs that we are considering, the transition and features are always the same. Thus, the only thing that the learner needs to learn by interacting with the environment is the reward value. Since the reward value is non-zero only for states in level $H - 1$ , each time the algorithm for solving MDP samples a trajectory that ends at state $s _ { i }$ where $s _ { i }$ is a state in level $H - 1$ , we query whether $i ^ { * } = i - \dot { 2 } ^ { H - 1 } + \dot { 1 }$ or not in $\mathsf { I N D Q } _ { 2 ^ { H - 1 } }$ , and return reward value 1 if $i ^ { * } = i - 2 ^ { H - 1 } + \mathbf { \bar { l } }$ and it original reward value otherwise. If the algorithm is guaranteed to return a $1 / 4$ -optimal policy, then it must be able to find $i ^ { * }$ .
|
| 378 |
+
|
| 379 |
+
# B TECHNICAL PROOFS
|
| 380 |
+
|
| 381 |
+
# B.1 PROOF OF THEOREM A.1
|
| 382 |
+
|
| 383 |
+
Proof. The proof is a straightforward application of Yao’s minimax principle Yao (1977). We provide the full proof for completeness.
|
| 384 |
+
|
| 385 |
+
Consider an input distribution where $i ^ { * }$ is drawn uniformly at random from $[ n ]$ . Suppose there is a 0.1-correct algorithm for $| \mathsf { N D Q } _ { n }$ with worst-case query complexity $T$ such that $T < 0 . 9 n$ . By averaging, there is a deterministic algorithm $\mathcal { A } ^ { \prime }$ with worst-case query complexity $T$ , such that
|
| 386 |
+
|
| 387 |
+
$$
|
| 388 |
+
\operatorname* { P r } _ { i \sim [ n ] } [ { \mathcal { A } } ^ { \prime } \ \mathrm { c o r r e c t l y \ o u t p u t s \ } i \ \mathrm { w h e n \ } i ^ { * } = i ] \geq 0 . 9 .
|
| 389 |
+
$$
|
| 390 |
+
|
| 391 |
+
We may assume that the sequence of queries made by $\mathcal { A } ^ { \prime }$ is fixed. This is because (i) $\mathcal { A } ^ { \prime }$ is deterministic and (ii) before $\mathcal { A } ^ { \prime }$ correctly guesses $i ^ { * }$ , all responses that $\mathcal { A } ^ { \prime }$ receives are the same (i.e., all guesses are incorrect). We use $S \stackrel { \cdot } { = } \left\{ s _ { 1 } , s _ { 2 } , \ldots , s _ { m } \right\}$ to denote the sequence of queries made by $\mathbf { \mathcal { A } ^ { \prime } }$ . Notice that $m$ is the worst-case query complexity of $\mathcal { A } ^ { \prime }$ . Suppose $m < 0 . 9 n$ , there exist $0 . 1 n$ distinct $i \in [ n ]$ such that $\mathcal { A } ^ { \prime }$ will never guess $i$ , and will be incorrect if $i ^ { * }$ equals $i$ , which implies
|
| 392 |
+
|
| 393 |
+
# B.2 PROOF OF LEMMA A.1
|
| 394 |
+
|
| 395 |
+
We need the following tail inequality for random unit vectors, which will be useful for the proof of Lemma A.1.
|
| 396 |
+
|
| 397 |
+
Lemma B.1 (Lemma 2.2 in Dasgupta & Gupta (2003)). For a random unit vector $u$ in $\mathbb { R } ^ { d }$ and $\beta > 1$ , we have
|
| 398 |
+
|
| 399 |
+
$$
|
| 400 |
+
\operatorname* { P r } \left[ u _ { 1 } ^ { 2 } \geq \beta / d \right] \leq \exp ( ( 1 + \ln \beta - \beta ) / 2 ) .
|
| 401 |
+
$$
|
| 402 |
+
|
| 403 |
+
In particular, when $\beta \geq 6$ ,we have
|
| 404 |
+
|
| 405 |
+
$$
|
| 406 |
+
\begin{array} { r } { \operatorname* { P r } \left[ u _ { 1 } ^ { 2 } > \beta / d \right] \le \exp ( - \beta / 4 ) . } \end{array}
|
| 407 |
+
$$
|
| 408 |
+
|
| 409 |
+
Proof of Lemma A.1. Let $\mathcal { Q } = \{ q _ { 1 } , q _ { 2 } , \dots , q _ { n } \}$ be a set of $n$ independent random unit vectors in $\mathbb { R } ^ { d }$ with $d = \lceil 8 \ln n / \varepsilon ^ { 2 } \rceil$ . We will prove that with probability at least $1 / 2 , \mathcal { Q }$ satisfies the two desired properties as stated in Lemma A.1. This implies the existence of such set $\mathcal { P }$ .
|
| 410 |
+
|
| 411 |
+
It is clear that $\| q _ { i } \| _ { 2 } = 1$ for all $i \in [ n ]$ , since each $q _ { i }$ is drawn from the unit sphere. We now prove that for any $i , j \in [ n ]$ with $i \neq j$ , with probability at least $\textstyle { 1 - { \frac { 1 } { n ^ { 2 } } } }$ , we have $| \langle q _ { i } , q _ { j } \rangle | \leq \varepsilon .$ . Notice that this is sufficient to prove the lemma, since by a union bound over all the ${ \binom { n } { 2 } } = n ( n - 1 ) / 2$ possible pairs of $( i , j )$ , this implies that $\mathcal { Q }$ satisfies the two desired properties with probability at least $1 / 2$ .
|
| 412 |
+
|
| 413 |
+
Now, we prove that for two independent random unit vectors $u$ and $v$ in $\mathbb { R } ^ { d }$ with $d = \lceil 8 \ln n / \varepsilon ^ { 2 } \rceil$ , with probability at least $\textstyle 1 - { \frac { 1 } { n ^ { 2 } } }$ , $| \bar { \langle u , v \rangle } | \leq \varepsilon$ . By rotational invariance, we assume that $v$ is a standard basis vector. I.e., we assume $v _ { 1 } = 1$ and $v _ { i } = 0$ for all $1 < i \leq d$ . Notice that now $\langle u , v \rangle$ is the magnitude of the first coordinate of $u$ . We finish the proof by invoking Lemma B.1 and taking $\beta = 8 \ln n > 6$ . □
|
| 414 |
+
|
| 415 |
+
# B.3 PROOF OF LEMMA A.2
|
| 416 |
+
|
| 417 |
+
Proof of Lemma A.2. Consider a $\sqrt { \epsilon }$ -packing $\mathcal { N }$ with size $\Omega ( 1 / \epsilon ^ { d / 2 } )$ on the $d$ -dimensional unit sphere $\dot { \mathbb { S } } ^ { d - 1 }$ (for the existence of such a packing, see, e.g., Lorentz (1966)). Let $o$ be the origin. For two points $x , x ^ { \prime } \in \mathbb { R } ^ { d }$ , we denote $| x x ^ { \prime } | \overset { \cdot } { : } = \| x - x ^ { \prime } \| _ { 2 }$ the length of the line segment between $x , x ^ { \prime }$ . Note that every two points $x , x ^ { \prime } \in \mathcal { N }$ satisfy $| x x ^ { \prime } | \geq { \sqrt { \epsilon } }$ .
|
| 418 |
+
|
| 419 |
+
To prove the lemma, it suffices to show that $\mathcal { N }$ satisfies the property equation 1. Consider a point $x \in \mathcal N$ , let $A$ be a hyperplane that is perpendicular to $x$ (notice that $x$ is a also a vector) and separates $x$ and every other points in $\mathcal { N }$ . We let the distance between $x$ and $A$ be the largest possible, i.e., $A$ contains a point in √ $\mathcal { N } \backslash \{ x \}$ . Since $x$ is on the unit sphere and $\mathcal { N }$ is a $\sqrt { \epsilon }$ -packing, we have that $x$ is at least $\sqrt { \epsilon }$ away from every point on the spherical cap not containing $x$ , defined by the cutting plane $A$ . More formally, let $b$ be the intersection point of the line segment $o x$ and $A$ . Then
|
| 420 |
+
|
| 421 |
+
$$
|
| 422 |
+
\forall y \in \left\{ y ^ { \prime } \in \mathbb { S } ^ { d - s } : \langle b , y ^ { \prime } \rangle \leq \| b \| _ { 2 } ^ { 2 } \right\} : \quad \| x - y \| _ { 2 } \geq \sqrt { \epsilon } .
|
| 423 |
+
$$
|
| 424 |
+
|
| 425 |
+
Indeed, by symmetry, $\forall y \in \{ y ^ { \prime } \in \mathbb { S } ^ { d - 1 } : \langle b , y ^ { \prime } \rangle \leq \| b \| _ { 2 } ^ { 2 } \}$ ,
|
| 426 |
+
|
| 427 |
+
$$
|
| 428 |
+
\| x - y \| _ { 2 } \geq \| x - z \| _ { 2 } \geq \sqrt { \epsilon } .
|
| 429 |
+
$$
|
| 430 |
+
|
| 431 |
+
where $z \in \mathcal { N } \cap A$ . Notice that the distance between $x$ and the convex hull of $\mathcal { N } \backslash \{ x \}$ is lower bounded by the distance between $x$ and $A$ , which is given by $| b x |$ . Consider the triangles defined by $x , z , o , b$ . We have $b z \perp o x$ (note that $b z$ lies inside $A$ ). By Pythagorean theorem, we have
|
| 432 |
+
|
| 433 |
+
$$
|
| 434 |
+
\begin{array} { c } { { | b z | ^ { 2 } + | b x | ^ { 2 } = | x z | ^ { 2 } ; } } \\ { { | b x | + | b o | = | x o | = 1 ; } } \\ { { | b z | ^ { 2 } + | b o | ^ { 2 } = | o z | ^ { 2 } = 1 . } } \end{array}
|
| 435 |
+
$$
|
| 436 |
+
|
| 437 |
+
Solve the above three equations for $| b x |$ , we have
|
| 438 |
+
|
| 439 |
+
$$
|
| 440 |
+
| b x | = | x z | ^ { 2 } / 2 \ge \epsilon / 2
|
| 441 |
+
$$
|
| 442 |
+
|
| 443 |
+
as desired.
|
| 444 |
+
|
| 445 |
+
# C EXACT LINEAR $Q ^ { * } + \mathrm { G A P }$ IN GENERATIVE MODEL
|
| 446 |
+
|
| 447 |
+
In this section we present and prove the following theorem.
|
| 448 |
+
|
| 449 |
+
Theorem C.1. Under Assumption 3.1, Assumption 4.2 and Generative Model query model, the agent can find the optimal $\pi ^ { * }$ with poly $\begin{array} { r } { \left( d , H , \frac { 1 } { \rho } , \log \left( \frac { 1 } { \delta } \right) \right) } \end{array}$ queries with probability $1 - \delta$ for a given failure probability $\delta > 0$ ,
|
| 450 |
+
|
| 451 |
+
Proof of Theorem C.1. We first describe the algorithm. For each level, the agent first construct a barycentric spanner $\Lambda _ { h } \triangleq \{ \phi ( s _ { h } ^ { 1 } , a _ { h } ^ { 1 } ) , \dots \phi ( s _ { h } ^ { d } , a _ { h } ^ { d } ) \} \subset \Phi _ { h } \triangleq \{ \phi ( s , a ) \} _ { s \in S _ { h } , a \in { \cal A } }$ (Awerbuch & Kleinberg, 2008). We have the property that any $\phi ( s , a )$ with $s _ { h } \in \mathcal { S } _ { h } , a \in \mathcal { A }$ , we have $c _ { s , a } ^ { 1 } , \ldots , c _ { s , a } ^ { d } \in [ - 1 , 1 ]$ such that $\begin{array} { r } { \phi ( s , a ) = \sum _ { i = 1 } ^ { d } c _ { s , a } ^ { i } \phi ( s _ { h } ^ { i } , a _ { h } ^ { i } ) } \end{array}$ .
|
| 452 |
+
|
| 453 |
+
The algorithm learns the optimal policy from $h = H - 1 , \ldots , 0$ . At any level $h$ , we assume the agent has learned the optimal policy $\pi _ { h ^ { \prime } } ^ { * }$ at level $h ^ { \prime } = h + 1 , \ldots , H - 1$ .
|
| 454 |
+
|
| 455 |
+
Now we present a procedure to show how to learn the optimal policy at level $h$ . At level $h$ , the agent queries every vector $\phi ( s _ { h } ^ { i } , a _ { h } ^ { i } )$ in $\Lambda _ { h }$ for $\begin{array} { r } { \mathrm { p o l y } ( d , \frac { 1 } { \rho } , \log \left( \frac { \dot { H } } { \delta } \right) ) } \end{array}$ times and uses $\pi _ { h + 1 } ^ { * } , \ldots , \pi _ { H } ^ { * }$ as the roll-out to get the on-the-go reward. Note by the definition of $\pi ^ { * }$ and $Q ^ { * }$ , the on-the-go reward is an unbiased sample of $Q ^ { * } ( s _ { h } ^ { i } , a _ { h } ^ { i } )$ . We denote $\widehat { Q } ( s _ { h } ^ { i } , a _ { h } ^ { i } )$ the average of these on-the-go rewards. By Hoeffding inequality, it is easy to show with probability $\textstyle 1 - { \frac { \delta } { H } }$ , for all $i = 1 , \ldots , d$ $\begin{array} { r } { \left| \widehat { Q } ( s _ { h } ^ { i } , a _ { h } ^ { i } ) - Q ^ { * } ( s _ { h } ^ { i } , a _ { h } ^ { i } ) \right| \leq \mathrm { p o l y } \left( \frac { 1 } { d } , \rho \right) } \end{array}$ . Now we define our estimated $Q ^ { * }$ at level $h$ as follow: for any $( s , a ) \in S _ { h } \times \mathcal { A }$ , $\begin{array} { r } { \widehat { Q } ^ { { \bf \widehat { \alpha } } } ( s , a ) = \sum _ { i = 1 } ^ { d } c _ { s , a } ^ { i } \widehat { Q } ( s _ { h } ^ { i } , a _ { h } ^ { i } ) } \end{array}$ . By the boundedness property of $\boldsymbol { c } _ { s , a }$ , we know for any $\begin{array} { r } { ( s , a ) \in S _ { h } \times \mathcal { A } , \widehat { Q } \left( s , a \right) - Q ^ { * } \left( s , a \right) < \frac { \rho } { 2 } } \end{array}$ . Note this implies the policy induced by $\widehat { Q }$ is the same as $\pi ^ { * }$ . Therefore by induction we finish the proof.
|
| 456 |
+
|
| 457 |
+
# D LINEAR $Q ^ { \pi }$ FOR ALL $\pi$ IN GENERATIVE MODEL
|
| 458 |
+
|
| 459 |
+
In this section we present and prove the following theorem.
|
| 460 |
+
|
| 461 |
+
Theorem D.1. Under Assumption 4.2 with $\delta = 0$ , in the Generative Model query model, there is an algorithm that finds an -optimal policy $\hat { \pi }$ using poly $\left( d , H , \textstyle \frac { 1 } { \epsilon } \right)$ trajectories with probability 0.99.
|
| 462 |
+
|
| 463 |
+
Proof of Theorem D.1. The algorithm is the same as the one in Theorem C.1 We only need to change the analysis. Suppose we are learning at level $h$ and we have learned policies $\pi _ { h + 1 } , \ldots , \pi _ { H - 1 }$ for level $h + 1 , h + 2 , \ldots , H - 1$ , respectively. Because we use the roll-out policy $\pi _ { h + 1 } \circ \cdot \cdot \cdot \circ \pi _ { H - 1 }$ , by Assumption 4.2 and the property of barycentric spanner, using the same argument in the proof of Theorem C.1, we know with probability $1 - 0 . 0 1 / H$ , we can learn a policy $\pi _ { h }$ with poly $( \ot { d } , H , \frac { 1 } { \epsilon } )$ samples such that for any $s \in S _ { h }$ , we know $\pi _ { h }$ is only sub-optimal by $\frac { \epsilon } { H }$ from the $\tilde { \pi } _ { h }$ where $\tilde { \pi } _ { h }$ is the optimal policy at level $h$ such that $\pi _ { h + 1 } \circ \cdot \cdot \cdot \circ \pi _ { H - 1 }$ is the fixed roll-out policy.
|
| 464 |
+
|
| 465 |
+
Now we can bound the sub-optimality of $\widehat { \pi } \triangleq \pi _ { 0 } \circ \cdot \cdot \cdot \circ \pi _ { H - 1 }$
|
| 466 |
+
|
| 467 |
+
$$
|
| 468 |
+
\begin{array} { c } { { V ^ { \pi _ { 0 } \circ \pi _ { 1 } \circ \cdots \circ \pi _ { H - 1 } } \left( s _ { 1 } \right) - V ^ { \pi _ { 0 } ^ { * } \circ \pi _ { 1 } ^ { * } \circ \cdots \circ \pi _ { H - 1 } ^ { * } } \left( s _ { 1 } \right) } } \\ { { = V ^ { \pi _ { 0 } \circ \pi _ { 1 } \circ \cdots \circ \pi _ { H - 1 } } \left( s _ { 1 } \right) - V ^ { \tilde { \pi } _ { 0 } \circ \pi _ { 1 } \circ \cdots \circ \pi _ { H - 1 } } \left( s _ { 1 } \right) } } \\ { { + V ^ { \tilde { \pi } _ { 0 } \circ \pi _ { 1 } \circ \cdots \circ \pi _ { H - 1 } } \left( s _ { 1 } \right) - V ^ { \pi _ { 0 } ^ { * } \circ \pi _ { 1 } \circ \cdots \circ \pi _ { H - 1 } } \left( s _ { 1 } \right) } } \\ { { + V ^ { \pi _ { 0 } ^ { * } \circ \pi _ { 1 } \circ \cdots \circ \pi _ { H - 1 } } \left( s _ { 1 } \right) - V ^ { \pi _ { 0 } ^ { * } \circ \pi _ { 1 } ^ { * } \circ \cdots \circ \pi _ { H - 1 } ^ { * } } \left( s _ { 1 } \right) . } } \end{array}
|
| 469 |
+
$$
|
| 470 |
+
|
| 471 |
+
The first term is at least $- \frac { \epsilon } { H } .$ by our estimation bound, The second term is positive by definition of $\tilde { \pi } _ { 0 }$ We can just recursively apply this argument to obtain
|
| 472 |
+
|
| 473 |
+
$$
|
| 474 |
+
\begin{array} { r l } & { V ^ { \pi _ { 0 } \circ \pi _ { 1 } \circ \cdots \circ \pi _ { H - 1 } } \left( s _ { 1 } \right) - V ^ { \pi _ { 0 } ^ { * } \circ \pi _ { 1 } ^ { * } \circ \cdots \circ \pi _ { H - 1 } ^ { * } } \left( s _ { 1 } \right) } \\ & { \geq V ^ { \pi _ { 0 } ^ { * } \circ \pi _ { 1 } \circ \cdots \circ \pi _ { H - 1 } } \left( s _ { 1 } \right) - V ^ { \pi _ { 0 } ^ { * } \circ \pi _ { 1 } ^ { * } \circ \cdots \circ \pi _ { H - 1 } ^ { * } } \left( s _ { 1 } \right) - \displaystyle \frac { \epsilon } { H } . } \\ & { \geq V ^ { \pi _ { 0 } ^ { * } \circ \pi _ { 1 } ^ { * } \circ \cdots \circ \pi _ { H - 1 } } \left( s _ { 1 } \right) - V ^ { \pi _ { 0 } ^ { * } \circ \pi _ { 1 } ^ { * } \circ \cdots \circ \pi _ { H - 1 } ^ { * } } \left( s _ { 1 } \right) - \displaystyle \frac { 2 \epsilon } { H } . } \end{array}
|
| 475 |
+
$$
|
parse/train/r1genAVKPB/r1genAVKPB_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1genAVKPB/r1genAVKPB_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/train/r1genAVKPB/r1genAVKPB_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|