Deep Unfolded Robust PCA
Replacing a 200 iteration optimization solver with a 10 layer network whose step sizes and thresholds are learned end to end.
The world is low rank + sparse
A huge class of real datasets is the superposition of a structured low rank part, a few sparse outliers, and some dense noise. The job is to pull those pieces apart.
Video surveillance
Static background is low rank; moving people are sparse foreground.
Recommender systems
Latent user/item factors are low rank; corrupted ratings are sparse.
Network monitoring
Regular traffic is low rank; intrusions are sparse anomalies.
A security camera, in one matrix
Stack every video frame as a column of a matrix D. The unchanging background repeats across columns, so it is low rank L. The people walking through appear in a few pixels of a few frames, so they are sparse S.
DThe classical tool: Robust PCA
Robust PCA already solves this beautifully, by convex optimization. But it has two practical pains that deep unfolding is built to fix.
Slow
It needs ~200 proximal gradient iterations to converge, each with a full SVD. That is expensive per image.
Hand tuned
Its thresholds (τL, τS) are set by grid search, one painful sweep per dataset.
The system model
We observe one matrix D ∈ ℝn×n that is the sum of three components, and we want to recover the first two.
D = L + S + N
L low rank
The structured component. Few independent directions (small rank).
S sparse
The outliers / anomalies. Most entries are exactly zero.
N noise
Dense Gaussian noise, N ~ 𝒩(0, σ²I).
From rank & count to a convex problem
"Low rank" and "few nonzeros" are non convex and intractable. We relax them to their convex surrogates: the nuclear norm ‖·‖* (sum of singular values) and the ℓ1 norm ‖·‖1.
Convex, but with two non smooth terms exactly what proximal gradient is made for.
One iteration = gradient step + two proximal shrinks
Take a shared gradient step on the data fit term, then apply the proximal operator of each prior. Repeat ~200 times.
L ← SVTτL( L − α·R ) # prox of ‖·‖* : shrink singular values
S ← softτS( S − α·R ) # prox of ‖·‖1 : shrink entries
Three scalars drive everything: step size α and the two shrink thresholds τL, τS. Hold that thought.
Unroll the solver into a network
Take K iterations and treat each one as a layer. The fixed scalars become learnable per layer parameters (αk, τLk, τSk), trained end to end by backprop.
10 learned layers stand in for ~200 hand tuned iterations. Positivity of the parameters is enforced with softplus.
Structure from the model, knobs from the data
This is the heart of model based deep learning: not a black box net, and not a hand tuned solver, but the best of both.
The model gives structure
Each layer is exactly one RPCA iteration: SVT for low rank, soft threshold for sparse. The architecture is the math, so it needs little data and stays interpretable.
Learning replaces tuning
Instead of grid searching one global (α, τ), backprop learns a different optimal triplet at every layer, something a human would never tune by hand.
How we test it
Train on synthetic D = L + S + N matrices with known ground truth, then compare three methods on held out data with a fixed seed.
Truncated SVD
Best rank r fit; treats outliers as noise. The naive baseline.
Classical RPCA
Grid search tuned proximal gradient, ~200 iterations. The strong baseline.
Deep unfolded RPCA
Our K=10 unrolled net with learned per layer parameters.
10 layers ≈ 200 iterations, at 18× the speed
Main setting n=32, rank=4, 5% sparsity, σ=0.05. Truncated SVD recovers L but cannot separate outliers (S error 0.57), confirming explicit sparsity modeling is essential. The model based DL win: a fraction of the compute for almost the same accuracy.
Where it wins, and where it doesn't
Holding the model fixed (K=10, same budget) and varying only the rank deconfounds capacity from rank. The honest picture:
| rank | method | L err | S err | F1 |
|---|---|---|---|---|
| 4 | Classical | 0.135 | 0.183 | 0.995 |
| 4 | Unfolded | 0.155 | 0.202 | 0.984 |
| 6 | Classical | 0.138 | 0.233 | 0.986 |
| 6 | Unfolded | 0.201 | 0.217 | 0.971 |
| 8 | Classical | 0.150 | 0.305 | 0.960 |
| 8 | Unfolded | 0.233 | 0.289 | 0.933 |
Classical wins on low rank L at every rank and the gap widens (1.15× → 1.55×): 10 layers can't resolve a higher rank subspace like 200 iterations can. But unfolded overtakes on sparse S at rank 6 & 8, and stays ~18× faster. Training had converged, so this is a capacity ceiling.
Capacity ≈ iteration budget: depth closes the gap
If the L gap is a depth ceiling, deeper should close it. At K=12 the unfolded net beats classical on both components, even at rank 8.
One layer ≈ one iteration of capacity. Match depth to difficulty and unfolding wins outright, an order of magnitude faster.
From synthetic training to a real security camera
We trained only on synthetic video shaped matrices, then froze the model and ran it on a real escalator clip it had never seen. Below, the same clip is decomposed by the classical solver and by our network, side by side.
Three methods, side by side
L and foreground S · classical RPCA, our unfolded net, truncated SVDOur unfolded background is indistinguishable from classical, and its foreground catches the moving people (a touch brighter and more permissive). Truncated SVD separates them the least cleanly. The same answer as the slow solver, an order of magnitude faster.
What we'd be honest about
- ✓ ~12 layers match a 200 iteration tuned solver on sparse recovery, ~15× faster
- ✓ No per dataset grid search; trained once, generalizes to real video
- ! Trained on synthetic data only; real domains may need calibration
- ! Single seed, small 32×32 matrices; SVD step limits scaling
- ! Only scalar
(α, τ)per layer richer per entry thresholds could help
Next: multi seed mean ± std, and a CDnet clip with ground truth masks for a true foreground F measure.
"Deep unfolding turns a trusted optimization solver into a fast, learnable network, and tells you exactly what more depth buys."