SALSAS: Sub-linear Active Learning Strategy with...

38
Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear Active Learning Strategy with Approximate k-NN Search David Gorisse 1 Matthieu Cord 2 Fr ´ ed´ eric Precioso 1,2 (1)ETIS lab, ENSEA-UCP-CNRS, France (2)LIP6-UPMC Paris 6, Sorbonnes Universit´ es 3 Novembre 2010 1/27

Transcript of SALSAS: Sub-linear Active Learning Strategy with...

Page 1: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

SALSAS: Sub-linear Active LearningStrategy with Approximate k-NN Search

David Gorisse1 Matthieu Cord2 Frederic Precioso1,2

(1)ETIS lab, ENSEA-UCP-CNRS, France

(2)LIP6-UPMC Paris 6, Sorbonnes Universites

3 Novembre 2010

1/27

Page 2: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Introduction : CBIR classification framework

Content-based

Category Retrieval

Interactivity andLearning

Category search => a two-class problem :

Relevant class : image set fitting to the user query concept

Irrelevant class : all other images from the database

2/27

Page 3: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Introduction : similarity function – kernel

Kernel definition :

Let k : Rd × Rd → Rx, y 7−→ k(x, y)

k is a Kernel iif :∃φ|∀(x, y), k(x, y) = 〈φ(x), φ(y)〉with φ, an embedding function into aHilbert space.

Advantage : Machine learning friendly (Artificial neural network, SVM, . . .)

Relevance function (without b) : fA(x) =< w,Φ(x) >=P|A|

p=1 αpk(ap, x)

Kenels :

RBF : k(x, y) = e−d(x,y)2

2σ2

l2-RBF : with d(x, y) = ||x− y||2, χ2-RBF : with d(x, y) =

rPpi

(xi−yi )2

(xi +yi )

3/27

Page 4: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Introduction : interactive / active learning

GoalTo choose the best images for annotation to increase thetraining set thus optimally improving the search

Which ones ?The most relevant ones : TOPNThe most uncertain [Tong02] and the most diversified :Angle Diversity [Brinker03] (U unlabeled dataset) :

i? = arg minxi∈U

(λ|fA(xi)|+ (1− λ) maxxj∈A

k(xi ,xj)√k(xi ,xi)k(xj ,xj)

)

4/27

Page 5: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Scalable interactive learning

CBIR systemsTime retrieval ok for several thousands image databasesBut is it scalable ? what is the search time complexity ?

5/27

Page 6: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Scalable interactive learning

CBIR systemsTime retrieval ok for several thousands image databasesBut is it scalable ? what is the search time complexity ?

Fast online retrievalNice fast similarity search schemes recently introduced[Datar04, Valle08, Chum, Perdoch09] based on indexingstructures for database representation and knn search(trees KDTree, hashing LSH, clustering Inverted files...)Can we speed-up the interactive learning using similarstrategies ?

5/27

Page 7: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Scalable interactive learning

CBIR systemsTime retrieval ok for several thousands image databasesBut is it scalable ? what is the search time complexity ?

Fast online retrievalNice fast similarity search schemes recently introduced[Datar04, Valle08, Chum, Perdoch09] based on indexingstructures for database representation and knn search(trees KDTree, hashing LSH, clustering Inverted files...)Can we speed-up the interactive learning using similarstrategies ?

5/27

Page 8: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Scalability problems in interactive search

TOPN relevant images for intermediate results.

Computation : fA(x) ∀x ∈ U + Ranking

⇒ Complexity : O(U ln(U))

6/27

Page 9: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Scalability problems in interactive search

Most uncertain images for annotation strategy

Computation : Angle Diversity score ∀x ∈ U + Ranking

⇒ Complexity : O(U ln(U))

6/27

Page 10: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Scalability problems in interactive search

Training

Complexity O(A2), with A � U⇒ Complexity negligible

6/27

Page 11: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Scalability problems in interactive search

Complexity at least linear regarding the size of the database

⇒ impracticable for large databases

Sublinear solution : only consider a relevant subset S instead of U

6/27

Page 12: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Scalability problems in interactive search

Complexity at least linear regarding the size of the database

⇒ impracticable for large databases

Sublinear solution : only consider a relevant subset S instead of U

6/27

Page 13: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

How to decrease search complexity ?

Idea : subsamplingOnly work (ranking with the relevant function fA) on thepool S wrt N < |S| � n = UHow to find S ? with images that have a high probability tobe in the TOPN

MethodsSubsampling of U – ramdom selection ?Hierarchical sampling based on clustering [Panda06] andfocusing on ”interesting” clustersOur strategy : sampling using knn search with an optimizedLSH indexing structure over a fA approximation

7/27

Page 14: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Our Subsampling Strategy

TOPN

Looking for TOPN images = maximize the relevance function :

fA(x) =P|A+|

p=1 αpK (a+p , x)−

P|A−|n=1 αnK (a−n , x) = fA+ (x)− fA− (x)

with A+ training set of positively annotated imagesand A− training set of negatively annotated images

8/27

Page 15: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Subsampling Strategy

Selection : to build S

approximation of fA by focusing on fA+ .

fast maximization of fA+

9/27

Page 16: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Subsampling Strategy

Pruning

some images of S can have a low fA score because of fA−To compute exact fA score for all images in S in order to filter lower scoreimages.

10/27

Page 17: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Subsampling Strategy

Salsas

Approximation of maximization of fA+

⇒ by selecting images of U that are Nearest Neighbor of A+ images

11/27

Page 18: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Subsampling Strategy

Annotation Strategy

Pool S quite larger than the TOPN

