A Single-Loop Algorithm for Decentralized Bilevel Optimization

Youran Dong, Shiqian Ma, Junfeng Yang, Chao YinarXiv 2023

Abstract

Bilevel optimization (BO) has become a cornerstone of modern machine learning, powering applications from meta-learning to adversarial training. However, solving these problems in a decentralized network—where data is distributed across multiple nodes—presents significant challenges, particularly regarding computational efficiency and data heterogeneity. This paper introduces SLDBO, a novel single-loop algorithm for decentralized bilevel optimization. By employing a unique projection technique and gradient tracking, SLDBO achieves state-of-the-art convergence rates without requiring restrictive assumptions about gradient heterogeneity. Our results demonstrate that SLDBO is both theoretically robust and empirically superior to existing decentralized methods.

Introduction

Bilevel optimization involves a hierarchical structure where an upper-level objective depends on the optimal solution of a lower-level problem. While effective for tasks like hyperparameter optimization, BO is notoriously difficult to scale. The primary bottleneck lies in calculating the "hypergradient," a process that traditionally requires inverting a large Hessian matrix or solving the lower-level problem to high precision at every step.

In decentralized environments, such as federated learning or sensor networks, this complexity is compounded. Agents must collaborate to solve the global objective while communicating only with their immediate neighbors. Most existing decentralized BO algorithms rely on a "gradient heterogeneity" assumption, which posits that local data distributions across nodes are relatively similar. In practice, this assumption is often violated, leading to poor convergence or total failure of the algorithm.

The SLDBO Algorithm

To address these challenges, we propose the Single-Loop Decentralized Bilevel Optimization (SLDBO) algorithm. SLDBO is designed around three core technical pillars that allow it to bypass the limitations of previous methods.

1. Single-Loop Architecture

Traditional "double-loop" algorithms require solving the lower-level problem completely before making a single update to the upper-level variables. SLDBO updates the upper-level variables ($x$), lower-level variables ($y$), and an auxiliary variable ($v$) simultaneously. This single-loop structure drastically reduces the per-iteration computational cost.

2. Gradient Tracking

Because each agent only has access to a local portion of the data, they must estimate the global gradient to ensure consensus. SLDBO utilizes a gradient tracking mechanism for all three variable sequences ($x, y, v$). This ensures that even with highly diverse local datasets, the agents can converge toward a common, globally optimal solution.

3. The Projection Step

The most significant innovation in SLDBO is the introduction of a projection step for the auxiliary variable $v$, which is used to estimate the Hessian-inverse-gradient product. By projecting $v$ onto a Euclidean ball of a specific radius, we prevent the iterates from diverging in the absence of gradient heterogeneity assumptions. This mathematical constraint is the "secret sauce" that allows SLDBO to remain stable regardless of how much the data varies between nodes.

Theoretical Contributions

SLDBO achieves a convergence rate of $O(1/K)$, matching the best-known rates for bilevel optimization. Notably, it maintains this rate while requiring only two matrix-vector multiplications per iteration. This is a significant improvement over standard methods that often require $O(\log K)$ multiplications, making SLDBO highly scalable for high-dimensional problems.

Experimental Evaluation

We evaluated SLDBO against state-of-the-art methods like MA-DSBO using both synthetic and real-world datasets.

Synthetic Data: Testing Heterogeneity

Using a logistic regression problem with $\ell_2$ regularization, we tested the algorithm across 8 agents in a ring topology. We introduced a heterogeneity rate ($r$) to simulate increasingly diverse data.

  • Results: When data was highly heterogeneous ($r=40$), SLDBO maintained high performance, while algorithms lacking the projection step failed to converge, resulting in classification accuracy dropping to 0.5 (random guessing). SLDBO also converged significantly faster than MA-DSBO even in low-heterogeneity scenarios.

Real-World Data: MNIST Hyperparameter Optimization

We applied SLDBO to a hyperparameter optimization task on the MNIST dataset (60,000 samples). The goal was to learn the optimal regularization parameters for a classification model.

  • Results: SLDBO demonstrated a faster reduction in both training and testing loss compared to existing decentralized methods. It achieved higher final classification accuracy, proving its efficacy in practical, large-scale machine learning workflows.

Conclusion

SLDBO represents a significant step forward for decentralized bilevel optimization. By eliminating the need for gradient heterogeneity assumptions and utilizing a computationally efficient single-loop structure, it provides a robust framework for distributed meta-learning and hyperparameter tuning. Future work will focus on extending this framework to fully stochastic settings and integrating communication-compression techniques to further reduce the overhead of node-to-node synchronization.

Summary updated

BibTeX
@misc{dong2023single,
  author = {Youran Dong and Shiqian Ma and Junfeng Yang and Chao Yin},
  title = {{A Single-Loop Algorithm for Decentralized Bilevel Optimization}},
  year = {2023},
  eprint = {2311.08945},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.08945},
}
Figure