Quiz: spectral partitioning and normalized cuts
Before this unit: Graph-cut segmentation (previous unit); Day 12: Thresholding.
See also: Day 13: Morphology; Day 15: Watershed.
Short questions to test your understanding. Try each on paper first, then open the answer. W is the symmetric matrix of affinities, D the diagonal matrix of degrees d_p = \sum_q w_{pq}, and L = D - W.
Q1. Why is \mathbf{1} (the vector of all ones) always an eigenvector of L, and with which eigenvalue?
Compute row p of L\mathbf{1}.
Row p of L\mathbf{1} is d_p - \sum_q w_{pq} = 0. So L\mathbf{1} = 0 \cdot \mathbf{1}: eigenvalue 0. Since \mathbf{x}^\top L\mathbf{x} = \sum w_{pq}(x_p - x_q)^2 \ge 0, no eigenvalue is negative, so 0 is the smallest.
Q2. A graph consists of two separate pieces with no edges between them. What is \mu_2, and what does the Fiedler vector look like?
Find a second vector with \mathbf{x}^\top L\mathbf{x} = 0.
\mu_2 = 0. Any vector that is constant on each piece has \mathbf{x}^\top L\mathbf{x} = 0, for example +1 on one piece and -c on the other, chosen orthogonal to \mathbf{1}. Its sign splits the graph exactly into the two pieces. The number of zero eigenvalues is the number of connected pieces.
Q3. For \mathbf{x} \in \{\pm 1\}^n, why is \mathbf{x}^\top L\mathbf{x} equal to 4 times the cut?
\mathbf{x}^\top L\mathbf{x} = \sum_{\text{edges}} w_{pq}(x_p - x_q)^2.
For an edge inside a part, x_p = x_q and the term is 0. For an edge across the cut, x_p - x_q = \pm 2 and the term is 4 w_{pq}. Summing gives 4 \sum_{\text{across}} w_{pq} = 4\,\text{cut}(A, B).
Q4. Why does minimising the plain cut without seeds give a useless answer, and how does Ncut avoid it?
What does it cost to cut off a single node, in cut and in Ncut?
Cutting off one node costs only the weights of its own edges, usually less than any real boundary, which crosses many edges. In Ncut that same cut is divided by the node’s volume, which is exactly those weights: \text{cut}/\text{vol}(A) = 1. A balanced split with weak edges between large groups has \text{Ncut} \ll 1, so Ncut prefers it.
Q5. What is the relation between L\mathbf{x} = \mu D\mathbf{x} and an ordinary symmetric eigenproblem?
Substitute \mathbf{x} = D^{-1/2}\mathbf{y} and multiply by D^{-1/2}.
L D^{-1/2}\mathbf{y} = \mu D^{1/2}\mathbf{y}, and multiplying on the left by D^{-1/2}: D^{-1/2}LD^{-1/2}\,\mathbf{y} = \mu\,\mathbf{y}. The matrix D^{-1/2}LD^{-1/2} (the normalized Laplacian) is symmetric, so it has real eigenvalues and orthogonal eigenvectors; \mathbf{x} = D^{-1/2}\mathbf{y} recovers the generalized eigenvector.
Q6. The Fiedler vector has real entries, not \pm 1. How do you get a segmentation from it, and why is the result not guaranteed to be the minimum Ncut?
What did the relaxation change?
Threshold it: at 0, or at the split point along the sorted vector that gives the smallest Ncut. The eigenvector is the exact solution of the relaxed problem (real values), not of the original one (two values). Rounding it back can be far from the true optimum on some graphs; in practice it is usually good when the graph has a clear two-group structure.
Q7. In an image graph, what happens to the Fiedler vector when \sigma_I, the intensity scale of the affinity, is made very large?
What does w_{pq} then depend on?
All intensity factors become close to 1, so w_{pq} depends only on the distance between pixels: the graph is just the pixel grid. Its Fiedler vector is a slowly varying wave across the image (like a lowest-frequency cosine), and the split is geometric (left/right or diagonal), regardless of the image content.
Q8. Name one advantage of graph cuts over normalized cuts, and one the other way round.
Think of what each needs as input and what each guarantees.
Graph cuts find the exact minimum of their energy, and the user can steer the result with seeds. Normalized cuts need no seeds or intensity model and take the whole image into account at once; they find the dominant grouping, but only approximately (relaxation and thresholding), and the result may not be the object you wanted.