Full text
PhiDelayNet: A Physics-Informed Neural Network for Time-Series with Variable Delays Bahman Masarrat Independent Researcher Email: [email protected] Abstract—This paper introduces PhiDelayNet, a physicsinformed neural network designed to forecast time series with nonlinear, variable delays. The core of the model is a dynamic delay operator, τ(x, t), inspired by 5D scalar field theory, whose components are validated through an ablation study. The model’s efficacy was demonstrated through a two-stage process. First, on a synthetic benchmark, it achieved a 37.5% reduction in Mean Squared Error over a standard LSTM. Second, when applied to a real-world hydrology dataset, the model’s interpretable operator successfully uncovered a non-obvious, physically meaningful insight: the system’s response delay is higher during complex wet seasons than during simple dry seasons. This validates the model’s ability to not only predict accurately but also to provide actionable insights for real-world applications like water resource management. The code for this project is publicly available on GitHub. Index Terms—physics-informed neural networks, time-series forecasting, variable delay, interpretable AI, ablation study, hydrology. I. INTRODUCTION Time-series forecasting is a fundamental task in many scientific and industrial domains. While deep learning models like Recurrent Neural Networks (RNNs) have achieved stateof-the-art performance, they often struggle with a specific challenge: **nonlinear, variable time delays**. To address this gap, we propose PhiDelayNet1, a novel architecture that integrates a dynamic, interpretable, and physicsinformed delay operator directly into the network. This paper presents its theoretical foundation, implementation, and a rigorous validation on both synthetic and real-world data. We then discuss the practical implications of our findings and conclude with the model’s overall contribution. II. THEORETICAL FRAMEWORK The central innovation of PhiDelayNet is the dynamic delay operator τi(x, t), formulated as an effective scalar field ˜ ϕ(x, t). The formulation is: τi(x, t) = exp (−Var[x(t−i:t)])·"˜ ϕ0+ N X n=1 Ane−ni/R i+ϕγ# (1) where the exponential term provides variance-based adaptation, ˜ ϕ0is a learnable zero-mode term, the summation represents higher-mode Yukawa-like contributions inspired by 5D physics [1], and ϕγaccounts for photonic effects [2]. 1Code and data available at: https://github.com/bahman2017/PhiDelayNet III. METHODOLOGY The PhiDelayNet model was implemented in PyTorch. The core architecture consists of a ‘DynamicDelayModule‘ that computes τaccording to Eq. 1. The input sequence is then weighted by the computed delay and fed into a 2-layer LSTM. The model is trained using a custom physics-informed loss function that combines Mean Squared Error (MSE) with a smoothness constraint on the learned delay term. IV. EXPERIMENTAL VALIDATION We conducted a series of experiments to validate PhiDelayNet’s performance, interpretability, and architectural design. A. Synthetic Data Experiment We first tested the model on a synthetic dataset with a known, oscillating ground-truth delay. PhiDelayNet decisively outperformed the LSTM baseline, reducing the MSE by 37.5% (Table I). TABLE I PERFORMANCE ON THE SYNTHETIC TEST SET Model MSE MAE R² LSTM Baseline 0.2137 0.3775 0.5716 PhiDelayNet 0.1335 0.3065 0.7323 B. Real-World Hydrology Experiment We then applied the model to predict daily river discharge from precipitation data for the American River, CA (20102020). The model produced temporally accurate forecasts and, more importantly, a physically meaningful learned delay parameter τ(Figure 1). C. Ablation Study To justify the model’s complexity, we conducted an ablation study. As shown in Figure 2, removing the physics-inspired components (Yukawa Modes and Photonic Term) significantly degraded performance, confirming their critical role and validating the architectural design.
Fig. 1. Results on the real-world hydrology dataset. (Top) PhiDelayNet’s predictions (green) show superior temporal accuracy on discharge peaks compared to the LSTM baseline (purple). (Bottom) The model’s learned delay parameter τexhibits clear seasonal patterns, demonstrating the model’s interpretability. Fig. 2. Ablation study results. The plot shows the increase in Test MSE as components are removed from the full PhiDelayNet model. V. DISCUSSION: IMPLICATIONS FOR WATER RESOURCE MANAGEMENT The successful application of PhiDelayNet to the hydrology dataset offers more than just an accurate forecast; it provides a new, interpretable tool with significant implications for practical water resource management. The model’s learned delay parameter, τ, effectively acts as a dynamic, real-time indicator of the watershed’s overall state. Our analysis showed that τis not static but varies seasonally, revealing a physically meaningful insight: the average learned delay is higher during the wet season than the dry season. This counter-intuitive result reflects the complex physical processes of the watershed. This interpretability translates into two key benefits: 1) Enhanced Operational Forecasting: The model’s superior temporal accuracy allows for more reliable flood warnings and optimized dam operations. 2) A New Diagnostic Tool for Watershed Health: The learned delay τcan be monitored over the long term to detect changes in the environment due to urbanization or wildfires.
VI. CODE AVAILABILITY The source code for the PhiDelayNet model, along with the scripts to reproduce the experiments in this paper, is publicly available on GitHub at: https://github.com/bahman2017/ PhiDelayNet. VII. CONCLUSION This paper introduced PhiDelayNet, a novel, physicsinformed neural network designed to forecast time series with variable delays. We have shown through synthetic data, a real-world application, and a detailed ablation study that its architecture is effective, interpretable, and well-justified. Its ability to provide physically meaningful insights highlights its potential as a tool not just for prediction, but for scientific discovery and practical decision support. By embedding physical principles directly into its architecture, PhiDelayNet offers a powerful and robust alternative to black-box models, paving the way for more intelligent and explainable time-series analysis. REFERENCES [1] P. Bull, et al., ”Beyond ΛCDM: Problems, solutions, and the road ahead,” Physics of the Dark Universe, vol. 12, pp. 56–99, 2016. [2] B. Masarrat, ”Integrating a 5D Scalar Field with General Relativity and Photonic Contributions,” Preprint, Zenodo, 2025. [Online]. Available: https://zenodo.org/records/16667924