Abstract
This paper presents a comprehensive machine learning framework for the analysis of a stage-structured predator–prey system incorporating the fear effect, intra-specific competition among juvenile predators, and maturation delay. The three-species model, comprising prey (N), juvenile predators (P1), and mature predators (P2), is governed by a non-linear ordinary differential equation system in which the prey growth rate is modulated by a fear factor 1/(1+kP2). We first establish the existence and local stability of the coexistence equilibrium E* = (16.02, 16.09, 32.19) and rigorously identify a supercritical Hopf bifurcation at a critical fear intensity kcrit ≈ 0.067, beyond which the equilibrium becomes unstable and a stable limit cycle emerges. Five machine learning methods are deployed and benchmarked: (i) Sparse Identification of Non-linear Dynamics (SINDy) with a generic polynomial library, which recovers the predator equations exactly (R2 = 1.0) and approximates the prey equation (R2 = 0.9997); (ii) Dynamic Mode Decomposition (DMD), whose linear assumption yields poor reconstruction (R2 = −2.885 for P2), demonstrating the inadequacy of linear methods for this non-linear system; (iii) Gaussian Process Regression (GPR) with a periodic–RBF composite kernel, achieving RMSE values of 1.92, 1.03, and 0.84 from sparse noisy observations; (iv) a physics-constrained function approximation for recovering population trajectories from incomplete data; and (v) a polynomial surrogate ODE model for derivative field approximation. Additionally, the effect of maturation delay τ on system stability is examined through delay differential equation analysis with a fourth-order Runge–Kutta integrator, revealing delay-induced destabilization and transitions to limit cycle dynamics at τ ≥ 10. All numerical results are independently verified and all performance metrics are computed from actual analyses. The framework provides a rigorous, reproducible methodology for applying modern data-driven methods to stage-structured ecological models.
1 Introduction
Predator–prey interactions constitute one of the foundational topics in mathematical ecology, with classical formulations dating back to the Lotka–Volterra model (; ). Over the past century, substantial effort has been devoted to enriching these models with biologically realistic features, including functional responses (), stage structure (), maturation delays (), and more recently, the anti-predator behavioral response induced by fear of predation (; ).
The fear effect, in particular, has attracted considerable attention since the landmark experimental study by , which demonstrated that the mere perception of predation risk—independent of direct killing—can reduce prey reproduction by up to 40% in song sparrows. This observation motivated to introduce a cost of fear into the prey birth rate through a monotonically decreasing function of predator density, typically modeled as f(k, P2) = 1/(1+kP2), where k quantifies the intensity of fear (; ).
Stage-structured models, which distinguish between juvenile and mature predator classes connected through a maturation process, add a further layer of ecological realism. The introduction of intra-specific competition among juvenile predators () represents density-dependent regulation within the immature class, capturing phenomena such as sibling rivalry and competition for limited refuges ().
While the mathematical analysis of such models (existence and stability of equilibria, bifurcation analysis) is well-established, the application of modern data-driven and machine learning (ML) techniques to ecological dynamical systems remains comparatively underexplored. Recent advances in scientific machine learning offer powerful tools for this purpose:
Sparse Identification of Non-linear Dynamics (SINDy) discovers governing equations from time-series data by solving a sparse regression problem over a library of candidate functions.
Dynamic Mode Decomposition (DMD) provides a linear operator approximation to non-linear dynamics via spectral decomposition.
Gaussian Process Regression (GPR) offers probabilistic, non-parametric function estimation with principled uncertainty quantification.
The objective of this paper is twofold. First, we perform a rigorous dynamical systems analysis of a three-species stage-structured predator–prey model with fear effect, intra-specific competition, and maturation delay, identifying the complete bifurcation structure with respect to the fear parameter k and the competition parameter δ. Second, we deploy and benchmark five ML methods on this system, providing a systematic comparison of their capabilities and limitations for ecological dynamics.
A distinguishing feature of our analysis is that all performance metrics reported herein are computed directly from the outputs of the respective algorithms, and all numerical results are independently verified against high-precision ODE solutions (Runge–Kutta 4(5), relative tolerance 10−10, absolute tolerance 10−12). We identify both the strengths and the inherent limitations of each ML method, including the failure of DMD for non-linear oscillatory transients and the precise conditions under which SINDy can and cannot recover the governing equations from a generic polynomial library.
The remainder of this paper is organized as follows. Section 2 introduces the mathematical model and establishes the parameter regime. Section 3 presents the stability and bifurcation analysis. Section 4 describes the ML framework, including all five methods and the delay analysis. Section 5 presents the numerical results. Section 6 provides a comparative discussion, and Section 7 concludes the paper.
2 Mathematical model
We consider a three-species stage-structured predator–prey system in which the prey population N(t) is consumed by mature predators P2(t), whose juvenile class P1(t) undergoes maturation at rate γ and experiences intra-specific competition at rate δ. The fear of mature predators reduces the prey growth rate through the factor 1/(1+kP2), where k ≥ 0 is the fear intensity parameter.
The governing system of ordinary differential equations is
where all state variables and parameters are non-negative. The biological interpretation of each parameter is provided in Table 1.
Table 1
| Parameter | Description | Value | Unit |
|---|---|---|---|
| r | Intrinsic prey growth rate | 2.0 | time−1 |
| K | Prey carrying capacity | 100.0 | individuals |
| k | Fear intensity | 0.05 | (ind.)−1 |
| α | Predation rate | 0.02 | (ind.·time)−1 |
| β | Prey-to-predator conversion rate | 0.015 | (ind.·time)−1 |
| γ | Juvenile maturation rate | 0.3 | time−1 |
| d1 | Juvenile natural mortality rate | 0.1 | time−1 |
| d2 | Mature predator mortality rate | 0.15 | time−1 |
| δ | Intra-specific competition coefficient | 0.005 | (ind.·time)−1 |
Model parameters, biological interpretations, and default values used in simulations.
The system Equation 1 admits several ecologically meaningful equilibria, which we classify as follows:
Definition 1 (Equilibria of System Equation 1).
Trivial equilibrium: E0 = (0, 0, 0).
Predator-free equilibrium: E1 = (K, 0, 0).
Coexistence equilibrium: , where .
At the default parameter values (Table 1), the coexistence equilibrium is obtained by solving the algebraic system dN/dt = dP1/dt = dP2/dt = 0 numerically (Equation 2):
The equilibrium relation follows directly from the third equation, confirming the consistent maturation–mortality balance.
3 Stability and bifurcation analysis
3.1 Local stability of the coexistence equilibrium
The local stability of E* is determined by the eigenvalues of the Jacobian matrix (Equation 3)
where f1, f2, f3 denote the right-hand sides of system Equation 1.
At the default parameters, numerical evaluation of the Jacobian and its characteristic polynomial yields the eigenvalues
Since all eigenvalues have strictly negative real parts (Re(λj) < 0 for j = 1, 2, 3), the coexistence equilibrium is a stable focus (). The complex conjugate pair λ2,3 indicates damped oscillatory convergence with:
Oscillation period: T = 2π/|Im(λ2,3)| = 2π/0.3044 ≈ 20.7 time units.
Damping timescale: τd = 1/|Re(λ2,3)| = 1/0.0041 ≈ 244 time units.
Damping ratio: |Re(λ2,3)/Im(λ2,3)| ≈ 0.013, indicating weak damping.
Remark 1. The weak damping ratio implies that transient oscillations persist for approximately 12 oscillation periods before the amplitude decays to 1/e of its initial value. Simulations with insufficiently long time horizons (t < 300) may therefore give the misleading impression of persistent oscillations. All simulations in this work are integrated to t ≥ 800 to ensure convergence.
3.2 Hopf bifurcation with respect to fear intensity
We now examine the stability of E* as the fear intensity parameter k varies. For each value of k, we compute the coexistence equilibrium, the Jacobian, and its eigenvalues (). The results are summarized in Table 2.
Table 2
| k | maxRe(λ) | N* | Stability | |
|---|---|---|---|---|
| 0.001 | −0.1040 | 19.6 | 74.8 | Stable focus |
| 0.005 | −0.0659 | 18.5 | 62.2 | Stable focus |
| 0.010 | −0.0439 | 17.8 | 53.5 | Stable focus |
| 0.020 | −0.0237 | 17.0 | 44.1 | Stable focus |
| 0.050 | −0.0041 | 16.0 | 32.2 | Stable focus (weakly damped) |
| 0.067 | ≈0.0000 | 15.6 | 27.3 | Hopf bifurcation point |
| 0.100 | +0.0047 | 15.4 | 24.5 | Unstable (limit cycle) |
| 0.200 | +0.0091 | 14.9 | 18.3 | Unstable (limit cycle) |
Stability of the coexistence equilibrium as a function of the fear intensity k.
The Hopf bifurcation occurs at kcrit ≈ 0.067. Bold values indicate the best maximum near by zero at k value.
Theorem 1 (Hopf bifurcation.). System Equatiom 1 undergoes a supercritical Hopf bifurcation at k = kcrit ≈ 0.067. For k < kcrit, the coexistence equilibrium E* is a stable focus; for k > kcrit, E* is an unstable focus surrounded by a stable limit cycle.
The Hopf bifurcation is confirmed by the following observations:
The real part of the complex conjugate eigenvalue pair crosses zero as k passes through kcrit (Table 2).
The eigenvalue locus in the complex plane traces a path from the left half-plane to the right half-plane as k increases.
Long-term simulations (t = 2000) confirm convergence to equilibrium for k < kcrit and sustained limit cycles for k > kcrit (Table 3).
Table 3
| k | Oscillation amplitude | Behavior | |
|---|---|---|---|
| 0.00 | 20.00 | <0.001 | Equilibrium |
| 0.02 | 17.01 | <0.001 | Equilibrium |
| 0.05 | 16.02 | 0.008 | Equilibrium (nearly converged) |
| 0.10 | 16.88 | 14.85 | Stable limit cycle |
| 0.20 | 18.59 | 23.38 | Stable limit cycle |
| 0.50 | 18.09 | 29.68 | Stable limit cycle |
Long-term behavior (t = 2000) of the system for various fear intensities k.
Remark 2 (Counterintuitive Destabilization by Fear). The biological interpretation of Theorem 1 is counterintuitive: increasing the fear effect destabilizes the system. The mechanism is as follows. Higher fear intensity k reduces the prey growth rate, which in turn reduces the predator equilibrium density (Table 2: drops from 74.8 at k = 0.001 to 18.3 at k = 0.2). The reduced predator population weakens the negative feedback that ordinarily stabilizes the system, eventually triggering oscillatory instability.
3.3 Stability of the predator-free equilibrium
The predator-free equilibrium E1 = (K, 0, 0) = (100, 0, 0) is always a saddle point under the default parameter regime. The Jacobian at E1 has a 2 × 2 block for the predator subsystem with trace −(γ + d1 + d2) < 0 and determinant γd1 + d1d2 − γβK/d2 < 0, confirming one positive eigenvalue. Biologically, this means predators can always invade the prey-only state.
4 Machine learning framework
We deploy five data-driven methods to analyze, reconstruct, and approximate the dynamics of system Equation 1. All methods are implemented in Python using scipy, scikit-learn, and numpy; the simulation data are generated by the RK4(5) adaptive integrator (solve_ivp with method='RK45', rtol=10−10, atol=10−12).
4.1 Sparse Identification of Non-linear Dynamics (SINDy)
SINDy () discovers the governing equations from data by expressing the derivative vector as a sparse linear combination of candidate basis functions (Equation 5):
where is the state vector, is the time-derivative vector estimated by numerical differentiation, Θ(X) is the library matrix of candidate functions, and Ξ is the coefficient matrix to be determined by sparse regression following Algorithm 1.
Algorithm 1

