The regression problem
- A hidden parameter vector
x ∈ ℝᵈ; observed variablesa₁, …, a_dand a responseb = Σᵢ aᵢxᵢ49:59. - We run experiments: the
aᵢandbare observable, thexᵢare what we want to solve for50:48. - Stack the experiments into a tall, skinny
n × dmatrixAand solveAx = bwithb ∈ ℝⁿ51:09. - Reality adds noise:
b = Σᵢ aᵢxᵢ + noise, so we only wantAx ≈ b52:17. - Least squares:
x* = argmin_x ‖Ax − b‖₂53:06.
The closed form and its bottleneck
x* = (AᵀA)⁺ Aᵀ b, where⁺is the pseudoinverse — a generalization of the inverse that also handlesAwithout full column rank53:06,53:36.- Cost of
AᵀA: it is ad × ntimesn × dproduct; each of thed²output entries is a length-ndot product ⇒O(nd²)53:56,54:42,55:04. - The pseudoinverse costs only
poly(d)(roughlyd³), soAᵀAis the bottleneck55:04. - Alternative from the problem set: solve iteratively by gradient descent
55:04,55:52.
Subspace embeddings (Sarlós)
Definition.
Πis an ε-subspace embedding for a linear subspaceVif for allv ∈ V,‖Πv‖₂² = (1 ± ε)‖v‖₂².
- The same norm-preservation as before, but now demanded for infinitely many vectors at once
56:14.
The claim
- If
Πis an ε-subspace embedding forspan(b ∪ columns of A), andx̃* = argmin_x ‖ΠAx − Πb‖, then‖Ax̃* − b‖ ≤ ((1+ε)/(1−ε))·‖Ax* − b‖57:45. - I.e. solving the tiny sketched regression is almost as good as solving the true one
58:54.
The proof (three lines)
x̃*is optimal for the sketched problem, so‖ΠAx̃* − Πb‖ ≤ ‖ΠAx* − Πb‖1:00:33.- Both sides are
Πapplied to a vector of the formAx − b, which lives in the embedded subspace, so both are preserved to within1 ± ε1:00:57. - Rearrange. Done
1:01:24.
The payoff
- With
Πanm × nmatrix andm ≪ n, the bottleneck becomes(ΠA)ᵀ(ΠA), costingO(md²)instead ofO(nd²)— ann → mswap. Space drops too59:19,59:54. - Crucially,
mcan be made to depend only ond, not onnat all1:00:07. - The catch an audience member raises: you still have to compute
ΠA. The answer is to use the Thorup–Zhang sketch, which is so sparse thatΠAis very cheap1:01:24,1:01:56.
flowchart LR
A["A: n × d<br/>b: n × 1"] -->|"apply Π (m × n)"| PA["ΠA: m × d<br/>Πb: m × 1"]
A -->|"exact: AᵀA"| T1["O(nd²)"]
PA -->|"sketched: (ΠA)ᵀ(ΠA)"| T2["O(md²), m = O(d²/ε²)"]
T2 --> R["x̃*: within (1+ε)/(1−ε)<br/>of optimal residual"]