This section presents EdgeGuard-AI, an adaptive framework that couples zero-trust security with load-aware scheduling for IoT edge networks. The key idea is simple: every scheduling decision must be trust-feasible and load-feasible at the same time. In real edge deployments, traffic patterns and attacks change quickly, and edge nodes often have limited compute and memory. Therefore, static access control alone is not enough, and pure performance-based scheduling is unsafe. EdgeGuard-AI solves this by (i) continuously computing trust from flow evidence, (ii) forecasting near-term load, and (iii) selecting task placements under explicit trust and risk constraints. The full pipeline is implemented using four connected algorithms (Algorithms 1–4), where the output of each stage is the input to the next stage.
Algorithm 1 defines how EdgeGuard-AI computes trust from streaming traffic. For each flow sample, an evidence vector
is built from the normalized flow features and the derived risk indicator. In practice,
contains compact, decision-friendly signals such as traffic burstiness, protocol behavior, anomaly concentration, and resource stress indicators. A suspicion score
is computed using a logistic mapping,
where
is the sigmoid function and
is a learnable weight vector. Equation (
6) ensures
, which makes the value suitable for trust updates and constraint checks.
| Algorithm 1: EdgeGuard-AI (Part I): Zero-Trust Evidence Construction and Trust Scoring |
![Sensors 26 01989 i001 Sensors 26 01989 i001]() |
5.1. Evidence Vector Construction
The evidence vector
summarizes the security- and workload-relevant signals extracted from the normalized flow representation
and the derived risk indicator
. Instead of using the entire high-dimensional feature space directly, EdgeGuard-AI constructs a compact evidence representation composed of aggregated traffic statistics and behavioral indicators. In particular, the evidence vector includes: (i) traffic burst metrics such as packet rate and inter-arrival variance, (ii) protocol behavior indicators derived from TCP/UDP flags and session statistics, (iii) anomaly concentration features capturing deviations from typical flow distributions, and (iv) resource stress indicators reflecting CPU, memory, or queue pressure associated with the observed flows.
| Algorithm 4: EdgeGuard-AI (Part IV): Federated Adaptation with Secure Aggregation |
![Sensors 26 01989 i004 Sensors 26 01989 i004]() |
Empirically, the most influential components for trust estimation correspond to anomaly concentration and burst-level traffic statistics, as these features are strongly correlated with malicious activity such as scanning, flooding, or injection attacks. By combining these signals with the derived risk indicator
, the evidence vector provides a compact representation that allows the suspicion score in Equation (
6) to capture both instantaneous anomalies and sustained behavioral deviations.
The per-client trust state is then updated using exponential forgetting:
where
and
is the decay factor. Equation (
7) is important for two reasons. First, it supports
continuous verification: trust changes as new evidence arrives. Second, it avoids overreacting to a single noisy flow because the trust state is smoothed over time. The emitted trust score
is clipped to
to maintain a consistent decision range. This trust score becomes the security gate used by the scheduling policy in Part III.
Edge scheduling decisions must consider both current resource usage and near-future load. Algorithm 2 builds this capability. For each client
k, EdgeGuard-AI forms a workload sequence
from recent evidence. Intuitively,
captures how much traffic or task demand is arriving at the edge node at time
t. Because edge traffic is bursty, we forecast the short-term load:
where
H is the look-back horizon. Equation (
8) reduces instability in scheduling decisions by preventing aggressive oscillation when traffic spikes occur.
The scheduler state is then built by composing trust, predicted load, queue occupancy, and device telemetry:
Equation (
9) is the key interface between security and performance. It ensures that every edge node is represented by a compact state that includes both
security readiness (trust) and
service capacity (load and resources). The state
becomes the input to the constrained scheduling policy.
Algorithm 3 defines the scheduling policy. At each decision time
t, a set of tasks
arrives, where each task
j has a demand profile
and a deadline or delay tolerance
. EdgeGuard-AI evaluates each candidate node
e and checks whether it is admissible under zero-trust:
where
is a trust threshold and
is the indicator function. Equation (
10) is a strict security gate: nodes below
are not allowed to receive sensitive tasks, even if they have spare capacity.
For admissible nodes, the scheduler predicts latency and cost, and computes a risk score driven by trust:
Equation (
11) is used to enforce a risk budget. The final decision selects task-to-node assignments by optimizing QoS while satisfying security constraints:
Equation (
12) forms the core decision rule of the proposed framework, jointly optimizing latency and cost while enforcing trust and risk constraints: trust and risk are constraints, while latency and cost are optimized objectives. This structure is practical because it allows safe operation even under load spikes. If no node satisfies the constraints, the task can be delayed, downgraded, or rejected, which prevents unsafe offloading.
Edge environments are distributed, and data sharing is often restricted. Algorithm 4 provides a federated adaptation mechanism so that EdgeGuard-AI can learn across clients without sharing raw traffic records. Each client k starts from the global policy parameters , runs local rollouts by executing Algorithms 1–3, and updates its local parameters using a combined objective that penalizes QoS loss and security violations.
The client then sends an update
to the server, and the server aggregates using a FedAvg-style rule:
where
are client weights, typically proportional to local data size. Equation (
13) is important for practical deployment because it supports continuous improvement under client shift. Edge nodes may differ in device types, traffic profiles, and attack exposure, so federated adaptation helps the global policy remain robust across heterogeneous conditions.
After preprocessing the Edge-IIoTset dataset, we obtain a clean and structured flow-level dataset
where each record is a normalized feature vector with its label, client identity, timestamp, and a derived risk indicator. In simple terms, the raw packets are converted into fixed-size flow vectors, noisy and broken rows are removed, features are standardized so that one feature does not dominate another, and imbalance is reduced so that rare attacks are not ignored. We also keep client partitions and time order because our method needs to learn how trust and load change over time at each edge node. This final dataset becomes the direct input stream for Algorithm 1. In Algorithm 1, each flow sample is transformed into a compact evidence vector
that summarizes the security-relevant and load-relevant signals. From
, the model computes an instantaneous suspicion value
using Equation (
6), and then updates the client trust state using Equation (
7). The key point is that trust is not a fixed label; it is continuously updated as new flows arrive. Therefore, the output of Algorithm 1 is a time-varying trust score
per client and a trust value
per sample, which represents the current security confidence of that edge node under observed traffic.
Next, Algorithm 2 takes the trust stream from Algorithm 1 and combines it with the system load signals. It builds a workload sequence from recent evidence, predicts near-future load using Equation (
8), and then forms the final scheduling state vector
using Equation (
9). This state is a single compact input that contains trust, predicted load, queue occupancy, and resource telemetry, so it fully describes whether an edge node is both safe and capable at the current time. Algorithm 3 then uses these states to schedule tasks. For each node, it first checks admissibility using Equation (
10), which enforces zero-trust by blocking nodes below the trust threshold. For the remaining nodes, it predicts latency and resource cost, computes a risk score using Equation (
11), and then selects the task placement policy
by solving the constrained objective in Equation (
12). This step is the core of our contribution because it ties security and scheduling into one decision rule: tasks are placed only when trust and risk constraints are satisfied, and among safe choices the policy prefers lower latency and lower cost. Finally, Algorithm 4 makes the entire system adaptive across multiple edge sites. Each client trains locally using the same trust, load, and scheduling loop, then sends only parameter updates to a server. The server aggregates them using Equation (
13). This allows EdgeGuard-AI to improve over time under client shift, without sharing raw traffic data, while keeping the same zero-trust and load-aware behavior.
Figure 1 summarizes the complete EdgeGuard-AI pipeline and highlights how the dataset stream is transformed into trust signals, load-aware states, constrained scheduling actions, and federated policy updates. The trust scoring, state formation, and constrained decision steps correspond to Algorithms 1–3, while the privacy-preserving adaptation loop is defined in Algorithm 4.