Disentangling deep neural networks with rectified linear units using duality

1 INTRODUCTION . Despite their success deep neural networks ( DNNs ) are still largely considered as black boxes . The main issue is that in each layer of a DNN , the linear computation , i.e. , multiplication by the weight matrix and the non-linear activations are entangled . Such entanglement has its pros and cons . The commonly held view is that such entanglement is the key to success of DNNs , in that , it allows DNNs to learn sophisticated structures in a layer-by-layer manner . However , in terms of interpretability , such entanglement has an adverse effect : only the final layer is linear and amenable to a feature/weight interpretation , and the hidden layers are non-interpretable due to the non-linearities . Prior works ( Jacot et al. , 2018 ; Arora et al. , 2019 ; Cao & Gu , 2019 ) showed that training an infinite width DNN with gradient descent is equivalent to a kernel method with the so called neural tangent kernel matrix . As a pure kernel method , the NTK matrix performed better than other pure kernel methods . However , in relation to ‘ black box ’ -ness , there are two issues with NTK theory : ( i ) Issue I : Infinite width NTK matrix does not explain fully the success of DNNs because it was observed that finite width DNNs outperform their infinite width NTK counterparts , and it was an open question to understand this performance gap ( Arora et al. , 2019 ) , and ( ii ) Issue II : Since the NTK is based on the gradients , it does not offer further insights about the inner workings of DNNs even for infinite width . A dual view for DNNs with rectified linear units ( ReLUs ) was recently developed by Lakshminarayanan & Singh ( 2020 ) who exploited the gating property ( i.e. , ‘ on/off ’ states ) of the ReLUs . The dual view is essentially linearity in the path space , i.e. , the output is the summation of path contributions . While the weights in a path are the same for each input , whether or not a path contributes to the output is entirely dictated by the gates in the path , which are ‘ on/off ’ based on the input . To understand the role of the gates , a deep gated network ( DGN ) ( see Figure 1 ) was used to disentangle the learning in the gates from the learning in weights . In a DGN , the gates are generated ( and learnt ) in a ‘ gating network ’ which is a DNN with ReLUs and are applied as external signals and the weights are learnt in a ‘ weight network ’ consisting of gated linear units ( GaLUs ) ( Fiat et al. , 2019 ) . Each GaLU multiplies its pre-activation and the external gating signal . Using the DGN , two important insights were provided : ( i ) learning in the gates is the most crucial for finite width networks to outperform infinite width NTK ; this addresses Issue I , and ( ii ) in the limit of infinite width , learning the weights with fixed gates , the NTK is equal to ( but for a scalar ) a so called neural path kernel ( NPK ) which is a kernel solely based on inputs and gates . This shifts Issue II on interpretability to that of interpretability of the gates as opposed to interpretability of the gradients . Our Contribution . We extend the dual view to address ‘ black box ’ -ness by completely disentangling the ‘ gating network ’ and the ‘ weight network ’ . Our contributions are listed below . • Disentangling Gating Network . For this , we propose a novel Deep Linearly Gated Network ( DLGN ) as a mathematically interpretable counterpart of a DNN with ReLUs ( see Figure 1 ) . In a DLGN , the gating network is a deep linear network , i.e. , there is disentanglement because of the absence of non-linear activations . The gating network is mathematically interpretable , because , the transformations from input to the pre-activations are entirely linear ; we call this primal linearity . •Dual View ( Section 3.1 ) . We present an unnoticed insight in prior work on fully connected networks that the NPK is a product kernel and is invariant to layer permutations . We present new results to show that ( i ) the NPK is rotationally invariant for convolutional networks with global average pooling , and ( ii ) the NPK is an ensemble of many kernels in the presence of skip connections . • Disentangling Weight Network . We then argue via theory and experiments that the weight network is disentangled in the path space , i.e. , it learns path-by-path and not layer-by-layer . For this , in Section 3.2 we show via experiments that destroying the layer-by-layer structure by permuting the layers and providing a constant 1 as input ( see DLGN in Figure 1 ) do not degrade performance . These counter intuitive results are difficult to reconcile using the commonly held ‘ sophisticated structures are learnt in layers ’ interpretation . However , these experimental results follow from the theory in Section 3.1 . In other words , it is useful to think that the learning in the weight network happens path-by-path ; we call this dual linearity , which ( for infinite width ) is interpreted via the NPK . Message . The DLGN is not an alternative architecture per se , but a disentanglement and an interpretable re-arrangement of the computations in a DNN with ReLUs . The DLGN disentangles the computations into two ‘ mathematically ’ interpretable linearities ( i ) the ‘ primal ’ linearity and ( ii ) the ‘ dual ’ linearity interpreted via the NPK . Using the facts that the NPK is based on input and the gates , and in a DLGN , the pre-activations in the gating network are ‘ primal ’ linear , we have complete disentanglement . We compare the performance of DNN , DGN and DLGN on CIFAR-10 and CIFAR100 to show that , the DLGN recovers more than 83.5 % of the performance of state-of-the-art DNNs , i.e. , while entanglement in the DNNs enable their improved performance , the ‘ disentangled and interpretable ’ computations in the DLGN recovers most part of the performance . Related Works . We now compare our work with the related works . • Kernels . Several works have examined theoretically as well as empirically two important kernels associated with a DNN namely its NTK based on the correlation of the gradients and the conjugate kernel based on the correlation of the outputs ( Fan & Wang , 2020 ; Geifman et al. , 2020 ; Liu et al. , 2020 ; Chen et al. , 2020 ; Xiao et al. , 2020 ; Jacot et al. , 2018 ; Arora et al. , 2019 ; Novak et al. , 2018 ; Lee et al. , 2017 ; 2020b ) . In contrast , the NPK is based on the correlation of the gates . We do not build pure-kernel method with NPK , but use it as an aid to disentangle finite width DNN with ReLUs . • ReLU , Gating , Dual Linearity . A spline theory based on max-affine linearity was proposed in ( Balestriero et al. , 2018 ; Balestriero & Baraniuk , 2018 ) to show that a DNN with ReLUs performs hierarchical , greedy template matching . In contrast , the dual view exploits the gating property to simplify the NTK into the NPK . Gated linearity was studied in ( Fiat et al. , 2019 ) for single layered networks , along with a non-gradient algorithm to tune the gates . In contrast , we look at networks of any depth , and the gates are tuned via standard optimisers . The main novelty in our work in contrast to the above is that in DLGN the feature generation is linear . The gating in this paper refers to the gating property of the ReLU itself and has no connection to ( Srivastava et al. , 2015 ) where gating is a mechanism to regulate information flow . Also , the soft-gating used in our work and in ( Lakshminarayanan & Singh , 2020 ) enables gradient flow via the gating network and is different from Swish ( Ramachandran et al. , 2018 ) , which is the multiplication of pre-activation and sigmoid . • Finite vs Infinite Width . Lee et al . ( 2020a ) perform an extensive comparison of finite versus infinite width DNNs . An aspect that is absent in their work , but present in the dual view is the disentanglement of gates and weights , and the fact that the learning in gates is crucial for finite width network to outperform infinite width DNNs . In our paper , we make use of theory developed for infinite width DNNs to provide empirical insights into inner workings of finite width networks . • Capacity . Our experiments on destruction of layers , and providing constant 1 input are direct consequences of the insights from dual view theory . These are not explained by mere capacity based studies showing DNNs are powerful to fit even random labelling of datasets ( Zhang et al. , 2016 ) . 2 PRIOR WORK : NEURAL TANGENT KERNEL AND DUAL VIEW . In this section , we will focus on the dual view ( Lakshminarayanan & Singh , 2020 ) and how the dual view helps to address the open question in the NTK theory . We begin with a brief summary of NTK . NTK . An important kernel associated with a DNN is its neural tangent kernel ( NTK ) , which , for a pair of input examples x , x′ ∈ Rdin , and network weights Θ ∈ Rdnet , is given by : NTK ( x , x′ ) = 〈∇Θŷ ( x ) , ∇Θŷ ( x′ ) 〉 , where ŷΘ ( · ) ∈ R is the DNN output . Prior works ( Jacot et al. , 2018 ; Arora et al. , 2019 ; Cao & Gu , 2019 ) have shown that , as the width of the DNN goes to infinity , the NTK matrix converges to a limiting deterministic matrix NTK∞ , and training an infinitely wide DNN is equivalent to a kernel method with NTK∞ . While , as a pure kernel NTK∞ performed better than prior kernels by more than 10 % , Arora et al . ( 2019 ) observed that on CIFAR-10 : CNTK-GAP : 77.43 % ≤ CNN-GAP : 83.30 % where , CNN-GAP is a convolutional neural network with global average pooling and CNTK-GAP is its corresponding NTK∞ matrix . Due to this performance gap of about 5− 6 % , they concluded that NTK∞ does not explain fully the success of DNNs , and explaining this gap was an open question . 2.1 DUAL VIEW FOR DNNS WITH RELUS : CHARACTERISING THE ROLE OF GATES . In the dual view , the computations are broken down path-by-path . The input and the gates ( in each path ) are encoded in a neural path feature vector and the weights ( in each path ) are encoded in a neural path value vector , and the output is the inner product of these two vectors . The learning in the gates and the learning in the weights are separated in a deep gated network ( DGN ) setup , which leads to the two main results of dual view presented in Section 2.1.2 and Section 2.1.3 , wherein , the neural path kernel , the Gram matrix of the neural path features will play a key role .

Summary: This paper proposed deep linearly gated networks (DLGN) for interpreting DNNs with ReLU activations based on a dual view. The proposed framework is able to completely disentangle the ‘gating network’ and the ‘weight network’. Finally, the experiment results demonstrate that DLGN can achieve good performance for classification on two benchmark datasets compared to the existing DNNs.