Source-linked AI summary
NetLLM: Adapting Large Language Models for Networking
Duo Wu, Xianda Wang, Yaqi Qiao, Zhi Wang, Junchen Jiang, Shuguang Cui, Fangxin Wang
TL;DR
Networking learning-based algorithms face high DNN engineering costs and weak generalization on unseen environments, motivating a reusable foundation model. NetLLM adapts a single LLM with multimodal encoding, networking heads, and low-rank fine-tuning to process networking inputs and generate task-specific answers efficiently. Across viewport prediction, adaptive bitrate streaming, and cluster job scheduling, the adapted LLM significantly outperforms state-of-the-art algorithms.
Problem
Existing networking learning-based algorithms require costly task-specific DNN engineering and often generalize poorly to unseen environments; adapting LLMs also faces modality, generation-efficiency, and fine-tuning challenges.
Method
NetLLM adapts a single LLM using a multimodal encoder, networking heads for direct task-specific answers, and DD-LRNA to reduce fine-tuning costs.
Results
Across viewport prediction, adaptive bitrate streaming, and cluster job scheduling, NetLLM significantly outperforms state-of-the-art algorithms and achieves stronger generalization on unseen environments.
Takeaways & Limitations
NetLLM demonstrates the potential of adapting one LLM as a reusable foundation for networking tasks with lower handcraft costs and strong generalization.
Takeaways & Limitations
Full-parameter fine-tuning is costly and may disrupt pre-trained knowledge, while LLM explainability remains an important unresolved direction.
Abstract
from arXiv · showhide
Many networking tasks now employ deep learning (DL) to solve complex prediction and optimization problems. However, current design philosophy of DL-based algorithms entails intensive engineering overhead due to the manual design of deep neural networks (DNNs) for different networking tasks. Besides, DNNs tend to achieve poor generalization performance on unseen data distributions/environments. Motivated by the recent success of large language models (LLMs), this work studies the LLM adaptation for networking to explore a more sustainable design philosophy. With the powerful pre-trained knowledge, the LLM is promising to serve as the foundation model to achieve "one model for all tasks" with even better performance and stronger generalization. In pursuit of this vision, we present NetLLM, the first framework that provides a coherent design to harness the powerful capabilities of LLMs with low efforts to solve networking problems. Specifically, NetLLM empowers the LLM to effectively process multimodal data in networking and efficiently generate task-specific answers. Besides, NetLLM drastically reduces the costs of fine-tuning the LLM to acquire domain knowledge for networking. Across three networking-related use cases - viewport prediction, adaptive bitrate streaming and cluster job scheduling, we showcase that the NetLLM-adapted LLM significantly outperforms state-of-the-art algorithms.
1 INTRODUCTION
Networking learning-based algorithms reduce rule engineering but still require costly task-specific DNN design and generalize poorly across unseen environments. NetLLM adapts a single LLM through multimodal encoding, direct task-specific answer generation, and low-cost fine-tuning, with strong results across three networking tasks.
- Existing limitations: Learning-based networking algorithms replace handcrafted control rules with trained DNNs, but their success depends on labor-intensive model engineering.Different networking tasks generally require specialized DNN architectures, preventing straightforward model reuse.
- Existing limitations: Specialized DNNs often perform poorly on unseen data distributions or network environments, limiting confidence in deployment.An ABR model trained on smooth conditions can generalize poorly to dynamic bandwidth fluctuations.
- Opportunity: LLMs offer a possible foundation for one model across networking tasks because pre-trained knowledge may support planning and generalization across environments.The paper motivates using LLM abilities for bitrate decisions and diverse network conditions.
- NetLLM framework: NetLLM projects multimodal networking inputs into token space, replaces token prediction with networking heads, and uses DD-LRNA to reduce fine-tuning costs.The multimodal encoder processes heterogeneous inputs, networking heads generate valid task answers directly, and DD-LRNA acquires domain knowledge efficiently.
- NetLLM framework: NetLLM supports compatibility, reliability, efficiency, and transferability by reusing a single LLM across tasks while reducing invalid outputs, latency, and adaptation costs.Its networking heads map LLM features directly to task-specific answers rather than generating tokens autoregressively.
- Evaluation: Across viewport prediction, adaptive bitrate streaming, and cluster job scheduling, NetLLM significantly outperforms state-of-the-art algorithms and improves unseen-environment generalization.The evaluation combines trace-driven simulation and real-world tests.
2 BACKGROUND
Learning-based networking methods use DNNs for prediction and decision-making, but specialized architectures and weak unseen-environment performance remain limitations. LLMs provide a pre-trained sequence-modeling foundation that has been adapted successfully beyond NLP, motivating their study for networking.
- Learning-based algorithms: Supervised learning trains DNNs for networking prediction tasks, while reinforcement learning commonly addresses networking decision-making problems.Examples include traffic classification, bandwidth prediction, viewport prediction, and control decisions.
- Learning-based algorithms: Learning-based algorithms require specialized DNNs for different tasks and remain prone to poor performance on unseen data distributions or environments.These limitations create model engineering overhead and generalization concerns.
- Domain adaptation: Pre-trained LLMs have demonstrated broad capabilities in dialogue, reasoning, and code generation, motivating adaptation to domains beyond natural language processing.Prior examples include robotic control and protein-structure prediction.
- Large language models: LLMs are Transformer-based DNNs that represent inputs and outputs as token sequences and generate answers using tokenization, vocabulary, and an LM head.Their token-based mechanism is illustrated in Figure 1.
- Domain adaptation: This paper explores LLM adaptation for networking because prior work had not provided an in-depth framework for applying LLMs to networking problems.The goal is a more sustainable design philosophy for networking solutions.
3 MOTIVATION
The motivation identifies three challenges in adapting LLMs to networking: incompatible input modalities, inefficient token-based answer generation, and high adaptation costs. NetLLM addresses these challenges with multimodal processing, networking heads, and data-driven low-cost adaptation.
- Motivating tasks: Networking studies span SL prediction and RL decision-making across centralized and distributed control, with diverse input modalities.The motivating tasks are viewport prediction, adaptive bitrate streaming, and cluster job scheduling.
- Challenge 1: Large modality gap: A large modality gap makes networking inputs difficult for native text-based LLMs to process, especially for time-varying and multimodal data.Viewport prediction is particularly challenging because it requires cross-modality fusion.
- NetLLM design: NetLLM uses multimodal encoding, networking heads, and DD-LRNA to adapt LLMs efficiently for networking tasks.Its data-driven pipeline avoids repeated environment interaction, while low-rank adaptation reduces trainable parameters.
- Challenge 1: Large modality gap: 11.1% higher MAE than TRACK shows that prompt-learning-adapted Llama2 performs poorly on viewport prediction.Transforming networking data into textual prompts may fail to express time-varying characteristics effectively.
- Challenge 2: Inefficiency of token-based answer generation: Token prediction can produce physically invalid answers and delayed responses, undermining reliability and responsiveness in network systems.Llama2 took up to 3.84s per viewport answer despite a 1-second prediction deadline.
- Challenge 3: High adaptation costs: Full-parameter fine-tuning of Llama2-7B for viewport prediction consumed 65.88GB GPU memory and 7.9h of training time.Updating all parameters can also disrupt pre-trained knowledge and hinder sharing one LLM across tasks.
4 NETLLM DESIGN
NetLLM adapts an LLM for networking through multimodal input encoding, task-specific answer generation, and data-driven low-rank adaptation. Its pipelines support supervised prediction and decision-making tasks while reducing adaptation costs.
- Framework overview: NetLLM comprises a multimodal encoder, networking head, and data-driven low-rank networking adaptation scheme.The framework is illustrated for VP, ABR, and CJS.
- Multimodal encoder: The multimodal encoder projects task inputs from multiple modalities into token-like embeddings that the LLM can process.It reuses modality-specific encoders and applies trainable projection layers; layer normalization further stabilizes training.
- Networking head: The networking head replaces token prediction with a trainable task-specific layer that directly generates valid answers in one inference.It constrains outputs to valid ranges or sets, such as viewport coordinates or available video bitrates.
- Data-driven low-rank adaptation: DD-LRNA combines data-driven adaptation pipelines for prediction and decision-making with low-rank updates that tune fewer parameters.Supervised learning uses task-specific labels and CE or MSE losses, while decision-making uses offline experience data rather than repeated environment interaction.
- Data-driven low-rank adaptation: 51.1%/37.7% reduction of training time for ABR/CJS task under the same training iterations is reported when experience data is collected once and reused.This contrasts with traditional RL pipelines that periodically refresh the experience dataset during training.
5 EVALUATION
NetLLM-adapted Llama2 consistently outperforms baselines across viewport prediction, adaptive bitrate streaming, and cluster job scheduling, including unseen and real-world environments. Additional evaluations examine domain knowledge, LLM compatibility, and deployment overhead.
- General Evaluation: Learning-based algorithms consistently outperform traditional rule-based algorithms on the evaluated tasks, but NetLLM-adapted Llama2 achieves superior performance over the learning-based methods.The paper attributes the learning-based improvement to DNN function fitting and the stronger capabilities of LLMs to function approximation, pattern mining, and long-term planning.
- Generalization: NetLLM-adapted Llama2 reduces MAE by 1.7-9.1%, improves QoE by 3.9-24.8%, and reduces JCT by 2.5-6.8% versus learning-based algorithms in unseen settings.It consistently outperforms baselines in both average values and distributions across testing environments generated with settings different from training.
- Generalization: For unseen ABR settings, NetLLM-adapted Llama2 achieves the highest QoE by balancing bitrate, rebuffering time, and other QoE factors.GENET is surpassed by MPC on unseen settings because it struggles with a different video or more frequent bandwidth fluctuations.
- Generalization: NetLLM-adapted Llama2 outperforms baselines on each tested real-world network connection, indicating generalization to real-world ABR scenarios.The evaluation uses a real-world client-server ABR system under different network connections.
- Deep Dive: Removing either Llama2’s pre-trained knowledge or learned domain knowledge degrades performance across tasks, while adapted OPT, Mistral, and LLaVa outperform state-of-the-art methods on VP and ABR.The multimodal LLaVa performs worse than single-modal Llama2, and the paper notes that deeper investigation is left for future work.
- Deep Dive: A 7B Llama2 requires 29 GB memory and generates one answer in about 0.1s∼0.3s, whereas OPT-1.3B requires 7GB and takes about 0.04s.The paper identifies model compression and smaller LLMs as ways to reduce deployment overhead.
6 DISCUSSION
The discussion examines practical considerations for adapting LLMs to networking, including model size, retrieval, computation overhead, and explainability.
- Adaptation considerations: NetLLM requires a new networking head for each target task and a modality-specific feature encoder for each new modality.The networking head is a simple linear layer customized to the task output space, which minimizes ad-hoc design costs.
- RAG: Retrieval-augmented generation stores domain knowledge in an external corpus and retrieves relevant information into the LLM context during inference.The passage introduces RAG as a related approach for enhancing LLM capabilities, while noting challenges for networking applications.
- Computation overhead: Model pruning, quantization, and knowledge distillation are potential approaches for reducing LLM computation overhead in NetLLM deployments.The paper notes that performance and resource-consumption trade-offs require further exploration.
- Explainability: Interpretable systems are needed to clarify LLM behaviors, capabilities, limitations, and improvement areas for reliable and secure networking deployment.The paper identifies explainability as a significant future research direction.
7 CONCLUDING REMARKS
The paper presents NetLLM as an initial step toward using LLMs as foundation models for networking, reducing handcrafted design costs while supporting generalization across tasks.
- Conclusion: NetLLM is presented as the first framework to adapt LLMs efficiently for different networking tasks using a single LLM as a foundation model.Across three use cases, the framework demonstrates superior performance and generalization in multiple networking tasks.
- Conclusion: The authors position NetLLM as a stepping stone toward a more sustainable design philosophy for future networking algorithms.They explicitly state that NetLLM is not the final answer.
A APPENDICES
The appendix is identified as supporting material that has not been peer-reviewed.
- Appendices: The appendices provide supporting material that has not been peer-reviewed.
A.1 Details of Figure 2
The appendix details how prompt learning and token prediction are used to adapt Llama2-7B for viewport prediction and generate task answers.
- Prompt Learning: Prompt learning encapsulates time-series viewports into textual prompts for Llama2-7B adaptation to the viewport prediction task.Measurements use an existing immersive video viewport dataset.
- Token Prediction: Token prediction instructs Llama2 to generate answers for viewport prediction from the constructed prompts.The appendix describes token prediction as the answer-generation mechanism.
- Answer validity: Valid answers are those from which viewports can be extracted using predefined string-parsing operations.Invalid answers may contain unexpected punctuation or omit required values.
A.2 Details of NetLLM Implementation
NetLLM is integrated into existing VP, ABR, and CJS codebases through task-specific APIs, multimodal encoders, customizable networking heads, and low-rank adaptation settings.
- A.2 Details of NetLLM Implementation: NetLLM is integrated into existing VP, ABR, and CJS codebases using APIs based on their existing functionalities.The implementation details are tied to the codebases for viewport prediction, adaptive bitrate streaming, and cluster job scheduling.
- A.2 Details of NetLLM Implementation: Multimodal encoders use ViT for images, 1D-CNN for time-series and sequence data, fully connected layers for scalar data, and GNNs for graph information.The encoders are trainable by default except that ViT parameters are frozen.
- A.2 Details of NetLLM Implementation: Task-specific heads predict viewport coordinates, bitrate probabilities, or cluster-scheduling actions such as job stage selection and executor allocation.CJS uses two heads to generate its scheduling actions.
- A.2 Details of NetLLM Implementation: For DD-LRNA, context windows are 10 for ABR and 20 for CJS, while low-rank matrix ranks are 32, 128, and 128 for VP, ABR, and CJS.The authors report good performance generally when w≥10 and r≥32 without sophisticated hyperparameter tuning.
A.3 Overview of Baselines
The evaluation compares NetLLM with learning-based and rule-based baselines across viewport prediction, adaptive bitrate streaming, and cluster job scheduling, using established implementations or faithful reimplementations.
- A.3 Overview of Baselines: VP baselines are TRACK, linear regression, and Velocity, covering LSTM-based prediction and simpler motion-based approaches.TRACK uses historical viewports and video saliency maps, while linear regression and Velocity estimate future viewports from temporal movement patterns.
- A.3 Overview of Baselines: TRACK was converted from Keras to PyTorch and retrained from scratch because its original implementation lacked compatible code and pretrained weights.The conversion preserved the original functionality and used the training hyperparameters specified by TRACK.
- A.3 Overview of Baselines: ABR baselines are GENET, BBA, and MPC, representing reinforcement learning, buffer-based control, and model-predictive control approaches.GENET improves on Pensieve with curriculum learning, BBA targets desired buffer occupancy, and MPC uses multiple streaming signals.
- A.3 Overview of Baselines: CJS baselines are Decima, FIFO, and Fair, including graph-based reinforcement learning and Spark scheduling policies.FIFO schedules jobs by arrival order, whereas Fair uses round-robin scheduling to provide roughly equal cluster shares.
- A.3 Overview of Baselines: ABR baseline implementations and pretrained GENET model weights are reused from GENET's open-source codebase.The codebase already contains implementations of GENET, BBA, and MPC.
A.4 Details of Simulation Settings
The simulations evaluate NetLLM and baselines on real-world and synthetic datasets, while generalization tests introduce unseen data distributions or more difficult prediction settings.
- A.4 Details of Simulation Settings: Simulation environments use real-world and synthetic datasets for training and testing across the three networking tasks.This design supports evaluation against baselines under varied conditions.
- VP simulation: VP methods are trained and tested by default on Jin2022, containing traces from 84 viewers watching 27 60-second immersive videos.The dataset is used as the default large-scale viewport dataset.
- VP simulation: VP generalization is tested on unseen datasets or harder prediction setups, including Wu2017 with 36 long viewport traces from 4 videos and 9 viewers.Wu2017 contains 9 videos averaging 242 seconds and traces from 48 viewers.
- A.4 Details of Simulation Settings: Synthetic bandwidth traces are generated with a larger bandwidth range and more dynamic fluctuations than FCC traces.SynthTrace contains 100 traces and is generated according to the method in Pensieve.
A.5 Real-world ABR Testbed Setup
The real-world ABR testbed runs adapted Llama2 and comparison algorithms in a modified dash.js client-server system, with broadband and cellular traces emulated under an 80ms RTT.
- A.5 Real-world ABR Testbed Setup: The testbed modifies dash.js 2.4 to support BBA, MPC, GENET, and the NetLLM-adapted Llama2.Tests use Google Chrome 87 as the client player and Apache 2.7 as the video server on the same machine.
- A.5 Real-world ABR Testbed Setup: Mahimahi emulates broadband and cellular mobile network environments using randomly sampled traces with an 80ms RTT.The setup samples 100 traces from each bandwidth dataset.
- A.6 Evaluation Metrics: Viewport prediction is evaluated with mean absolute error over predicted and ground-truth viewports across the prediction horizon H.The viewport coordinates are roll, pitch, and yaw values.
- A.6 Evaluation Metrics: ABR quality of experience is defined as a weighted linear combination of bitrate, rebuffering time, and bitrate-change terms.The weights are set to λ=4.3 and γ=1, following Pensieve.