# Deep Learning of Diffuse Optical Tomography Based on Time-Domain Radiative Transfer Equation
## 2 Methodology
### LSTM Deep Learning Method  
In order to classify absorber positions, we employ a deep learning method. For temporal data, Long Short Term Memory (LSTM) learning is an effective tool that is an extension of the artificial recurrent neural network (RNN) architecture to analyze not only single data points but also entire sequences of temporal data. In Figure 4, an example of a LSTM networks that we employ is shown. LSTM networks have improved recurrent neural networks by using gates to selectively retain and forget information, which are relevant and not relevant, respectively. Lower sensitivity to time gaps makes LSTM networks robust for analysis of temporal data compared with a simple recurrent network. LSTM has four neural network layers. Figure 4 shows the explicit interaction of such layers. The input data are \(x_{t}\) at time step \(t\). We put the absorption data \(A(t)\) in \(x_{t}\) and the output data are \(y_{t}\). Although RNN uses just one _tanh_ layer, some output data are reused as input data in the next time step in LSTM. In Figure 4, boxes and circles represent layers and pointwise operations, respectively. The symbol \(\sigma\) is the sigmoid function, which determines whether data can be transferred to the next gate. The symbol _tanh_ is the hyperbolic tangent function. It is used to restrict data in the range \((-1,1)\). The actual calculations are conducted as follows:  
\[D_{t} =\sigma\Big{(}W_{D}\cdot y_{t-1}+U_{D}\cdot x_{t}+b_{D}\Big{)} \tag{7}\] \[E_{t} =\sigma\Big{(}W_{E}\cdot y_{t-1}+U_{E}\cdot x_{t}+b_{E}\Big{)}\] (8) \[F_{t} =tanh\Big{(}W_{F}\cdot y_{t-1}+U_{F}\cdot x_{t}+b_{F}\Big{)}\] (9) \[G_{t} =\sigma\Big{(}W_{G}\cdot y_{t-1}+U_{G}\cdot x_{t}+b_{G}\Big{)}\] (10) \[C_{t} =E_{t}\times F_{t}+D_{t}\times C_{t-1}\] (11) \[y_{t} =G_{t}\times tanh(C_{t}) \tag{12}\]  
Figure 3: Datasets with noises: the **left panel** shows training data with Gaussian noises whose standard deviation is \(\sigma=0.001\), and the **right panel** is test data with Gaussian noises of \(\sigma=0.01\). Here, \(W\), \(U\), and \(b\) are weight matrix and bias in the neural network, respectively. Though we have to set the value of \(b\) as a parameter, the parameters, \(W\) and \(U\), are automatically determined by each learning step in order to make a good classification. This is the key point for deep learning. The _sigmoid_ and _tanh_ activation functions are used for each component of any 8-dimensional vector such as \(y_{t-1}\) and \(x_{t}\). The symbol \(\times\) denotes an element-wise product. LSTM uses three types of gates: input, output, and forget gates, which are shown by different colors of circles in Figure 4. This allows the network to retain or forget some information. We implement a deep learning scheme composed of two LSTM layers plus a final dense layer utilizing TensorFlow 2.1.0, a free and open-source library for deep learning. We set the bias function \(b\) zero as a simple setup. In order to classify multiple domains, we use a categorical cross entropy as a loss function and a softmax activation function. The cross entropy loss function is defined as  
\[-\sum_{j=1}^{M}d_{j}\log(p_{j}) \tag{13}\]  
where \(M\) is the number of domains, \(d_{j}\) is a binary indicator which assumes the value 1 if domain label \(j\) is the correct classification, and is otherwise 0, and \(p_{j}\) is the predicted probability observing from the LSTM network domain \(j\). We calculate a separate loss for each domain label and sum over all domains. The softmax activation function is defined as  
\[p_{j}(x_{j})=\frac{e^{x_{j}}}{\sum_{i=1}^{M}e^{x_{i}}} \tag{14}\]  
where \(x_{i}\) is element of the input data vector \(x\). We use the softmax activation function to solve a classification problem. We conduct deep learning based on the the algorithm shown in \[E_{t} =\sigma\Big{(}W_{E}\cdot y_{t-1}+U_{E}\cdot x_{t}+b_{E}\Big{)}\]0 What we are doing in deep learning this time is classification learning. The output data are categorized by positions.