CollaPipe: Adaptive Segment-Optimized Pipeline Parallelism for Collaborative LLM Training in Heterogeneous Edge Networks

Jiewei Chen, Xiumei Deng, Zehui Xiong, Shaoyong Guo, Xuesong Qiu, Ping Wang, Dusit NiyatoarXiv 2025 · OpenReview

Abstract

The increasing demand for intelligent mobile applications has made multi-agent collaboration with Transformer-based large language models (LLMs) essential in mobile edge computing (MEC) networks. However, training LLMs in such environments remains challenging due to heavy computation, high end-to-end latency, and limited model generalization. We introduce CollaPipe, a hybrid distributed learning framework that integrates collaborative pipeline parallelism with federated aggregation to support self-evolving intelligent networks. In CollaPipe, the encoder part is adaptively partitioned into variable-sized segments and deployed across mobile devices for pipeline-parallel training, while the decoder is deployed on edge servers to handle generative tasks. Then we perform global model update via federated aggregation. To enhance training efficiency, we formulate a joint optimization problem that adaptively allocates model segments, micro-batches, bandwidth, and transmission power. We derive and use a closed-form convergence bound to design an Dynamic Segment Scheduling and Resource Allocation (DSSDA) algorithm based on Lyapunov optimization, ensuring system stability under long-term constraints. Extensive experiments on downstream tasks with Transformer and BERT models show that CollaPipe improves computation efficiency by up to 15.09%, reduces end-to-end latency by at least 48.98%, and cuts single device memory usage by more than half, enabling online learning in heterogeneous and dynamic communication environments.

Introduction

The proliferation of intelligent mobile applications has driven the need for multi-agent collaboration powered by Transformer-based large language models (LLMs) within mobile edge computing (MEC) networks. However, the deployment and training of these massive models on edge devices face significant obstacles. LLMs are characterized by heavy computational demands and high memory footprints that far exceed the capabilities of individual IoT devices. Furthermore, training in dynamic wireless environments introduces high end-to-end latency and challenges in maintaining model generalization across heterogeneous data sources.

The authors identify three primary hurdles in this domain:

  1. Resource Constraints: Individual edge devices like smartphones or IoT sensors lack the necessary memory and compute power to host a full LLM.
  2. Communication Bottlenecks: Standard Federated Learning (FL) requires the exchange of massive model parameters over constrained wireless links, leading to significant overhead.
  3. System Heterogeneity: Static model partitioning strategies often fail because devices possess vastly different hardware capabilities and experience fluctuating channel conditions.

To address these challenges, we propose CollaPipe, a hybrid distributed learning framework that integrates collaborative pipeline parallelism with federated aggregation.

System Architecture

CollaPipe decomposes the LLM architecture into three distinct functional modules to optimize resource utilization across the edge network.

CollaPipe System and Model Architecture

As shown in Figure 1, the architecture consists of:

  • Embedding Layer: Hosted on a cluster's Control Unit (CU), which manages local data and initial feature extraction.
  • Encoder: This is the most compute-intensive component. It is adaptively partitioned into variable-sized segments and distributed across multiple devices within a cluster. These devices perform training using Pipeline Parallelism (PP).
  • Decoder: Hosted on the edge server (Base Station) to handle generative tasks and final output production.

This hierarchical structure allows for intra-cluster collaborative training while leveraging the edge server for global coordination.

Methodology

The core of CollaPipe is its ability to adaptively manage model segments and resources in a dynamic environment.

Hybrid Parallelism and Federated Learning

CollaPipe employs a two-tier training strategy. Within a cluster, devices participate in cross-device pipeline parallelism. Data is split into micro-batches and processed sequentially through the partitioned encoder segments. This approach allows devices with limited memory to contribute to the training of a large model by only hosting a subset of Transformer Encoder Blocks (TEBs).

Timing diagram of the cross-device pipeline parallelism

Figure 3 illustrates the timing of this pipeline. By overlapping the computation of different micro-batches across devices, the framework minimizes "bubble time" (idle time), thereby increasing overall throughput. Following intra-cluster training, the updated encoder parameters are aggregated globally using federated learning techniques at the base station.

Dynamic Segment Scheduling and Resource Allocation (DSSDA)

To ensure system stability and efficiency, we formulate a joint optimization problem. The DSSDA algorithm, based on Lyapunov optimization, is designed to minimize long-term average training latency under energy and resource constraints. It dynamically adjusts the number of model segments ($S$), micro-batch sizes ($m$), and transmission power and bandwidth allocation.

A key theoretical insight is the "Granularity Paradox": while more segments can increase parallelism, the authors prove that the number of segments $S$ appears quadratically in the convergence bound's task-related gap. Thus, the DSSDA algorithm carefully balances partitioning granularity with learning performance.

Experimental Results

The framework was rigorously evaluated using Transformer and BERT models on tasks such as machine translation (Multi30K) and sentence classification (Toutiao).

Key performance improvements include:

  • Latency Reduction: CollaPipe reduced end-to-end latency by at least 48.98% compared to traditional federated learning and standard split learning approaches.
  • Efficiency Gains: Computation efficiency improved by up to 15.09%, thanks to the adaptive segment scheduling.
  • Memory Optimization: Single-device memory usage was cut by more than 50%, enabling LLM training on hardware that previously could not support such models.
  • Model Performance: The framework achieved a 2.76% improvement in inference accuracy and a 19.5% improvement in BLEU scores for translation tasks, demonstrating that resource optimization does not come at the cost of model quality.

Conclusion

CollaPipe represents a significant step forward in enabling online LLM training within heterogeneous and dynamic edge networks. By combining adaptive pipeline parallelism with federated aggregation and a robust resource allocation algorithm, it overcomes the physical limitations of edge devices. Future work will explore finer-grained scheduling at the token level and the integration of self-evolving learning mechanisms for autonomous AI agents.

Summary updated

BibTeX
@misc{chen2025collapipe,
  author = {Jiewei Chen and Xiumei Deng and Zehui Xiong and Shaoyong Guo and Xuesong Qiu and Ping Wang and Dusit Niyato},
  title = {{CollaPipe: Adaptive Segment-Optimized Pipeline Parallelism for Collaborative LLM Training in Heterogeneous Edge Networks}},
  year = {2025},
  eprint = {2509.19855},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.19855},
}
Figure