oxford reading group
DESCRIPTION
Oxford Reading Group. Phil Torr (Oxford Brookes). Outline of Lecture. Motivation: What problems may be solved by Semi Definite Programming SDP : segmentation, matching, classification. What is SDP? How can it be implemented. Linear Programming. Includes many problems Graph cut - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/1.jpg)
Oxford Reading GroupOxford Reading Group
Phil Torr (Oxford Brookes)
![Page 2: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/2.jpg)
Outline of LectureOutline of Lecture
Motivation: What problems may be solved by Semi Definite Programming SDP: segmentation, matching, classification.
What is SDP?
How can it be implemented.
![Page 3: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/3.jpg)
![Page 4: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/4.jpg)
Linear ProgrammingLinear Programming
Includes many problemsGraph cut
Segmentationstereo
Shortest pathTrackingObject recognitionStereo
Some L1 regressions
![Page 5: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/5.jpg)
SDPSDP
Has been described as the most exciting mathematical programming development in the 1990’s (Robert M Freund; MIT).
The simplex method etc from LP can be generalized to SDP.
![Page 6: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/6.jpg)
Classification by EllipsoidsClassification by Ellipsoids
Rosen [95].Constrain A matrices to be PSD.
![Page 7: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/7.jpg)
![Page 8: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/8.jpg)
![Page 9: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/9.jpg)
Another Application: Another Application:
![Page 10: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/10.jpg)
Recall Min Cut ProblemRecall Min Cut Problem
s-t graph cut
A graph with two terminals S and T
“source”
S T
“sink”
• Cut cost is a sum of severed edge weights • Minimum cost s-t cut can be found in polynomial time
Goal: divide the graph into two parts separating red and blue nodes
![Page 11: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/11.jpg)
Segmentation - ModelSegmentation - Model
• Input: Image consisting of pixels
• Output: Segmentation of pixels
• Color model
• Coherence or Edge model
Input Output
5 Hard Degmentation – Probablistic Framework GRABGRABCUTCUT
![Page 12: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/12.jpg)
Color ModelColor Model
Assignment variable:
Which mixture component does a pixel belong to?
7 Hard Degmentation – Probablistic Framework GRABGRABCUTCUT
![Page 13: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/13.jpg)
GraphCut for InferenceGraphCut for Inference
Cut: A collection of edges which separates the Source from the Sink
MinCut: The cut with minimum weight (sum of edge weights)
Solution: Global optimum (MinCut) in polynomial time
Image
Sink
Source
Foreground
Background
Cut
21 Hard Degmentation – Probablistic Framework GRABGRABCUTCUT
![Page 14: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/14.jpg)
22 Hard Degmentation – Probablistic Framework GRABGRABCUTCUT
GraphCut for InfernceGraphCut for Infernce
MinCut minimizes the energy of the MRF:
Image
Sink
Source
Foreground
Background
Cut
constant
![Page 15: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/15.jpg)
MinCutMinCut
Edge weights must all be positive,
Then soluble in polynomial time, by max flow algorithm.
Weights are capacities therefore negative capacity does not make sense.
![Page 16: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/16.jpg)
MaxCutMaxCut
Edge weights may be negative,
Note MaxCut and MinCut are same problem, however term MaxCut used when weights can be negative and positive.
MaxCut NP complete.
![Page 17: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/17.jpg)
Negative weights, MaxCutNegative weights, MaxCut
Edge weights may be negative,
Problem is NP-hard
With SDP, an approximation ratio of 0.878 can be obtained! (Goemans-Williamson ’95), i.e. within 13% of the global energy minimum.
![Page 18: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/18.jpg)
Why negative weightsWhy negative weights
In example above the MinCut produces an odd segmentation, negative weights encode the idea of repulsive force that might yield a better segmentation.
![Page 19: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/19.jpg)
Pop outPop out
Maybe need attractive and repulsive forces to get Gestalt effects:
![Page 20: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/20.jpg)
MaxCut Integer ProgramMaxCut Integer Program
GraphCut
![Page 21: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/21.jpg)
LaplacianLaplacian
∑ wij (1 - xi xj ) = x┬ (diag(W 1) - W) x
Laplacian of graph
![Page 22: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/22.jpg)
![Page 23: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/23.jpg)
MaxCut Integer ProgramMaxCut Integer Program
Laplacian (semi positive definite)
Min/Max Cut minimizes this integer program (cf Hopfield network):
![Page 24: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/24.jpg)
Solving via relaxationSolving via relaxation
Problem above NP complete
Some NP complete problems can be approximated using a “relaxation”, e.g. from binary to continuous variables etc.
Next semi definite programming is explained and then it is shown what relaxation can be used to help solve MaxCut.
![Page 25: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/25.jpg)
Solving via relaxationSolving via relaxation
Keuchel et al 2002; suggest adding a constraint
Where e = (1, … 1) to favour partitions with equal numbers of nodes.
![Page 26: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/26.jpg)
Solving via Solving via relaxationrelaxation
The vector e corresponds to no cut so is an eigenvector of L with eigenvalue 0, a natural relaxation of the problem is to drop the integer constraint and solve for the second smallest eigenvector of L (the Fiedler vector, c.f. Shi & Malik)
Eigenvector may or may not be binary.
![Page 27: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/27.jpg)
Linear Programming (Linear Programming (LPLP))
Canonical form, inequalities removed by introduction of surplus variables.
![Page 28: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/28.jpg)
LP ExampleLP Example
![Page 29: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/29.jpg)
Semidefinite Programming Semidefinite Programming
If X and Ai are diagonal this is a linear program,<X,Y> also used for inner produce of two matrices.
![Page 30: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/30.jpg)
![Page 31: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/31.jpg)
Positive Semidefinite MatricesPositive Semidefinite Matrices
W is Gram matrix, not weightW is Gram matrix, not weight
![Page 32: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/32.jpg)
![Page 33: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/33.jpg)
![Page 34: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/34.jpg)
![Page 35: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/35.jpg)
Semi Definite ProgrammingSemi Definite Programming
![Page 36: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/36.jpg)
Semi Definite ProgrammingSemi Definite Programming
If X diagonal then reduces to LP
The feasible solution space of SDP is convex.
Polynomial time exact solution.
Note most non trivial applications of SDP are equivalent to minimizing the sum of the first few eigenvalues of X with respect to some linear constraints on X.
![Page 37: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/37.jpg)
Recall:Recall:
Min/Max Cut minimizes this integer program:
![Page 38: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/38.jpg)
SDP relaxation of MaxCutSDP relaxation of MaxCut
The relaxation is to relax the rank one constraint for X; allowing X to be real valued. Bad news, many more variables.
![Page 39: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/39.jpg)
Binary variables Binary variables
}1,1{ s.t.2
1Max
i
jiij
x
xxw
![Page 40: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/40.jpg)
Graph Vertices: Unit VectorsGraph Vertices: Unit Vectors
1||||, s.t.2
1Max
in
i
jiij
vRv
vvw
![Page 41: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/41.jpg)
AlgorithmAlgorithm
X is a continuous matrix, recovered by SDP.Recover Gram matrix V, X = VVT by Cholesky decomposition matrix, each vertex represented by a vector vi on unit sphere.Choose random hyperplane to bisect unit sphere and define cut.
![Page 42: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/42.jpg)
RecallRecall
ji vv ji |v| cos (a)|v |
Vertices on same side of cut nearby on unit sphere yields large dot product, vertices far apart yield small (negative) dot product.
![Page 43: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/43.jpg)
An SDP Relaxation of An SDP Relaxation of MAX CUT – MAX CUT –
Geometric intuitionGeometric intuition
Embed the vertices of the graph on the unit sphere such that vertices that are joined by edges are far apart.
![Page 44: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/44.jpg)
Random separationRandom separation
![Page 45: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/45.jpg)
vi
vj
Algorithm AnalysisAlgorithm Analysis
The probability that two vectors are separated by a The probability that two vectors are separated by a random hyperplane:random hyperplane:
![Page 46: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/46.jpg)
Algorithm AnalysisAlgorithm Analysis
Calculate expected value of cut.
Note value of relaxation exceeds cost of MaxCut (as it lives in a less constrained space).
Note the following identity:
11
1
ratio min2
1 = 0.8785Cos ( ) 6..
x x
x
![Page 47: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/47.jpg)
1
1
1
1
exp
sdp
ratio min
1
2
2
1
cos
0.8785
( )
cos (.
)6. .
ii
jj
ijj
x
i
w
v v
x
v
w
v
x
Expected Value of CutExpected Value of Cut
![Page 48: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/48.jpg)
Classification by EllipsoidsClassification by Ellipsoids
Rosen [95].Constrain A matrices to be PSD.
![Page 49: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/49.jpg)
![Page 50: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/50.jpg)
![Page 51: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/51.jpg)
Another Application: Another Application:
Set of matches m, which can be on or off, so that m = 0,1
![Page 52: Oxford Reading Group](https://reader035.vdocument.in/reader035/viewer/2022062217/56815870550346895dc5d0db/html5/thumbnails/52.jpg)
Change of variable k = 2m -1 changes this to the max cut problem.