CVPR2018的一篇文章,主要提出了一種利用深度神經網絡實現端到端圖匹配(Graph Matching)的方法. 該篇文章理論性較強,較難讀懂。。。
介紹這篇文章之前,需要先了解一下什么是圖匹配,圖匹配是干嘛的。
圖匹配
圖匹配簡單來說就是將已有的兩個圖中對應的頂點關聯起來實現能量函數最大。以多目標跟蹤任務來說,每幀圖像中的觀測都可以構成一個拓撲圖,希望將兩幀圖像中的拓撲圖匹配起來以實現同一條軌跡中的觀測成功匹配。
Formulation
這里需要說明的是,一般而言兩個圖之間節點的匹配,直接根據關聯矩陣就可以了,比如 中分別有個節點,那么關聯矩陣就決定了節點的匹配結果,但是這樣只考慮了兩個點之間的相似度而沒有考慮更高階信息。高階信息,說起來挺玄的,其實就是更全局的信息。比如這里兩個點之間是否匹配不僅僅取決這兩個點之間的相似度還要考慮這兩個點匹配的話對其他匹配的影響,從而選取一種匹配使得總體的能量最大。
舉個簡單的例子,現在有兩個男孩 和兩個女孩, 有一個掙錢的工作必須男女搭檔完成(一股銅臭味,誰讓我掉錢眼里了呢。。。),已知搭檔性價比如下:
掙錢(元) | A | B |
---|---|---|
a | 1000 | 900 |
b | 800 | 600 |
現在讓你分組你怎么分?
那么這里是怎么刻畫高階信息的呢?其實是二階信息。
還以這個例子來說,構建如下的矩陣
Aa | Ab | Ba | Bb | |
---|---|---|---|---|
Aa | 1000 | 0 | 0 | 1600 |
Ab | 0 | 800 | 1700 | 0 |
Ba | 0 | 1700 | 900 | 0 |
Bb | 1600 | 0 | 0 | 600 |
對角線表示兩個點匹配的能量,稱為邊的unary energy, 非對角線表示對應的兩個匹配同時成立的能量,比如(Aa, Bb)=1600表示Aa和Bb同時成立,(Aa,Ab)=0是因為A不可能同時分給兩個人。
這里公式(1)其實約束有點問題 . 如果那么約束不可能同時成立。
在使用深度學習框架學習的時候牽涉到大量的矩陣求導操作,所以論文首先給出了矩陣求導需要使用的公式:
這段話想說啥?無非就是矩陣的復合求導過程。
Deep Network Optimization for Graph Matching 框架
這里我們先來看看框架流程,先別管具體推導過程。首先利用深度學習框架生成每一個頂點的深度特征(Deep Feature Extractor), 然后將這些特征送到Affinity Matrix Layer生成Affinity Matrix, 接着采用冪迭代(Power Iteration)的方法對Affinity Matrix進行分解,再然后通過Bi-Stochastic layer添加 one-to-one約束,最后兩層是用於計算網絡損失的。
可以參考鏈接1,看看之前Affinity Matrix是怎么用Power Iteration分解的
可以發現矩陣分解部分就是直接將傳統的操作放到了網絡里面,所以本文實現的Deep Learning的重點其實是如何用深度網絡構建Affinity Matrix。
Deep Network Optimation
OK, 不管願不願意,還是介紹到了公式的部分。。。
首當其中的就是Affinity Matrix Layer,直觀上我們將頂點組合成edge,再由edge組成pairs然后放到網絡里自然可以學到對應的能量,但是這樣會導致計算規模太大,而且Affinity Matrix還有對稱非負(元素非負)約束等。 而正是由於這些特性,可以將Affinity Matrix 分解成了兩個較小部分再進行運算。
那么Affinity Matrix Layer的前向計算過程如下:
Power Iteration Layer
Bi-Stochastic Layer
Loss Layer
Experiments
實驗數據集我也不了解,具體就不介紹了,只看一下定性結果吧
Conclusion
We have presented an end-to-end learning framework for graph matching with general applicability to models containing deep feature extraction hierarchies and combinatorial optimization layers. We formulate the problem as a quadratic assignment under unary and pair-wise node relations represented using deep parametric feature hierarchies. All model parameters are trainable and the graph matching optimization is included within the learning formulation. As such, the main challenges are the calculation of backpropagated derivatives through complex matrix layers and the implementation of the entire framework (factorization of the affinity matrix, bi-stochastic layers) in a computationally efficient manner. Our experiments and ablation studies on diverse datasets like PASCAL VOC keypoints, Sintel and CUB show that fully learned graph matching models surpass nearest neighbor counterparts, or approaches that use deep feature hierarchies that were not refined jointly with (and constrained by) the quadratic assignment problem.
網絡的計算還是相當耗時的,論文中也給出了一些加速的建議,不過這些加速會影響性能。
參考文獻