Optimization using Parallel Gradient Evaluations on Multiple Parameters

Yash Chandak, Shiv Shankar, Venkata Gandikota, Philip S. Thomas, Arya Mazumdar

TL;DR

Standard gradient descent evaluates gradients at a single parameter point sequentially, or uses parallel hardware simply to divide up minibatches for that single vector. Gradient Grouping (GG) introduces a practical alternative for small multi-core systems: it evaluates gradients across $N$ distinct parameter configurations in parallel (even as few as $N=2$) and extrapolates them to find their approximate intersection near the optimum. This delivers second-order-like acceleration, automatically determines step sizes without learning-rate tuning, and maintains the lightweight $O(d)$ memory footprint of ordinary gradient descent.

What Problem Does This Paper Address?

Modern consumer devices and edge systems often have a few parallel cores but limited memory. Standard first-order optimizers (like SGD, Adam, or RMSprop) typically exploit multi-core parallelism by distributing data minibatches to compute the gradient for a single parameter vector $\theta$. While this speeds up per-step gradient calculation, it learns nothing about the global curvature of the loss surface across different regions.

Conversely, second-order methods (like Newton or quasi-Newton algorithms) capture curvature to accelerate convergence and reduce hyperparameter sensitivity, but they require storing large matrices ($O(d^2)$ memory) or performing costly matrix inversions. The authors ask: Can we evaluate gradients at a small group of different parameter vectors in parallel, using their mutual geometry to infer curvature and accelerate convergence without the heavy computational and memory burdens of second-order methods?

Methods

The authors propose Gradient Grouping (GG):

  1. Parallel Gradient Evaluation: Maintain a small ensemble of $N$ parameter vectors $\{\theta_1, \dots, \theta_N\} \subset \mathbb{R}^d$ and evaluate their respective gradients $G = [\nabla f(\theta_1), \dots, \nabla f(\theta_N)] \in \mathbb{R}^{d \times N}$ simultaneously across $N$ processors.
  2. Intersection Proxy Formulation: The algorithm aims to move each $\theta_i$ along its gradient $\nabla f(\theta_i)$ with an individual step size $\eta_i$ such that updated points $\tilde{\theta}_i = \theta_i + \eta_i \nabla f(\theta_i)$ converge to a common intersection point. In high dimensions, exact intersection is impossible, so GG minimizes parameter dispersion: $$\Psi(\tilde{\theta}_1, \dots, \tilde{\theta}_N) := \sum_{i=1}^N \left\| \tilde{\theta}_i - \frac{1}{N}\sum_{j=1}^N \tilde{\theta}_j \right\|^2$$
  3. Closed-Form Step Sizes: Minimizing $\Psi$ yields an analytic, closed-form solution for the step size vector $\eta$: $$\eta = -(G^\top G \circ L)^{-1} (G^\top \Theta \circ L)\mathbf{1}$$ where $\circ$ is the Hadamard (entrywise) product, $\mathbf{1}$ is the all-ones vector, and $L = N \cdot I - \mathbf{1}\mathbf{1}^\top$ is the Laplacian matrix of a fully connected graph of size $N$.

  4. Computational Efficiency & Stability: Inverting $(G^\top G \circ L)$ is extremely cheap because it is only an $N \times N$ matrix ($O(N^3)$ operations where $N \ll d$, typically $N \le 10$). To avoid singular matrices when gradients align, eigenvalues are clipped below $\epsilon = 10^{-4}$ and steps are scaled by a fixed damping factor $\alpha = 0.9$.

Datasets

The authors evaluated the method on convex multi-class logistic regression benchmarks using standard image classification datasets across various parameter dimensions ($d$):

  • MNIST ($d = 7{,}840$)
  • Fashion-MNIST ($d = 7{,}840$)
  • SVHN ($d = 30{,}720$)
  • CIFAR-10 ($d = 30{,}720$)
  • Extended-MNIST (EMNIST) ($d = 29{,}008$)
  • STL-10 ($d = 276{,}480$)

No new benchmarks were created; standard torchvision datasets were utilized.

Key Insights and Ideas

  • One-Step Convergence on Well-Conditioned Quadratics: For any quadratic function $f(\theta) = \frac{1}{2}\theta^\top A\theta$ with condition number $\rho = 1$, GG reaches the exact optimum in a single update step, regardless of parameter dimension $d$ and with as few as $N = 2$ parameter vectors. When $\rho \neq 1$, error bounds scale directly with $(\rho - 1)$.
  • Gradient "Post-Conditioning": While Newton's method pre-conditions gradients with an inverted Hessian ($A^{-1}G$), GG effectively post-multiplies gradients by an $N \times N$ matrix ($G B \approx A^{-1}G$), gleaning curvature information along the subspace spanned by the evaluated points.
  • Inherent Hyperparameter Robustness: Because step sizes are derived geometrically from the degree to which gradients point toward each other, the method automatically scales its updates without requiring learning rate tuning.

Key Results

  • Matches Tuned Baselines Out-of-the-Box: Under a strictly controlled computation budget (GG using $N=2$ with batch size 32 vs. baselines using 1 processor with batch size 64 to keep wall-clock time and sample count identical), GG with fixed defaults ($\alpha=0.9, \epsilon=10^{-4}$) matched the average loss of the best hand-tuned versions of SGD, Adam, RMSprop, Nesterov acceleration, and L-BFGS across all six benchmarks.
  • Immunity to Tuning Sensitivity: While baseline methods saw catastrophic failure or heavy performance drops when the learning rate was varied by an order of magnitude, GG required zero dataset-specific tuning.
  • Ablation on $N$: Testing $N \in \{2, 4, 6, 8, 10\}$ demonstrated that as additional parallel resources become available, optimization performance monotonically improves across all evaluated datasets.

Limitations and Future Work

  • Convexity Assumption: The theoretical derivations and empirical tests assume convex functions. In non-convex loss landscapes (e.g., deep networks), gradients from different parameters may belong to entirely different local valleys, making extrapolation toward an intersection invalid.
  • Stochastic Noise: The analytical derivation relies on deterministic gradients; although it functioned well empirically with minibatches, formal convergence proofs in stochastic regimes remain open.
  • Combining with History-Based Momentum: GG operates memorylessly across iteration steps. Combining parallel spatial gradient evaluations with sequential temporal history (such as momentum or past-gradient L-BFGS buffers) is a promising open direction.

Summary updated

BibTeX
@inproceedings{chandak2022optimization,
  author = {Yash Chandak and Shiv Shankar and Venkata Gandikota and Philip S. Thomas and Arya Mazumdar},
  title = {{Optimization using Parallel Gradient Evaluations on Multiple Parameters}},
  booktitle = {OPT @ NeurIPS},
  year = {2022},
  url = {https://openreview.net/forum?id=weWbPUIMSq},
}

Loading related content...

Figure