# Deep-Learning-Based Stream-Sensing Method for Detecting Asynchronous Multiple Signals
## 5 Learning-Based Asynchronous Stream Sensing
### Losses and Objectives for Learning ASensNet
#### 5.3.1 Losses for AutoEncoder Extractor  
The losses of the AutoEncoder Extractor are defined for each 'Encoding Block' and 'Decoding Block'.  
**Losses for Encoding Block**: The Encoding Blocks should make the Decoding Blocks generate the same \(\mathbf{I}_{\text{R,region}}\) and \(\mathbf{I}_{\text{I,region}}\) as \(\mathbf{I}_{\text{R}}\) and \(\mathbf{I}_{\text{I}}\) as much as possible. Therefore, for real and imaginary subnetworks, the regeneration losses are defined as  
\[\mathcal{L}_{\text{region, R}}(E_{\text{R}},D_{\text{R}},\mathcal{I}_{\text{R}}) =\mathbb{E}_{\mathbf{I}_{\text{R}}}[D_{\text{R}}(E_{\text{R}}( \mathbf{I}_{\text{R}}))-\mathbf{I}_{\text{R}}], \tag{3}\] \[\mathcal{L}_{\text{region, I}}(E_{\text{I}},D_{\text{I}},\mathcal{I}_{\text{I}}) =\mathbb{E}_{\mathbf{I}_{\text{I}}}[D_{\text{I}}(E_{\text{I}}( \mathbf{I}_{\text{I}}))-\mathbf{I}_{\text{I}}]. \tag{4}\]  
In addition, the Encoding Blocks should also generate \(\mathbf{z}_{\text{R}}\) and \(\mathbf{z}_{\text{I}}\) that allow the Classifier to predict \(\mathbf{p}\) as well as possible. The classification loss is defined as (5).  
\[\mathcal{L}_{\text{class}}(E_{\text{R}},E_{\text{I}},F_{\text{R}},F_{\text{I}},K_ {\text{c}},K_{\text{e}},K,\mathcal{I}_{\text{R}},\mathcal{I}_{\text{I}}, \mathcal{I}_{\text{eig}},\mathfrak{L})=\mathbb{E}_{\mathbf{I}_{\text{R}}, \mathbf{I}_{\text{I}},\mathbf{I}_{\text{eig}}}\big{[}O\big{(}K(\mathbf{w}_{ \text{e}}\circ\mathbf{w}_{\text{c}}),G_{\text{truth}})\big{]}, \tag{5}\]  
where \(\mathbf{w}_{\text{c}}=K_{\text{c}}\big{(}E_{\text{R}}(\mathbf{I}_{\text{R}}),E_{ \text{I}}(\mathbf{I}_{\text{I}}),F_{\text{R}}(\mathbf{I}_{\text{R}}),F_{ \text{I}}(\mathbf{I}_{\text{I}})\big{)}\) and \(\mathbf{w}_{\text{e}}=K_{\text{e}}(\mathbf{I}_{\text{eig}})\). In addition, \(G_{\text{truth}}\) is given as soon as \(\mathbf{I}_{\text{R}}\), \(\mathbf{I}_{\text{I}}\), and \(\mathbf{I}_{\text{eig}}\) are generated. Note that the loss is the same for the real and imaginary subnetworks.  
**Objective of AutoEncoder Extractor**: Therefore, the complete objective of the AutoEncoder Extractor is defined as\[\mathcal{L}_{\text{AE}}(E_{\text{R}},E_{\text{L}},F_{\text{R}},F_{ \text{L}},K_{\text{c}},K,\gamma_{\text{R}},\gamma_{\text{I}},\gamma_{\text{ eig}}\mathfrak{L})\] \[=\mathcal{L}_{\text{regen,R}}(E_{\text{R}},D_{\text{R}},\gamma_{ \text{R}})+\mathcal{L}_{\text{regen,I}}(E_{\text{L}},D_{\text{L}},\gamma_{ \text{I}})+\mathcal{L}_{\text{class}}(E_{\text{R}},E_{\text{I}},F_{\text{R}},F _{\text{I}},K_{\text{c}},K_{\text{e}},K,\gamma_{\text{R}},\gamma_{\text{I}}, \gamma_{\text{eig}},\mathfrak{L}). \tag{6}\]  
Note that the losses of the Decoding Blocks are the same as the losses of the Encoding Blocks. In other words, by \(\mathcal{L}_{\text{regen,R}}\) and \(\mathcal{L}_{\text{regen,I}}\), the Encoding Blocks and the Decoding Blocks are updated simultaneously. In the same vein, \(\mathcal{L}_{\text{class}}\) updates both Encoding Blocks in the real and imaginary subnetworks.  
For the AutoEncoder Extractor, the following problem will be solved.  
\[E_{\text{R}}^{*},E_{\text{I}}^{*}=\underset{E_{\text{R}},E_{\text{I}}}{\text{ argmin}}\;\mathcal{L}_{\text{AE}}(E_{\text{R}},E_{\text{I}},F_{\text{R}},F_{ \text{I}},K_{\text{c}},K_{\text{e}},K,\gamma_{\text{R}},\gamma_{\text{I}}, \gamma_{\text{eig}},\mathfrak{L}). \tag{7}\]