# Stochastic Memristor Modeling Framework Based on Physics-Informed Neural Networks
## 4 Result and Discussion  
The solution \(P(x,t)\) includes the physics interpretation of the noise. Figures 3 and 4 show the numerical and PINN solution of FPE with the noise term. These are computed by using parameters (\(\mu_{D}\sim 10^{-10}\)cm\({}^{2}\) V\({}^{-1}\) s\({}^{-1}\), \(R_{ON}=1\) k\(\Omega\), \(R_{OFF}=4\) k\(\Omega\), \(f=0.25\) Hz, \(\Gamma=1\times 10^{-2}\) s\({}^{-1}\), \(L=10\) nm, \(V_{0}=5.5\times 10^{-3}\) V) obtained from [22]. The input data are time (\(0\leq t\leq 16\)) and state (\(0\leq x\leq 1\)) in the simulation. The learning rate and the number of iterations in the PINN are set to 0.001 and 1000, respectively. As illustrated in Figures 3 and 4, the memristor state with the noise is characterized as a probability density function. The probabilities at the initial time (\(t=0\)) and state (\(x=0.3\)) are approximated by 1. As time increases, the probability distribution due to noise decreases. Figure 4: Two-dimensional contour probability density function depending on memristor state and time at \(\Gamma=1\times 10^{-2}\) s\({}^{-1}\): (**a**) numerical solution; (**b**) PINN training data. Figure 3: Three-dimensional probability density function dictated by memristor state and time at \(\Gamma=1\times 10^{-2}\) s\({}^{-1}\): (**a**) numerical solution; (**b**) PINN training data. As shown in Figure 5, the maximum error of the PINN and numerical solution is 0.0084, indicating a high accuracy of more than 99.9%. Furthermore, as shown in Figure 6, the maximum errors of the PINN and numerical solution are 0.015 and 0.0125, respectively, when the activation functions used are a sigmoid and hyperbolic tangent function. These results are less than 99% accurate when used with sigmoid functions and hyperbolic tangent functions. This indicates that the Gaussian function has a higher prediction accuracy of the probability density function compared to other activation functions. The accuracy of the RNN-based RRAM modeling [28] is 98%, but the PINN achieves relatively higher accuracy, exceeding this value. The loss functions in Figure 7 represent the loss values for the three activation functions. The loss convergence values for the Gaussian, sigmoid, and hyperbolic tangent functions are \(6\times 10^{-7}\), \(8\times 10^{-6}\) and \(3\times 10^{-6}\), respectively. The result of the PINN becomes more accurate as the maximum loss converges to zero. This indicates that the Gaussian transfer function has the best metric and serves as evidence for its higher accuracy. This is attributed to the fact that the PINN calculation uses a Gaussian transfer function, which is closely similar to the probability density. Figure 8 illustrates the stochastic behaviors and probability variation due to noise. The random fluctuation of the pink solid lines represents the state over time in the presence of noise, as shown in Figure 8a. The black solid line corresponds to the noise-free condition in Equation (2). Figure 8b is plotted by using a PINN for the FPE. The red solid line represents the maximum value of the probability at each time point. The maximum value of the probability at each time point has a shape that approximates the noise-free one in Figure 8a. Figure 5: Error data between the numerical solution and the PINN data using Gaussian function: (a) Three-dimensional plot; (b) Two-dimensional contour plot. Figure 6: Three-dimensional error data between numerical solution and PINN training data: (a) sigmoid function; (b) hyperbolic tangent function. The random state occurs stochastically and converges within the contours. Figure 9 presents the simulation results when a pulse voltage is applied under the same conditions. The pulse voltage generates 800 pulses within the range of \(0\leq t\leq 16\) with an amplitude of \(5.5\times 10^{-3}\) V. In Figure 9a, the pink and black solid lines illustrate random fluctuations and noise-free states over time by Equation (2). Figure 9b shows the probability density function over time and state in the PINN.