# [Network morphism](http://www.jmlr.org/proceedings/papers/v48/wei16.pdf), ICML 2016 ## Abstract 將 parent network 變形後,child network 要繼承 parent 的 knowledge,並且有潛力以遠遠更快的 training 速度成長得更強大。 2個 requirement, - 要能夠應付各種不同變形, 包括改變 深度&寬度、kernel size 甚至是(新增) subnet。 - **_(???)_** The second requirement is its ability to deal with non-linearity in a network. We propose a family of parametric-activation functions to facilitate the morphing of any continuous nonlinear activation neurons. ## 1. Introduction 一個複雜的變形可以被分解成以下四種 - depth morphing - width morphing - kernel size morphing - subnet morphing ### Depth morphing IdMorph (**_Net2Net?_**) 會有 Identity Matrix 過於稀疏的問題,本方法的最差情況,非零的佔據率仍然高於 IdMorph ### Dealing the non-linearity in a neural network IdMorph 在許多 activation function 上都會失敗,因為它只適用 idempotent functions (function $\rho$ 滿足 $\rho o \rho = \rho$),而只有 ReLU 較適用,像 Sigmoid 和 TanH 都不適用 因此引進了 parametric-activation function family - we introduce the concept of parametric-activation function family, which is defined as an adjoint function family for arbitrary non-linear activation function. It can reduce the non-linear operation to a linear one with a parameter that can be learned. Therefore, the network morphism of any continuous non-linear activation neurons can be solved. ### 成功變形 VGG16,並將 training time 縮減至 1/15 ## 2. Related Work ### Mimic Learning 略 ### Pre-training and Transfer Learning 略 ### Net2Net Net2Net 仍被 IdMorph approach 所限制 1. NetMorph 是第一個能夠嵌入 non-identity layers 的 approach 2. NetMorph 是第一個能夠處理任意 non-linear activation functions 的 3. Net2Net 只能處理 width & depth 改變,而 NetMorph 還能改變 kernel size 以及 subnet 4. Net2Net 針對深度 & 寬度需要分開考量,而 NetMorph 可以在同個 operation 處理 depth、width 以及 kernel size ## 3. Network Morphism ### 3.1. Network Morphism: Linear Case 先從最簡單的 linear case 開始 ![](https://i.imgur.com/kCbmFs9.png) parent network 的兩個 (相鄰?) hidden layer 以一個 weight matrix $G$ 連接起來,如 Figure 2 $B_{l+1} = G \cdot B_{l-1}$ 而 network morphism 在中間插入了一層新的 hidden layer $B_l$,因此 child network 滿足: $B_{l+1} = F_{l+1}\cdot B_l = F_{l+1}\cdot(F_l\cdot B_{l-1})=G\cdot B_{l-1}$ 此時就是單純的矩陣分解問題 $G=F_{l+1}\cdot F_l \tag {3}$ #### **Convolutional layer** - Convolutional layer 在這被稱做 **blobs** $B$ (feature map) - 權重矩陣被稱做 filters $F$ - Channel 數 $C$ filters shape - $G: (C_{l+1}, C_{l-1}, K, K)$ - $F_l: (C_l, C_{l-1}, K_1, K_1)$ - $F_{l+1}: (C_{l+1}, C_l, K_2, K_2)$ 一個 conv 拆成2個 conv $\tilde G(c_{l+1},c_{l-1})=\sum_\limits{c_l}F_l(c_l,c_{l-1}) * F_{l+1}(c_{l+1},c_l) \tag 5$ 貫串全文的公式 $\tilde G=F_{l+1}\circledast F_l\tag 6$ ### 3.2. Network Morphism Algorithms: Linear Case 引入 2 個演算法來解 equation (6) #### Algorithm 1: 隨機初始化 $F_l, F_{l+1}$ 然後迭代解這兩個的時候固定另一個。 - 只要其中一個 filter $F$ 的參數量大於 $G$ 的參數量,即可收斂至 loss = 0 ![](https://i.imgur.com/AmZrRjv.png) ### 3.3. Network Morphism: Non-linear Case ###### tags: `model expansion`