Paper · 2020-11-17 · cs.LG, cs.AI
Deep Reinforcement Learning for Stochastic Computation Offloading in Digital Twin Networks
Models offloading of stochastic IIoT tasks in a digital-twin network as a long-term energy-efficiency problem. Lyapunov drift-plus-penalty turns each slot into a deterministic problem, solved with asynchronous actor-critic (AAC). Author-reported: AAC lowers simulated system cost versus two resource-allocation variants and DQN; no numeric values in the text.
Policy gradientLyapunov optimizationComputation offloadingreinforcement-learningcomputation-offloadingdigital-twiniiot
AI-compiled by claude-haiku-5-5 on 2026-10-18, not yet reviewed by a human. Every claim cites its source; check it when a detail matters.
In plain words
Factories full of sensors and small machines generate more data than their own hardware can process quickly, so some of the work has to be sent to nearby servers. Sending work costs battery energy, and the wireless link and the amount of incoming work both change from moment to moment. The paper asks how each device should split its work between itself, the nearby small base stations and a central base station, so that the energy spent per unit of completed work stays low over time.
The authors model the network as a "digital twin": a software copy that tracks where devices are, how much power and bandwidth they have, and how full their task queues are. The hard part is that the decision has to be made for every short time slot, under uncertain future work. A standard mathematical trick (Lyapunov optimisation) turns the long-term goal into a sequence of per-slot problems that keep the queues from growing. A reinforcement-learning agent, trained in the digital twin, then learns to make these per-slot decisions quickly, instead of re-solving an optimisation problem each time the channel changes.
TL;DR
- Problem: minimise long-term energy per completed computation task for devices that offload work over wireless links to small-cell and macro base stations §2, §3.1.
- Method: Lyapunov drift-plus-penalty converts the long-term objective and queue-stability constraints into a per-slot problem §3.2, eq. 17; a continuous-action actor-critic agent is trained to output the per-slot decisions §4.
- Evidence: author-reported simulations only, with 20 devices, 3 small cells and 1 macro cell §5. The comparisons are shown in figures, not tables.
- Relevance: useful if you work on edge offloading or digital-twin control. Read the Pitfalls: the per-slot objective as written does not depend on the energy term, and several equations are inconsistent.
Problem
Devices with limited CPU and battery must offload tasks to base stations. Task arrivals are stochastic and wireless channels vary, so the decision variables (bandwidths, transmit powers, offloaded amounts and CPU shares) have to be chosen per slot, with the coupling between them made explicit §2.2, §3.1. The authors state that prior work usually assumed one task per device or a deterministic arrival model, which they consider impractical for industrial IoT §1. They also state that conventional per-slot solvers that alternate between sub-problems must be re-run whenever the channel or the queues change §3.2.
Method
Network and digital twin. A directed graph of devices U and base stations B, where index 0 is the macro base station (MBS) and the others are small-cell base stations (SBS). Each device is associated with the nearest base station that covers it; devices outside all SBS coverage use the MBS §2.1, §2.2. The digital twin stores a per-device tuple (maximum power, location, local CPU) and a per-base-station tuple (location, bandwidth, edge CPU) eq. 1, eq. 2. The authors say the twin predicts locations with a KNN method from prior work and chooses associations with an online method from prior work §4.1.
Rates. SBS link rate follows a Shannon-type expression with interference from other SBSs; MBS link rate has no interference term eq. 3, eq. 4. The authors state that SBSs reuse the MBS frequency and that OFDMA suppresses interference, so MBS–SBS interference is ignored §2.2.
Queues. Device local queue Q_i^l and edge queue Q_j^e follow max-minus-departure plus arrivals updates eq. 5, eq. 6. Task arrivals lambda_i(t) are independent across slots with mean lambda §2.2. Stability is the long-run average of expected queue lengths being finite eq. 7.
Energy. Local execution processes D_i^l = tau f_i^l / c bits per slot eq. 8 at energy tau-times-varsigma-times-f-cubed eq. 9. Offloading to base station j sends D_ij^e bits (rate times tau) eq. 10 and costs transmit energy p_i tau plus an edge term eq. 11. Total energy sums both eq. 12.
Objective. The energy-efficiency metric eta_EE is the ratio of long-run total energy to long-run processed bits eq. 13. The problem P1 minimises eta_EE over bandwidth, power, offloaded amount and CPU shares, subject to capacity constraints and the queue-stability conditions eq. 14.
Lyapunov transformation. The authors use the quadratic Lyapunov function over device queues shifted by a perturbation beta and edge queues eq. 15. They take the one-slot drift eq. 16, add V times expected eta_EE as a penalty eq. 17, and bound the drift eq. 18. The perturbation is set per device as V times a term written eta'_EE(t) plus the maximum departure eq. 19.
Per-slot problem P2. Each slot, the agent (or a solver, see Pitfalls) chooses the action that minimises the P2 objective, which has the energy term, the edge-queue term and the device-queue term eq. 20, alg. 1.
DRL formulation. State s(t) collects rates, CPU capacities, maximum powers, bandwidths and both queue vectors eq. 21. Actions are the bandwidths, powers, edge departures and CPU shares, all continuous §4.1. Reward is the negative of the P2 objective eq. 22, and the agent maximises the discounted sum of rewards eq. 23. The paper states that infeasible decisions give a fixed negative penalty §4.1.
Asynchronous actor-critic (AAC). Learning agents at the SBSs each roll out t_max steps with a copy of the global actor and critic, then send returns to a global agent at the MBS, which applies the gradients alg. 2, alg. 3, §4.2. The actor gradient is the log-policy gradient weighted by an advantage eq. 24, eq. 25, eq. 26. The critic update is written on the squared temporal-difference error eq. 27.
# Digital-twin perturbation and per-slot decision [alg. 1] [eq. 19] [eq. 20]
# Input: local queues (N,), edge queues (M+1,), arrivals (N,)
# Output: action (bandwidths, powers, departures, CPU shares)
def offloading_slot(local_queues, edge_queues, arrivals):
# Perturbation per device, predicted by the digital twin [eq. 19]
perturbation = V * eta_prime + max_departure # eta_prime: not defined
# Choose the action that minimises the P2 objective [alg. 1] [eq. 20]
action = solve_p2(local_queues, edge_queues, arrivals, perturbation)
# Advance both queue banks with the update equations [eq. 5] [eq. 6]
local_queues, edge_queues = update_queues(action, arrivals)
return action# One learning-agent rollout [alg. 2] [§4.2]
# Input: global actor and critic parameters, horizon t_max
def learning_agent_rollout(global_actor, global_critic, t_max):
# Copy the global parameters into the local agent [alg. 2]
actor = copy(global_actor)
critic = copy(global_critic)
# Collect t_max transitions with the local policy [alg. 2]
states, actions, rewards = rollout(actor, t_max)
# Bootstrap from the critic's value at the last state [alg. 2]
bootstrap = critic(states[-1])
# Discounted returns, computed backwards [alg. 2] [eq. 23]
returns = discounted_returns(rewards, bootstrap, discount)
return states, actions, returns# Global update from asynchronously received returns [alg. 3] [eq. 24]-[eq. 27]
# Input: states, actions and returns from one learning agent
def global_update(global_actor, global_critic, states, actions, returns):
# Advantage: return minus critic value [eq. 25] [alg. 3]
advantages = returns - global_critic(states)
# Actor step: raise log-probability of actions, scaled by advantage
# [eq. 24] [eq. 26]
global_actor += actor_lr * grad_log_pi(states, actions) * advantages
# Critic step: the paper writes this as an ascent step on the squared
# error, see Pitfalls [eq. 27] [alg. 3]
global_critic += critic_lr * grad_squared_error(global_critic, states, returns)Hyperparameters
Only the values below are stated. Everything else is marked as not stated.
| Name | Value | Where | Notes |
|---|---|---|---|
| devices N | 20 | §5 | Fig. 6 and Fig. 7 vary the count |
| small-cell base stations M | 3, plus one MBS | §5 | Fig. 5 varies the SBS count |
| channel model | Rayleigh fading | §5 | fading parameters not stated |
| max device transmit power | 100 mW | §5 | |
| noise power sigma^2 | 1e-11 mW | §5 | |
| bandwidth, MBS / each SBS | 10 MHz / 5 MHz | §5 | |
| slot duration tau | 100 ms | §5 | |
| cycles per bit c | 100 | §5 | |
| CPU, devices / SBS / MBS | 0.5 / 10 / 50 GHz | §5 | |
| actor network | 3 fully connected hidden layers, 128 units, ReLU; output 8 units, softmax | §5 | output-to-action mapping not stated |
| critic network | 3 fully connected hidden layers, 128 units, ReLU; output 1 linear unit | §5 | |
| learning rate | 0.001 | fig. 8 §5 | described as best in the sweep; which of alpha_pi / alpha_v it applies to is not stated |
| discount factor delta | not stated | eq. 23 | only delta in [0, 1] |
| Lyapunov weight V | not stated | eq. 17 | |
| penalty for infeasible actions | a negative constant, value not stated | §4.1 | |
| path-loss exponent alpha, SBS coverage radius | not stated | §2.2 | |
| edge energy per cycle epsilon, switched capacitance varsigma | not stated | §2.3 | |
| t_max, T_max, number of learning agents | not stated | §4.2 | |
| optimiser, batch size, episode count | not stated | §4.2 fig. 4 |
Results
Author-reported. Setup: one MBS, 3 SBSs, 20 devices, Rayleigh fading, Python and TensorFlow §5. The paper reports no numeric table. All results are plots, and the text gives only qualitative comparisons. Compare against the curves yourself before quoting any value.
| Setting | Metric | Baseline | This paper | Source |
|---|---|---|---|---|
| Schemes vs training episodes | system cost (negative DRL return) | two variants: joint offloading with bandwidth and power but no CPU allocation; joint offloading with CPU allocation but no bandwidth/power | AAC with all decisions optimised; lowest curve | fig. 4 §5 |
| System cost vs number of SBSs | system cost | not applicable | cost falls as SBS count grows when devices are many; little effect when devices are few | fig. 5 §5 |
| System cost vs number of devices, by scheme | system cost | the same two variants | proposed scheme lowest; cost rises with devices | fig. 6 §5 |
| System cost vs number of devices, by DRL algorithm | system cost | DQN | AAC lower than DQN; text attributes this to action discretisation in DQN | fig. 7 §4.2 §5 |
| Learning-rate sweep | system cost convergence | other learning rates | 0.001 converges to the lowest cost | fig. 8 §5 |
Paper vs code
No official code. The paper and its arXiv metadata give no code or project
link. Searches: the TeX source (raw/src/2011.08430/TII_final.tex) contains no
repository or project URL; GitHub repository search via the API for the title
words, for "Asynchronous Actor-Critic computation offloading digital twin",
and for the first author's name returned zero results. The paper's and the
code's values therefore cannot be compared.
Pitfalls
- The V term cancels as written. eta_EE(t) is defined as E^tol(t) divided by the sum of D_i^l + D_ij^e eq. 17 text. The P2 objective and the reward both contain V times [E^tol(t) minus eta_EE(t) times that same sum] eq. 20 eq. 22. That bracket is identically zero, so the energy weight V has no effect if implemented literally. The paper gives no alternative definition. Check for a different choice before implementing.
- Typo in the denominator. Eq. 13 and the text around eq. 17 write the device sum as D_i^t(t) rather than D_i^l(t). Read it as D_i^l(t).
- Perturbation is undefined. eta'_EE(t) in eq. 19 is not defined anywhere in the paper. eta_EE is the only energy ratio given eq. 13, eq. 17. Max departure also depends on the current action, so beta is not known before the decision it is supposed to inform eq. 19 alg. 1.
- Who solves P2? Algorithm 1 says the digital twin "determines a(t) by solving the following problem", while §4 says the DRL agent finds the solution alg. 1 §3.2 §4. The paper does not say whether the solver is an optimiser or the actor network. This is the main design choice an implementer must make.
- Actor output does not match continuous actions. §4.1 says all action variables are continuous, and the policy gradient in eq. 24 treats the actor as a stochastic policy. §5 gives an actor with 8 softmax outputs, which is a categorical distribution. The paper never maps 8 outputs to the action vector of bandwidths, powers, departures and CPU shares.
- Reward index. The queue term in eq. 22 sums over devices i while it multiplies edge queue Q_j^e. It should sum over base stations j. The sign convention makes reward equal to minus the P2 objective.
- Energy units. Eq. 11 adds p_i tau (energy) to (D c / f) multiplied by epsilon. D c / f is a time, so epsilon must carry units of energy per time. The paper calls epsilon the energy per unit computation without giving units. Eq. 9 is consistent with varsigma f^2 per cycle times f tau cycles.
- Advantage form. The advantage in eq. 25 is one-step temporal difference, but Algorithm 2 uses n-step bootstrapped returns over t_max steps. Choose one form and say so in your code.
- Reward in Algorithm 2. The loop that builds the return appends the reward R^imm(s(t), a(t)) for every index i. It does not use the reward of step i. Treat this as a typo and use per-step rewards.
- Critic update sign. Eq. 27 and Algorithm 3 add the gradient of the squared error. A squared error is minimised, so the step should descend. Check the sign against the actor step, which ascends.
- Section heading vs content. The heading "Asynchronous Learning with Experience Replay" §4.2 is followed by text that says AAC avoids replay memory. Do not add a replay buffer based on the heading.
- Number of agents and rollout length. The number of learning agents and t_max are not stated, though the text says there are several per SBS §4.2. Both must be set by the implementer.
- Mixed use of N. §5 says "when N=40" in the discussion of Fig. 5, where N is the device count; the setup gives N=20 and Fig. 5 is about the number of SBSs fig. 5 §5. The device ranges also differ between figures: Fig. 6 uses 10 to 40 devices and Fig. 7 uses 5 to 20 fig. 6 fig. 7 §5. The text gives no baseline details for DQN.
- Hidden costs. Each learning agent holds a full environment copy at an SBS, and the global agent runs at the MBS, so communication of gradients is a cost the paper does not measure §4.2.
- Digital twin is idealised. The twin is assumed to predict location, energy and task flow accurately §4.1. The paper gives no error model and no experiment with prediction error.
- Figures only. Plotted numbers cannot be read exactly from the text. The paper gives no table, so any numeric value you use must come from the figure and be labelled as read off a plot.
Lineage
- Builds on: Lyapunov drift-plus-penalty with a perturbation vector, from the work the paper cites as huang2012utility §3.2. Stability definition from the work cited as neely2010stochastic §2.2. Asynchronous actor-critic from the work cited as mnih2016asynchronous §4.2. These are cited by key only; no card exists for them in this wiki.
- Compared against: a joint-optimisation scheme with two resource-allocation variants, and DQN fig. 4 fig. 7 §5. The paper also discusses DDPG and double DQN in related work §1.
- Superseded by: not known from content in this wiki.
Source and license
Adapted from “Deep Reinforcement Learning for Stochastic Computation Offloading in Digital Twin Networks” by Yueyue Dai, Ke Zhang, Sabita Maharjan, Yan Zhang (arXiv:2011.08430), used under CC BY 4.0. Changes: condensed and restructured for implementation, with tables, equations and algorithms taken from the paper and its code, each cited to its source. Not affiliated with or endorsed by the authors.