  We derive a dimension-free Hanson-Wright inequality for quadratic forms of
independent sub-gaussian random variables in a separable Hilbert space. Our
inequality is an infinite-dimensional generalization of the classical
Hanson-Wright inequality for finite-dimensional Euclidean random vectors. We
illustrate an application to the generalized $K$-means clustering problem for
non-Euclidean data. Specifically, we establish the exponential rate of
convergence for a semidefinite relaxation of the generalized $K$-means, which
together with a simple rounding algorithm imply the exact recovery of the true
clustering structure.
