# Dual Path Network ###### tags: `paper` `已公開` [toc] ## Revisiting ResNet, DenseNet and Higher Order RNN(HORNN) ![](https://i.imgur.com/cPbyEQo.png) 在本節中,我們首先將DenseNet與高階RNN 連接起來,以提供對DenseNet的新理解。我們證明殘差網絡本質上屬於DenseNet家族,除了their connections are shared across steps。 然後,我們對每種拓撲架構的優缺點進行了分析,這促使我們開發dual path網絡架構。為了探索上述關係,我們從高階 RNN 的角度提供了對DenseNet的新觀點,解釋了它們的關係和然後專門分析殘差網絡。 在整篇論文中,我們以更通用的形式來表述 HORNN。 我們使用$h^{t}$來表示循環神經網絡在$t$-th step 的隱藏狀態,並使用$k$作為current step的index。$x^{t}$表示輸入在$t$-th step , $h_{0}=x^{0}$。對於每一步,$f^{k}_{t}(\cdot)$[是指以隱藏狀態為輸入並輸出提取信息的]特徵提取函數。$g^{k}(\cdot)$ 表示將收集到的信息轉換為當前隱藏狀態的轉換函數 $$ h^{k} = g^{k}[\sum^{k-1}_{t=0}{f^{k}_{t}(h^{t})}] \tag1 $$ 等式1以一種通用的方式封裝了各種網絡架構的更新規則。對於 HORNN,eights are shared across steps,即$\forall t, k, f^{k}_{k-t}(\cdot)\equiv f_{t}(\cdot)$ and $\forall k, g^{k}(\cdot)\equiv g(\cdot)$。對於密集連接的網絡,每一步都有自己的參數,這意味著$f^k_{t}(\cdot)$ 和 $g^k(\cdot)$ 不共享。這樣的觀察表明,DenseNet 的密集連接路徑本質上是一條高階路徑,能夠從之前的狀態中提取新的信息。 圖 1 以圖形方式顯示了密集連接網絡和高階循環網絡的關係。 我們解釋了residual net可以視為densely connection net的special case,if taking $\forall t,k,f^k_{t}(\cdot) \equiv f_{t}(\cdot)$。為了簡潔表示,引入了$\gamma^k$,denote intermediate results and $\gamma^0=0$,等式1可以被改寫成: $$ \gamma^{k} \triangleq \sum^{k-1}_{t=1}{f_{t}(h^t)} = \gamma^{k-1} + f_{k-1}(h^{k-1}) \tag2 $$ $$ h^k = g^k(\gamma^k) \tag3 $$ $$ \gamma^{k} = \gamma^{k-1} + f_{k-1}(h^{k-1}) = \gamma^{k-1} + f_{k-1}(g^{k-1}(\gamma^{k-1})) = \gamma^{k-1} +\phi^{k-1}(\gamma^{k-1}) \tag4 $$ where $\phi^{k}(\cdot) = f_{k}(g^k(\cdot))$,等式4has the same form as the residual net and RNN. * Specifically, 當$\forall k, \phi^{k}(\cdot)\equiv \phi(\cdot)$,等式4,退化成RNN。 $$ h= g(\gamma(\cdot)) $$ * 當 none of $\phi^{k}(\cdot)$ is shared, and $x^k=0, k>1$,相當於residual net. * $\forall t,k,f^{k}_{t}(\cdot) \triangleq f_{t}(\cdot)$,那相當於從Dense block退化成residual net,所以可以說residual net 是densely connected net家族的。 以上分析,發現了三件事。 1. residual nets and densely connected nets can be seen as HORNN when $f^{k}_{t}(\cdot)$ and $g^{k}(\cdot)$ are shared for all k. 2. 殘差網絡是一個密集連接的網絡 $\forall t,k,f^k_t(\cdot) \triangleq f_t(\cdot)$。通過在所有步驟中共享 $f^k_t(\cdot)$,$g^k(\cdot)$ 從給定的輸出狀態接收相同的特徵,這鼓勵特徵重用,從而減少特徵冗餘。 ## Dual Path Networks ![](https://i.imgur.com/sMSYiTu.png) $$\begin{gather} x^k \triangleq \sum^{k-1}_{t=1}f^k_t(h^t), \\ y^k \triangleq \sum^{k-1}_{t=1}v_t(h^t) = y^{k-1}+\phi^{k-1}(y^{k-1}), \\ \gamma^k \triangleq x^k + y^k, \\ h^k = g^k(\gamma^k), \end{gather} $$ ## 參考資料 - [Dual Path Networks](https://arxiv.org/abs/1707.01629)