In the era of big data, machine learning models face a "double whammy" of scale. On one hand, the number of training samples ($N$) can reach into the millions or billions. On the other, the dimensionality of the feature space ($p$) can be equally massive, especially in genomics, recommendation systems, or when using kernel methods.
Standard optimization tools usually solve only one half of this problem. Stochastic Gradient Descent (SGD) handles large $N$ by sampling a few data points at a time, but it still requires computing a gradient across all $p$ features. Conversely, Randomized Block Coordinate Descent (RBCD) handles large $p$ by updating only a few features at a time, but it usually requires looking at all $N$ samples to do so.
Doubly Stochastic Optimization breaks this bottleneck by sampling both dimensions simultaneously. By selecting a small "patch" of the data—a subset of rows and a subset of columns—these algorithms achieve a per-iteration computational cost that is independent of the total size of the dataset.
The Geometry of the Patch Update
To understand why this works, consider the objective function as a matrix where rows are observations and columns are features. Arindam Banerjee 0001 and Huahua Wang introduced Online Randomized Block Coordinate Descent (ORBCD) to exploit this structure. Instead of calculating a full gradient, the algorithm picks a mini-batch of samples and a random block of coordinates.
The intuition is that an unbiased estimate of an unbiased estimate is still unbiased. If a mini-batch gives us a noisy but correct direction for the whole dataset, and a coordinate selection gives us a noisy but correct direction for the feature space, combining them preserves the convergence properties of the original gradient descent, albeit with higher variance. Aryan Mokhtari, Alec Koppel, and Alejandro Ribeiro formalized this in their Random Parallel Stochastic Algorithm (RAPSA), demonstrating that updating fewer coordinates per iteration actually leads to faster convergence in terms of total computational work.
Scaling the Unscalable: Kernel Methods
Perhaps the most impactful application of this idea is in kernel methods. Historically, kernels were considered unscalable because they require an $N \times N$ matrix, leading to $O(N^2)$ complexity.
Bo Dai and colleagues revolutionized this in Scalable Kernel Methods via Doubly Stochastic Gradients. They employed two layers of randomness:
- Data Sampling: Picking a random training point to estimate the functional gradient.
- Feature Sampling: Using random Fourier features to approximate the kernel function itself.
By avoiding the explicit construction of the kernel matrix and instead sampling the "basis functions" of the kernel space, they reduced the complexity from quadratic to linear. This approach was further extended by Bin Gu and Heng Huang to create Asynchronous Doubly Stochastic Sparse Kernel Learning, which allows these models to be trained across multiple CPU cores without expensive locking mechanisms.
Managing Variance and Momentum
The primary challenge of doubling the randomness is the increase in noise (variance). If the "patch" we sample is too small or too noisy, the algorithm might wander aimlessly.
Recent work has focused on stabilizing these updates. Zebang Shen and Hui Qian 0001 developed an Accelerated Doubly Stochastic Gradient Algorithm that uses a "triple-momentum" technique. This approach buffers the noise from both the data sampling and the coordinate sampling, allowing the algorithm to maintain the optimal accelerated convergence rate.
Similarly, Bin Gu introduced variance reduction techniques (like SVRG) into the doubly stochastic framework in Asynchronous Doubly Stochastic Proximal Optimization with Variance Reduction. By periodically computing a full gradient (or a more accurate one), the algorithm "anchors" the noisy updates, ensuring they stay on a path toward the global optimum.
Beyond Simple Gradients
The doubly stochastic principle is now being applied to more complex model architectures and optimization manifolds:
- Generalized Additive Models (GAMs): Bin Gu and Chenkang Zhang showed in DSGAM that sampling feature coordinates allows interpretable additive models to scale to datasets that were previously too high-dimensional for non-linear modeling.
- Riemannian Manifolds: For problems like matrix eigen-decomposition, Peilin Zhao and Zhiqiang Xu 0003 developed DSRG-EIGS, which performs stochastic updates on the manifold of orthogonal matrices, handling dense matrices that would otherwise exceed memory limits.
- Primal-Dual Optimization: Adams Wei Yu and Qihang Lin demonstrated that for regularized empirical risk minimization, one can simultaneously sample primal coordinates (features) and dual coordinates (samples) to bypass the linear scaling bottleneck of either dimension.
Why It Works: The Rule of Thumb
In a rigorous theoretical cleanup of the field, Kyurae Kim and Jacob R. Gardner analyzed the convergence of SGD with Doubly Stochastic Gradients. They confirmed that while the dual randomness adds noise, the computational savings are so significant that you can afford more iterations. Their practical takeaway: when your computational budget is fixed, it is almost always better to increase the number of data samples (minibatch size) rather than the complexity of the feature approximation (Monte Carlo samples), as data diversity generally drives convergence faster than feature precision.