work, deep reinforcement learning-based online offload-
ing (DROO) [8] and its enhanced method, DROO with
early-exit (DROOE), under different dynamic scenarios.
In our experiments, GRLE achieves average accuracy up
to 3.41×over graph reinforcement learning (GRL) and
1.45×over DROOE, which demonstrates that GRLE is
effective to make offloading decision in dynamic MEC.
II. RELATED WORK
Due to the characteristics of time-varying wireless channels,
it is crucial to make effective offload decisions to ensure the
QoS in edge computing paradigms. Guo et al. [5] proposed
a heuristic search-based energy-efficient dynamic offloading
scheme to minimize energy consumption and completion
time of task with strict deadline. Tran et al. [6] designed
a heuristic search method to optimize task offloading and
resource allocation to jointly minimize task completion time
and energy consumption by iteratively adjusting the offloading
decision. However, heuristic search methods require accurate
input information, which is not applicable to dynamic MEC.
Reinforcement learning (RL) is a holistic learning paradigm
that interacts with the dynamic MEC to maximize long-
term rewards. Li et al. [7] proposed to use deep RL (DRL)-
based optimization methods to address dynamic computational
offloading problem. However, applying DRL directly to the
problem is inefficient in a practical deployment because of-
floading algorithms typically require many iterations to search
an effective strategy for unseen scenarios. Huang et al. [8]
proposed DROO to significantly improve the convergence
speed through efficient scaling strategies and direct learning of
offloading decisions. However, the DNN used in DROO can
only handle Euclidean data, which makes it not well suitable
for the graph-like structure data of MEC. In addition, all
the above methods do not provide dynamic inference, which
is lack of flexibility in making good use of any available
computation resource under stringent latency.
III. SYSTEM MODEL
This paper studies the computation offloading in an MEC
network, which consists of MIoT devices and NESs. The
set of IoT devices and ESs are denoted as M={1,2,· · · , M}
and N={1,2,· · · , N}respectively. At each time slot k∈K,
each IoT device generates a computational task that has to
be processed within its deadline, where K={1,2,· · · , K}.
The length of each time slot kis assumed to be τ. The
computational task of IoT device is assumed to use a CNN
with Lconvolutional layers (CLs), which are denoted as
L={1,2,· · · , L}. Each IoT device can offload its inference
task to one ES through wireless channel and each ES can serve
multiple IoT devices at each time slot. In the case of poor
wireless channel state or insufficient available computation
resource of ESs, ESs can use the early-exit mechanism to
terminate the computation earlier to meet the deadline of an
inference task. After completing inference task, ES will send
back the results to IoT devices. To perform computational
offloading, two decisions should be considered: (1) to which
ES an IoT device should offload its tasks; (2) to which early-
exit the ES can perform the task based on a time constraint.
A. Communication time
Computation offloading involves delivering of task data and
its inference result between IoT device and ES. We assume that
a task of IoT device mis offloaded to ES nat time slot k. The
task information is expressed as θk
m,n =dk
m,n, δk
m,n, rk
m,n,
where dk
m,n and δk
m,n are the task size and latency requirement
respectively, and rk
m,n is the uplink transmission data rate from
IoT device mto ES n. Therefore, the transmission delay of
an inference task from IoT device mto ES nis denoted as
tcom
m,n (k) = αk
m,ndk
m,n/rk
m,n (1)
where αk
m,n ∈ {0,1}is a binary variable to indicate whether
the task of device mis offloaded to ES nat time slot k. As
each inference task can only be offloaded to one ES, there is
X
n∈N
αk
m,n = 1,∀m∈M.(2)
In addition, as the output of CNN is very small, often a
number or value that represents the classification or detection
result, transmission delay of the feedback is negligible.
B. Computation time
During computation, an ES can only select an early-exit to
perform inference for each offloaded task. As we use a binary
variable βk
m,n,l ∈ {0,1}to denote if ES nperforms device
m’s task until early-exit l, there is
X
l∈L
βk
m,n,l = 1,∀m∈Mand n∈N.(3)
Assuming that ES nperforms an inference task until early-
exit l, the computation time and inference accuracy are de-
noted as tcmp
n,l and φlrespectively. Therefore, the computation
time of m’s task on ES nis expressed as
tcmp
m,n(k) = βk
m,n,ltcmp
n,l .(4)
Correspondingly, the achieved inference accuracy of the task
generated by IoT device mat time slot kis
Φm,n(k) = βk
m,n,lφl.(5)
We assume each ES processes inference tasks on a first-
come-first-served basis. Namely, ES ncan start to process a
new arrival task only if it has processed all the previously ar-
rived tasks. Assume that device m’s task generated at time slot
kis offloaded to ES n, device mcan start transmission of this
task only after completing transmission of its previous tasks.
Since the propagation time is negligible, the task generated
by device mat time slot karrives at ES nat time instant,
Ta
m,n (k), which can be expressed as
Ta
m,n
(k)=tcom
m,n (k)k=1,
maxTa
m,n0(k−1),(k−1)τ+tcom
m,n(k)k6=1, n0∈N.
(6)
Correspondingly, the waiting time at ES nof device m’s task
generated at time slot k,tw
m,n (k), can be calculated as (7),
where 1(·)is an indicator function to show the occurrence of
device m0’s task arriving at ES nbefore device m’s task.