# Predictive Modeling of Light-Matter Interaction in One Dimension: A Dynamic Deep Learning Approach
## 2 Methods
### Numerical Discretization
\right\} \tag{16}\]  
\[y=L_{1}\{w_{1}x\}\]  
\[y=[y(1),y(2),\ldots,y(n)],\;\;x=[x(1),x(2),\ldots,x(n)]\]  
where \(w_{1}\) is the coefficient matrix containing the weights that connect/relate the network nodes, and the activation operator \(L_{1}\) can be either a linear or a nonlinear operator that transforms the elements of the result vector of the matrix multiplication to fit within a certain range in accordance with the analyzed problem and the underlying system. For a given output sample \(y(n)\), Equation (16) can also be expressed via the following summation term:  
\[y(n)=L_{1}\left\{\sum_{k=1}^{K_{1}}w_{1}[n;k]x(k)\right\} \tag{17}\]  
In system theory, Equation (17) represents the response of a nonlinear time-varying (NTV) system [33; 34]. For slowly (time) varying systems, an NTV system can be approximated as a linear time-invariant (LTI) system within narrow time intervals, in which case Equation (17) can be expressed by the time shift between the input and output samples in the form of a convolution operation [34]:  
\[y(n)=L_{1}\left\{\sum_{k=1}^{K_{1}}w_{1}[k]x(n-k)\right\}=L_{1}\left\{\sum_{k= 1}^{K_{1}}w_{1}[n-k]x(k)\right\},\;\;n>K_{1} \tag{18}\]  
which can be rewritten as a matrix equation (\(L_{1}\) is now an identity operator):  
\[ \begin{bmatrix}y(K_{1}+1)\\.\\ y(n)\end{bmatrix} =L_{1}\left\{ \begin{bmatrix}w_{1}[K_{1}]&\cdots&w_{1}[1]\\ \vdots&\ddots&\vdots\\ w_{1}[n-1]&\cdots&w_{1}[n-K_{1}]\end{bmatrix}\begin{bmatrix}x(1)\\.\\ x(K_{1})\end{bmatrix} \right\} \tag{19}\]  
Equation (19) has much fewer unknowns to solve for (compared to Equation (16)), as the weight (unknown) matrix can now be vectorized as a time shift vector. For this reason, the LTI system approximation provides a great reduction in the computational cost for slowly time-varying systems that are trained gradually over small data segments [35; 36; 37; 38] (see Section 2.5). In this study, we extend the formulation in Equation (19) for a three-layer neural network, which is considered as a deep learning network with two hidden layers. The use of hidden layers provides more accuracy in determining all features of a given system. In this case, the input-output relationship is modified as follows:  
\[ \begin{bmatrix}y(1)\\ y(n)\end{bmatrix} =L_{3}\left\{ \begin{bmatrix}w_{2}[1;1]&\cdots&w_{2}[1;K_{3}]\\ \vdots&\ddots&\vdots\\ w_{3}[n;1]&\cdots&w_{3}[n;K_{3}]\end{bmatrix} L_{2}\left\{ \begin{bmatrix}w_{2}[1; 1]&\cdots&w_{2}[1;K_{3}]\\ \vdots&\ddots&\vdots\\ w_{2}[K_{3};1]&\cdots&w_{2}[K_{3};K_{2}]\end{bmatrix} L_{1}\left\{ \begin{bmatrix} w_{1}[1;1]&\cdots&w_{1}[1;K_{1}]\\ \vdots&\ddots&\vdots\\ w_{1}[K_{2};1]&\cdots&w_{1}[K_{2};K_{1}]\end{bmatrix}\begin{bmatrix}x(1)\\ x(K_{1})\end{bmatrix} \right\}\right\}\right\}\end{bmatrix} \tag{20}\]  
Based on Equation (20), one can deduce that each output sample is related to the input samples through the following mathematical relation:  
\[y(n)=L_{3}\left\{\sum_{k=1}^{K_{3}}w_{3}[n;k]L_{2}\left\{\sum_{l=1}^{K_{2}}w_{2 }[k;l]L_{1}\left\{\sum_{q=1}^{K_{1}}w_{1}[l;m]x(m)\right\}\right\}\right\} \tag{21}\]  
Just as in the case for a single-layer network, assuming a slowly time-varying system and using small segments of training data, Equation (21) can be expressed in terms of the time shift between the input and output samples over each given training segment (LTI system approximation), which is represented as a serial convolution operation between the network weights and the input data:  
\[y(n)=\sum_{k=1}^{K_{3}}\sum_{l=1}^{K_{2}}\sum_{m=1}^{K_{1}}w_{3}[n-k]w_{2}[k-l ]w_{1}[l-m]x(m) \tag{22}\]  
in which case the activation functions are identity operators. In this study, we will base our approach on Equation (22) to train a 3-layer network for identifying the systems that govern an LMI process.