NetLLM: Adapting Large Language Models for Networking

Duo Wu, Xianda Wang, Yaqi Qiao, Zhi Wang, Junchen Jiang, Shuguang Cui, Fangxin Wang

Abstract

Recent advances in Large Language Models (LLMs) have demonstrated remarkable reasoning and planning capabilities. However, applying these "foundation models" to networking tasks—such as video bitrate selection or cluster job scheduling—remains challenging due to the multimodal nature of network data, the latency requirements of real-time systems, and the high cost of fine-tuning. We present NetLLM, the first framework designed to adapt LLMs for networking. By replacing the standard language modeling head with a task-specific networking head and utilizing a data-driven low-rank adaptation (LoRA) strategy, NetLLM outperforms specialized state-of-the-art algorithms while offering superior generalization and significantly reduced engineering overhead.

Introduction

The networking community has increasingly adopted Deep Learning (DL) to manage complex systems. While effective, current learning-based algorithms suffer from high engineering overhead, requiring bespoke architectures for every task, and brittle generalization when faced with unseen network conditions. Large Language Models (LLMs) like Llama2 offer a potential solution through their emergent reasoning abilities, but they are not natively designed for the numerical, time-series, and graph-based data prevalent in networking. Furthermore, the autoregressive nature of LLMs introduces unacceptable latency and the risk of "hallucinating" invalid decisions.

The NetLLM Framework

NetLLM bridges the gap between general-purpose LLMs and specialized networking requirements through three key innovations:

  1. Multimodal Feature Projection: Instead of converting network data into text prompts, NetLLM uses lightweight task-specific encoders (e.g., CNNs for time-series throughput or GNNs for job dependencies). These features are projected directly into the LLM's embedding space, allowing the model to process raw network signals as if they were semantic tokens.
  2. Specialized Networking Head: To eliminate the latency of token-by-token generation and the risk of invalid outputs, NetLLM replaces the standard Language Modeling head with a linear layer. This "Networking Head" enables single-step inference, producing direct decisions with 100% validity.
  3. Efficient Adaptation (DD-LRNA): NetLLM employs Low-Rank Adaptation (LoRA), training only a tiny fraction (0.31%) of the model's parameters. This is combined with a data-driven reinforcement learning pipeline that utilizes offline experience pools, bypassing the need for slow, real-time environment interactions during training.
NetLLM achieves 100% valid answers and significantly lower latency compared to standard token prediction methods.

Experimental Evaluation

We evaluated NetLLM across three diverse networking domains: Viewport Prediction (VP) for 360-degree video, Adaptive Bitrate (ABR) streaming, and Cluster Job Scheduling (CJS).

Performance and Generalization

NetLLM consistently outperformed specialized state-of-the-art (SOTA) models, including TRACK, GENET, and Decima. Performance improvements ranged from 10.1% to 41.3% across the different tasks. Crucially, NetLLM demonstrated superior robustness; while specialized models often failed when moved to "unseen" environments (e.g., new network traces), NetLLM maintained high performance, leveraging the broad patterns learned during its massive pre-training phase.

Efficiency and Latency

By avoiding full-parameter fine-tuning and utilizing the specialized networking head, NetLLM achieves significant resource savings. As shown in the evaluation, the framework reduces GPU memory consumption by over 60% compared to full fine-tuning, while maintaining inference times (approx. 0.04s) suitable for real-time networking.

NetLLM reduces trainable parameters to 0.31%, cutting GPU memory consumption by 60.9% and accelerating training.

Conclusion and Future Work

NetLLM demonstrates that LLMs can serve as effective foundation models for networking. By bypassing the tokenizer and using task-specific heads, we can harness the reasoning power of billion-parameter models within the strict latency and validity constraints of real-world networks. Future work will focus on model compression techniques to enable deployment on resource-constrained edge devices and exploring the interpretability of LLM-based networking decisions.

Summary updated

BibTeX
@inproceedings{wu2024netllm,
  author = {Duo Wu and Xianda Wang and Yaqi Qiao and Zhi Wang and Junchen Jiang and Shuguang Cui and Fangxin Wang},
  title = {{NetLLM: Adapting Large Language Models for Networking}},
  booktitle = {SIGCOMM},
  year = {2024},
  doi = {10.1145/3651890.3672268},
}
Figure