1
Unleashing the Power of Tree-of-Thoughts for Edge-Enabled AIGC Service Provisioning Zhang Liu, Shanhao Zhan, Shaowei Shen, Lianfen Huang, Qiao Xiang, Ying-Jun Angela Zhang, Fellow, IEEE, and Dusit Niyato, Fellow, IEEE
arXiv:2605.19108v1 [cs.DC] 18 May 2026
✦
Abstract—Delivering AI-generated content (AIGC) services fundamentally relies on the reasoning capabilities of generative AI (GenAI) models. Chain-of-Thought (CoT) enhances such reasoning by guiding models through intermediate steps, while Tree-of-Thoughts (ToT) further extends CoT by exploring multiple candidate reasoning paths simultaneously, thereby greatly improving AIGC service quality. However, generating diverse reasoning paths requires separate calls to computationally intensive GenAI models, posing significant challenges for resourceconstrained user devices. In this paper, we investigate mobile edge computing-enabled AIGC service provisioning with ToT prompting. Specifically, using creative writing AIGC tasks as a case study, we first characterize the number of output tokens as a measure of computational resources in GenAI models and establish its relationship with generation delay and quality through experiments with Qwen 2.5-7B-Instruct. Afterward, we introduce a directed acyclic graph (DAG) model to accurately characterize the reasoning process of ToT prompting, where each vertex represents a thought and each directed edge denotes a transition between consecutive thoughts. We then formulate a DAG-based thought assignment problem aimed at minimizing generation delay subject to a user-adjustable quality constraint. To address this problem, we propose a diffusion-based soft actor-critic (DSAC) algorithm that innovatively integrates diffusion models to determine optimal thought assignment decisions. Through extensive simulations, we demonstrate that the proposed DSAC achieves total generation delay reductions of up to 8.32% over PPO, 11.57% over SAC, and 36.09% over DDQN across various simulation settings, while reducing latency by over 80% compared to the fully local generation baseline even under stringent quality requirements. Index Terms—Edge intelligence, AI-generated content, tree-of-thoughts, diffusion models, and deep reinforcement learning.
1
I NTRODUCTION
1.1 Background and Overview Driven by the rapid advancements in generative artificial intelligence (GenAI), AI-generated content (AIGC) has revoZ. Liu ([email protected]) and Q. Xiang ([email protected]) are with the Department of Computer Science and Technology, Xiamen University, China. S. Zhan ([email protected]) and S. Shen ([email protected]) are with the Department of Informatics and Communication Engineering, Xiamen University, China. L. Huang ([email protected]) is with the Key Laboratory of Intelligent Manufacturing Equipment and Industrial Internet Technology, School of Information Science and Technology, Xiamen University Tan Kah Kee College, China, and also with the Department of Informatics and Communication Engineering, Xiamen University, China. Y. Zhang ([email protected]) is with the Department of Information Engineering, The Chinese University of Hong Kong, Hong Kong. D. Niyato ([email protected]) is with the College of Computing and Data Science, Nanyang Technological University, Singapore. (Corresponding author: Lianfen Huang.)
Input
Input thought
Input
…… ……
Output
Output
Output
(a) Input-Output
(b) Chain-of-Thought
(c) Tree-of-Thoughts
Fig. 1: A schematic illustration of different prompting approaches for GenAI model inference (e.g., GPT-5.4), where each rectangular box denotes a thought—a coherent language sequence that acts as an intermediate step toward AIGC service provisioning.
lutionized the production of diverse, high-quality content [1]. For example, ChatGPT [2] can generate large volumes of content–including text, images, and videos–based on human instructions. Recently, building on the concept of Chain-of-Thought [3], a new framework for GenAI model inference, Tree-of-Thoughts (ToT) [4], has further enhanced the AIGC service-provisioning capabilities of GenAI models. Specifically, as shown in Fig. 1, unlike (a) wrapping the input in human instructions to produce the final answer directly or (b) generating a sequence of intermediate thoughts that connect the input to the final answer, (c) ToT enables multiple reasoning paths to determine the next course of action. This mechanism allows the exploration of coherent text units (i.e., thoughts) as intermediate steps toward delivering AIGC services (see Sec. 3.2 for details). Despite the remarkable progress in AIGC and ToT, their real-world implementation continues to face numerous challenges. First, delivering AIGC services depends on the inference process of GenAI models, whose growing size and complexity pose significant challenges for deployment [5]. For instance, built on GPT-5 with approximately 52 trillion parameters, ChatGPT requires clusters of 128×80 GB A100 GPUs to generate contextually relevant responses.1 Second, ToT is resource-intensive, as each thought requires a new GenAI model call, and exploring multiple reasoning paths rapidly multiplies the number of generations. Consequently, ToT demands significantly more computation and time. To address this, mobile cloud computing [6], with its high processing speed and sustainable energy supply, enables users to access cloud-based AIGC services through the core 1. https://openai.com/index/introducing-gpt-5-4/
2
network. However, with the massive surge in AIGC service demand–for example, ChatGPT reached 100 million active users within just two months of its launch–the long latency of cloud computing will exceed what networks can affordably support. To this end, mobile edge computing (MEC) [7] extends cloud capabilities to the network edge by deploying computing resources close to end devices, thereby reducing service latency and alleviating the computational burden on resource-constrained users. In a typical MEC system, user devices offload computation-intensive tasks to nearby edge servers via wireless links, and the servers process the tasks and return the results to the users. 1.2 Motivation and Main Challenges Even though edge-enabled AIGC service provisioning hold great potential, several challenges remain: • Defining the notion of computational resources within GenAI models and quantifying their relationship to AIGC generation delay and quality remains challenging: In contrast to most MEC studies [8]–[11], where computational resources are clearly defined as CPU cycles per second, the concept of computational resources for GenAI models remains ambiguous. It is essential to identify which controllable parameters that influence the generation time and quality of AIGC outputs. Without a well-defined expression linking GenAI computational resources to both generation delay and output quality, quantifying AIGC service provisioning becomes impossible. To address this, we focus on a specific type of AIGC–creative writing– and define the computational resources of GenAI models in terms of the number of output tokens. To model the mathematical relationships among output token count, writing generation delay, and the quality of the generated text, we conduct extensive experiments with Qwen 2.57B-Instruct [12], an open-source language model with outstanding performance, deployed locally. We then apply parameter fitting methods to develop one of the first such mathematical functions. • Modeling the ToT-empowered AIGC process is challenging: ToT expands AIGC generation into multiple intermediate reasoning paths and requires iterative generation and evaluation of candidate thoughts, making the prompting process difficult to characterize tractably. Moreover, the reasoning structure of ToT is inherently sequential and branching, as different thoughts may lead to different subsequent paths and final outputs. To address these challenges, we introduce a directed acyclic graph (DAG) model [13] to characterize the reasoning process of ToT prompting, where each vertex represents a thought generated by the GenAI model and each directed edge denotes the transition from one thought to the next. With this framework, we formulate the ToT-empowered AIGC process as a DAG-based thought assignment problem. The objective is to determine the optimal mapping of thoughts to edge servers, such as base stations and user devices with surplus computing resources, thereby enabling systematic optimization for low-latency, high-quality AIGC service delivery. • Conventional optimization methods are ill-suited to the highly dynamic nature of edge environments: Due to time-varying wireless conditions, fluctuating resource
availability, and changing service demands, the system state may evolve rapidly over time. Traditional heuristic methods [10], [14] and convex relaxation approaches [15], [16] often rely heavily on expert knowledge and require frequent redesign or retuning to adapt to changing environments, which is both time-consuming and impractical. Recently, deep reinforcement learning (DRL) has emerged as a promising solution. However, for discrete action problems such as the DAG-based thought assignment problem, value-based DRL methods typically update the Q-network based on one-step rewards, which directly affects only individual state-action pairs and may result in slow convergence [17]. To address this issue, we propose replacing conventional DNNs with a diffusion model [18], which captures the global structure of action distributions through iterative denoising. This design enables exploration over a broader range of action candidates, thereby improving convergence speed and policy robustness. 1.3 Summary of Contributions To the best of our knowledge, this is the first work to investigate the modeling and optimization of ToT-prompted AIGC service provisioning in edge-enabled environments. Our main contributions are as follows: • Modeling: Focusing on creative writing AIGC services, we conduct extensive experiments with Qwen 2.5-7BInstruct [12] to develop one of the first mathematical functions linking output token count, writing generation delay, and the quality of the generated text. Building on this analytical framework, we introduce a DAG to accurately capture the reasoning process of ToT prompting and formulate a DAG-based thought assignment problem, an integer nonlinear programming (INLP) problem known to be non-convex. • Solution: To address this problem effectively, we propose a diffusion-based soft actor-critic (DSAC) algorithm. Specifically, the DSAC algorithm leverages diffusion models– originally developed for image generation–to generate optimal thought assignment decisions. The denoising process in diffusion models enables more thorough exploration of the solution space, faster convergence, and avoidance of local optima under the heterogeneous and dynamic conditions of MEC systems. • Validation: We evaluate the effectiveness of the proposed DSAC algorithm through extensive experiments under various simulation settings, comparing its performance against three benchmark DRL algorithms. The results demonstrate that DSAC achieves total generation delay reductions of up to 8.32% over PPO, 11.57% over SAC, and 36.09% over DDQN across various simulation settings, while reducing latency by over 80% compared to the fully local generation baseline even under stringent quality requirements, all with only a modest increase in computational overhead. 1.4 Paper Organization The rest of the paper is organized as follows. Sec. 2 reviews related work. Sec. 3 presents the system model and formulates the DAG-based thought assignment optimization problem. Sec. 4 introduces the preliminaries of diffusion models. Sec. 5 describes the proposed DSAC algorithm. Sec. 6
3
reports the simulation results, and Sec. 7 concludes the paper with directions for future research.
2
AIGC service
R ELATED W ORK
Henceforth, we summarize the contributions of related works and highlight the aspects they have not addressed, which serve as the primary motivations for this work. 2.1 DAG Task Scheduling in MEC Networks The ToT prompting process unfolds through multiple interconnected thoughts and can be naturally represented as a DAG, where each vertex corresponds to a thought generated by the GenAI model and each directed edge denotes the logical progression from one thought to the next. Consequently, DAG task scheduling has been widely studied in MEC networks. For example, the authors in [19] investigated DAG task offloading in vehicular clouds to minimize the overall task completion time while ensuring a high execution success rate. In [20], the authors examined joint DAG task scheduling in UAV-enabled aerial edge computing with the objective of optimizing both the makespan and the energy consumption of DAG task execution. The authors in [21] studied a multiobjective DAG task scheduling problem in MEC-aided 6G networks to achieve low latency under limited energy resources. In [22], the authors formulated an online multi-DAG task scheduling problem to minimize task completion time while guaranteeing server load balance. The authors in [23] investigated scheduling and offloading schemes for DAG tasks in MEC scenarios with the aim of minimizing completion time. However, the execution cost of a conventional DAG task can be clearly quantified by CPU cycles, and optimization objectives–such as minimizing latency or energy consumption–are well established, supported by mature mathematical formulations. In contrast, in the ToTempowered AIGC services, the notion of computational resources is not clearly defined, and the relationship among computational resources, AIGC generation delay, and quality lacks well-validated closed-form expressions. 2.2 Usage of Deep Reinforcement Learning in Optimization In recent years, learning-based algorithms, particularly DRL, have been extensively employed to enhance realtime decision-making and address complex optimization problems. The authors in [9] proposed a DRL framework based on an actor–critic learning structure to jointly optimize offloading decisions and resource allocation. The authors in [24] proposed a graph neural network-augmented DRL scheme for timely DAG task scheduling in dynamic vehicular cloud environments. The authors in [25] integrated long short-term memory with a dueling deep Q-network to determine offloading decisions for each device, including whether to offload and, if so, which edge node to offload its task to. The authors in [26] proposed an improved PPO algorithm to jointly optimize task-serving decisions (offloading and migration) in order to reduce latency for all mobile users in UAV-assisted MEC networks. The authors in [27] proposed a two-time-scale DRL learning approach that optimizes caching decisions at a large time-scale agent, while focusing on offloading and resource allocation at a short time-scale agent.
JO
AIGC result
MEC server
BS BS-to-SP link
SP 1
SP-to-SP link
SP u
SP U
Fig. 2: An illustration of edge-enabled AIGC service provisioning. The JO submits an AIGC task to the BS, which is equipped with an MEC server running a large-scale GenAI model (e.g., ChatGPT), and receives the final result via a downlink. To accelerate ToT-based AIGC delivery, the BS offloads individual thought generation tasks to SPs, each equipped with a lightweight GenAI model (e.g., Qwen, Claude, DeepSeek), via BS-to-SP and SP-to-SP links.
However, current DRL methods, including value-based approaches (e.g., DQN) and policy-based approaches (e.g., PPO), each have their shortcomings. Specifically, valuebased DRL derives a deterministic policy by updating the deep Q-network based on one-step rewards. However, this one-step update rule directly influences only the value of the state–action pair that produced the reward, while the values of other pairs are affected only indirectly through the updated Q-network. As a result, the learning process can be slow [17]. In contrast to value-based methods, policybased DRL directly parameterizes the policy with a DNN and updates it through gradient ascent on the total return, enabling faster convergence. However, when tackling complex and dynamic optimization problems, the use of Monte Carlo estimation can introduce high variance, slowing down learning. In addition, conventional policy gradient methods are often data-inefficient and prone to getting stuck in local optima [28].
3
S YSTEM M ODEL AND P ROBLEM F ORMULATION
In this section, we first present an overview of edge-enabled AIGC service provisioning. We then introduce a DAG model to characterize the reasoning process of ToT prompting, followed by the corresponding communication and computation models. Finally, we formulate the DAG-based thought assignment problem. 3.1
Network Outline
As shown in Fig. 2, we consider a network consisting of one base station (BS) equipped with an MEC server, one job owner (JO), and U service providers (SPs) indexed by the set U = {1, . . . , U }. The JO generates an AIGC task,2 but does not host a GenAI model locally and therefore requests AIGC service from the BS. The BS is equipped with a welltrained GenAI model (e.g., GPT-5.4) to deliver AIGC services using ToT prompting and acts as a centralized controller with global knowledge of the network. SPs are edge devices, 2. In this paper, we consider a single JO with one AIGC task as a typical setting [9]. The framework can be readily extended to multiple JOs with multiple AIGC tasks by assuming that AIGC tasks arrive at the BS according to a Poisson process. In addition, we use creative writing AIGC tasks as a representative example, while the same methodology can also be applied to other content types, such as images and audio (see Remark 1).
4
(a) Tree-of-Thoughts prompting Input
Input
…
Plan1
Passage1
…
Plan3
…
Plan5 …
Passage3
Passage5 Step1
Output (b) DAG representation
0 1
2
3
4
5
6
7
8
9
10
Write a coherent passage of 4 short paragraphs. The end sentence of each paragraph must be: (1) Everything was going so well until I was accosted by a purple giraffe. (2) Malls are great places to shop; I can find everything I need under one roof. (3) The beauty of the sunset was obscured by the industrial cranes. (4) Tomatoes make great weapons when water balloons are not available. Plan1 (1) Begin with a scene of order and control in the narrator’s day, then abruptly introduce the absurd disruption of meeting a purple giraffe. (2) Shift the setting to a shopping mall where the narrator seeks comfort and normalcy, emphasizing its variety and convenience. (3) Move the story outside at dusk, showing the clash between natural beauty and industrial reality at the harbor. (4) Conclude with a playful conflict involving thrown tomatoes, tying the theme to how ordinary objects gain new meaning in chaotic situations.
Plan3
…
Plan5
( 1 ) Describe the narrator’s excitement as their carefully planned outing finally seems to be going smoothly, only for the bizarre interruption of a purple giraffe to shatter the sense of normalcy . ( 2 ) The narrator flees the odd encounter and takes refuge in a mall, reflecting on the reassuring predictability of shopping and how it restores their balance . ( 3 ) Wanting fresh air, the narrator steps out to watch the sunset, only to find the romantic moment marred by looming industrial cranes and noise. (4) A sudden burst of chaotic fun (fruit fight, street festival, or playful scuffle) turns frustration into laughter, ending with the ironic practicality of tomatoes as weapons.
Passage1
Step2
11
Passage3
(1) The afternoon promised simplicity: ... Everything was going so well until I was accosted by a purple giraffe. (2) Shaken, I ducked into the sprawling mall across the street, ... Malls are great places to shop; I can find everything I need under one roof. (3) As dusk painted the sky, ... The beauty of the sunset was obscured by the industrial cranes. (4) Then, as if to mock my longing for serenity, .... Tomatoes make great weapons when water balloons are not available.
…
(1) … (2) … (3) … (4) …
…
(1) … (2) … (3) … (4) …
Passage5
…
(1) … (2) … (3) … (4) …
Fig. 3: An example of ToT prompting in a creative writing AIGC task. Given the input, at Step 1, the GenAI model generates five different plans and selects the best one. At Step 2, the GenAI model generates five passages based on the selected plan and outputs the final AIGC result.
such as laptops and desktop computers, each equipped with a lightweight GenAI model (e.g., Qwen3.5-Flash). These SPs can cooperatively assist the BS in delivering AIGC services. 3.2
Tree-of-Thoughts Prompting
ToT [4] extends the popular Chain-of-Thought [3] prompting by enabling exploration of coherent text units (i.e., thoughts) that serve as intermediate steps in delivering AIGC services. ToT allows GenAI models to engage in deliberate decisionmaking by considering multiple reasoning paths. Specifically, ToT involves four key steps: (1) decomposing the reasoning process into several steps T oTstep , (2) generating potential thoughts at each step T oTthought , (3) evaluating these thoughts, and (4) selecting an appropriate search algorithm. 3.2.1
Thought Decomposition and DAG Modeling
Based on the nature of the problem, ToT decomposes the reasoning process into intermediate thought steps. Depending on the task, a thought may consist of a few words, a line of an equation, or an entire paragraph of a writing plan. As an example of a creative writing AIGC task, consider providing four random sentences and requiring the output to be a coherent passage with four paragraphs, each concluding with one of the input sentences. As shown in Fig. 3(a), we construct a ToT with two steps, each containing five thoughts. At step one, the GenAI model generates five thoughts corresponding to five writing plans and evaluates them to select one candidate. Consequently, in the next step, ToT generates five thoughts corresponding to passages based on the best writing plan and then evaluates them to select one candidate as the final AIGC result.3 To capture the intrinsic multi-step, dependency-aware, and branching characteristics of ToT prompting, we model the ToT reasoning process as a directed acyclic graph (DAG) G = (I, E). This representation is well aligned with the structure of ToT, where each thought depends on preceding 3. Note that the number of steps T oTstep , the number of thoughts generated at each step T oTthought , and the number of candidates retained per step, are hyperparameters that are typically predetermined before the ToT prompting begins.
thoughts and may lead to multiple subsequent reasoning branches. As shown in Fig. 3(b), each vertex in I represents a thought i, and each directed edge (i, j) ∈ E indicates that thought i must be generated before thought j . For clarity of exposition, we index the input and output thoughts as 0 and |I| + 1, respectively. By enforcing local generation of both the input and output thoughts, we ensure that the ToT prompting process always starts and ends at the BS. 3.2.2 Thought Generation and Assignment At each step, each thought is generated by independently issuing the same prompt to the GenAI model. Since each model call is separate and stochastic, the results are mutually independent, increasing the likelihood of exploring diverse reasoning paths. Furthermore, since different SPs are equipped with different GenAI models, these independent model calls can be executed in parallel across SPs, enabling faster thought generation and enhancing diversity through heterogeneous model capabilities. Define a binary variable xi,m , where m ∈ U ∪ {0}, to represent the thought assignment decision, i.e., the server assigned to generate thought i at each step of the ToT prompting process (e.g., a writing plan at Step 1 or a passage at Step 2, as illustrated in Fig. 3(a)). Specifically, xi,m = 1 if thought i is assigned to edge server m for generation, where m = 0 denotes the BS and m = u represents SP u; otherwise, xi,m = 0. Since both the input and output thoughts must be generated locally, we have x0,0 = x|I|+1,0 = 1. Finally, upon completion of the ToT prompting process, the BS transmits the final AIGC result back to the JO. 3.2.3 Thought Evaluation Each thought is evaluated independently through a separate call to the GenAI model using a dedicated evaluation prompt. The model is asked to assess the given thought and output a score that can be mapped to a numerical value, such as a 1–10 scale. For creative writing AIGC tasks, this approach is particularly natural, as both writing plans and generated passages are complete language segments. In such cases, the evaluation prompt can be designed to have the model rate the thought based on coherence and diversity, producing a
5
numerical score that guides which thoughts are retained for further exploration in the ToT prompting process. 3.2.4 Search Algorithm At each step, we apply a breadth-first search strategy, retaining the most promising thought based on its evaluation score and using it as the starting point for the next expansion. This approach allows the search to explore multiple candidate paths simultaneously, preserving diversity and preventing premature convergence to a single reasoning trajectory. It should be noted that the search algorithm itself is not the optimization objective of this work; alternative strategies such as depth-first search [4] could also be applied, and refining search algorithms is left for future work. 3.3
Communication Models
Wireless transmission is required whenever two dependent thoughts are assigned to different edge servers. Specifically, if a predecessor thought is generated at the BS, i.e., xi,0 = 1, and its successor is assigned to SP u, i.e., xj,u = 1, the intermediate result must be transmitted over a BS-to-SP link. Likewise, if two dependent thoughts are assigned to different SPs, i.e., xi,u = 1 and xj,v = 1 with u ̸= v , the corresponding data must be delivered through an SP-to-SP link. Let a and b denote two communicating nodes, where (a, b) can represent either a BS-to-SP link or an SP-to-SP link. The achievable transmission rate (in bits per second) from node a to node b at time slot t is given by ! pa ha,b,t , (1) Ra,b,t = B log2 1 + BN0 where B is the pre-allocated bandwidth (in Hz) under orthogonal frequency division multiple access among the BS and U SPs, pa is the transmit power (in W) of node a, ha,b,t is the channel power gain from node a to node b at time slot t, and N0 is the noise power spectrum density (in W/Hz). The channel power gain ha,b,t captures both large-scale path loss and small-scale fading, and is modeled as
|ga,b,t |2 , (2) 10PLa,b,t /10 where ga,b,t ∼ CN (0, 1) denotes the small-scale fading coefficient, which is assumed to vary independently across time slots, and PLa,b,t = 127 + 30log10 (da,b,t ) [29] is the large-scale path loss (in dB) between nodes a and b at time slot t, with da,b,t denoting the corresponding link distance (in meter). ha,b,t =
3.4
Computing Models
Before introducing our computing models, we first highlight the major challenges in evaluating the performance of AIGC services. Unlike most MEC studies [8]–[11], where computational resources are clearly defined as CPU cycles per second, the notion of computational resources in GenAI models remains ambiguous. Moreover, unlike traditional performance indicators such as task execution delay and energy consumption, the evaluation metrics for AIGC services remain unclear. It is essential to identify which controllable parameters truly influence the generation time and quality of AIGC outputs. Without a well-defined expression linking GenAI computational resources to both generation delay
Prompt for Group 1 Write a coherent passage of 4 short paragraphs. The end sentence of each paragraph must be: (1) At that moment he wasn't listening to music, he was living an experience. (2) Green should have smelled more tranquil, but somehow it just tasted rotten. (3) She was amazed by the large chunks of ice washing up on the beach. (4) Patricia loves the sound of nails strongly pressed against the chalkboard. Try to make the length around 50 tokens, and do not alter the above four sentences.
A
B
Fig. 4: Hardware setup for providing a creative-writing AIGC service with different output token counts. The server is equipped with an NVIDIA 4090 GPU, on which the open-source large language model Qwen2.5-7B-Instruct is deployed.
and output quality, it is impossible to quantify AIGC service provisioning. To address this, we focus on a specific type of AIGC– creative writing–and define the computational resources of GenAI models in terms of the number of output tokens.4 We then sample 40 random sentences from https:// randomwordgenerator.com/sentence.php and deploy Qwen 2.5-7B-Instruct [12], an open-source language model with outstanding performance, on a platform equipped with an NVIDIA 4090 GPU. Consequently, we conduct extensive experiments (detailed in Sec. 3.4.1 and Sec. 3.4.2) and apply parameter fitting methods to establish one of the first mathematical relationships among output token count, writing generation delay, and the quality of the generated text. 3.4.1 Generation Quality Given that passage quality is inherently subjective and no reference sentences are available, direct evaluation is highly challenging. One possible approach is to rely on human judgments, such as hiring professional writers to assess the quality of the generated passages, but this method is highly costly. To this end, considering that GPT-5.4 has been trained on vast amounts of text and has learned general patterns of coherence, fluency, and relevance [2], we evaluate the generated passages using a GPT-5.4 zero-shot prompt that provides a scalar score from 1 to 10. In this setting, GPT-5.4 generates the score without examples, where a higher score indicates better sentence quality. We divide 40 random sentences into 10 groups as 10 creative writing AIGC tasks. In each task, the input consists of 4 sentences, and the output is required to be a coherent passage with 4 paragraphs, each ending with one of the input sentences. For each creative writing AIGC task, we input the corresponding 4 sentences into Qwen 2.5-7BInstruct, and evaluate the generated passages using a zeroshot prompt that assigns a scalar score from 1 to 10. Since we define the computational resources of GenAI models in terms of output token count, we vary the number of output tokens in Qwen 2.5-7B-Instruct, selecting values from the set {50, 75, 100, 125, 150, 175, 200}. As shown in Part A of Fig. 4, we present the scores of the 10 creative writing AIGC 4. Considering that for generation time, a longer output length requires more decoding steps, causing the generation time to increase approximately linearly with the number of output tokens. On the other hand, for generation quality, a longer output length typically enables the language model to produce more semantically rich, coherent, and well-structured content in creative writing AIGC tasks. Therefore, we treat the number of output tokens as the computational resource in GenAI models in this paper.
6
tasks under different output token counts and fit them using an exponential saturation function.5 As a result, we propose a general mathematical relationship that links the score of generating thought i on server m (in this experiment, m can represent any server equipped with Qwen 2.5-7B-Instruct), denoted by Scorei,m , to the output token count Cm , expressed as follows:
Scorei,m = Scoremax − σm e−ρm Cm ,
3
SP 2
1
BS
3.4.2 Generation Delay Using the same methodology, we report the generation times of the 10 creative writing AIGC tasks under different output token counts and fit them with a function that appears linear, as shown in Part B of Fig. 4. Similarly, we propose a general mathematical relationship that links the generation delay of gen thought i on server m, denoted by Ti,m , to the output token count Cm , expressed as follows:
Remark 1. While our experiments focus on creative writing as a representative AIGC task, the proposed methodology is not limited to this specific scenario. In creative writing, the number of output tokens is closely related to both the expressiveness and coherence of the generated text, making it a natural proxy for computational resources. However, for other types of AIGC tasks, alternative controllable inference parameters (e.g., reasoning depth or search beam width) can be used to characterize computational resource consumption. By fitting the corresponding mathematical relationships and integrating them into the optimization model, the proposed ToT-empowered AIGC service framework can be readily extended to a broad range of reasoning and generation tasks beyond creative writing. Next, to characterize the execution time of each thought (including transmission and generation) in the local BS and SPs, we first define the notions of ready time and finish time. Definition 1 (Finish Time). The finish time of thought i refers fin to the moment when it has been generated. We denote Ti,m as the finish time when thought i is generated at server m, where m ∈ U ∪ {0}. Definition 2 (Ready Time). The ready time of a thought is the earliest moment when it has received all the necessary input data (e.g., prompting information) to begin generation. For example, in Fig. 3(b), the ready time of thought 6 is the time when the 5. Since ToT prompting consists of multiple thoughts generated and evaluated independently, in this experiment we consider only a singlestep passage generation. We treat this process as one thought, from which the corresponding mathematical expression is derived.
9 6
2
SP 1
8
11
5
Fig. 5: An illustration of the thought assignment and generation timeline based on the DAG structure in Fig. 3(b), with U = 3 SPs. Each row represents a server (BS, SP 1, SP 2, SP 3), and each block denotes the generation of a specific thought.
input data stream from thought 3 has arrived. We denote the rdy ready time of thought i generated at server m as Ti,m . To further illustrate these concepts, Fig. 5 presents the thought assignment and generation timeline corresponding to the DAG structure in Fig. 3(b), from which the ready time and finish time of each thought across different servers can be clearly observed. • Local Generation: We assume that the BS is equipped with
a well-trained GenAI model (e.g., GPT-5.4) with an output token count of C0 . If thought i is generated locally at the BS, its local generation time, based on (4), is given by
(4)
where, in this experiment, ηm = 0.025 represents the generation delay per token (a larger value indicates higher latency per token), and ψm = 0.062 denotes the initial generation overhead (a larger value indicates a longer base delay).
7 10
0 4
(3)
where, in this experiment, Scoremax = 10 denotes the maximum score, σm = 49.13 represents the initial score deficit (a larger value indicates that the model starts from a lower baseline and therefore requires more tokens to approach the performance ceiling), and ρm = 0.046 denotes the rate of quality improvement as the output token count increases (a larger value indicates faster convergence).
gen Ti,m = ηm Cm + ψm ,
SP 3
gen Ti,0 = η0 C0 + ψ0 ,
(5)
where η0 and ψ0 are the generation delay parameters associated with the GenAI model deployed at the BS (to be provided in Sec. 6), and the corresponding generation quality, based on (3), is calculated as
Scorei,0 = 10 − σ0 e−ρ0 C0 ,
(6)
where σ0 and ρ0 are the generation quality parameters associated with the GenAI model deployed at the BS (to be rdy specified in Sec. 6). Then, the ready time Ti,0 of thought i generated locally at the BS is given by ( rdy Ti,0 = max
j∈Li −1
+
U X u=1
Tjactfin xj ∗ ,0
ej ∗ ,i Tjactfin + Ru,0,ti
)
xj ∗ ,u .
(7)
Here, Li denotes the step at which thought i is located (e.g., in Fig. 3, we have L3 = 1 and L6 = 2), j ∗ = argmaxj∈Li −1 Scorej,m xj,m denotes the thought that obtains the highest score at step Li − 1, Tjactfin denotes the actual completion time of thought j when generated on the designated server, and the max operator guarantees that thought evaluation can only be performed after all thoughts have been generated. Specifically, if xj ∗ ,0 = 1 for thought j ∗ , the time until its output data becomes available at the BS is equal to the latest local finish time maxj∈Li −1 Tjactfin . Otherwise, if xj ∗ ,u = 1, the time until its output data becomes available at the BS for generating thought i equals the latest completion time maxj∈Li −1 Tjactfin plus the data transmission time ej ∗ ,i ∗ Ru,0,t , where ej ,i denotes the input data size associated i
with edge (j ∗ , i). Additionally, ti = maxj∈Li −1 Tjactfin denotes the time slot at which thought i begins receiving
7
the corresponding input data. When all required data is rdy available at the ready time Ti,0 , the BS generates thought gen i with the generation time Ti,0 from (5), so the finish time of thought i for local generation is given by rdy gen fin Ti,0 = max Ti,0 , A0 + Ti,0 , (8) where A0 denotes the time when the BS finishes generating its most recently assigned thought and becomes available to generate thought i. • MEC Generation: We assume that each SP u is equipped with a lightweight GenAI model (e.g., Qwen3.5-Flash) with an output token count of Cu,t at time slot t6 (Cu,t < C0 , ∀u ∈ U ). If thought i is generated at SP u during time slot t, its generation time, based on (4), is given by gen Ti,u,t = ηu Cu,t + ψu ,
(9)
where ηu and ψu are the generation dalay parameters associated with the GenAI model deployed at SP u (to be provided in Sec. 6), and the corresponding generation quality, based on (3), is calculated as
Scorei,u = 10 − σu e−ρu Cu ,
(10)
where σu and ρu are the generation quality parameters associated with the GenAI model deployed at SP u (to be specified in Sec. 6). Similarly, the ready time of thought i generated at SP u can be calculated as ( ! ej ∗ ,i rdy actfin actfin Ti,u = max Tj xj ∗ ,u + Tj + xj ∗ ,0 j∈Li −1 R0,u,ti ! ) U X ej ∗ ,i actfin xj,v , (11) + Tj + Rv,u,ti v=1,v̸=u where ti = maxj∈Li −1 Tjactfin denotes the time slot at which thought i begins receiving the corresponding input data. Finally, the finish time of thought i generated at SP u is given by rdy gen fin Ti,u = max{Ti,u , Au } + Ti,u,max{T . rdy ,A } i,u
3.5
u
(12)
Problem Formulation
From the above discussion, considering the interdependencies among different thoughts and the requirement that both the input and output thoughts must be generated locally at the BS, the total finish time to complete the ToT prompting is equal to the local finish time of the output thought, i.e., fin Ttot = T|I|+1,0 . Moreover, the total generation quality of the ToT prompting can be calculated as7 ! |I|+1 U X X Scoretot = Scorei,0 xi,0 + Scorei,u xi,u . (13) i=0
u=1
6. Unlike the BS, which is assumed to possess fixed and ample computing resources, each SP has limited and time-varying computational availability due to its constrained hardware capacity and the need to concurrently support its own local workloads. 7. In this work, we recognize that each thought’s quality influences subsequent ones and ultimately the final result. Therefore, we evaluate the quality of all thoughts throughout the ToT prompting process.
To deliver low-latency AIGC services,8 we minimize the total generation delay subject to a user-adjustable quality constraint: (P) min Ttot , X
s.t.
C1 : xi,m ∈ {0, 1}, ∀i ∈ I, m ∈ U ∪ {0}, C2 : Scoretot ≥ Scoremin ,
where X = [xi,m ]|I|×(|U |+1) is a binary matrix representing the complete thought assignment plan. Constraint C1 enforces the binary nature of the assignment variables, and constraint C2 ensures that the overall generation quality meets a minimum threshold Scoremin specified by the user. Remark 2. Due to the interdependencies among thoughts in the ToT prompting process–where each thought’s generation depends on the outputs of its predecessor(s)–the optimization problem exhibits strong temporal and structural coupling. Moreover, the presence of the binary variable xi,m makes the problem inherently discrete. Consequently, problem (P) is non-convex and challenging to solve.
4
OVERVIEW OF D IFFUSION M ODELS
Before introducing our diffusion-based soft actor-critic (DSAC) algorithm, we first present the challenges faced by conventional DRL algorithms, which serve as the main motivation for integrating diffusion models with DRL. We then present the adaptation of the diffusion model specifically designed to generate optimal thought assignment decisions. 4.1
Motivation of Adopting Diffusion Model
Since the thought assignment decisions in this paper are binary, we primarily focus on value-based DRL algorithms (e.g., DQN) and their inherent limitations. Specifically, valuebased DRL derives a deterministic policy by updating the deep Q-network based on one-step rewards. However, this update directly affects only the value of the state–action pair that produced the reward, while the values of other pairs are influenced only indirectly through the updated Q-network [17]. Considering the rapidly varying channel conditions, the number of state–action pairs becomes substantial. Consequently, the learned Q-values for different thought assignment decisions cannot be efficiently generalized, resulting in slow convergence, inefficient exploration, and suboptimal performance. The denoising diffusion probabilistic model (DDPM) [18], originally developed for image generation, inspires our approach to address the shortcomings mentioned above. Specifically, in a standard DDPM implementation, the training involves two key stages: 1) the forward process, which gradually adds noise sampled from a standard Gaussian distribution to the input image over multiple steps until it becomes indistinguishable from isotropic Gaussian noise; and 2) the reverse process, in which a neural network learns to progressively remove the noise step by step to reconstruct the original image. Building on the iterative refinement mechanism and strong generative capabilities of DDPM, it can gradually refine noisy latent representations into highquality action candidates, rather than relying on single-step 8. In the era of large language models, where a single inference already demands considerable time, the multi-step structure of ToT compounds this delay significantly, leading to unacceptable waiting times for end users.
8 Forward process Optimal solution
Gaussian noise
where αk = 1 − βk , ᾱk = α1 ∗ α2 ∗ . . . ∗ αk , and zk ∼ N (0, I) denotes standard Gaussian noise.
Reverse process
Step
Reparameterization Learned noise
MLP State
Fig. 6: An illustration of the diffusion model tailored to generate the optimal assignment decision for thought i.
updates. Additionally, our adoption of diffusion models is further motivated by their strong compatibility with DRL frameworks [30], [31]. Specifically, in a conventional diffusion model, a user can input a text prompt (e.g., ‘an apple on the table’) to guide the model in generating a corresponding image. In our scenario, we treat the system state (e.g., channel conditions) as the ’input text prompt’ and define the optimal thought assignment decisions as the ‘target image’ to be generated. 4.2
Preliminaries of Diffusion Models
where zk−1 is standard Gaussian noise sampled from N (0, I). Consequently, the mathematical relationship between xi,0 and xi,k at any step k can be derived as: √ √ xi,k = ᾱk xi,0 + 1 − ᾱk zk , (16)
Remark 3. Since our goal is to obtain the optimal assignment decision xi,0 for thought i using the diffusion model, the forward process–which requires xi,0 in advance to serve as the ‘original image’ to be progressively perturbed with noise–contradicts our objective. Therefore, the forward process is omitted in this work, as indicated by the dotted lines in Fig. 6. That is, the forward process here primarily defines the mathematical relationship between xi,0 and xi,k , providing the necessary foundation for the subsequent reverse process. 4.2.2 The Reverse Process Since xi,k becomes indistinguishable from isotropic Gaussian noise as K increases, in the reverse process we initialize with xi,K ∼ N (0, I) and iteratively remove the noise to reconstruct the optimal thought assignment decision xi,0 . Therefore, the core of the reverse process is to determine the transition from xi,k to xi,k−1 , which cannot be calculated directly. However, it follows a Gaussian distribution as given in [18]:
For thought i, we represent its optimal assignment decision xi,0 9 as a set of discrete probabilities over the choice of being q(xi,k−1 |xi,k ) = N (xi,k−1 ; µ̃i,k , β̃k I), (17) generated at the BS or one of the SPs, i.e., xi,0 ∼ R|U |+1 . ᾱk−1 According to the diffusion model, the optimal assignment where β̃k = 1− 1−ᾱk βk is the variance amplitude, which can decision xi,0 can be progressively perturbed with noise until be easily computed from deterministic parameters, and µ̃i,k it becomes Gaussian, a process known as the forward process. can be derived through Bayesian inference [18]: √ √ Then, in the reverse process, the denoiser, denoted by πϕ αk (1 − ᾱk−1 ) ᾱk−1 βk and parameterized by ϕ, starts from Gaussian noise and µ̃i,k = xi,k + xi,0 . (18) 1 − ᾱ 1 − ᾱk k progressively reconstructs xi,0 . Fig. 6 illustrates our diffusion Next, by substituting the mathematical relationship bemodel framework for generating the optimal assignment decision for thought i. In the following, we present the tween xi,0 and xi,k obtained in (16) into (18), we can reformulate the mean µ̃i,k as: forward and reverse processes, respectively. ! 1 1 − αk z̃k , (19) µ̃i,k = √ xi,k − √ 4.2.1 The Forward Process αk 1 − ᾱk Given the optimal assignment decision xi,0 , the forward process adds a sequence of Gaussian noise at each step k to where z̃k is a new source of noise at each step k , independent obtain xi,1 , xi,2 , . . . , xi,K , where xi,k is the discrete vector of of the noise zk added during the forward process. To obtain the distribution at step k and has the same dimensionality z̃k , we then employ the denoiser πϕ , which takes three inputs: as xi,0 . The transition from xi,k−1 to √ xi,k is modeled as a xk , the step index k , and the system state si when assigning normal distribution with a mean of 1 − βk xi,k−1 and a thought i (defined later in Sec. 5.2), to predict the noise to be subtracted. We further express the mean µ̃i,k as: variance of βk I, as given in [18]. ! p 1 − αk 1 q(xi,k |xi,k−1 ) = N (xi,k ; 1 − βk xi,k−1 , βk I), (14) xi,k − √ πϕ (xi,k , k, si ) , (20) µ̃i,k = √ αk 1 − ᾱk β − min − 2k−1 2 (βmax −βmin ) K 2K where k = 1, 2, . . . , K , βk = 1 − e is the diffusion rate, with βmin and βmax denoting the miniFinally, after obtaining µ̃i,k and β̃k , based on (17), we mum and maximum rates, respectively, and I representing derive the transition from xi,k to xi,k−1 through reparamethe identity matrix. terization: ! q We then express the connection between xi,k−1 and xi,k 1 1 − αk xi,k−1 = √ xi,k − √ πϕ (xi,k , k, si ) + β̃k z̄k , (21) by rewriting (14) using the reparameterization technique, as αk 1 − ᾱk follows [18]: p p xi,k = 1 − βk xi,k−1 + βk zk−1 , (15) where z̄k is standard Gaussian noise sampled from N (0, I). By iteratively applying the transition in (21) over K steps 9. We make a slight adjustment to the thought assignment decision in our simulations, where xi,m ∈ {0, 1} is extended to xi ∈ {0, 1, . . . , U }. (as detailed in Algorithm 1), we can reconstruct the optimal Here, xi = u indicates that xi,u = 1 within our proposed system model. assignment decision xi,0 for thought i.
9 Diffusion-based actor network
Remark 4. In standard DDPM implementations, the training objective is to minimize the mean squared error (MSE) between the noise zk sampled from N (0, I) in the forward process and the noise z̃k predicted by the denoiser πϕ in the reverse process at each step k . However, since we omit the explicit forward process, we optimize the reverse process in an exploratory manner. Specifically, the training objective of the denoiser πϕ shifts from minimizing the MSE with labeled data to maximizing the objective function of problem (P) (as detailed in Sec. 5).
Storage
Evaluating policy
D IFFUSION -BASED S OFT ACTOR -C RITIC A LGO -
5.1 Motivation for Adopting the SAC Algorithm The motivation for adopting the SAC algorithm stems from its superior stability, efficiency, and exploration capability. SAC is a DRL framework built on the principle of maximum entropy, where the entropy represents the randomness of the agent’s policy [32]. Specifically, traditional reinforcement learning algorithms, such as DQN and DDPG, aim to maximize only the expected cumulative reward. However, this reward-only objective often results in insufficient exploration and unstable policy learning, particularly in highdimensional or non-stationary environments. In contrast, the SAC algorithm maximizes both the expected cumulative reward and the policy entropy, encouraging the agent to sustain sufficient exploration throughout the training process. This entropy-regularized objective allows SAC to achieve more stable learning and effectively avoid suboptimal convergence. Moreover, SAC can be naturally extended to discrete action spaces [33], making it well-suited for decision-making tasks such as thought assignment, where the action space is discrete yet demands efficient and robust exploration. This makes SAC particularly effective in dynamic MEC networks. 5.2 MDP Elements in the DSAC Algorithm Recall that we have a set of thoughts I , and the objective is to assign each thought to either the BS or one of the SPs to maximize the QoS of AIGC service delivery. This makes the MDP framework particularly suitable for the thought assignment problem [34]. An MDP is a discrete-time stochastic control process that can be represented as a 3-tuple (S, A, R), where S denotes the state space, A represents the action space, and R is the reward, as described below. • State Space: The state space S encapsulates the environmental information required for making thought assignment decisions. The state si ∈ S , corresponding to the assignment of thought i, is defined as follows:
si = {gti , Cti , X, ej ∗ ,i }, ti = max Tjactfin , j∈Li −1
(22)
where gti = |ga,b,ti |2 a∈U ∪{0},b∈U ∪{0} denotes the smallscale fading power gains of all BS-to-SP and SP-toSP links at time slot ti , Cti = Cu,ti u∈U represents
Update
Critic2
Mini-batch sampling
Min
Fig. 7: The overall architecture of the DSAC algorithm.
RITHM
In this section, we first present the motivation for integrating the diffusion model into the soft actor-critic (SAC) algorithm. We then define the Markov decision process (MDP) elements in the DSAC algorithm, followed by an overview of the DSAC architecture. Finally, we provide a comprehensive analysis of its computational complexity.
Soft update Target critic networks Critic1
Replay buffer
5
Update
...
...
Critic networks Critic1 Critic2
the output token counts of all SPs at time slot ti , X denotes the assignment decisions xi for all thoughts, where the vector is padded with -1 for thoughts that have not yet been assigned, and ej ∗ ,i represents the input data size required to generate thought i, where j ∗ = argmaxj∈Li −1 Scorej,m xj,m denotes the thought that obtains the highest score at step Li − 1. • Action Space: The action space A is defined as the set of all possible thought assignment decisions, i.e., A = {0, 1, 2, . . . , U }. Recalling that xi,0 represents a set of discrete probabilities over the choices of being generated at the BS or one of the SPs, i.e., xi,0 ∼ R|U |+1 , the action ai ∈ A corresponding to the assignment of thought i can be expressed as
ai = arg max{xi,0 }.
(23)
• Reward Function: The reward ri ∈ R is a scalar repre-
senting the immediate feedback received after executing action ai in state si . Specifically, we define the reward as the incremental increase in total generation delay incurred by assigning thought i: actfin ri = Tiactfin − Ti−1 Scoremin actfin − max 0, − Scorei , |I|
(24)
actfin min where Ti−1 = 0 for the input thought i = 0, Score |I| denotes the average quality threshold that each thought should attain, and Scoreactfin denotes the actual generi ation quality of thought i on its designated server. The penalty term becomes active when the quality of thought i falls below the per-thought quality threshold, thereby implicitly enforcing constraint C2 through penalization and effectively integrating it into the learning objective.
5.3
Architecture of the DSAC Algorithm
The architecture of DSAC is illustrated in Fig. 7. It comprises a diffusion model-based actor network, two critic networks, two target critic networks, and a replay buffer, as detailed below. • Diffusion Model-Based Actor Network: In DSAC, the actor network πϕ , parameterized by ϕ, serves as the denoiser used in the reverse process of the diffusion model. Unlike the standard reinforcement learning objective, which focuses solely on maximizing the expected cumulative reward, DSAC further incorporates an entropy term. This enables the optimal policy to maximize its entropy, thereby maintaining sufficient exploration [32]:
10
πϕ∗ = arg max π ϕ
X
E(si ,ai )∼πϕ [ri + εH(πϕ (·|si ))],
(25)
Algorithm 1: DSAC Algorithm.
i
1
where H(πϕ (·|si )) = Eai ∼πϕ [− log πϕ (ai |si )] denotes the entropy that measures the randomness of policy πϕ , and ε is the temperature parameter that controls the trade-off between the entropy term and the reward. • Replay Buffer: During training, once thought i is scheduled, the transition tuple (si , ai , ri , si+1 ) is stored in the replay buffer D. The replay buffer serves as an experience memory, enabling the agent to break temporal correlations through random mini-batch sampling, thereby improving sample efficiency and stabilizing the learning process. • Two Critic Networks: Two critic networks, Qθ1 and Qθ2 , parameterized by θ1 and θ2 , respectively, take the state si and action ai as inputs and produce the corresponding Q-values Qθn (si , ai ) [32]:
Qθn (si , ai ) = ri + γ Esi+1 ∼D,ai+1 ∼πϕ [Qθn (si+1 , ai+1 ) − ε log πϕ (ai+1 |si+1 )], n ∈ {1, 2}. (26) Specifically, γ denotes the reward discount factor, and these Q-values quantify the expected quality of the state–action pair by incorporating both reward and entropy, where a higher value reflects not only a greater expected return but also a higher potential for exploration. Moreover, during policy improvement, the smaller of the two Q-values is used as the target Q-value, which helps reduce overestimation bias and stabilize training. • Policy Improvement: After sufficient exploration, a minibatch of samples is randomly drawn from the replay buffer D to update both the critic and actor networks. For the two critic networks, both are updated independently using the same optimization target. Specifically, the parameters θ1 and θ2 of the two critic networks are trained to minimize the soft Bellman residual [32]: h1 JQ (θn ) = E(si ,ai ,ri ,si+1 )∼D (Qθn (si , ai ) 2i
− min Qθ̄n (si , ai ))2 , n ∈ {1, 2}, n∈{1,2}
(27)
where minn∈1,2 Qθ̄n (si , ai ) represents the soft Bellman target, which combines the immediate reward and the expected future return while incorporating an entropy bonus. It can be computed as [32]:
min Qθ̄n (si , ai ) = ri h + γ Eai+1∼πϕ min Qθ̄n (si+1 , ai+1 ) n∈{1,2} i − α log πϕ (ai+1 |si+1 ) ,
n∈{1,2}
(28)
where Qθ̄n denotes the target critic networks, which take the state si+1 and action ai+1 as inputs and produce the corresponding Q-values. Finally, the parameters ϕ of the actor network are learned by directly minimizing the expected Kullback–Leibler divergence [32]: Jπ (ϕ) = Esi ∼D Eai ∼πϕ [α log πϕ (ai |si )−Qθ1 (si , ai )] . (29) To ensure stable training, the parameters of the target networks are updated gradually, allowing smooth changes in the learned Q-value estimates over time. This is achieved through soft updates as follows:
2
Input: ϕ, θ1 , θ2 , θ̄1 ← θ1 , θ̄2 ← θ2 , D ← ∅. Output: The optimal thought assignment decisions.
for episode = 1 to E do for i = 1 to |I| do 5 Obtain si according to (22) and initialize the assignment decision distribution xi,K ∼ N (0, I). 6 for k = K to 0 do 7 Use a denoiser πϕ to infer the noise z̃k = πϕ (xi,k , k, si ). 8 Calculate the mean µ̃i,k and the distribution q(xi,k−1 |xi,k ) by (20) and (17), respectively. 9 Calculate the thought assignment decision distribution xi,k−1 by (21). 10 end 11 Obtain the optimal assignment decision as ai = arg max{xi,0 }. 12 Receive the reward ri according to (24) and transition to the next state si+1 . 13 Store the transition tuple (si , ai , ri , si+1 ) into D. 14 Randomly sample a batch of transitions, update the parameters θ1 and θ2 of the two critic networks using (27), update the parameter ϕ of the actor network using (29), and update the parameters θ̄1 and θ̄2 of the two target critic networks using (30). 15 end 16 end 3
4
θ̄n ← τ θn + (1 − τ )θ̄n , n ∈ {1, 2},
(30)
where τ ∈ (0, 1] denotes the update rate of the target networks. 5.4 DSAC Algorithm and Complexity Analysis Algorithm 1 provides the pseudocode of the proposed DSAC algorithm. The computational complexity of DSAC mainly stems from two aspects: training complexity and execution complexity. Note that since the training of learning-based methods can be carried out in a cloud data center with abundant computational resources [30], [35], our analysis of the DSAC algorithm’s computational complexity primarily focuses on the execution phase. During the execution phase, only the trained diffusionbased actor network is required, and the computational complexity corresponds to a forward pass through this network. Assume the denoiser in DSAC consists of L fully connected layers, each with N neurons. A single forward pass through the denoiser then requires O(LN 2 ) multiply–accumulate operations [34]. Since the diffusion model performs K steps to generate the action for each thought, the per-thought complexity is O(KLN 2 ). Finally, across E episodes, each containing I thoughts to be scheduled, the total computational complexity of the proposed DSAC algorithm is O(EIKLN 2 ), which scales linearly with the number of episodes E , the number of thoughts I , the number of steps in the reverse process K , and quadratically with the width of the network’s hidden layers N .
6
P ERFORMANCE E VALUATION
In this section, we first present the simulation parameter settings and then evaluate the performance of the proposed DSAC by comparing it with three benchmark solutions. 6.1 Simulation Settings 6.1.1 Network Layout We consider a 100m × 100m square network, where the BS is located at the center and [0, 8] SPs are uniformly distributed
11
Table 1: Parameters used in simulation [19], [36], [37].
Value
Initial generation quality of the BS (σ0 ) Rate of quality improvement of the BS (ρ0 ) Generation delay per token of the BS (η0 ) Initial generation overhead of the BS (ψ0 ) Output token count of the BS (C0 ) Initial generation quality of SP u (σu ) Rate of quality improvement of SP u (ρu ) Generation delay per token of SP u (ηu ) Initial generation overhead of SP u (ψu ) Date size associated with edge ei,j Number of episodes (E ) Reward discount factor (γ ) Target network update rate (τ )
50 0.085 0.05 0.1 150 (30, 55) (0.035, 0.055) (0.02, 0.04) (0.05, 0.15) [5, 10]KB 1000 0.99 0.005