Designing Network Algorithms via Large Language Models

Zhiyuan He, Aashish Gottipati, Lili Qiu, Xufang Luo, Kenuo Xu, Yuqing Yang, Francis Y. Yan

TL;DR

This paper introduces NADA, a framework that uses Large Language Models (LLMs) to autonomously design novel network algorithms. By leveraging LLMs' code generation capabilities and employing a series of filtering techniques, NADA can discover and optimize algorithms that outperform existing solutions across various network environments, significantly reducing development effort and computational cost.

What Problem Does This Paper Address?

Developing effective network algorithms, such as those for adaptive bitrate (ABR) streaming or congestion control, has traditionally relied on human expertise and heuristics. As network environments rapidly evolve (e.g., the advent of 5G and satellite networks), existing algorithms often become suboptimal, necessitating the creation of new, tailored solutions. This process is time-consuming and requires significant effort. While LLMs show promise in code generation, directly prompting them to design complex algorithms often yields vague or incomplete results. The challenge is to harness LLMs' generative power to automatically create high-performing, specialized network algorithms efficiently, without incurring prohibitive evaluation costs.

Methods

NADA tackles this challenge through a two-pronged approach:

  1. LLM-driven Design Generation: Instead of asking LLMs to describe algorithms in natural language, NADA leverages their code generation capabilities. It starts with an existing functional code implementation of a network algorithm (e.g., Pensieve for ABR streaming) and prompts LLMs to generate diverse alternative code blocks for specific components, such as state representations or neural network architectures. To enhance the quality and diversity of these generated designs, NADA employs strategies like "Chain-of-Thought" prompting, semantic renaming of variables, and explicit requests for proper normalization.
  2. Efficient Filtering and Evaluation: To manage the large volume of LLM-generated designs, NADA uses a multi-stage filtering process to quickly identify promising candidates and discard unpromising ones, thereby minimizing computational costs.
  3. Compilation Check: Filters out code that fails to compile or execute.
  4. Normalization Check: Identifies state designs with abnormally large feature values that could hinder training convergence.
  5. Early Stopping Mechanism: A predictive binary classifier (a 1D-CNN trained on early training rewards) estimates whether a design is likely to be performant. If not, its training is terminated early. This mechanism is crucial for reducing the computational burden of training reinforcement learning agents.

Datasets

The study uses real-world network traces from various environments for evaluation:

  • FCC: Measurements from the U.S. broadband network.
  • 4G and 5G: Downlink throughput measurements from U.S. 4G and 5G networks.
  • Starlink: Throughput traces from a stationary Starlink RV terminal, with bandwidth artificially reduced to simulate off-peak conditions.

These datasets are split into training and testing sets. The paper does not introduce new benchmark datasets but rather uses existing trace data to evaluate the performance of generated algorithms across diverse network conditions.

Key Insights and Ideas

  • Component-wise LLM Optimization: Optimizing individual components (like state representations or neural network architectures) of an existing algorithm with LLMs is more effective and manageable than trying to generate an entire complex algorithm from scratch.
  • LLMs as Creative Explorers: LLMs can generate novel and effective design alternatives that human developers might not have considered, particularly in areas like normalization strategies and feature engineering for RL states.
  • The Importance of Filtering: The sheer volume of LLM-generated code necessitates robust, multi-stage filtering mechanisms to efficiently identify high-quality candidates and avoid prohibitively expensive full-scale evaluations.
  • Buffer Size History is Key: The paper highlights that while existing ABR algorithms often overlook buffer size history, incorporating features related to buffer size trends or differences between time steps can lead to noticeable performance improvements.
  • LLM Capabilities Vary: GPT-4 generally produced more compilable and well-normalized code than GPT-3.5, demonstrating the impact of model choice on the quality of generated designs.

Key Results

  • NADA consistently generated ABR algorithms that outperformed the original Pensieve design across FCC, Starlink, 4G, and 5G network environments in simulation.
  • Improvements were particularly significant for the Starlink traces, with generated states showing up to a 56.3% improvement.
  • Emulation experiments confirmed that the generated states continued to outperform the original design, even with simulation-to-emulation discrepancies.
  • The early stopping mechanism successfully terminated 87% of suboptimal designs while incorrectly rejecting only 12% of them, leading to substantial computational savings.
  • Combining novel states with novel neural network architectures yielded further consistent improvements, with gains up to 61.1% on Starlink traces.

Limitations and Future Work

  • LLM Proposal Rigor: LLM-generated proposals, while creative, can lack completeness and rigor. The authors plan to integrate LLMs with program synthesis or neural architecture search (NAS) to systematically explore the design space.
  • Generalizability: While NADA is presented as a generic framework, its application to other network algorithms (like congestion control) and non-RL methods requires further investigation, potentially necessitating different filtering techniques.
  • Prompting Refinement: The authors aim to refine prompting strategies to more effectively harness LLMs' reasoning capabilities, reducing the initial candidate pool while maintaining diversity and quality, thereby improving overall framework efficiency.
  • Budget Constraints: The investigation into neural network architectures was limited due to budget constraints, suggesting further exploration is warranted.

Summary updated

BibTeX
@inproceedings{he2024designing,
  author = {Zhiyuan He and Aashish Gottipati and Lili Qiu and Xufang Luo and Kenuo Xu and Yuqing Yang and Francis Y. Yan},
  title = {{Designing Network Algorithms via Large Language Models}},
  booktitle = {HotNets},
  year = {2024},
  doi = {10.1145/3696348.3696868},
}
Figure