1. Introduction
In recent years, physics-informed neural networks (PINNs) have emerged as a powerful paradigm for solving differential equations by embedding physical laws directly into the learning process [
1,
2,
3]. The core idea of PINNs is to incorporate governing equations as soft constraints into the loss function via automatic differentiation, which computes derivatives of network outputs with respect to inputs [
4,
5]. This allows for the construction of residual terms equivalent to the original differential equations, enabling the network to learn system dynamics solely by satisfying physical laws, even in the absence of labeled data. Unlike traditional numerical methods such as finite difference or finite element methods, PINNs are mesh-free, thus avoiding the computational bottlenecks associated with grid generation and the curse of dimensionality. They naturally handle high-dimensional problems, complex boundary conditions, and sparse observational data while integrating data-driven insights with physical knowledge. This makes PINNs particularly advantageous in inverse problems, parameter identification, and uncertainty quantification [
6,
7]. PINNs have been successfully applied in various fields, including fluid mechanics, solid mechanics, heat transfer, and quantum mechanics.
As a key application area, PINNs have been employed to solve various systems of differential equations derived from epidemiological and propagation models [
8,
9,
10]. Their ability to simultaneously fit observational data while respecting underlying physical laws makes them particularly attractive for modeling complex dynamical systems. Moreover, as these epidemiological and propagation models become increasingly high-dimensional, efficiently solving the resulting differential equation systems poses a critical challenge. Traditional numerical methods such as Runge–Kutta [
11], while accurate, incur substantial computational costs and face difficulties in real-time scenarios. However, despite their success across multiple domains, conventional PINNs treat time as an independent spatial dimension and compute derivatives solely through automatic differentiation. This approach introduces two fundamental limitations when solving time-dependent dynamical systems: accumulated errors over long time horizons and the vanishing or exploding gradient problem in deep networks.
To overcome these limitations, this work integrates PINNs with long short-term memory networks. The memory cells and gating mechanisms of LSTM effectively capture long-term dependencies and time-delayed effects, which standard PINNs fail to exploit due to their independent treatment of time points [
12,
13]. Moreover, the gating structure alleviates gradient vanishing and explosion, stabilizing training and accelerating convergence, making the hybrid PINN + LSTM framework particularly suitable for long-range sequence prediction.
As a concrete application, we consider the problem of malware propagation in wireless sensor networks (WSNs), where accurate modeling and prediction are critical for network security. Malware poses severe threats to WSN stability, causing resource theft, data tampering, and service outages [
14]. Given the analogy between malware spread and infectious disease transmission, compartmental models such as SIR and SEIR have been widely adopted to characterize propagation dynamics [
15]. However, with increasingly refined node state divisions, the resulting differential equation models become high-dimensional, making efficient solution a critical challenge.
In this paper, we propose a novel PINN + LSTM hybrid model to characterize malware propagation in WSNs. Departing from traditional numerical methods, we employ physics-informed neural networks integrated with long short-term memory to solve the underlying differential equation systems. Using the fourth-order Runge–Kutta (RK4) method as the benchmark, we conduct comprehensive numerical comparisons between the proposed PINN + LSTM, standard PINN, and Fourier PINN. The rest of the paper is organized as follows.
Section 2 constructs a malware propagation model based on SEIR epidemic theory.
Section 3 introduces the PINN + LSTM framework.
Section 4 carries out numerical simulations and a corresponding analysis. Finally,
Section 5 concludes the paper and discusses future work.
2. Malware Propagation Model Formulation
In this section, we construct an extended SEIR-based epidemic model with seven state variables, namely Susceptible (
S), Vaccinated (
V), Exposed (
E), High-Risk Infectious (
H), Low-Risk Infectious (
L), Quarantined (
Q), and Recovered (
R). Let
,
,
,
,
,
, and
denote the density of nodes in each compartment at time
t, respectively. We assume that the total number of nodes in the WSNs remains constant over time. Therefore,
Let
be a time interval, where
is a sufficiently small time segment starting from time
t. Based on epidemic theory, the state transition relationships of nodes among different compartments are illustrated in
Figure 1.
The density variation in compartment
S consists of three components. First, susceptible nodes are protected by the defense system and transition to the vaccinated compartment
V at a rate
. Second, susceptible nodes can be infected by high-risk and low-risk infectious nodes, and then move to the exposed compartment
E at rates
and
, respectively. Third, some recovered nodes return to the susceptible state at rate
. Accordingly, the density change in
S over the time interval
is formulated as follows:
The density variation in compartment
V consists of two components. First, susceptible nodes are protected by the defense system and transition to the vaccinated compartment
V at rate
. Second, some vaccinated nodes may still be infected by high-risk and low-risk infectious nodes, and transfer to the exposed compartment
E at rates
and
, respectively, where
and
. Accordingly, the density change in
V over the time interval
is formulated as follows:
The density variation in compartment
E consists of two components: susceptible and vaccinated nodes can be infected and transition to compartment
E (consistent with the infection mechanisms of
S and
V), and the exposed nodes then progress to compartments
H and
L at rates
and
, respectively. Accordingly, the density change in
E over the time interval
is formulated as follows:
The density variation in compartment
H consists of two components: exposed nodes transfer to compartment
H at rate
, and high-risk infectious nodes move to compartment
Q at rate
. Accordingly, the density change in
H over the time interval
is formulated as follows:
The density variation in compartment
L consists of two components: exposed nodes transition to compartment
L at rate
, and low-risk infectious nodes recover at rate
. Accordingly, the density change in
L over the time interval
is formulated as follows:
The density variation in compartment
Q is determined by two components: high-risk infectious nodes move to compartment
Q at rate
, and quarantined nodes recover at rate
. Accordingly, the density change in
Q over the time interval
is formulated as follows:
Since the total number of nodes in the WSN is constant, the density variation in compartment
R consists of three components: low-risk infectious nodes recover at rate
, quarantined nodes recover at rate
, and some recovered nodes return to the susceptible state at rate
. Accordingly, the density change in
R over the time interval
is formulated as follows:
We assume that the number of nodes in each state varies continuously within
. Equations (
2)–(
8) are in discrete-time difference form; by dividing by
and letting
, the continuous-time ordinary differential Equation (
9) is directly obtained.
where the initial condition is
.
The added complexity of the SVEHLQR model is justified by its ability to capture WSN-specific features. Distinguishing between high-risk infectious (H) and low-risk infectious (L) nodes reflects differences in node roles and transmission capabilities, which is critical for propagation accuracy [
16], unlike the homogeneous infectious classes assumed in [
17,
18]. Furthermore, the introduction of vaccinated (V) and quarantined (Q) compartments incorporates proactive protection and isolation mechanisms, which are absent in basic models but essential for WSN security [
19]. Compared to recent works such as [
20,
21], our model further subdivides infectious states to better align with the heterogeneous communication patterns observed in WSNs. In contrast to [
22], which focuses on detection mechanisms, our work models propagation dynamics using a macroscopic compartmental approach suitable for large-scale WSNs.
For the model to be mathematically meaningful, we examine its steady states and derive a basic reproduction number. Let
. System (
9) can be written as
with
f Lipschitz continuous.
At a malware-free steady state, no exposed, infected or quarantined nodes exist. Setting
in (
9) and solving yields
This means the entire population is vaccinated. The derivation is straightforward: the first equation gives ; with we get . The second equation then holds automatically. Normalization of forces .
Following the next-generation method, we isolate the infected compartments. Let
. System (
9) becomes
where
Let
f and
v be the Jacobians of
and
with respect to
Y, evaluated at
:
The next-generation matrix is
Hence
, the spectral radius of
, equals
Standard results from epidemic theory tell us that the stability of is governed by . When , the malware-free equilibrium is locally asymptotically stable. In practical terms, a small outbreak will not spread and eventually disappears. When , loses stability and the malware can invade the population. The case marks a transcritical bifurcation where the two equilibria exchange stability.
For
, there exists a nontrivial endemic equilibrium
with
. Solving the steady-state equations yields the following relations:
Substituting these into gives an equation for . The explicit form is omitted as our focus is numerical rather than analytical.
3. Physics-Informed Neural Network Fused with LSTM Model
In this section, a hybrid physics-informed neural network integrated with long short-term memory (PINN + LSTM) is proposed to solve the numerical solution of the malware propagation system (
9) accurately. The traditional fully connected PINN treats time as a static input feature and lacks the ability to capture long-term temporal dependencies in dynamic systems, which easily leads to accumulated errors and non-physical drift in long-time predictions. To address this limitation, the LSTM module is embedded into the PINN framework to enhance the model’s capability of memorizing historical dynamic information and modeling sequential evolution patterns, thereby improving the stability and accuracy of the numerical solution for the malware propagation system.
The PINN + LSTM model inherits the core advantage of PINNs by encoding physical laws into the training process via a physics-informed loss function. Meanwhile, it leverages the LSTM’s recursive memory mechanism to capture the temporal correlation of the dynamic system. The overall architecture of the model consists of four key components: an input layer, a time embedding layer, a stacked LSTM encoder, and a fully connected decoder. The detailed structure and mathematical formulation are presented as follows.
3.1. Network Architecture and Forward Propagation
The input of the PINN + LSTM model is the scalar time variable
(where
is the initial time and
is the terminal time), and the output is the predicted value of the 7-dimensional state vector
, which corresponds exactly to the solution of the malware propagation system given in Equation (
9).
The time input
t is first mapped to a high-dimensional feature space through the embedding layer to enhance the expressive ability of temporal features. The mathematical formulation of the embedding layer is
where
is the embedded time feature vector,
and
are trainable parameters, and
is the hyperbolic tangent activation function.
To capture the dynamic evolutionary characteristics of the malware propagation system, an LSTM encoder is introduced to memorize the historical states of during temporal propagation. Based on the embedded feature , the LSTM updates its internal states through four gate mechanisms, which are mathematically defined as follows:
Forget Gate (): Controls the retention of historical dynamic information related to the malware propagation states.
where
is the sigmoid activation function that constrains gate values between 0 and 1,
is the weight matrix of the LSTM gates,
is the hidden state at the previous time step, initialized as
, and
is the bias vector of the LSTM gates.
Input Gate (): Regulates the update of new temporal information for the epidemic states.
where
is the weight matrix of the LSTM gates, and
is the bias vector of the LSTM gates.
Cell State Update: Integrates historical memory and new features to maintain continuous evolution of the malware propagation trend.
where ⊙ is the element-wise (Hadamard) product,
is the cell state that maintains long-term memory of state variables
,
is the weight matrix of the LSTM gates,
is the bias vector of the LSTM gates, and
is the cell states at the previous time step, initialized as
.
Output Gate and Hidden State: Outputs temporal features that reflect the evolutionary trend of the malware propagation system.
where
is the hidden state that records the evolutionary features of the malware propagation system,
is the weight matrix of the LSTM gates, and
is the bias vector of the LSTM gates.
The decoder is a fully connected PINN-style network that maps the LSTM hidden state
to the physical state variables of the malware propagation system. It outputs the predicted solution
that satisfies the dynamic constraints of System (
9):
where
are the hidden layer features of the decoder,
are the weight matrices, and
are the bias vectors.
By combining LSTM-based temporal memory and PINN-based physical constraints, the PINN + LSTM model accurately learns the dynamic evolution of while strictly satisfying the malware propagation ODE system.
3.2. Training Objective and Loss Function
The training of the PINN + LSTM model is guided by a physics-informed loss function, which enforces the model output to satisfy both the initial conditions of the malware propagation system and the dynamic constraints described by the ODEs. The total loss function
consists of two components: the initial condition loss
to ensure consistency with the initial state and the physics-informed residual loss
to enforce compliance with the ODE system, which is formulated as
where
is the weight coefficient of the residual loss, used to balance the importance of the initial condition and physical constraints.
The initial condition loss measures the squared error between the model’s predicted output at the initial time
and the given initial state values of the malware propagation system. The mathematical formulation is
where
are the given initial values of the seven state variables, which are consistent with the initial conditions of System (
9), and
are the predicted values of the PINN + LSTM model at
.
The residual loss is the core of the PINN framework, which forces the model output to satisfy the ODE constraints of the malware propagation system. For a set of collocation points
(randomly sampled within the time interval
,
l is the number of collocation points), the residual of each state variable is defined as the difference between the temporal derivative of the model’s predicted value and the corresponding right-hand side of the ODE in System (
9).
To obtain the temporal derivatives needed for residual evaluation, we apply automatic differentiation. This approach enables accurate and efficient computation of output derivatives with respect to the input time t without manual symbolic derivation.
Although the LSTM layer updates its hidden state recursively from the preceding state , the full network is regarded as a continuous mapping from the scalar input t to the estimated state vector . The internal recurrence of the LSTM defines the structure of the approximator rather than a discrete dynamic update, so the network remains differentiable with respect to t.
The derivatives are computed through the chain rule in network backpropagation. The total derivative of the output state
with respect to time is expressed as
where each term is evaluated analytically during backpropagation. The term
naturally captures the recursive update rule
within the LSTM cell. The resulting derivative represents the exact continuous-time gradient of the predicted trajectory, which is mathematically consistent with the derivative required by the ODE residual. This construction is supported by existing research on physics-informed recurrent networks, whose convergence can be guaranteed under mild regularity conditions on the dynamical system.
Based on the automatic differentiation results, the residual functions for each state variable are defined as follows:
The residual loss is the average of the squared residuals over all collocation points, which quantifies the degree to which the model output violates the ODE constraints:
3.3. Model Training Process
The trainable parameters of the PINN + LSTM model include all weight matrices and bias vectors of the embedding layer, LSTM encoder, and decoder:
The training process aims to minimize the total loss function with respect to , which is implemented using the Adam optimizer to adjust the parameters iteratively. The learning rate is dynamically adjusted using a learning rate scheduler, which reduces the learning rate by a factor of 0.5 when the loss does not decrease for 500 consecutive epochs, to improve convergence stability.
The training steps are summarized as follows:
Step 1: Initialize all trainable parameters using the Xavier normal initialization method to avoid vanishing/exploding gradients at the start of training;
Step 2: Randomly sample l collocation points within the time interval ;
Step 3: For each epoch, compute the model output for the collocation points and initial time via forward propagation;
Step 4: Compute the initial condition loss and the residual loss (using automatic differentiation to compute temporal derivatives);
Step 5: Compute the total loss and backpropagate the gradient to update the parameters using the Adam optimizer;
Step 6: Repeat steps 2–5 until the loss converges to a stable value or the maximum number of epochs (10,000 epochs in this study) is reached.
Compared with a traditional fully connected PINN, the PINN + LSTM model benefits from the LSTM module in two key aspects: it captures temporal dependencies and remembers historical dynamic information, while achieving more stable long-term prediction with less accumulated error and non-physical drift.
4. Numerical Simulations and Performance Analysis
In this section, a series of numerical simulations is carried out to verify the effectiveness of the proposed PINN + LSTM model for solving the malware propagation dynamic system in a wireless sensor network. All simulations are implemented in Python 3.7. The traditional fully connected PINN [
23], the Fourier feature-based PINN, and the proposed PINN + LSTM are comprehensively compared, where the fourth-order Runge–Kutta (RK4) method is used as a high-precision reference solution. The comparison covers training convergence, state variable prediction, multi-dimensional error metrics, long-term stability, and error distribution. All experiments are implemented in PyTorch (1.13.1+cpu) with the same initial conditions, network parameters, and training settings for fairness.
The simulation interval is set to
, with 1500 uniform sampling points for testing and 500 collocation points for training. The parameters of the epidemic dynamics system are given as
The initial states of the seven compartments are
Both networks are trained for 10,000 epochs using the Adam optimizer with an initial learning rate of . The PINN uses four hidden layers with 128 neurons per layer. The PINN + LSTM uses an embedding layer, two LSTM layers with 128 hidden units, and a two-layer fully connected decoder. To ensure reproducibility, the penalty coefficient is set to and the random seed is fixed at 42.
4.1. Training Dynamics and Convergence
Figure 2 shows the training loss curves of the traditional fully connected PINN, the Fourier feature-based PINN, and the proposed PINN + LSTM, including total loss, ODE residual loss, initial condition loss, and learning rate decay.
A comparative analysis of the training logs reveals distinct performance characteristics among the traditional PINN, the PINN + LSTM model, and the Fourier feature-based PINN for solving differential equations. In terms of convergence speed, the traditional PINN’s total loss fell from an initial 5.18 to a final value of , a reduction of approximately six orders of magnitude. The Fourier PINN’s total loss decreased from 3.94 to , achieving a five-order-of-magnitude reduction. By contrast, the PINN + LSTM model saw its total loss drop from 5.45 to , a reduction of over seven orders of magnitude. This suggests that integrating the LSTM structure notably improves both convergence rate and final approximation accuracy. The PINN + LSTM’s final ODE loss reached , nearly three orders of magnitude lower than that of the traditional PINN and the Fourier PINN.
The PINN + LSTM exhibited a notable loss rebound at epoch 3000, with total loss jumping from to , signifying temporary instability during training. This phenomenon is attributed to the structural oscillation during optimization, which is a normal behavior when the model balances learning long-term temporal dynamics and satisfying physical constraints, rather than a sign of training failure. Regarding the satisfaction of initial conditions, the traditional PINN achieved an extremely precise IC loss of , followed by the Fourier PINN with , while the PINN + LSTM recorded an IC loss of . In summary, the traditional PINN offers a highly stable training process with excellent adherence to initial conditions. The Fourier PINN delivers moderate performance in both convergence accuracy and stability. In contrast, the PINN + LSTM achieves superior solution accuracy and ODE residual minimization, albeit at the cost of minor training instability, making it better suited for complex dynamical problems where high precision is the top priority.
4.2. State Variable Prediction
Figure 3,
Figure 4,
Figure 5,
Figure 6,
Figure 7,
Figure 8 and
Figure 9 illustrate the predicted trajectories of all seven state variables. Both models can roughly capture the evolutionary trend. However, PINN + LSTM achieves significantly higher precision, especially for the key compartments
E,
H, and
L, which dominate the epidemic transmission.
Examining each state variable individually, all three methods generally follow the overall evolutionary trend given by the RK4 benchmark. For the Vaccinated (V) compartment, PINN + LSTM achieves exceptional accuracy, while Fourier PINN performs noticeably worse than both PINN and PINN + LSTM. For Susceptible (S) individuals, PINN shows clear deviations in both the declining rate and long-term steady state, while PINN + LSTM maintains tight alignment with the reference solution. In the Exposed (E) compartment, PINN + LSTM closely reproduces the amplitude and timing of the epidemic curve. For High-Risk Infectious (H) and Low-Risk Infectious (L) compartments, PINN + LSTM achieves outstanding consistency with RK4, while both PINN and Fourier PINN display mild to moderate mismatches. In the Quarantined (Q) compartment, Fourier PINN performs significantly worse than PINN and PINN + LSTM, with clear deviations and unstable oscillations, while PINN drifts gradually and PINN + LSTM remains nearly identical to RK4. The Recovered (R) compartment further confirms the superior performance of PINN + LSTM. Overall, although Fourier PINN improves upon the vanilla PINN in some compartments, it performs notably worse in the Vaccinated (V) and Quarantined (Q) states, and PINN + LSTM remains the most accurate and stable method across all variables. This superior performance arises from LSTM’s inherent temporal memory and sequential gating mechanism, which effectively capture time-varying dynamics while complying with physical ODE constraints.
4.3. Error Analysis and Comparison
Figure 10 and
Table 1 present the Relative Error (RE), Absolute Error (AE), and
error for each state variable.
Based on the quantitative results, the PINN + LSTM model significantly outperforms both the standard PINN and Fourier PINN across all error metrics. The average relative error is reduced from for PINN to for PINN + LSTM, corresponding to a remarkable improvement of 94.61%. Similarly, the average absolute error and average L2 error are reduced by approximately 97.19% compared with the traditional PINN. Meanwhile, Fourier PINN fails to provide competitive accuracy and performs noticeably worse, particularly in the Vaccinated (V) and Quarantined (Q) compartments.
Examining each state variable individually, PINN + LSTM achieves exceptional precision in slowly varying compartments such as S and V, with relative errors of only and , representing accuracy improvements exceeding 98% over PINN. For infection-dominated states, including H, L, Q, and R, the relative error reductions all exceed 93%, and the relative errors are uniformly controlled within the order of . Even in the most dynamical Exposed (E) compartment, the relative error is reduced to .
In sharp contrast, the standard PINN shows relatively large deviations, with a relative error as high as for Low-Risk Infectious (L), and an absolute error for Susceptible (S) nearly 123 times larger than that of PINN + LSTM. Fourier PINN performs even worse, especially in V and Q, with relative errors reaching and , respectively. These results confirm the clear limitations of purely fully connected PINN and Fourier PINN in capturing sharp transitions and long-term evolutionary dynamics.
Overall, the superior performance of PINN + LSTM validates that introducing temporal memory via the LSTM structure effectively captures the time-dependent characteristics of epidemic transmission and peak dynamics, yielding overwhelming advantages in prediction accuracy, stability, and long-term simulation consistency.
To further validate the robustness of the proposed model in a realistic scenario, we conducted additional experiments by adding Gaussian noise to the observed training data points at three representative levels: 1%, 5%, and 10%. The average relative errors of the PINN + LSTM, standard PINN, and Fourier PINN under different noise intensities are compared, and the results are illustrated in the following figure (
Figure 11).
The robustness of the proposed model is validated under three levels of Gaussian noise: 1%, 5%, and 10%. At 1% noise, PINN + LSTM achieves an average relative error of 0.0049, which is far lower than 0.0707 for PINN and 0.2782 for Fourier PINN. When the noise level increases to 5%, the errors of PINN and Fourier PINN rise sharply to 0.1225 and 0.4532, respectively, while PINN + LSTM maintains an extremely low error of 0.0011. Even under strong 10% noise, PINN + LSTM still exhibits superior performance with an error of 0.0017, whereas PINN and Fourier PINN yield much higher errors of 0.0384 and 0.4431. These results confirm that PINN + LSTM possesses stronger noise immunity and more stable dynamic learning ability than both PINN and Fourier PINN in realistic noisy environments.
5. Conclusions
In this paper, we have proposed a novel hybrid framework combining physics-informed neural networks (PINNs) with long short-term memory (LSTM) to model malware propagation dynamics in wireless sensor networks. A seven-compartment SVEHLQR epidemiological model was developed to capture the complex physical interactions among nodes, classifying them into Susceptible (S), Vaccinated (V), Exposed (E), High-Risk Infectious (H), Low-Risk Infectious (L), Quarantined (Q), and Recovered (R) categories. This study’s key contribution lies in integrating LSTM’s temporal memory capability into the PINN architecture, enabling the model to effectively learn time-dependent propagation characteristics.
Using the fourth-order Runge–Kutta (RK4) method as the benchmark, we conducted extensive numerical comparisons among the proposed PINN + LSTM, standard PINN, and Fourier PINN. Experimental results demonstrate that the PINN + LSTM model significantly outperforms both baseline methods across all seven compartments. The average relative error achieved by PINN + LSTM is , compared to for PINN and for Fourier PINN, representing a remarkable 94.6% improvement in accuracy over the conventional PINN and an even greater advantage over the Fourier-enhanced version. Particularly noteworthy is its performance on the Vaccinated (V) compartment, where PINN + LSTM attains near-perfect agreement with the RK4 benchmark, with a relative error as low as . Even on the most challenging compartment, Low-Risk Infectious (L), which exhibited a relative error of for standard PINN and far higher values for Fourier PINN, the proposed method reduces the error to , demonstrating its robustness in capturing complex dynamic behaviors.
It is necessary to clarify why a deep learning solver (PINN + LSTM) is adopted here, even though the 7-dimensional SVEHLQR ODE is low-dimensional, and grid-based methods like RK4 are theoretically feasible. We use RK4 not because it is inadequate for this specific low-dimensional scenario, but as a high-precision benchmark to validate the PINN + LSTM framework. While RK4 performs well in low-dimensional problems, it becomes computationally prohibitive in high-dimensional real-world WSN scenarios (e.g., more compartments, spatial–temporal propagation) due to the curse of dimensionality. Validating PINN + LSTM against RK4 in a low-dimensional setting ensures its reliability, laying the groundwork for its application in complex, high-dimensional scenarios where RK4 is no longer sufficient.
Despite its superior accuracy, the proposed PINN + LSTM framework has certain limitations. The training process is computationally more expensive than standard PINN and Fourier PINN due to the additional LSTM layers, which may hinder its deployment in highly resource-constrained scenarios. Moreover, while the model excels at learning from RK4-generated reference data, its performance on real-world noisy measurements still requires thorough validation. The current study focuses on a fixed parameter configuration, and its generalization ability across different network sizes, topologies, and malware types remains to be fully explored.
Future work will explore several promising directions. First, we plan to validate the model on real-world malware propagation datasets to evaluate its practical reliability. Second, we aim to integrate attention mechanisms or transformer-style structures to further strengthen its long-range temporal dependency modeling. Third, extending the framework to support adaptive and online learning would facilitate real-time threat monitoring and response. Fourth, while the proposed SVEHLQR model represents a meaningful advance for WSN malware modeling by explicitly distinguishing high-risk and low-risk infections, recent research trends from 2025 to 2026 highlight a growing emphasis on spatial–temporal dynamics, especially in the Internet of Underwater Things (IoUT), as well as topology-aware propagation models suitable for the Internet of Vehicles (IoV); thus, we will expand the model to capture these spatial–temporal and topology-aware dynamics to improve its relevance to emerging systems such as IoUT and IoV. Finally, combining the proposed data-driven physics-informed approach with optimal control strategies could lead to a unified framework for both accurate prediction and effective mitigation of malware spread in wireless sensor networks.