2011年6月8日 星期三

[aMMAI] Paper Summary: Online Dictionary Learning for Sparse Coding

Title: Online Dictionary Learning for Sparse Coding
Author: Julien Mairal, Francis Bach, Jean Ponce, Guillermo Sapiro
Publication: ICML 2009



Sparse coding: modeling data vectors as sparse linear combination of basis elements.


This paper propose a new stochastic online algorithm for learning dictionaries adapted to sparse coding task, and proven its convergence.

Sparse coding optimize the empirical cost function:
n: number of samples
D: m*k dimension dictionary
Loss function l(x,D) should be small if D is “good” at representing the signal x.

Define l( x , D ) as the optimal value of the ℓ 1 -sparse coding problem:
To prevent D from being arbitrarily large, it is common to constrain its columns d to have an ℓ 2 norm less than or equal to one.
Since the computation of α dominates the cost of each iteration, a second-order optimization technique can be used in this case to accurately estimate D at each step when α is fixed.

Contrary to classical first-order stochastic gradient descent, it does not require explicit learning rate tuning and minimizes a sequentially quadratic local approximations of the expected cost.

Online Dictionary Learning
Two motivations:


Dictionary Update
Updating the dictionary uses block-coordinate descent with warm restarts, and one of its main advantages is that it is parameter-free and does not require any learning rate tuning, which can be difficult in a constrained optimization setting.


Optimizing the Algorithm
  • Handling Fixed-Size Datasets.
    The size of the training set is often finite. In this situation, the same data points may be examined several times, and it is very common in online algorithms to simulate an i.i.d. sampling of p( x ) by cycling over a randomly permuted training set
  • Mini-Batch Extension.
    Improve the convergence speed of our algorithm by drawing η  >  1 signals at each iteration instead of a single one, which is a classical heuristic in stochastic gradient descent algorithm
  • Purging the Dictionary from Unused Atoms.
    Some of the dictionary atoms are never used. A common practice is to replace them during the optimization by elements of the training set.



Contribution:
  • The dictionary learning problem as the optimization of a smooth nonconvex objective function over a convex set, minimizing the (desired) expected cost when the training set size goes to infinity.

  • Propose an iterative online algorithm that solves this problem by efficiently minimizing at each step a quadratic surrogate function of the empirical cost over the set of constraints.
  • Experimentally their algorithm is significantly faster than previous approaches to dictionary learning on both small and large datasets of natural images.




2011年6月1日 星期三

[aMMAI] Paper Summary: Fast concurrent object localization and recognition

Title: Fast concurrent object localization and recognition
Author: Tom Yeh, John J. Lee, Trevor Darrell
Publication: CVPR, 2009



這篇paper提出一個方法來對多個不同物件做 localizationrecognition

傳統ESS的方式,要找多個不同的物件,直接的想法就是每個物件都去找一次。
但是這樣很耗時,ESS的複雜度: O(N^4),用ESSM個物件: O(M*N^4)

作法:
  1. 基於ESS的方法,加上物件的維度。
  2. (xj,yj,vj(i)): feature j 在位置(x,y)且該feature對物件i的分數v(i)
  3. v(i)的計算方式: 就是將有屬於該物件i的總和,最後在乘上SVM的權重。
  4. 計算出分數後,再用branch-of-bound的方式去切割。
  5. 切割時是切在feature上面,不過最後面框出來的視覺上看起來差別不大。
  6. 切物件時,每次都會針對分數作排序,因為是堆疊的行式,所以會先放低方再放高分。


上面的做法是有幾項假設:
  1. 物件M是固定的,paper中用了120種物件。
  2. 每張圖中的物間只有一種。如果有多種物件在同一張圖裡面,作法上就要多加上,找到一種物件後,就將該範圍的feature拿掉。
  3. 如果不同物件間位置太相近,就很可能出錯。


最後面有與幾項baseline做實驗。




BOF最快,但是無法定位。

ISM最準,但是如果不做orientation位置的正確度就會下降,如果做了,時間複雜度就會上升。

然後有提到可以用非長方體的方式來做bounding box,像是利用多個長方體或是三角形來框想要的物件,算出來的分數會比較好。

2011年5月16日 星期一

[aMMAI] Paper Summary: PEGASUS: A Peta-Scale Graph Mining System - Implementation and Observations

Title: PEGASUS: A Peta-Scale Graph Mining System - Implementation and Observations
Author: U Kang, Charalampos E. Tsourakakis, Christos Faloutsos
Publication: ICDM 2009


這篇paper主要是在描述一個graph mining library, PEGASUS, 其中最重要的部分GIM-V (Generalized Iterated Matrix-Vector multiplication)
GIM-V最主要的概念:
假設有n*nmatrix M和大小為nvector vmi,j 表示在M(i,j)位置的值。
將兩者相乘,可用下面的數學式子表示
接著將它轉換成需要的graph mining algorithms
1. combine2: multiply mi,j and vj .
2. combineAll: sum n multiplication results for node i.
3. assign: overwrite previous value of vi with new result to make vi.