As long as user not satisfied uncertain images in S⇒ Looking for the most uncertain and diversified images in S :

i? = arg minxi∈S

(λ|fA(xi )|+ (1− λ) maxxj∈A

k(xi , xj )qk(xi , xi )k(xj , xj )

)

Pros

Very fast : benefit of the previous stage

Rebalance the problem : much more irrelevant images than relevant ones(amplified with database size growing)

Cons

No more theoretical validity [Tong02]

⇒ But “valid in experiments”12/27

Page 19: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Our interactive scheme

13/27

Page 20: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Our interactive scheme

13/27

Page 21: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Our interactive scheme

13/27

Page 22: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Our interactive scheme

13/27

Page 23: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Our interactive scheme

S updating

To be efficient, the k-nearest neighbor knn search must be very fastSublinear⇒ Index Structure : Locality Sensitive Hashing (LSH)

13/27

Page 24: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Locality Sensitive Hashing (LSH)

Definition

LSH is a space-partitioning data structure [Indyk98]

Principle

Split database into bucketsstored in a table

Bucket accessible with a key

Key provided by a hashfunction

Locality Sensitive goal

Hash function must be able to :

Bring together similar images

Sort out dissimilar images

14/27

Page 25: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

E2-LSH : Hash function of Euclidean metric

DefA hash function to perform fast search with l2 distance and toapproximate l2-RBF :

Hash function ha,b based on randomprojection :

ha,b(p) = ba.p + b

wc

a a random vector : each component ischosen independently from a Gaussiandistribution,b a shift, W a bin width

15/27

Page 26: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

E2-LSH

DefTo increase the datapartitioning : concatenationof M hash functions

Lattice to approximateEuclidean partitioning

16/27

Page 27: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

E2-LSH

DefTo increase the datapartitioning : concatenationof M hash functions

Lattice to approximateEuclidean partitioning

Limitation if data distribution not grid regular

4500 feature vectors randomly selected froman image database

16/27

Page 28: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

CHI2-LSH

CHI2-LSH def

A new hash function to perform fast search with χ2 distanceand to approximate χ2-RBF

Same principle as E2-LSHBut distances between twoconsecutive hyperplansconstant W with χ2

distance

ha,b(p) =

√8a.pW 2 + 1− 1

2+ b

To increase data partitioning− > M hash functions, L hash tables

17/27

Page 29: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

CHI2-LSH : splitting space differences with L2

4500 feature vectors randomly selected from an imagedatabaseSpace grids for feature components with respect to χ2 (in red)and l2 (in blue)

18/27

Page 30: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Experiments

Protocol

5 datasetsbetween 5K and 180K images from VOC 2006, 2007, 2008 + TrecVid 2007,2008, 2009

Feature Space128-dimension vector (color and texture based)

Parameters1 annotation by iteration, TOP200, 100-NN search

19/27

Page 31: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Examples

LIN CHI2 SALSAS

20/27

Page 32: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Examples

LIN CHI2 SALSAS

20/27

Page 33: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Examples

LIN CHI2 SALSAS

20/27

Page 34: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Examples

LIN CHI2 SALSAS

20/27

Page 35: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Evaluation (1) : exact vs fast search

Accuracy and Efficiency comparison between exact and fast searchAccuracy => MAP measurementEfficiency => Time speed-up measurement5 datasets between 5K and 180K images

MAP of TOP200 at 50th iteration10 class VOC06 – 5 databases Time after 50 iterations vs database size

21/27

Page 36: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Evaluation (2) : χ2 vs l2-RBF

Comparison of Acuracy and Efficiency between l2-RBF and χ2-RBF exact search

22/27

Page 37: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Evaluation (3) : SALSAS vs E2LSH

(a) MAP of TOP200 at 50th itera-tion vs database size

(b) Time at 50th iteration vs data-base size

FIG.: Evolution of the accuracy and the efficiency with the size of the database for 50iterations with 1 label by iteration. V1 is E2LSH scheme combined with a l2-RBF kerneland V2 is E2LSH scheme combined with a χ2-RBF kernel.

23/27

Page 38: SALSAS: Sub-linear Active Learning Strategy with ...cedric.cnam.fr/~crucianm/src/echelle/FPrecioso.pdf · Introduction Scalability SALSAS System LSH indexing Experiments SALSAS: Sub-linear

Introduction Scalability SALSAS System LSH indexing Experiments

Thanks for your attention ! Questions ?

Bibliography pieces

SALSAS : Sub-linear Active Learning Strategy with Approximate k-NN Search,D. Gorisse, M. Cord, F. Precioso, Elsevier, Pattern Recognition, Special Issue on”Semi-Supervised Learning”, to appear in 2011.

Machine Learning Techniques for Multimedia – Case Studies on Organizationand Retrieval, Springer 2008, M. Cord, P. Cunningham (Eds.).

Active learning methods for Interactive Image Retrieval, P.H. Gosselin, M. Cord,IEEE Transactions on Image Processing, 17(7), 1200 –1211, 2008.

Fast Approximate Kernel-based Similarity Search for Image Retrieval Task, D.Gorisse, M. Cord, F. Precioso, S. Philipp-Foliguet, ICPR 2008.

Combining visual dictionary, kernel-based similarity and learning strategy forimage category retrieval, P.H. Gosselin, M. Cord, S. Philipp, CVIU, 2008

People

David Gorisse (ETIS, ENSEA/UCP/CNRS PhD student)

Matthieu Cord Frederic PreciosoLIP6, Univ. UPMC-PARIS 6 ETIS ENSEA/UCP/[email protected] [email protected] ://webia.lip6.fr/∼cord/ http ://frederic.precioso.free.fr24/27