Fast Iterative Hard Thresholding Methods with Pruning Gradient Computations

Yasutoshi Ida, Sekitoshi Kanai, Atsutoshi Kumagai, Tomoharu Iwata, Yasuhiro Fujiwara

Finding the "signal in the noise" often means identifying a small subset of important features from a massive dataset. In the world of linear regression, Iterative Hard Thresholding (IHT) is a go-to algorithm for this task. It is simple and effective, but it has a glaring weakness: it is computationally slow when scaled to high-dimensional data.

A paper from researchers at NTT, titled "Fast Iterative Hard Thresholding Methods with Pruning Gradient Computations," offers a clever mathematical shortcut. By "safely" skipping unnecessary calculations, they have managed to speed up the process by up to 73 times without losing a shred of accuracy.

The Bottleneck in Standard IHT

In high-dimensional data analysis, we often seek a sparse solution—a model where only $k$ parameters are non-zero. Standard IHT achieves this by alternating between a standard gradient descent step and a "hard thresholding" step, where it simply zeros out everything except the $k$ largest elements.

Algorithm 1: Standard Iterative Hard Thresholding

The primary bottleneck lies in the gradient computation (Line 4 of the algorithm). If you have $m$ samples and $n$ features, calculating the gradient takes $O(mn)$ time. When $m$ and $n$ are in the tens or hundreds of thousands, performing this calculation during every single iteration becomes incredibly expensive.

The authors noticed a critical inefficiency: most of the parameters we calculate gradients for end up being zeroed out in the thresholding step anyway. The challenge was figuring out how to skip those calculations without accidentally throwing away an important feature.

The Solution: Fast IHT via Safe Pruning

The core contribution of the paper is Fast IHT, which uses a "candidate set" and mathematical bounds to prune the computational workload safely.

  1. The Candidate Set ($D^t$): Instead of updating all $n$ parameters, the algorithm maintains a set of $k$ indices that are the most likely candidates to be non-zero.
  2. Safe Pruning via Bounds: Before computing a gradient for a parameter outside the candidate set, the algorithm calculates an upper bound on what that parameter's value could be. It also identifies a threshold (a lower bound) based on the parameters already in the candidate set.
  3. The Rule: If a parameter's maximum possible value (upper bound) is smaller than the threshold, it is "safely pruned." The algorithm skips calculating its gradient because it is mathematically guaranteed not to make the top-$k$ cut.
  4. Automatic Interval Adjustment: Calculating these bounds is not entirely free, though it is much cheaper ($O(n)$) than a full gradient computation. To optimize further, the algorithm automatically decides how often to refresh its "anchor" values based on the current pruning rate. If pruning is highly effective, it waits longer between full refreshes.

Crucially, this is safe pruning. The authors provide a mathematical proof that their pruned version produces the exact same output as the original, "plain" IHT.

Key Insights

  • Cheap Bounds vs. Expensive Gradients: The breakthrough is realizing that while a gradient requires looking at every sample ($m$), an upper bound can be estimated using precomputed matrices and the change in the parameter vector, which only depends on $n$. Since $O(n)$ is much smaller than $O(mn)$, the trade-off is a massive win.
  • No Accuracy Trade-off: Most "fast" algorithms in machine learning involve some approximation or loss of precision. This method is a rare "free lunch"—it is faster purely because it eliminates redundant work, not because it settles for a worse answer.
  • Hyperparameter-Free: Unlike other accelerated versions of IHT (like RegIHT or AccIHT), this method does not require tuning extra "momentum" or "weight step" parameters. It works out-of-the-box with the same settings as plain IHT.

Experimental Results

The researchers evaluated their method on five well-known high-dimensional datasets (gisette, robert, ledgar, real-sim, and epsilon) ranging up to 400,000 samples and 20,000 features.

  • Massive Speedups: On the gisette dataset, the method was 73 times faster than plain IHT. Across all datasets, it consistently outperformed both plain IHT and other state-of-the-art accelerated variants.
  • Extreme Pruning: In some experiments, the algorithm was able to skip 98.87% of all gradient computations.
  • Consistency: As promised by the theory, the objective values (the "error" of the model) were identical to plain IHT across all tests.

Limitations and Future Work

While highly effective, the method does have boundaries:

  • The $k$ Factor: The speedup is most dramatic when $k$ (the number of features to keep) is small relative to $n$. As $k$ increases, the candidate set grows, and the pruning becomes less efficient.
  • Loss Function Scope: Currently, the method is specifically designed for linear regression (squared loss). Extending this pruning logic to other convex loss functions, such as logistic regression, is a key goal for future research.
  • Precomputation: The method requires precomputing a matrix ($G = I - \eta X^\top X$). While this is only done once, for extremely large $n$, the memory requirements for this matrix could become a bottleneck.

Overall, Fast IHT represents a significant step forward for sparse learning, proving that sometimes the best way to speed up an algorithm is simply to stop doing unnecessary math.

Summary updated

BibTeX
@inproceedings{ida2024fast,
  author = {Yasutoshi Ida and Sekitoshi Kanai and Atsutoshi Kumagai and Tomoharu Iwata and Yasuhiro Fujiwara},
  title = {{Fast Iterative Hard Thresholding Methods with Pruning Gradient Computations}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=09RKw0vXjR},
}
Figure