大餅博士的神經網絡/機器學習算法收錄合集:2020年整理,持續更新ing


今年外面疫情嚴重,週末在家也不能出去,只能在家看論文了,哈哈。我看的論文很具有隨機性,只要我能看懂並且覺得有點意思的就放在這裏吧。來源都是一些公衆號推薦,或者晚上隨機搜索到的,主要是關注一些我覺得有趣的AI算法、網絡結構、硬件論文。比較雜,隨時看到隨時記錄,主要是自己mark用的。

CoordConv, Uber, 2018 [1] [2]

An Intriguing Failing of Convolutional Neural Networks and the CoordConv Solution論文中,作者研究並分析了卷積神經網絡的一種常見缺陷,即它無法將空間表示轉換成笛卡爾空間中的座標和one-hot像素空間中的座標。這很意外,因爲這些任務似乎很簡單,並且此類座標的轉換也是解決常見問題的必備方法,例如圖像中的物體檢測、訓練生成模型、訓練強化學習智能體等等,所以也很重要。經過研究我們發現,這些任務已經多多少少受到卷積結構的限制。所以爲了提升性能,我們提出了一種名爲CoordConv的解決方案,在多個領域進行了成果展示。
在這裏插入圖片描述

  • Supervised Coordinate Classification task:輸入x, y,輸出一張圖片只有x, y 爲白色1,其餘位置都爲黑色0。 我們發現使用Convolution 的方法僅能夠達到80% 的準確度,當添加CoordConv 的時候就可以達到趨近於100% 的準確度。
  • Supervised Rendering task:輸入x, y,輸出一張圖片以x, y爲中心,畫出一個白色正方形,其餘位置都爲黑色。
    在這裏插入圖片描述

另外:

  • Object Detection: 在偵測MNIST 的資料集中,相較於沒有使用CoordConv,加入CoordConv 後讓IoU 提升了24%
  • Generative Model: 這邊是假設mode collapse 的問題是因爲latent space 無法學習好空間的相關性所導致的,而這時候使用CoordConv 或許會有幫助,感覺是結果論。

方法就是:在input層上添加(i,j)座標兩個channel,會預處理在[-1, 1] 之間。有一些實驗還有添加r coordinate(添加第3 個Channel),
在這裏插入圖片描述
在這裏插入圖片描述
很簡單,有趣的一個工作。我個人理解相當於在Conv(第一層)中添加了一個位置編碼,這個和NLP的language model任務中position embedding有點類似,但是Coordconv還是簡單粗暴了一些,是一種絕對位置編碼,沒有考慮相對位置編碼,因此損失了Conv的平移不變性的特點。我覺得如果採用相對位置編碼,通過learning對應的weight,應該還是可以做到平移不變性的。(Uber這篇也被懟了:Uber發佈的CoordConv遭深度質疑,“翻譯個座標也需要訓練?”

NullHop,稀疏CNN計算加速器, ETH Zurich,2018

論文:NullHop: A Flexible Convolutional Neural Network Accelerator Based on Sparse Representations of Feature Maps, 2018

論文比較完整,設計了一個Feature Map稀疏壓縮和計算的加速器,實現ASIC仿真,並在FPGA上實現。原理不算複雜,加速器單元組成如下圖,詳細我就不展開了。簡單說幾點,CCM是計算單元,一個MAC單元處理一個卷積filter的參數,而所有MAC單元會共享相同的數據。
在這裏插入圖片描述
重點看一下稀疏編碼的方式,採用簡單的Non-zero Value List,加一個bitmap表示0和非0。對於每一個16bit數據,需要多1個bit的Sparsity Map,因此稀疏率(0的比例)只要> 1/16就在空間上有的賺。
在這裏插入圖片描述
保存的格式如下:先存一個16bit的SM,只要不是全0,後面就跟着非0的像素值。如果是全0的SM,後面會繼續跟一個SM。在計算的時候,只需要解碼SM,來獲得一次計算的像素值個數,以及需要取的weight的位置,取出相應的weight值,參與乘累加運算。因爲做的33卷積爲例,送進去44數據,一次會出來2*2個數據結果(把channel維度累加完。)

在這裏插入圖片描述

Learning rate, batchsize and minima [3]

Stochastic gradient descent is no different, and recent work suggests that the procedure is really a Markov chain that, under certain assumptions, has a stationary distribution that can be seen as a sort of variational approximation to the posterior. So when you stop your SGD and take the final parameters, you’re basically sampling from this approximate distribution. I found this idea to be illuminating, because the optimizer’s parameters (in this case, the learning rate) make so much more sense that way.

As an example, as you increase the learning parameter (learning rate) of SGD the Markov chain becomes unstable until it finds wide local minima that samples a large area; that is, you increase the variance of procedure. On the other hand, if you decrease the learning parameter, the Markov chain slowly approximates narrower minima until it converges in a tight region; that is, you increase the bias for a certain region.

Another parameter, the batch size in SGD, also controls what type of region the algorithm converges two: wider regions for small batches and sharper regions with larger batches.

在這裏插入圖片描述
SGD prefers wide or sharp minima depending on its learning rate or batch size. Wider minima:large learning rate,small batch size,i.e., large variance. Sharp minima:small learning rate,large batch size,i.e., small variance.

An Empirical Model of Large-Batch Training

參考資料

[1] https://xiaosean.github.io/deep%20learning/computer%20vision/2018-12-23-CoordConv/
[2] Uber提出CoordConv:解決普通CNN座標變換問題
[3] http://hyperparameter.space/blog/when-not-to-use-deep-learning/
[4] NullHop: A Flexible Convolutional Neural Network Accelerator Based on Sparse Representations of Feature Maps,2018
[5]
[6]
[7]
[8]
[9]
[10]

發佈了86 篇原創文章 · 獲贊 645 · 訪問量 134萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章