## 2 Training of the ANN Flow Law
### Computation of the Derivatives of the Neural Network  
As introduced in Section 1, implementing a flow law in a FE code requires both the computation of the flow stress \(\sigma^{y}\) as a function of the input data, performed using the previous Equations (5)-(11), but also the evaluation of the three derivatives of \(\sigma^{y}\) with respect to the input data to use a Newton-Raphson algorithm within the stress integration scheme, as proposed by many authors [24; 28; 45; 46] based on the radial return algorithm in the Abaqus FE code. It is, therefore, necessary to perform a numerical evaluation of these three derivatives based on the ANN to obtain these quantities. It seems obvious that it is not possible to train a neural network to evaluate these values of derivatives insofar as the training data are not physically collectible data during the experimental tests. It is, therefore, necessary to predict these derivatives from the neural network architecture itself. One straightforward, but not recommended, solution to this problem is to compute numerically the derivative of \(\sigma^{y}\) with respect to \(\epsilon^{p}\), \(\hat{\epsilon}\) and \(T\) using the following relation:  
\[\frac{\partial\sigma(x)}{\partial x}=\frac{\sigma(x+\delta x)-\sigma(x)}{ \delta x}, \tag{12}\]  
where \(\delta x\) is a small increase (\(\delta x=10^{-6}\) for example) applied to one of the 3 variables \(\epsilon^{p}\), \(\hat{\epsilon}\) and \(T\). As reported in [31], we need to compute a result from the ANN 4 times to compute the flow stress and approximate the three derivatives, which is quite time consuming. The solution for this study consists, insofar as the architecture of the neural network is known through Equations (6)-(10), in analytically deriving the output \(s\) of the network with respect to the input \(\overrightarrow{x}\), then integrating the data normalization operations defined by Equations (5) and (11). Given Equations (5)-(11), we can then establish in the case of a neural network containing two hidden layers and a sigmoid activation function on the two hidden layers that the derivative of \(\sigma^{y}\) with respect to the input data \(\epsilon^{p}\), \(\hat{\epsilon}\) and \(T\) is given by the following procedure. * First, we compute the internal terms of the ANN to compute the derivative of the ANN with respect to the input vector \(\overrightarrow{x}\): \[ \begin{cases}\overrightarrow{x}_{1}=\exp\left(-\mathsf{w}_{1}\boldsymbol{ \cdot}\overrightarrow{x}-\overrightarrow{b}_{1}\right)\\ \overrightarrow{x}_{2}=\exp\left(\mathsf{w}_{2}\boldsymbol{\cdot}\frac{1}{1+ \overrightarrow{x}_{1}}+\overrightarrow{b}_{2}\right)\\ \overrightarrow{x}_{3}=\overrightarrow{w}_{\circ}\frac{\overrightarrow{x}_{2} }{\left(1+\overrightarrow{x}_{2}\right)^{2}}\\ \overrightarrow{x}_{4}=\frac{\overrightarrow{x}_{1}}{\left(1+\overrightarrow {x}_{1}\right)^{2}}\end{cases} ,\] (13)where \(\circ\) is the element-wise product, known as the Hadamard product, which is a binary operation that takes two matrices \(\mathsf{A}\) and \(\mathsf{B}\) of the same dimensions and produces another matrix \(\mathsf{C}\) of the same dimension as the operands, where each element \(C_{i}=A_{i}\,B_{i}\). * Then, from the two terms \(\overrightarrow{z}_{3}\) and \(\overrightarrow{z}_{4}\), we can therefore compute the three derivatives of the output \(s\) with respect to the input vector \(\overrightarrow{x}\) with the following equation, where \(\overrightarrow{s}^{\prime}\) is a vector of 3 components containing the 3 derivatives \(\partial s/\partial e^{p}\), \(\partial s/\partial\hat{e}\) and \(\partial s/\partial T\): \[\overrightarrow{s}^{\prime}=\mathsf{w}_{1}^{T}\cdot\left[\left(\mathsf{w}_{2 }^{T}\cdot\overrightarrow{z}_{3}\right)\circ\overrightarrow{z}_{4}\right]\] (14)
* Finally, from Equation (14) and conforming to the normalization of the inputs introduced earlier, one can obtain the 3 derivatives of the yield stress \(\sigma^{y}\) with respect to the three inputs \(e^{p}\), \(\hat{e}\) and \(T\) using the following final equation: \[