Model Based Deep Learning · 361.2.2320 · BGU
01 / 17
scroll · ↓ · space · enter  |  F = full screen · N = notes
Recorded Seminar · 15 min

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.

Model Based Deep Learning · 361.2.2320 Ben Gurion University
Presented by Roey Graif & Or Yosef Cohen
scroll to begin
01 Motivation & background

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.

01 Motivation & background

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.

background = low rank L people = sparse S sensor noise = N
a single frame from a real escalator security camera
one frame of a real escalator camera = one column of D
01 Motivation & background

The 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.

Question Can we keep the model's structure but make it fast and self tuning by learning it from data?
02 Derivation & mathematical formulation

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).

02 Derivation & mathematical formulation

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.

min L,S ½‖D − LSF2 + λL·‖L* + λS·‖S1
data fit · low rank prior · sparsity prior

Convex, but with two non smooth terms exactly what proximal gradient is made for.

02 Derivation & mathematical formulation

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.

R = L + S − D   # shared residual
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.

03 Relationship to model based deep learning

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.

D
Layer 1
SVT + soft threshold
α¹, τL¹, τS¹
Layer 2
SVT + soft threshold
α², τL², τS²
···
Layer K=10
SVT + soft threshold
α¹⁰, τL¹⁰, τS¹⁰
L̂, Ŝ

10 learned layers stand in for ~200 hand tuned iterations. Positivity of the parameters is enforced with softplus.

03 Relationship to model based deep learning

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.

M

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.

L

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.

Payoff Far fewer iterations, no per dataset grid search, and the door is open to surpass the classical solver.
04 Simulation results

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.

metrics: relative error of L & S sparse support F1 runtime / sample
04 Simulation results

10 layers ≈ 200 iterations, at 18× the speed

18.5×
faster per sample than classical (0.75 ms vs 13.9 ms)
1.10×
of classical's S error essentially matched on sparse recovery
1.2 pts
F1 gap (0.984 vs 0.995) on the sparse support

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.

04 Simulation results · the honest comparison

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:

rankmethodL errS errF1
4Classical0.1350.1830.995
4Unfolded0.1550.2020.984
6Classical0.1380.2330.986
6Unfolded0.2010.2170.971
8Classical0.1500.3050.960
8Unfolded0.2330.2890.933
controlled rank sweep
K=10 held fixed · only rank varies

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.

04 Simulation results

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.

deeper K=12 rank sweep
K=12, longer training not a controlled comparison, a capacity probe
↓ 40%
L error vs classical at rank 8 (0.092 vs 0.150)
↓ 50%
S error vs classical at rank 8 (0.150 vs 0.302) and still ~15× faster

One layer ≈ one iteration of capacity. Match depth to difficulty and unfolding wins outright, an order of magnitude faster.

05 Application · real video

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.

original frame · classical background & foreground · our unfolded background & foreground the two backgrounds are nearly identical
13.3×
faster than classical on the real clip (142 ms vs 1887 ms)
0.056
background disagreement vs classical nearly identical
< SVD
closer to classical than truncated SVD on both L and S
05 Application · real video

Three methods, side by side

three-method background subtraction comparison
three frames (rows) · for each method: recovered background L and foreground S · classical RPCA, our unfolded net, truncated SVD

Our 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.

06 Discussion

What we'd be honest about

Strengths & caveats
  • ~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."
In one line

Unroll a 200 iteration RPCA solver into 12 learned layers: match it on sparse recovery, beat it with more depth, run it ~18× faster on real video.

github.com/roeygraif/Deep-Unfolded-Robust-PCA
Thank you. Roey Graif & Or Yosef Cohen.