Threat Aware Task Offloading and Caching for Secure UAV Assisted Vehicular Consumer Electronics
Analyze & explore related research in Conceptio
Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.
1
Threat Aware Task Offloading and Caching for Secure UAV Assisted Vehicular Consumer Electronics
arXiv:2608.17794v1 [cs.NI] 18 Aug 2026
Xiaoteng Yang, Sunil Prajapat and Zheng Lin
Abstract—Vehicular consumer electronics increasingly support computation-intensive and latency-sensitive services, imposing stringent efficiency, reliability, and security requirements on vehicular edge computing (VEC) systems. In dynamic vehicular environments, inference-based information leakage and anomalous communication behaviors further threaten system performance and data privacy. To address these challenges, this paper proposes a UAV-assisted cooperative VEC architecture that integrates threat-aware task offloading with intelligent spatiotemporal caching across roadside units (RSUs) and UAV edge nodes. A security-aware uplink transmission model is developed to capture potential information leakage risks and abnormal communication patterns, enabling adaptive offloading decisions. We formulate a joint optimization problem to minimize end-to-end task execution delay while improving cache utilization under limited computing and storage resources. To efficiently solve this problem, a Threat-Aware Joint Optimization (TAGO) framework is designed by combining proximal policy optimization for adaptive task offloading and a gradient-based caching update derived from the Frank–Wolfe algorithm to capture spatiotemporal service popularity. Simulation results demonstrate that the proposed approach significantly reduces task delay and improves cache efficiency compared with several baseline strategies, showing its effectiveness for secure and efficient UAV-assisted vehicular consumer electronics systems. Index Terms—Vehicular consumer electronics, edge computing, task offloading, intelligent caching.
I. I NTRODUCTION
I
N intelligent vehicular consumer electronics ecosystems supported by UAV-assisted edge computing [1], the integration of AI and edge intelligence enables real-time perception, decision-making, and coordination [2]–[10]. Despite these advancements, such systems remain vulnerable to cybersecurity threats, privacy leakage, and anomalous behaviors [11]– [15]. In particular, recent advances in AI have also enabled intelligent inference, adaptive eavesdropping, and anomalydriven attacks, allowing adversaries to exploit task offloading and data transmission processes in vehicular edge computing (VEC) systems. Traditional network architectures often lack the flexibility and resilience required to operate effectively under such adversarial conditions or variable workloads, due to limited resource elasticity, weak threat tolerance, and the absence of a unified framework that jointly considers computational efficiency and communication security [16]–[20]. Corresponding author: Sunil Prajapat, Zheng Lin. Xiaoteng Yang is with the School of Telecommunications Engineering, Xidian University, Xi’an 710071, China. (email: xtengyang@stu.xidian.edu.cn). Sunil Prajapat is with the Deptartment of Computer Engineering-AI Big Data, Marwadi University , 360006 India. (e-mail: sunilprajapat645@gmail.com) . Zheng Lin is with the Department of Electrical and Electronic Engineering, University of Hong Kong, Pok Fu Lam, Hong Kong SAR, China (e-mail: linzheng@eee.hku.hk).
With the rapid development of intelligent transportation and edge-enabled consumer electronics, the scale and complexity of vehicular edge services continue to increase. Consequently, ensuring both efficient computation and secure communication has become a critical requirement for next-generation vehicular networks. Furthermore, the scope of integrated edge intelligence extends beyond UAV assisted vehicular networks to other domains such as satellite edge computing, the Internet of Things (IoT), and large-scale cyber-physical systems, emphasizing the need for generalized, secure, and efficient optimization solutions [21]–[23]. Generative artificial intelligence (GAI) has been increasingly introduced into vehicular consumer electronics networks, where its use is no longer limited to performance-oriented optimization [24]–[27]. Recent studies indicate that generative models can also support adaptive decision-making and intelligent system management under dynamic and uncertain network conditions. Prior work has explored the application of GAI to threat-related analysis, intelligent security reasoning, anomaly-tolerant task scheduling, and resource management in heterogeneous and time-varying network environments [28]. For instance, Wu et al. employed GAI in combination with distributed reinforcement learning to address resource allocation and channel estimation in RIS-assisted networks, resulting in adaptive scheduling behavior and improved system utility [29]. Zhang et al. examined a GAI-based deployment approach for service function chains in multi-domain IoT systems and observed improvements in resource utilization and service performance [30]. In VEC scenarios, task offloading and caching decisions are not determined solely by latency or throughput. Securityrelated factors must also be taken into account. As a result, traditional offloading strategies that ignore physical-layer security and data exposure risks fail to provide trustworthy vehicular communication [31]. These limitations highlight the necessity of incorporating security-aware mechanisms into the design of offloading and caching strategies for vehicular edge systems. To address performance limitations in VEC systems, various optimization strategies have been investigated. Zhao et al. proposed a digital twin-assisted offloading mechanism using cluster-based decision compression to reduce the action space and improve execution efficiency [32]. Liu et al. designed a subtask scheduling mechanism based on directed acyclic graphs and integrated distributed deep reinforcement learning to optimize task delay and energy consumption under multi-vehicle collaboration [33]. Xiao et al. studied multiUAV data collection and trajectory optimization, modeling the problem as mixed integer nonlinear programming and achieving efficient control through Markov decision processes
2
and deep reinforcement learning [34]. Although these methods significantly improve computational efficiency and latency performance, they generally assume benign network environments and provide limited protection against emerging AI-enabled inference attacks and anomalous communication behaviors. To enhance the computational capacity and service flexibility of vehicle-mounted systems, researchers have integrated unmanned aerial vehicles (UAVs) as auxiliary edge nodes in air–ground collaborative vehicular edge computing (VEC) architectures [35]. With their flexible deployment, highaltitude line-of-sight communication, and dynamic load sensing capabilities, UAVs can rapidly execute computational tasks and deliver content, significantly improving task offloading efficiency and service availability. Chen et al. [36] proposed an energy-efficient edge cloud architecture based on a threelayer game-theoretic model. Goudarzi et al. [37] combined software-defined networking (SDN) with UAV resources to jointly optimize UAV trajectories and task offloading using a soft actor–critic algorithm. Zhao et al. [38] developed a multi-UAV collaborative edge computing framework incorporating cache deployment and service scheduling. Other studies investigated two-layer optimization frameworks [39], joint resource allocation schemes [40], Lyapunov-based online algorithms [41], and digital twin-assisted reinforcement learning methods [42], collectively enhancing computational efficiency, resource utilization, and service quality in UAVassisted VEC systems [43]. Recently, Zhang et al. [44] introduced a real-time scheduling framework for executing large language model reasoning tasks on edge nodes, achieving higher reasoning throughput and more efficient resource utilization. Related autonomous-driving studies have also shown that large-language-model-enhanced trajectory planning and spatiotemporal attention mechanisms can improve intelligent mobility services in IoT-enabled vehicular environments [45], [46]. Nevertheless, under AI-enabled inference and anomaly attacks, the decoupling of secure task offloading and caching remains a critical bottleneck. Most existing works optimize latency or energy efficiency in isolation, overlooking how caching decisions influence security exposure and how task placement can mitigate sensitive data retransmission. To address this challenge, this paper proposes a Threat-Aware Joint Optimization (TAGO) framework that tightly couples threataware task offloading, intelligent edge caching, and securityaware transmission optimization within UAV-assisted vehicular consumer electronics networks. The main contributions of this work are summarized as follows: 1) We develop a UAV-assisted vehicular edge computing architecture that integrates threat-aware task offloading and intelligent edge caching for vehicular consumer electronics networks. The framework explicitly considers information leakage risks and anomalous communication behaviors during task transmission, enabling secure and adaptive service provisioning in dynamic vehicular environments. 2) We formulate a multi-objective optimization problem for joint task offloading and edge caching in UAV-assisted vehicular systems. The formulation captures the trade-
Fig. 1: The proposed UAV-assisted vehicle edge computing system. off between execution latency, cache efficiency, and the additional overhead introduced by encryption and privacy-preserving mechanisms. 3) We propose a Threat-Aware Joint Optimization (TAGO) framework that coordinates task offloading and caching decisions. Specifically, proximal policy optimization (PPO) is employed to learn adaptive offloading strategies, while an improved Frank–Wolfe algorithm is used to update spatiotemporal caching policies. A conditional variational autoencoder is further incorporated to enhance the robustness of threat-aware policy learning in dynamic environments. 4) Extensive simulation studies demonstrate that the proposed approach significantly reduces task response time and improves cache efficiency compared to baseline methods, while maintaining resilience across varying vehicular densities and UAV deployment scales. The remainder of this paper is organized as follows. Section II describes the system model and formulates the joint optimization problem. Section III presents the proposed algorithmic framework and optimization procedure. Section IV outlines the experimental setup and evaluation metrics. Section V reports and analyzes the experimental results, and Section VI concludes the paper with directions for future research. II. S YSTEM M ODEL AND P ROBLEM F ORMULATION A. System Overview Fig. 1 shows the architecture of a UAV-assisted vehicular consumer electronics network with NOMA-enabled transmission. The system includes a UAV v with onboard computing resources, a set of vehicle users (VUs) U = {1, 2, . . . , U }, and RSUs S = {1, 2, . . . , S}, each providing computational and caching capabilities. During each time slot n ∈ N = {1, 2, . . . , N }, VUs generate tasks and decide whether to execute them locally, offload to an RSU, or offload to the UAV, based on network conditions, computational load, delay requirements, and security considerations. RSUs handle the received tasks and perform data caching based on spatiotemporal access patterns. When the available resources at RSUs become insufficient, the UAV is used to supplement the computing capability and support task execution within acceptable time limits. To protect sensitive information and reduce privacy risks, tasks offloaded to RSUs or the UAV
3
are encrypted, introducing a latency that depends on the data size. This security-aware delay is incorporated into the task scheduling model, while local execution remains unaffected. By combining encryption with anomaly-aware monitoring, the system enables adaptive, secure, and efficient offloading and caching decisions, supporting reliable operation in dynamic vehicular consumer electronics environments.
is adopted to characterize the wireless channels and evaluate transmission throughput, where the coordinates of network nodes are explicitly defined. The position of a VU at time slot n is denoted by (xu (n), yu (n), 0), and the associated RSU is located at (xs (n), ys (n), 0). The horizontal Euclidean distance between the VU and RSU is thus given by du,s (n) =
B. Caching Model To support computing and caching services such as video analytics and intelligent driving for vehicle users (VUs), roadside units (RSUs) proactively cache relevant data based on task requirements. Let Y = {1, 2, . . . , Y } denote the set of Y data types requiring caching and computation. The cache state at RSU s during time slot n is represented as Xs (n) = {xs,1 (n), xs,2 (n), . . . , xs,Y (n)}, where the binary variable xs,y (n) ∈ {0, 1} indicates whether data type y is cached at RSU s at time slot n. The popularity of data type y at RSU s, denoted by py,s , is modeled based on the MandelbrotZipf (MZipf) distribution py,s = PY
Is (y)−zs
′ −zs y ′ =1 Is (y )
,
(1)
where Is (y) represents the request rank of data type y within the coverage area of RSU s (with lower ranks indicating higher popularity), and zs is the skewness parameter controlling the popularity distribution. A larger value of zs indicates a more skewed distribution, meaning that a small number of data items dominate the request frequency, while smaller values correspond to a more uniform access pattern. Considering the popularity of tasks, the caching policy can better predict which tasks will be selected in the future, thus improving the cache hit rate. Specifically, if RSU s caches data y, the cache state decision variable xs,y (n) = 1 at time slot n, and xs,y (n) = 0 otherwise. Meanwhile, the RSU caching strategy should be dynamically adjusted with changes in network computing resources to maximize the cache hit rate. At time slot n, the cache hit rate As (n) in the RSU coverage area is defined as 1 X As (n) = au (n), (2) |Us | u∈Us
where au (n) is the indicator function indicating whether the task request of VU u at time slot n results in a cache hit. Assuming that the data type requested by VU u is y, when the data y already exists in the cache, i.e., xs,y (n) = 1, au (n) = 1, which indicates a hit; otherwise, au (n) = 0, which indicates a non-hit. The cache hit rate is used as a control metric for RSUs to adjust cached content in response to the access demand of VUs. C. Communication Model This section describes the data transmission process in the considered network. The process consists of two stages: uplink transmission from VUs to RSUs, and task forwarding from RSUs to UAVs when the available computational resources at RSUs are insufficient. A three-dimensional spatial model
p
(xu (n) − xs (n))2 + (yu (n) − ys (n))2 .
(3)
Considering the obstacles in the environment and the fading due to environmental changes, the channel gain gu,s (n) from VU to RSU can be expressed as de c , (4) gu,s (n) = hu,s (n) A 4πfc du,s (n) where hu,s (n) denotes the small-scale fading coefficient of the wireless link between VU u and RSU s, A is the antenna gain, c is the speed of light, fc is the carrier frequency, and de is the path loss exponent. To enhance spectral efficiency, a non-orthogonal multiple access (NOMA) scheme is employed for uplink task offloading, enabling multiple VUs to simultaneously transmit data to the RSU over shared frequency resources. To manage the resulting intra-cell interference, the RSU adopts SIC, where received signals are decoded in descending order of channel gains. Specifically, the set of channel gains between all VUs and RSU s at time slot n is denoted as G(n) = {g1,s (n), g2,s (n), . . . , gU,s (n)}. Based on Shannon’s capacity theorem, the achievable uplink transmission rate of the uth VU to RSU s is given by ! pu (n)gu,s (n) P Ru,s (n) = Bu,s (n) log2 1 + 2 σu,s + i∈Gu (n) pi (n)gi,s (n) (5) where Bu,s (n) is the transmission channel bandwidth, pu (n) is 2 the transmission power, σu,s is the noise power, and Gu (n) = {i | gi,s (n) < gu,s (n)} denotes the set of users whose signals are decoded after the u-th user in the SIC order and therefore generate interference during the decoding process. When the computational power of the RSU cannot meet the demand, the overloaded RSU forwards the task to the UAV for processing. Assuming that the UAV is located at high altitude, its coordinates at time slot n are (xv (n), yv (n), zv (n)). At this time, the distance ds,v (n) between the UAV and the RSU is p ds,v (n) = (xv (n) − xs (n))2 + (yv (n) − ys (n))2 + zv (n)2 . (6) Since there are fewer occlusions at high altitude, we assume that the communication between the UAV and the overloaded RSU takes place over the LoS (line-of-sight) channel. The channel transmission probability ϱs,v (n) between the RSU and the UAV can be expressed as follows 1 ϱs,v (n) = , (7) 1 + ε1 exp(−ε2 (θs,v (n) − ε3 )) where ε1 , ε2 and ε3 are environmental parameters, θs,v (n) = arctan
√
zv (n)
(xv (n)−xs (n))2 +(yv (n)−ys (n))2
is the elevation an-
gle between the RSU and the UAV. Therefore, the channel
4
gain gs,v (n) of the overloaded RSU transmitting information to the UAV is gs,v (n) =
g0 (ϱs,v (n) + ξ (1 − ϱs,v (n))) , d2s,v (n)
(8)
where g0 is the gain per unit distance and ξ is the attenuation factor in the NLoS channel. Ultimately, the transmission rate from the overloaded RSU to the UAV is ps (n)gs,v (n) , (9) Rs,v (n) = Bs,v (n) log2 1 + 2 σs,v where Bs,v (n) is the transmission channel bandwidth, ps (n) 2 is the transmission power, and σs,v is the noise power. D. Threat Model In wireless vehicular edge computing environments, task data transmitted over open wireless channels may be exposed to potential eavesdropping or traffic analysis attacks. An adversary observing the communication channel may attempt to infer sensitive task information from the transmitted data volume and communication patterns. Let Lu (n) denote the information leakage level associated with the task generated by VU u at time slot n. The leakage risk is assumed to increase with the amount of transmitted data and can be modeled as Lu (n) = ηDu (n), where Du (n) is the input data size of the task and η represents a leakage sensitivity coefficient reflecting the inference capability of a potential adversary. Based on the leakage level, the probability that an attacker successfully infers task-related information can be approximated as Puinf (n) = 1 − exp(−βLu (n)),
(10)
where β is a positive constant capturing the adversarial inference efficiency. This formulation reflects that larger amounts of exposed data lead to higher inference risks. To mitigate the inference risk represented by Puinf (n), security protection mechanisms such as encryption are applied during task transmission. These mechanisms introduce additional computational overhead and transmission latency. We model this overhead as a security-aware delay tsec u (n), which is proportional to the leakage level of the transmitted inf task tsec u (n) = γLu (n)Pu (n), where γ is a system-defined constant capturing the delay overhead of the applied security mechanism. This formulation reflects that higher inference risks require stronger protection mechanisms, which introduce additional processing latency. E. Computing Model This section presents a detailed computational model for task processing in the proposed network. The model accounts for three types of computational execution: local processing at VUs, edge computation at RSUs, and cooperative computing assisted by UAVs. Each task generated by a VU is abstracted as a quadruple Φ = {Du (n), Cu (n), Ou (n), Tu (n)}, where Du (n) represents the input data size, Cu (n) denotes the required number of CPU cycles, Ou (n) ∈ Y indicates the
index of the data type to be processed, and Tu (n) specifies the maximum allowable delay for task completion. For each given VU αu,s (n) = 1 indicates that the task is offloaded to the RSU for processing, and αu,s+1 (n) = 1 indicates that the task is executed locally at the VU. If the task is processed locally at the VU, the processing time tu (n) consumed is Cu (n) tu (n) = , (11) Zu where Zu is the CPU clock speed of the VU and remains constant during the computation. If the task of the VU is offloaded to the RSU for processing, the computational delay is divided into two parts: one part is the delay of the task uploading to the neighboring RSU, and the other part is the delay of the RSU processing the task. The transmission delay of the task can be expressed as tu,s (n) = αu,s (n)
Du (n) . Ru,s (n)
(12)
where αu,s (n) is a binary offloading decision variable indicating whether the task generated by user u is transmitted to RSU s at time slot n. If αu,s (n) = 1, the task is offloaded to RSU s, and the transmission delay depends on the achievable transmission rate Ru,s (n); otherwise, the transmission delay is zero. The time ts (n) for the RSU to process the task is P Cu (n) · u′ ∈U αu′ ,s (n) ts (n) = , (13) Zs where Cu (n) denotes the required CPU cycles of the task generated byP user u, and Zs is the CPU clock speed of RSU s. The term u∈U αu,s (n) represents the number P of tasks simultaneously assigned to RSU s. When K = u′ ∈U αu′ ,s (n) tasks are concurrently offloaded to RSU s, the total computing capacity Zs is equally partitioned among them, such that each task receives an effective clock speed of Zs /K and incurs a processing delay of Cu (n) · K/Zs . If the RSU experiences heavy computational load, the remaining tasks that cannot be processed locally will be forwarded to the UAV for further processing. When the tasks are offloaded to the UAV, denoted as αs,v (n) = 1, the transmission delay from RSU s to the UAV can be expressed as ts,v (n) = αs,v (n)
Du (n) , Rs,v (n)
(14)
where αs,v (n) is a binary decision variable indicating whether RSU s forwards the task to the UAV, and Du (n) denotes the input data size of the task being forwarded. If αs,v (n) = 1, the task is transmitted from RSU s to the UAV with transmission rate Rs,v (n); otherwise, no RSU–UAV transmission occurs. The processing delay tv (n) of the task can be expressed as ! XX Cu (n) tv (n) = · max 1, αu,s (n)αs,v (n) , (15) Zv u∈U s∈S
where Zv is the CPU clock speed of the UAV.
5
Based on the mutually exclusive execution locations, the total delay ttotal (n) for user u is given by u h ttotal (n) = α (n)t (n) + α (n) tu,s (n) + tsec u,s+1 u u,s u u (n) i +(1 − αs,v (n))ts (n) + αs,v (n) ts,v (n) + tv (n) . (16) The security-aware delay tsec u (n) only applies when the task is offloaded αu,s (n) = 1. This ensures that local processing is not penalized for security delay, while transmitted tasks incorporate the cost of data protection, contributing to more secure scheduling decisions. F. Problem Formulation In the temporal system framework n ∈ N , our objective is to minimize the average task processing delay while maximizing the cache hit rate, defining the system cost Mn of the system " # U S X X total Mn = λ 1 tu (n) + λ2 (1 − As (n)) , (17) u=1
s=1
where λ1 and λ2 are positive weighting coefficients used to adjust the preferences of the different terms in the objective function to ensure that they are of the same order of magnitude in the optimization process. Thus, the joint optimization problem is formulated as follows N
P1
1 X Mn α(n),xs,y (n) N n=1 min
s.t. C1 : α(n) ∈ {αu,s (n), αu,s+1 (n), αs,v (n)}, X C2 :αu,s+1 (n) + αu,s (n) = 1, ∀u ∈ U, s∈S
C3 : xs,y (n) ∈ {0, 1}, ∀s ∈ S, ∀y ∈ Y, C4 :
Y X
ly xs,y (n) ≤ Ls , ∀s ∈ S,
y=1
C5 : zmin ≤ zv (n) ≤ zmax ,
III. A PPROACH D ESIGN Since the proposed problem P1 is a mixed-integer nonlinear programming (MINLP) problem and belongs to the NP-hard class, directly solving it through exhaustive search is computationally infeasible for large-scale vehicular networks. To address this challenge, we propose a unified optimization framework termed Threat-Aware Generative Offloading–Caching Optimization (TAGO). The TAGO framework integrates three complementary components within a unified architecture: a reinforcement learning module for offloading optimization, a convex optimization module for cache placement, and a generative policy learning module for joint strategy refinement. A. Offloading Decision Optimization In this subsection, we discuss the optimization problem of offloading decisions, transform it into an MDP-based offloading problem, and propose a PPO-based offloading algorithm. The state s(n) of the system in each time slice n is denoted as a multidimensional state vector that covers all the network observations relevant to the offloading decision. It includes the task queue state Qu (n), which consists of the amount of data to be processed by the vehicle u and the number of CPU cycles required by the task; the load state of the RSU Fs (n), which consists of the current available computational resources of RSU s and the total computational demand to accumulate all the queued tasks of that RSU; the channel state Gu,i (n) and the UAV mobility state Zv (n). Thus, the system state at time slot n can be defined as s(n) = {Qu (n), Fs (n), Gu,i (n), Zv (n)} .
C6 : G(n) ∈ Gall (n), ∀u ∈ U, ∀s ∈ S, C7 : Puinf (n) ≤ Pmax , ∀u ∈ U, C8 : ttotal (n) ≤ Tu (n), ∀u ∈ U. u
constraint such that the total size of cached data does not exceed the memory limit of the RSU. Constraint C5 regulates the UAV’s flight altitude within a predefined operational range between zmin and zmax . Constraint C6 restricts the selected channel gain vector G(n) to feasible combinations in the candidate set Gall (n). Constraint C7 ensures that the inference success probability of each VU does not exceed the predefined security threshold Pmax . Lastly, constraint C8 ensures that the total processing delay of each task does not exceed its corresponding delay requirement Tu (n).
(18)
The optimization problem, denoted as P1, jointly determines the task offloading and caching decisions within the UAV-assisted vehicular edge computing system. Specifically, the offloading decision variable α(n) ∈ {αu,s (n), αu,s+1 (n), αs,v (n)} indicates the execution location of each VU’s task—either locally, at an RSU, or at a UAV. Simultaneously, the caching decision variable xs,y (n) represents whether data item y is stored at RSU s, with the aim of improving data access efficiency and reducing transmission delay. Constraint C1 and C2 guarantee that each task is offloaded to exactly one computing entity. Constraint C3 ensures that each RSU makes binary caching decisions per data item. Constraint C4 imposes a storage capacity
(19)
The action space defines the offloading location selection decisions for all vehicular terminal tasks within time slot n. Each agent selects an offloading target from the available set comprising S RSUs, the local processing unit, and V UAVs. The offloading action matrix is defined as α(n) = [αu,j (n)] ∈ {0, 1}U ×(S+V +1) ,
(20)
where j ∈ {0, 1, ..., S, S + 1, ..., S + V } denotes the local processor, RSUs, and UAVs. In order to simplify the strategy expression and action sampling in the model, the discrete action space representation of One-Hot coding is used an = onehot arg max πθ (j|s(n)) , (21) j∈{0,...,S+V }
where πθ is the policy network that outputs the probability distribution of offloading actions in the current state sn ,
6
considering the objective function of the offloading system, we translate delay minimization and cache hit maximization into a reward function used in PPO training. The expression for this is r(n) = −λ1
U S 1 X total 1X tu (n) + λ2 As (n), U u=1 S s=1
(22)
where λ1 and λ2 are the equilibrium coefficients, and the reward function maps the two optimization objectives to the forward payoff space, which guides the policy to converge to an efficient offloading scheme. To address the high-dimensional discrete action space in task offloading, the proximal policy optimization (PPO) algorithm is employed within a reinforcement learning framework. PPO offers enhanced stability and sample efficiency, making it well-suited for complex multinode, multi-task offloading scenarios. The approach utilizes a dual-network architecture: a policy network πθ (a|s) that outputs the probability distribution over offloading targets (local, RSU, UAV), and a value network Vϕ (s) that estimates the expected return of state s. The advantage function Ât is estimated using temporal difference methods and Generalized Advantage Estimation (GAE). Ât = δt +(γλ)δt+1 +(γλ)2 δt+2 +· · ·+(γλ)T −t+1 δT −1 , (23) where δt = rt + γVϕ (st+1 ) − Vϕ (st ), γ is the discount factor, and λ is the generalized advantage estimation parameter. To balance the strategy update with the value function fit, the PPO joint multinomial loss constructs the optimisation objective and the overall loss function is defined as h i value LPPO (θ, ϕ) = Et Lclip (ϕ) + c2 · Lent t (θ) − c1 · Lt t (πθ ) (24) where c1 and c2 are two hyperparameters that balance the weights of the components of the loss function. This includes the strategy loss function Lclip controlling the old and new t strategy changes, the value function loss, and the entropy regularity term. The strategy loss function is expressed as Lclip (θ) = min r (θ) Â , clip(r (θ), 1 − ϵ, 1 + ϵ) Â (25) t t t t t t) denotes the ratio of the probability where rt (θ) = ππθθ (a(at |s t |st ) old of new to old strategies, and ϵ is the strategy update trimming threshold to prevent too large a strategy update. Value function loss is expressed as
2
Lvalue (ϕ) = (Vϕ (st ) − Rt ) , t
(26)
where Rt denotes the real cumulative return. The entropy regularity term is denoted as X Lent πθ (a|st ) log πθ (a|st ). (27) t (πθ ) = − a
During training, the policy network πθ and value function network Vϕ are initialized. The agent interacts with the environment by sampling actions at ∼ πθ (at |st ) based on the observed state st , executes offloading decisions, receives rewards rt , transitions to state st+1 , and stores experience tuples (st , at , rt , st+1 ). After each episode, generalized advantage
estimation computes advantage values Ât and returns Rt . The previous policy πθold is fixed, and the current policy is updated via mini-batch training over multiple epochs using a clipped surrogate loss Lclip t to stabilize updates. Concurrently, the value loss Lvalue and entropy regularization Lent are optimized to t t enhance convergence and exploration. This process repeats until convergence or training completion. The trained policy network πθ adaptively generates offloading decisions to jointly minimize task delay and maximize resource utilization. B. Caching Policy Optimization In the joint optimization problem P1, the caching policy variable xs,y (n) directly influences task access delay and cache hit rate. To reduce the overall average task processing delay and improve caching efficiency, the problem is further decomposed into the subproblem P2, which optimizes caching policies given a fixed offloading policy α(n). The subproblem P2 is formulated as P2 max xs,y (n)
S X
As (n)
(28)
s=1
s.t. C3, C4 Considering the discrete nature of the problem, coupled constraints, and the need for online updates, an enhanced FrankWolfe algorithm is proposed to achieve efficient and lowcomplexity iterative optimization. To facilitate the solution, the binary variable xs,y (n) is relaxed to a continuous domain, rendering the objective function convex and linear. The feasible set is defined by sparse linear inequality constraints, transforming the problem into a standard convex program max x
c⊤ x (
s.t.
x ∈ X :=
x ∈ [0, 1]S×Y
Y X
) ly xs,y ≤ Ls , ∀s
(29)
y=1
where x is the splice vector of all xs,y and c is the gradient PU vector with elements cs,y = u=1 pu,y αu,s (n). The standard Frank-Wolfe algorithm constructs a linear approximation model based on the current point x(t) at each iteration and solves the subproblem over the feasible domain X D E d(t) = arg max ∇f (x(t) ), x . (30) x∈X
Then update the main variable 2 . (31) t+2 To guarantee that the solution still satisfies the cache capacity limit after each round of iteration, a projection retraction operation is introduced ( ) Ls (t+1) (t+1) xs,y ← min xs,y , P , ∀s, y (32) (t+1) +ϵ y ly · xs,y x(t+1) = x(t) + ηt (d(t) − x(t) ),
ηt =
ϵ > 0 is a tiny positive number to avoid division by zero error. Since the objective of the original problem is an integer optimization problem, we adopt an integer recovery strategy.
7
Specifically, after reaching the maximum number of iterations or convergence threshold, we recover the solution to integer form using a thresholding method for each RSU based on the final solution x∗ , i.e. ( 1 ifx∗s,y > 0.5, x∗s,y → (33) 0 otherwise. C. GAI Assisted Optimization To further enhance the generalization capability of the system and capture the nonlinear dependencies between offloading and caching strategies, a CVAE is introduced to build a generative artificial intelligence-assisted joint optimization model. The model takes the current system state as a conditional input and is trained under the guidance of historical optimization strategies. Specifically, the offloading policy α(P P O) obtained through PPO and the caching strategy x(F W ) derived from the Frank-Wolfe method are used as prior knowledge to guide the learning process. Based on these conditions, the CVAE learns to generate a new joint strategy (α̃, x̃), enabling adaptive decision-making and improved coordination between offloading and caching under dynamic network conditions. network , ϕcache , (34) ϕ(n) = ϕtask n n , ϕn where ϕ(n) denotes the feature representation extracted from the system state s(n), including task characteristics, network conditions, and cache states. We use (α(P P O) , x(F W ) ) as the optimization prior, which constitutes the CVAE conditional input c(n) = [s(n), α(n), x(n)] The training objective of the CVAE is to minimize the negative conditional variational lower bound. LCV AE = −Eqϕ (z|π,c(n)) [log pθ (π|z, c(n))] + βDKL (qϕ (z|π, c(n))∥p(z|c(n))) denotes the joint strategy; qϕ (z|·) is the network of encoders, which outputs the latent variable distribution; pθ (·|z, c(n))) is the decoder, which is used to generate the strategy; KL[·∥·] is the Kullback–Leibler (KL) divergence, which is used to constrain the latent distributions; and β is the coefficient that moderates the tradeoffs between the generation and regularity. The encoder receives the joint strategy π and the conditional input c(n)) and learns its distribution in the latent space. Its output is the mean µz and standard deviation σ z of the latent variable z, thus defining the conditional posterior distribution qϕ (z|π, c(n))) = N (z; µz , diag(σ 2z )).
(35)
Algorithm 1 TAGO: Threat-Aware Generative Offloading–Caching Optimization Require: System state s(n), policy networks πθ , Vϕ , cache capacity constraints Ensure: Optimized decisions (α∗ , x∗ ) 1: Initialize policy network πθ and value network Vϕ 2: Initialize caching variables xs,y 3: Initialize CVAE model qψ (z|π, c), pω (π|z, c(n)) 4: while training not converged do 5: Observe current system state s(n) 6: Sample offloading action α(n) ∼ πθ (·|s(n)) 7: Execute offloading decision and obtain reward r(n) 8: Update policy and value networks via PPO objective 9: Compute gradient ∇f (x) based on α(n) 10: Solve linear subproblem to obtain search direction d(t) 11: Update caching variables xs,y (n) via Frank–Wolfe iteration 12: Construct conditional context c(n) = [s(n), α(n), xs,y (n)] 13: for k = 1 to K do 14: Sample latent variable zk ∼ qψ (z|π, c(n)) 15: Generate candidate policy π̃k = [α̃k , x̃k ] 16: end for 17: Select best policy π̃ ∗ = arg min M (π̃k ) 18: if M (π̃ ∗ ) < M (π) then 19: Update joint policy π ← π̃ ∗ 20: end if 21: end while 22: return (α∗ , x∗ )
For each generated policy π̃k = [α̃k , x̃k ], the system utility M (π̃k ) is evaluated according to the objective function defined in Problem P1, i.e., M (π) = λ1
U X
ttotal (n) + λ2 (1 − As (n)) . u
(39)
u=1
The policy that minimizes the utility value is selected as the final decision. Multiple latent variables are sampled to generate candidate joint policies, and the strategy minimizing the objective function is selected as the final decision. The pseudocode for the process algorithm is shown in Algorithm 1.
We use the reparameterization trick to sample from it z = µz + σ z ⊙ ϵ,
ϵ ∼ N (0, I).
(36)
The decoder takes as input the condition c(n)) and the latent variable z and generates the joint policy π̃ = [α̃, x̃]. The decoder is implemented by a multilayer perceptron (MLP) with the optimization objective of minimizing the difference between the generated and true policies. Decoder output π̃ = pθ (π|z, c(n))),
(37)
The prior distribution p(z|c(n))) is defined in CVAE, and a Gaussian distribution is used to predict the mean and variance of the p(z|c(n)) = N (µprior (c(n)), σ 2prior (c(n))).
(38)
IV. E XPERIMENTAL S ETTINGS A large-scale urban vehicular edge computing scenario is constructed to evaluate the proposed framework. The simulation area is defined as a 10 km × 10 km urban grid, where [5, 10] RSUs are deployed at major road intersections to provide wireless communication and edge computing services. VUs move according to the Manhattan mobility model, which captures the grid-based mobility pattern of vehicles in urban road networks. The number of vehicles varies within the range [10, 30], and their speeds are randomly distributed between [30, 60] km/h. To enhance communication and computation capabilities, [1, 10] UAVs are introduced as aerial edge nodes. The UAVs
8
TAGO DO CO Greedy
80
Average Task Delay (ms)
operate at altitudes between [50, 100] meters and dynamically adjust their positions according to the workload of nearby RSUs to provide auxiliary communication and computing services. For vehicle-to-infrastructure (V2I) communication, each RSU is allocated a bandwidth within [5, 20] MHz, and a NOMA scheme is adopted to improve spectrum utilization. Shadow fading is modeled as a log-normal random variable with a standard deviation between [5, 8] dB, while the transmission power of vehicle users is randomly selected from [20, 30] dBm. Task arrivals at VUs follow a Poisson process. The input data size of tasks is uniformly distributed within [1, 10] MB, and the required computational workload ranges from [0.5, 2]×109 CPU cycles. Task popularity follows the MZipf distribution with skewness coefficient zs = 0.8 to capture the non-uniform access characteristics of vehicular services. Each RSU caches [5, 20] data items, where the size of each item lies within [5, 10] MB. The computational frequencies of all processing nodes, including VUs, RSUs, and UAVs, vary between [2, 16] GHz to reflect heterogeneous computing capabilities in practical systems [33], [36], [41]. The proposed framework is implemented in PyTorch. The PPO agent adopts a three-layer fully connected neural network with 256 neurons in each hidden layer and ReLU activation functions for both the policy and value networks. The training process uses a discount factor γ = 0.99, GAE parameter λ = 0.95, and clipping parameter ϵ = 0.2. The Adam optimizer is employed with a learning rate of 3×10−4 and a mini-batch size of 64. For caching optimization, the enhanced Frank-Wolfe algorithm runs for T = 100 iterations with a convergence threshold of 10−4 . The CVAE module is configured with a latent dimension of 64 and KL-divergence weight β = 0.5, producing relaxed continuous representations of the offloading policy α(n) and caching decision xs,y (n) for joint strategy refinement. To comprehensively evaluate the effectiveness of our model, we compare its performance against several baseline methods, including the following 1) DO: Delay optimization, which only considers the overall delay of the system without considering other factors. 2) CO: Cache optimization with the goal of maximizing the system’s cache hit rate regardless of other factors. 3) Greedy: A greedy approach is used to assign computational tasks to UAVs, making locally optimal decisions at each step without considering long-term effects. 4) Random: Tasks are randomly executed at the RSU or UAV to which they are assigned and do not depend on the system state. 5) LORA [41]: The dynamic resource allocation problem under long-term constraints is transformed into an instantaneous decision-making problem for each time slot by means of the Lyapunov optimization framework. The objective is to minimize the long-term average task delay while satisfying the long-term constraints on energy consumption and system cost. 6) FDLOA [47]: Full-duplex alternating offloading and caching algorithm, which jointly optimizes task offloading and data caching decisions in full-duplex-enabled edge computing networks. By decomposing the overall
Random LORA FDLOA BC-A3C-GS
70
60
50
40
10
15
20 Number of Vehicle Users (VUs)
25
30
Fig. 2: The impact of the number of vehicle users on the average task delay.
problem into three subproblems, FDLOA employs an alternating optimization strategy to minimize system delay while leveraging full-duplex communication to enhance spectral efficiency. 7) BC-A3C-GS [48]: Bias-correction A3C with gradient sharing, which first optimizes UAV deployment to maximize vehicle coverage and energy efficiency using an adaptive population differential evolution algorithm. Then, it jointly optimizes service caching and task offloading via a DRL-based framework that enhances the traditional A3C algorithm through bias correction and global gradient sharing. V. E XPERIMENTAL R ESULTS A. Comparative analysis of task delay To evaluate the effectiveness of the proposed joint optimization strategy under varying system loads, we analyze the trend of average task delay as the number of vehicle users increases from 10 to 30, as shown in Fig. 2. Each curve represents the mean task delay across multiple independent runs, while the shaded regions indicate one standard deviation around the mean, capturing variability and robustness across different realizations. All methods exhibit increasing delay with higher vehicle density due to intensified competition for computational and communication resources. The proposed TAGO framework demonstrates the most moderate increase, with mean task delay rising from 40.5 to 66.2, and consistently narrow shaded regions, indicating stable performance and low variability. In contrast, the Random baseline shows the steepest increase, reaching 78.3, with wide shaded regions reflecting high fluctuation and poor adaptability under dynamic load. Traditional heuristics such as CO and Greedy, along with advanced methods including LORA, FDLOA, and BC-A3CGS, achieve intermediate performance, with task delays 7.7%– 19.2% higher than TAGO at maximum vehicle density, with CO showing the largest gap and FDLOA the smallest among this group. DO maintains closer performance to TAGO but still exhibits a relative gap of approximately 6% at maximum vehicle density.
9
Table I: Average Task Delay of Different Methods under Varying Vehicle Users (VUs) and UAVs. VUs/UAVs
Our
DO
CO
Greedy
Random
LORA
FDLOA
BC-A3C-GS
46.0 – 54.0 ↑ (3.4%) 63.0 – 70.4 – 72.1 ↓ (3.6%)
43.1 ↓ (7.3%) 51.2 ↓ (1.9%) 59.5 ↓ (5.3%) 66.1 ↓ (6.4%) 71.3 ↓ (4.7%)
45.7 – 53.1 – 62.8 – 68.7 ↓ (2.7%) 73.4 ↓ (2.5%)
61.4 ↓ (4.8%) 62.6 ↓ (4.1%) 65.8 ↓ (6.8%) 61.4 ↓ (10.9%) 58.1 ↓ (13.5%)
60.3 ↓ (6.5%) 61.0 ↓ (6.6%) 65.2 ↓ (7.6%) 60.7 ↓ (11.9%) 57.5 ↓ (14.4%)
62.1 ↓ (3.7%) 63.2 ↓ (3.2%) 66.3 ↓ (6.1%) 61.5 ↓ (10.7%) 59.3 ↓ (11.7%)
Varying Vehicle Users (VUs) 40.5 ↓ (13.0%) 48.2 ↓ (7.7%) 56.1 ↓ (10.7%) 64.3 ↓ (8.9%) 66.2 ↓ (11.5%)
10 15 20 25 30
42.2 ↓ (9.2%) 52.8 ↑ (1.1%) 56.9 ↓ (9.4%) 65.4 ↓ (7.4%) 70.2 ↓ (6.1%)
48.3 ↑ (3.9%) 55.3 ↑ (5.9%) 67.2 ↑ (7.0%) 75.1 ↑ (6.4%) 78.9 ↑ (5.5%)
46.5 52.2 62.8 70.6 74.8
50.7 ↑ (9.0%) 57.8 ↑ (10.7%) 69.3 ↑ (10.4%) 71.0 ↑ (0.6%) 78.3 ↑ (4.7%)
Varying Number of UAVs 57.8 ↓ (10.4%) 59.1 ↓ (9.8%) 60.4 ↓ (14.4%) 57.3 ↓ (16.8%) 54.4 ↓ (19.0%)
1 2 3 4 5
60.2 ↓ (7.1%) 61.5 ↓ (5.8%) 62.1 ↓ (12.0%) 58.9 ↓ (14.5%) 57.9 ↓ (13.8%)
66.1 ↑ (2.6%) 67.4 ↑ (2.9%) 73.4 ↑ (3.9%) 70.2 ↑ (1.9%) 69.5 ↑ (3.4%)
64.5 65.3 70.6 68.9 67.2
85
Average Task Delay (ms)
80
75
70
65
60 TAGO DO CO Greedy
55
50
1
Random LORA FDLOA BC-A3C-GS
2
3 Number of UAVs
4
5
Fig. 3: The impact of the number of UAVs on the average task delay. 2 X U '