接著paper就描述了許多mining的方法,都將它轉成GIM-V上述三個主要的operation,有PageRankDiameter EstimationConnected Components

  • GIM-V BASE: Naive Multiplication是每個將matrix裡面每個項目拆開下去做。
  • GIM-V BL: Block Multiplication是將matrix中的資料切成一個個block去做,能加快速度的原因有二,一個是減少需要在shuffling步驟中排序的數量,二是資料的大小減少。
  • GIM-V CL: Clustered Edges先對matrix內的值作分群,在切block去做,可以有效加快速度,但是要注意的是,必須是block base才有加速的效果,如果是每個項目分開去跑,事先分群並沒有意義。
  • GIM-V DI: Diagonal Block Iteration:由於GIM-V的主要瓶頸在於shufflingI/O。在HCC中利用與diagonal block相乘來減少迭代的次數。


時間複雜度分析,每次迭代所需要的時間為O( ((V+E)/M) log ((V +E)/M) ),空間消耗上,需要O(V+E)

paper後面有利用GIM-V對實際的例子測試Connected ComponentsPageRanksDiameter這三個mining演算法。

這篇paper主要的貢獻有
1.      提出了一個可以是用在很多mining算法的方法。
2.      GIM-V有很多最佳化的方式。
3.      有針對實際的例子作測試。

整體來說,內容寫得很詳細,每個它所提到的演算法都有一步步拆成GIM-V的形式,能達到最佳化的原因有用圖示說明比較清楚,最後也有實際做在真實世界上的實驗,很有說服力。


2011年5月11日 星期三

[aMMAI] Paper Summary: Building a High-Level Dataflow System on top of Map-Reduce: The Pig Experience

Title: Building a High-Level Dataflow System on top of Map-Reduce: The Pig Experience
Author: Alan F. Gates, Olga Natkovich, Shubham Chopra, Pradeep Kamath, Shravan M. Narayanamurthy, Christopher Olston, Benjamin Reed, Santhosh Srinivasan, Utkarsh Srivastava
Publication: VLDB 2009


Pig 是一個high-level的系統,有點像SQL一樣可以利用一些語法去控制資料。
隨著資料量越來越龐大,許多地方都使用Map-Reduce來處理資料,Pig像是一個中介,將所寫的語法轉成Map-Reduce可處理的job

Map-Reduce programming model存在著一些問題。
1.      不支援N-step dataflow
2.      缺乏支援結合多個data setprocessing
3.      一些基本的且常用的操作(ex. Filtering, aggregation)必須自己寫。

Pig使用Pig Latin作為輸入,將之轉成Map-Reduce job
下面是整個處理過程的overview

Fig2 左邊就是使用者寫的Pig Latin,先將她轉為logical plan
Pig提供了許多type可以使用,支援比較複雜的type: maptuplebag

接著將Logical plan轉為physical plan
上面的數字表示對應的步驟,其中JOINGROUP會對應的多個physical stage

最後再將physical plan轉成map reduce plan

Pig 提供了對nested sub-plan的處理,所以在physical多了SPLIT/MULTIPLEX的處理。因為使用者可能想對同一份資料作多項處理,但是並不想重複load data
為了控制pipeline中的tuple,他們也考慮的push modelpull model

由於Hadoop是用java開發,所以pig也用java開發,但是因為java無法直接對memory作處理,所以很容易造成memory不夠的問題。
一般解決的方式是用增加JVM memory大小。

此外,Pig也提供了UDF,使用者自訂的函式。
他們對每個STREAM建立兩個thread: 一個用來feeding data去執行,另一個用來consuming data,先queue起來。
  
這篇paper最主要應該是要解決Map-Reduce上的問題,以及提供一些high-level的控制方式,讓使用者可以更方便操作資料。



2011年5月5日 星期四

[aMMAI] Paper Summary: Describable Visual Attributes for Face Verification and Image Search

Title: Describable Visual Attributes for Face Verification and Image Search
Author: Kumar, Berg, Belhumeur, Nayar
Publication: PAMI, 2011


這篇paper利用visual attribute來做Face VerificationImage Search
所以是針對人臉的attributetraining

Attribute: 在這邊的意思是可以用來描述圖片的label。例如: 性別、年記等
Face Verification: 比對兩張臉是不是同一個人。
Image Search: 輸入attribute找出特定的臉。(例如: 戴眼鏡的男人。)

因為傳統作法都是取low level featuretraining,往往會形成高維的資料,且對人來說感覺上並不直觀。所以希望改成用attribute base來改善。

他們用了兩個不同的attribute-base:
1. Describable visual attributes: 就是上面描述的性別、年記之類的
2. Similes: 與某個參考的人做比較。

建立資料庫:
1. 從網路上蒐及圖片,人工做tag
2. 做人臉校正。
3. 因為是請網路上的人去標tag,所以必須去做驗證,看準確度夠不夠。

下圖是training的架構圖。

Learning visual attribute:
  1. 如果是二分法的(如性別),就真對性別train一個classifier,如果非二分法的(如年紀),就真對不同的年紀範圍train不同的classifier
  2. 選一些適當的low level feature進來。
  3. 利用SVMs with RBF kernel做分類。


下圖是利用train出來的attributesimile classifierface verification的步驟。
由實驗果看出來,attribute base classifier的確有不錯的performance

這篇paper的好處:
  • Attribute對人來說比較直覺。
  • feature維度比較低比較有效率。
  • 有提供應用的方法。
  • 提供了兩個tag好的dataset FaceTracer”” PubFig”