## 3 Learned Separation
### Complex Objectives
However, since the individual peaks making up \(y_{j}^{\text{dirr}}\) and \(y_{j}\) necessarily have the same phases, the difference between \(d_{2,\delta}^{\text{q,rad}}\) and \(d_{2,\delta}^{\text{q,abs}}\) only matters if there is significant overlap between the peaks within the same tone, which is the case at very low fundamental frequencies. Figure 4: Example showing non-uniqueness of the tone separation in the direct prediction. In the direct prediction (**left**) the separation of the two instruments is different from the dictionary-based prediction \(y\) (**right**). For this example, we assume the dictionary-based separation to be correct, so ideally the direct separation would be the same. However, the total spectrum (Sum) of the incorrect separation equals the true total spectrum and thus also achieves the optimal loss value \(d_{2,\delta}^{\mathrm{zrad}}\left(Y,y^{\mathrm{dir}}\right)\). This motivates to regularize the individual tones \(y_{j}^{\mathrm{dir}}\) of the direct prediction using \(y_{j}\). The imaginary parts of the spectra are assumed to be all zero for this example. Figure 3: Example showing the interference of two overlapping peaks. Each peak models the contribution of one harmonic of a tone to the spectrum (cf. (8)). The left plots show a part of a direct prediction \(y^{\mathrm{dir}}\), which is assumed to equal the true spectrum \(Y\) for this example, and the right plots show a dictionary-based prediction \(y\) with deviating amplitudes. Due to the different amplitudes, also the phases mix differently, leading to a high value of \(d_{2,\delta}^{\mathrm{zrad}}\left(Y,y\right)\). The phases could be optimized for \(y\) (by increasing the phase for peak 1 and/or peak 2), but this would lead to suboptimal phases in \(y^{\mathrm{dir}}\). In contrast, the used loss \(d_{2,\delta}^{\mathrm{zabs}}\left(Y,y\right)\) does not depend on the phase. The loss functions \(d^{\text{d,rad}}_{2,\delta}\) and \(d^{\text{d,abs}}_{2,\delta}\) are both based on the \(\ell_{2}\) loss, so they do not induce sparsity. Thus, if there is linear dependency in the dictionary or, more likely, there is a discrepancy between the dictionary model for an instrument and an actual tone played by that instrument, then one single tone played by an instrument may get identified as multiple ones, either with the same fundamental frequency or with overlapping harmonics. Thus, we introduce an additional _sparsity parameter_\(u_{j}\in\{0,1\}\) that indicates whether a certain tone is present at all, and we henceforth include it in the set of stochastic parameters \(\varpi_{\text{s},j}\). Whenever \(u_{j}=0\), we discard the tone in the _sparse prediction_ given by  
\[y^{\text{SPr}}=\sum_{j}u_{j}\,y_{j} \tag{20}\]  
and discount part of the loss. In terms of architecture, the parameter \(u_{j}\) is modeled as a Bernoulli distribution. With \(y_{j}^{\text{dir}}=z_{j}^{\text{dir}}[k\cdot]\), \(y_{j}=z_{j}[k\cdot]\), and \(y^{\text{dir}}=z^{\text{dir}}[k\cdot]\) again, we define the loss as:  
\[L(\varpi_{\text{s}},\theta,D,Y)=\mu_{1}\,d^{\text{d,abs}}_{2,\delta}(Y,y^{ \text{SPr}})\cdot\lambda^{\sum_{j}(1-u_{j})}+\mu_{2}\,d^{\text{d,rad}}_{2, \delta}(Y,y^{\text{dir}})+\frac{\mu_{3}}{m}\sum_{j}d^{\text{d,rad}}_{2,\delta} (y_{j}^{\text{dir}},y_{j}), \tag{21}\]  
choosing \(\lambda=0.9\). This value is somewhat arbitrary, so we do not use it to enforce sparsity directly in \(y\). Instead, we compute the loss in the first term based on \(y^{\text{SPr}}\) so that the parameters are _compatible_ with a sparse solution and do not rely on redundant tones. However, additional tones can still appear in \(y^{\text{dir}}\) to reduce the distance to \(Y\) and, by extension, also in \(y\) to reduce the distance to \(y^{\text{dir}}\). We give both distances to \(Y\) the same loss coefficients while the regularization is supposed to be small. In practice, we find that \(\mu_{1}=10\), \(\mu_{2}=10\), \(\mu_{3}=1\) is a good choice.