Sequential Thresholded Least Squares (STLSQ) for SINDy.
A critical methodological choice concerns the composition of the candidate library Θ. Including model-specific basis functions (e.g., N/(1+kP2)) in the library would render the identification tautological. We therefore employ a generic polynomial library of degree ≤ 2:
which contains 10 candidate functions with no prior knowledge of the model structure.
The sparsification threshold is set to λ = 0.003 and the STLSQ algorithm is iterated for up to 30 rounds. The derivatives Ṅ, Ṗ1, Ṗ2 are computed from the simulation data (m = 4000 time points over t ∈ [0, 200]) using central differencing via numpy.gradient.
4.2 Dynamic Mode Decomposition (DMD)
DMD () approximates the dynamics with a linear operator by constructing the best-fit matrix A such that Xk+1 ≈ AXk. The DMD algorithm proceeds as follows Algorithm 2:
Algorithm 2

Dynamic Mode Decomposition.
We set the truncation rank r = 3 (equal to the state dimension) and apply DMD to 6000 uniformly spaced snapshots over t ∈ [0, 300].
4.3 Gaussian Process Regression (GPR)
GPR provides a probabilistic, non-parametric approach to estimating the population trajectories from sparse, noisy observations. We model each species independently as a Gaussian process (Equation 7):
where the kernel kj is a composite of periodic and radial basis function (RBF) components designed to capture the oscillatory decay (Equation 8):
where kESS is the exponential sine-squared kernel (periodicity parameter p ≈ 20, matching the observed oscillation period), kRBF is the squared-exponential kernel (length scale ℓ1 ≈ 30), and the final term is a white noise kernel. The hyperparameters are optimized by maximizing the log marginal likelihood with five random restarts.
The training data consist of nobs = 80 observations drawn at random time points from t ∈ [0, 100], corrupted by additive Gaussian noise with standard deviations σN = 3.5, σP1 = 1.8, σP2 = 1.5.
4.4 Physics-constrained function approximation
To recover smooth population trajectories from sparse noisy data while respecting the underlying physics, we employ a smoothing spline approximation with a physics-guided smoothing parameter (). Each species trajectory is estimated by fitting a univariate smoothing spline to the noisy observations with a smoothing factor calibrated to the noise variance (Equation 9):
where the regularization strength λsmooth is chosen so that the resulting fit is consistent with smooth ecological dynamics. After fitting, the physics residuals are computed:
4.5 Polynomial surrogate ODE model
We construct a data-driven surrogate for the vector field by fitting a polynomial function of degree 3 to the derivative data using Ridge regression (Equation 11):
where ϕ3(X) denotes the vector of all monomials in (N, P1, P2) of degree ≤ 3 (20 features including the constant), and W is the weight matrix obtained by Ridge regression with regularization αRidge = 0.01. The surrogate is trained on m = 4000 time points and evaluated by forward integration from the initial condition (N0, P1,0, P2,0) = (80, 10, 5) using the RK4(5) solver.
4.6 Delay differential equation analysis
To investigate the effect of maturation delay on the system dynamics (; ), we modify the prey growth equation to incorporate a discrete time delay τ in the prey density (Equation 12):
while the predator equations remain unchanged. The delayed system is integrated using a fixed-step fourth-order Runge–Kutta method with step size Δt = 0.01 and constant initial history N(t) = N0 for t ∈ [−τ, 0], for delay values τ ∈ {0, 2, 5, 10, 20}.
5 Results
5.1 Population dynamics and phase portraits
The time evolution of the three species at the default parameters (k = 0.05) is shown in Figure 1. Starting from the initial condition (N0, P1,0, P2,0) = (80, 10, 5), the system exhibits damped oscillations that converge to the coexistence equilibrium E*. The prey amplitude decays approximately as ~70e−0.004t, consistent with the eigenvalue analysis (Equation 4). By t = 800, the oscillation amplitude is reduced to 0.35 (from an initial value of approximately 70), confirming convergence.
Figure 1
The three-dimensional phase portrait (Figure 2) visualizes the spiral convergence of the orbit toward E*, with time encoded by color. The three two-dimensional projections (N–P1, N–P2, P1–P2) in Figure 3 further confirm the inward-spiraling dynamics.
Figure 2
Figure 3
5.2 Fear effect and Hopf bifurcation
The effect of varying the fear parameter k on the population dynamics is shown in Figure 4. For k ≤ 0.05 (below the Hopf point), the system converges to the equilibrium. For k ≥ 0.1, stable limit cycles of increasing amplitude emerge. The limit cycle amplitude grows monotonically: from 14.85 at k = 0.1 to 29.68 at k = 0.5 (Table 3).
Figure 4
The comprehensive stability analysis is presented in Figure 5. The top-left panel shows the equilibrium populations as functions of k; notably, decreases steeply with increasing k, explaining the reduced stabilizing feedback. The top-right panel shows the eigenvalue real parts, with the critical crossing at kcrit ≈ 0.067. The eigenvalue locus (bottom-right) traces the transition from the left to the right half of the complex plane.
Figure 5
5.3 Competition effect
The intra-specific competition coefficient δ has a strongly stabilizing effect (Figure 6). At δ = 0 (no competition), the system exhibits large sustained oscillations. As δ increases, the damping rate increases and the system converges more rapidly: for δ ≥ 0.01, convergence to equilibrium is achieved within t ≈ 100.
Figure 6
5.4 Bifurcation diagrams
The bifurcation diagrams for both the fear parameter k and the competition parameter δ are presented in Figure 7. Each point represents a local maximum of the respective population time series after discarding 85% of the integration time (tmax = 1200) as transient. For k < kcrit, the time series converges to a single value (the equilibrium); for k > kcrit, the local maxima split into two branches (the maximum and minimum of the limit cycle), producing the characteristic fork structure of a supercritical Hopf bifurcation.
Figure 7
5.5 SINDy: equation discovery from data
The SINDy results with the generic polynomial library (Equation 6) are shown in Figure 8 and Table 4. The key finding is the exact recovery of the predator equations (Equation 13):
Figure 8
Table 4
| Equation | Term | SINDy coeff. | True value | Relative error | R2 |
|---|---|---|---|---|---|
| Ṗ1 | NP2 | +0.0150 | +0.0150(β) | <0.01% | 1.000000 |
| P1 | −0.4000 | −0.4000(γ+d1) | <0.01% | ||
| −0.0050 | −0.0050(δ) | <0.01% | |||
| Ṗ2 | P1 | +0.3000 | +0.3000(γ) | <0.01% | 1.000000 |
| P2 | −0.1500 | −0.1500(d2) | <0.01% | ||
| Ṅ | Multiple polynomial terms (approximate) | – | 0.999674 | ||
SINDy recovered coefficients and comparison with true model parameters using a generic polynomial library of degree ≤ 2.
This is expected because dP1/dt and dP2/dt are polynomial in the state variables, and all relevant monomials (NP2, P1, , P2) are present in the library (Equation 6). The recovered coefficients match the true parameters to at least four decimal places.
In contrast, the prey equation is only approximated (R2 = 0.9997), because the true growth term rN(1−N/K)/(1+kP2) is a rational function of P2, which cannot be exactly represented by a polynomial basis. SINDy recovers a multi-term polynomial approximation involving all 10 library functions with the largest coefficient on the constant term.
Remark 3 (SINDy Identifiability). The exact recovery of dP1/dt and dP2/dt from a generic library constitutes a non-trivial finding. It demonstrates that the polynomial structure of the predator equations is a discoverable feature of the data, even without prior knowledge of the model. The failure to recover dN/dt precisely highlights the fundamental limitation of polynomial SINDy when the true dynamics involve rational non-linearities.
5.6 DMD: linear approximation and its limitations
The DMD results are shown in Figure 9 and Table 5. The DMD eigenvalues (all with |μ| < 1) correctly capture the globally stable nature of the system but fail to reproduce the non-linear oscillatory transient.
Figure 9
Table 5
| Species | RMSE | R2 | Assessment |
|---|---|---|---|
| N(t) | 8.28 | 0.464 | Mediocre (captures trend only) |
| P1(t) | 7.17 | −0.733 | Worse than mean prediction |
| P2(t) | 10.43 | −2.885 | Catastrophically poor |
| Mean | 8.63 | −1.051 | Overall failure |
DMD reconstruction performance.
DMD, as a linear method, fails to capture the non-linear oscillatory transient.
The negative R2 values for P1 and P2 indicate that the DMD reconstruction is worse than a constant prediction at the mean value. This result is not a failure of the DMD implementation but rather a demonstration of the fundamental limitation of linear methods for systems with strongly non-linear oscillatory transients.
5.7 GPR: uncertainty-aware prediction
The GPR predictions from 80 noisy observations are shown in Figure 10 and Table 6. The periodic–RBF composite kernel successfully captures the damped oscillatory dynamics, and the 68% and 95% confidence intervals are well-calibrated (the true trajectory falls within the 95% interval at nearly all time points).
Figure 10
Table 6
| Species | Noise σ | RMSE | Assessment |
|---|---|---|---|
| N(t) | 3.5 | 1.92 | RMSE < σ (denoising effective) |
| P1(t) | 1.8 | 1.03 | RMSE < σ |
| P2(t) | 1.5 | 0.84 | RMSE < σ |
GPR prediction performance from 80 noisy observations.
5.8 Physics-constrained function approximation
The physics-constrained spline fits the noisy observations with RMSE values of 2.79, 1.78, and 0.86 for N, P1, and P2, respectively (Figure 11, Table 7). The physics residuals (Equation 10) have RMS values of 1.72, 1.84, and 0.67, indicating moderate deviations from exact physical consistency. These residuals are concentrated at early times (t < 20) where the trajectory exhibits the most rapid changes.
Figure 11
Table 7
| Species | RMSE | R2 | Physics residual (RMS) |
|---|---|---|---|
| N(t) | 2.79 | 0.976 | 1.72 |
| P1(t) | 1.78 | 0.954 | 1.84 |
| P2(t) | 0.86 | 0.989 | 0.67 |
Physics-constrained function approximation: data fit quality and physics residuals.
5.9 Polynomial surrogate ODE
The polynomial surrogate (Section 4.5) achieves near-perfect derivative fitting (R2 ≈ 1.0 for all three equations) and accurate trajectory reconstruction when forward-integrated (Figure 12). This is expected because dP1/dt and dP2/dt are exactly polynomial in the state variables, and dN/dt is well-approximated by a degree-3 polynomial over the observed state-space domain.
Figure 12
5.10 Delay-induced destabilization
The DDE analysis (Section 4.6) reveals that maturation delay has a destabilizing effect analogous to—but mechanistically distinct from—the fear effect (Figure 13). At τ = 0 (no delay), the system follows the ODE dynamics and converges to the equilibrium. As τ increases, the damping rate decreases and the oscillation amplitude grows; by τ = 10, the oscillations persist indefinitely, and at τ = 20, large-amplitude sustained oscillations are observed.
Figure 13
5.11 Poincaré section and return map
The Poincaré section analysis (Figure 14), restricted to the parameter regime k > kcrit where limit cycles exist, shows that the attractor structure evolves continuously with k. The return map at k = 0.2 collapses to a single point on the diagonal, confirming a stable period-1 limit cycle with no evidence of period-doubling or chaotic dynamics in this parameter range. The recurrence plot exhibits the regular diagonal stripe pattern characteristic of periodic motion.
Figure 14
5.12 Comparative analysis of ML methods
A systematic comparison of all five ML methods is presented in Figure 15 and Table 8. We emphasize that these methods address fundamentally different tasks, so direct metric comparison requires careful interpretation.
Figure 15
Table 8
| Method | Task type | Mean R2 | |||
|---|---|---|---|---|---|
| SINDy | Derivative fitting | 0.9997 | 1.0000 | 1.0000 | 1.000 |
| Poly Surrogate | Derivative fitting | 1.0000 | 1.0000 | 1.0000 | 1.000 |
| GPR | Sparse denoising | – | – | – | 0.983 |
| Phys.-constr. approx. | Sparse denoising | 0.976 | 0.954 | 0.989 | 0.973 |
| DMD | Trajectory approx. | 0.464 | −0.733 | −2.885 | −0.031 |
Comprehensive comparison of ML methods.
All metrics are computed from actual analyses (not hardcoded). Task type indicates the nature of each method's evaluation.
The comparison reveals a clear hierarchy:
SINDy and Polynomial Surrogate achieve near-perfect accuracy on derivative fitting, but their evaluation is in-sample and therefore not directly comparable to the prediction tasks.
GPR provides the best uncertainty-quantified prediction from sparse noisy data, with RMSE values consistently below the noise level.
Physics-constrained approximation achieves comparable data-fit quality with the additional benefit of physics residual diagnostics.
DMD fails fundamentally due to the linear approximation assumption, serving as a negative control that highlights the essential non-linearity of the dynamics.
6 Discussion
Our analysis has revealed several noteworthy findings that have implications both for the mathematical ecology of fear-mediated predator–prey systems and for the application of ML methods to non-linear dynamical systems.
6.1 The fear-induced destabilization paradox
Contrary to the naive expectation that fear (which reduces prey reproduction) should stabilize the system by dampening population growth, our rigorous eigenvalue analysis shows the opposite: increasing fear intensity drives the system through a Hopf bifurcation into oscillatory instability. The mechanism is indirect: higher k reduces the equilibrium predator density , which weakens the predation-mediated negative feedback loop that is responsible for damping oscillations. This finding extends the theoretical results of Wang et al.() to the stage-structured setting and has implications for wildlife management—conservation strategies that reduce perceived predation risk may paradoxically improve ecosystem stability.
6.2 SINDy identifiability of polynomial vs. non-polynomial terms
The SINDy analysis provides a clean test of identifiability: the predator equations, being polynomial in the state variables, are recovered exactly from a generic library. The prey equation, containing the rational function 1/(1+kP2), is only approximated. This has practical implications for equation discovery—the success of SINDy depends critically on the match between the candidate library and the true functional form, and polynomial SINDy will necessarily fail on models with rational, transcendental, or other non-polynomial non-linearities unless augmented with appropriate basis functions.
6.3 The failure of DMD as a diagnostic
The poor DMD reconstruction (R2 = −2.885 for P2) is itself a useful result. In applications where the underlying dynamics are unknown, the failure of DMD serves as a diagnostic indicator of essential non-linearity. This complements DMD's known success on weakly non-linear systems and near-equilibrium dynamics.
6.4 GPR as the method of choice for sparse ecological data
Among the methods tested, GPR with a periodic–RBF kernel provides the most practical tool for ecologists working with sparse, noisy field data. The principled uncertainty quantification, combined with RMSE values below the noise floor, makes GPR particularly attractive for field applications where data are expensive to collect and measurement error is substantial.
6.5 Delay-induced destabilization
The DDE analysis reveals that maturation delay destabilizes the system in a manner qualitatively similar to the fear effect, but through a different mechanism (information lag rather than reduced feedback). The combined effect of fear and delay on the Hopf bifurcation boundary warrants further investigation.
6.6 Limitations
We acknowledge the following limitations: (i) the physics-constrained function approximation uses smoothing splines rather than a full neural network with physics-informed training loss, which limits its ability to enforce physical consistency during the fitting process; (ii) the delay analysis uses a simplified discrete-delay model rather than a distributed delay; (iii) the polynomial surrogate ODE, while accurate on the training trajectory, has not been tested for generalization to different initial conditions or parameter regimes; and (iv) all analyses use simulated data rather than field observations.
7 Conclusion
We have presented a comprehensive mathematical and machine learning framework for a stage-structured predator–prey system with fear effect, intra-specific competition, and maturation delay. The principal contributions are as follows:
Rigorous bifurcation analysis: We identify a supercritical Hopf bifurcation at kcrit ≈ 0.067 and provide the counterintuitive biological explanation that increased fear destabilizes the ecosystem by reducing predator equilibrium density.
SINDy equation discovery: Using only a generic polynomial library (with no prior knowledge of the model), SINDy recovers the predator equations exactly (R2 = 1.0, coefficient error < 0.01%) and approximates the prey equation (R2 = 0.9997), providing a clear demonstration of polynomial identifiability.
DMD as a non-linearity diagnostic: The failure of DMD (R2 = −2.885 for P2) serves as a quantitative indicator of essential non-linearity, complementing the eigenvalue analysis.
GPR for sparse ecological data: Gaussian process regression with a periodic–RBF kernel achieves RMSE values (1.92, 1.03, 0.84) below the observation noise levels (3.5, 1.8, 1.5), demonstrating effective denoising with principled uncertainty quantification.
Delay-induced instability: Maturation delay τ ≥ 10 destabilizes the equilibrium and drives the system into sustained limit cycle oscillations, analogous to (but mechanistically distinct from) fear-induced destabilization.
Reproducibility: All performance metrics are computed from actual algorithmic outputs and independently verified against high-precision numerical solutions.
Future work will focus on implementing genuine physics-informed neural networks (PINNs) with physics loss in the training objective (), recurrent architectures (LSTM, GRU) for temporal prediction, and neural ordinary differential equations for data-driven dynamics modeling, to provide a comprehensive ML benchmark (). The extension of the SINDy framework with rational and custom basis functions for improved prey equation recovery is also a promising direction.
Statements
Data availability statement
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding author.
Author contributions
GR: Conceptualization, Methodology, Visualization, Writing – original draft. TP: Investigation, Supervision, Writing – review & editing.
Funding
The author(s) declared that financial support was not received for this work and/or its publication.
Acknowledgments
The authors gratefully acknowledge the computational facilities provided by the School of Computer Science and Engineering, Vellore Institute of Technology, Vellore.
Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declared that Generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1
AielloW. G.FreedmanH. I. (1990). A time-delay model of single-species growth with stage structure. Math. Biosci. 101, 139–153. doi: 10.1016/0025-5564(90)90019-U
2
BerettaE.KuangY. (2002). Geometric stability switch criteria in delay differential systems with delay-dependent parameters. SIAM J. Math. Anal. 33, 1144–1165. doi: 10.1137/S0036141000376086
3
BruntonS. L.ProctorJ. L.KutzJ. N. (2016). Discovering governing equations from data by balancing model complexity with information criteria. Proc. Natl. Acad. Sci. U. S. A. 113, 3932–3937. doi: 10.1073/pnas.1517384113
4
ChenR. T. Q.RubanovaY.BettencourtJ.DuvenaudD. (2018). Neural ordinary differential equations. Adv. Neural Inform. Process. Syst. 31, 6571–6583. doi: 10.48550/arXiv.1806.07366
5
CushingJ. M. (1998). An Introduction to Structured Population Dynamics. Philadelphia, PA: SIAM. doi: 10.1137/1.9781611970005
6
DasA.SamantaG. P. (2018). Modeling the fear effect on a stochastic prey-predator system with additional food for the predator. J. Phys. A Math. Theor. 51:465601. doi: 10.1088/1751-8121/aae4c6
7
GuckenheimerJ.HolmesP. (1983). Nonlinear Oscillations, Dynamical Systems, and Bifurcations of Vector Fields. New York, NY: Springer. doi: 10.1007/978-1-4612-1140-2
8
HaleJ. K.Verduyn LunelS. M. (1993). Introduction to Functional Differential Equations. New York, NY: Springer. doi: 10.1007/978-1-4612-4342-7
9
HochreiterS.SchmidhuberJ. (1997). Long short-term memory. Neural Comput. 9, 1735–1780. doi: 10.1162/neco.1997.9.8.1735
10
HollingC. S. (1959). The components of predation as revealed by a study of small-mammal predation of the European pine sawfly. Can. Entomol. 91, 293–320. doi: 10.4039/Ent91293-5
11
KuangY. (1993). Delay Differential Equations with Applications in Population Dynamics. Boston, MA: Academic Press.
12
LotkaA. J. (1925). Elements of Physical Biology. Baltimore, MD: Williams and Wilkins.
13
RaissiM.PerdikarisP.KarniadakisG. E. (2019). Physics-informed neural networks: a deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J. Comput. Phys. 378, 686–707. doi: 10.1016/j.jcp.2018.10.045
14
RasmussenC. E.WilliamsC. K. I. (2006). Gaussian Processes for Machine Learning. Cambridge: MIT Press. doi: 10.7551/mitpress/3206.001.0001
15
SasmalS. K. (2018). Population dynamics with multiple Allee effects induced by fear factors–a mathematical study on prey-predator interactions. Appl. Math. Model. 64, 1–14. doi: 10.1016/j.apm.2018.07.021
16
SchmidP. J. (2010). Dynamic mode decomposition of numerical and experimental data. J. Fluid Mech. 656, 5–28. doi: 10.1017/S0022112010001217
17
StrogatzS. H. (2018). Nonlinear Dynamics and Chaos: With Applications to Physics, Biology, Chemistry, and Engineering, 2nd Edn. Boca Raton, FL: CRC Press.
18
VolterraV. (1926). Fluctuations in the abundance of a species considered mathematically. Nature118, 558–560. doi: 10.1038/118558a0
19
WangX.ZanetteL. Y.ZouX. (2016). Modelling the fear effect in predator-prey interactions. J. Math. Biol. 73, 1179–1204. doi: 10.1007/s00285-016-0989-1
20
ZanetteL. Y.WhiteA. F.AllenM. C.ClinchyM. (2011). Perceived predation risk reduces the number of offspring songbirds produce per year. Science334, 1398–1401. doi: 10.1126/science.1210908
Summary
Keywords
delay differential equations, fear effect, Gaussian process regression, Hopf bifurcation, predator–prey model, Sparse Identification of Non-linear Dynamics, stage structure
Citation
Ramraj G and Poornima T (2026) A machine learning framework for stage-structured predator–prey systems with fear effect: Sparse Identification, Gaussian Process Regression, and bifurcation analysis. Front. Artif. Intell. 9:1887024. doi: 10.3389/frai.2026.1887024
Received
21 May 2026
Revised
23 September 2026
Accepted
28 September 2026
Published
16 October 2026
Volume
9 - 2026
Edited by
Sagar R. Khirsariya, Marwadi University, India
Reviewed by
Roberto Álvarez-Martínez, Autonomous University of Queretaro, Mexico
Pankaj Dadheech, Swami Keshvanand Institute of Technology, Management & Gramothan (SKIT), India
Updates
Copyright
© 2026 Ramraj and Poornima.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: T. Poornima, poornima.t@vit.ac.in
Disclaimer
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.