# Efficient Open-Set Recognition for Interference Signals Based on Convolutional Prototype Learning
## 4 Proposed Method
### Hybrid Loss Function  
As the core of convolutional prototype learning, the loss function used in the training phase will affect the distribution of the sample features in the feature space, which is related to the OSR performance. Therefore, two aspects are considered in the design of the loss function. On the one hand, it should decrease the distance between the sample features and the ground truth prototype and increase the distance between the sample features and other prototypes. On the other hand, the prototypes should be updated to the periphery of the feature space to avoid overlapping of the UIS and KIS features. According to the principle of maximum entropy, for an unknown sample without any prior information, a well-trained classifier tends to assign known labels to it with equal probability, i.e., the classifier usually embeds an unknown sample feature into the inside of the feature space rather than random positions in the space [38; 39]. However, because GCPL [21; 22] uses DCE and OVA as the discriminative loss, the learned prototypes also appear in the interior of the feature space, and there is a lot of overlap between the UIS features and KIS features. Although replacing the Euclidean distance of GCPL with the cosine distance can make KIS features distribute all over the hypersphere, the unknown class will also be assigned to the hypersphere in the test phase, which does not solve the overlap problem. To deal with this issue, the HCPL adopts an inner product-based loss function as the discriminative loss to update the prototypes to the periphery of the feature  
Figure 5: Classification and rejection process. space. The feature space of the visual comparison of the HCPL and GCPL will be seen in Section 5. To update all prototypes per iteration, the Softmax function is used to normalize the similarity to the probability:  
\[p(x\in y|x)=\frac{e^{\alpha f^{\intercal}(x;\theta)\mathbf{m}_{y}}}{\sum\limits_{i= 1}^{N}e^{\alpha f^{\intercal}(x;\theta)\mathbf{m}_{i}}} \tag{18}\]  
For the training sample \((x,y)\), the inner-dot-based cross-entropy loss (ICE) is designed:  
\[L_{d}=-\ln p(x\in\mathbf{m}_{y}|x) \tag{19}\]  
According to the model of OSR of the interference signals, ICE can be considered as an empirical risk. Reducing ICE will essentially increase the similarity of the sample features to the ground truth prototype and decrease the similarity to others. By minimizing ICE, the network tends to distribute the prototypes corresponding to different classes uniformly on a hypersphere surface. However, if ICE is used only, it means only the empirical risk is considered in the OSR of the interference signals, and there are still many known class sample features in the interior of the feature space that does not provide enough open space for the UISs. Therefore, to constrain the KIS features to the periphery of the bounded feature space of the hypersphere and to reserve the interior of the feature space for the unknown classes, the center loss (CL) is considered as the open space risk and designed as Equation (20) to the improve intraclass compactness:  
\[L_{c}=\left\|\mathbf{m}_{y}-f(x;\theta)\right\|_{2}^{2} \tag{20}\]  
When ICE and CL are used together, ICE can also be regarded as having the ability to reduce the open space risk. Since ICE can keep prototypes away from the interior of the feature space and CL can enhance the intraclass compactness, KIS features are also kept away from the interior. Finally, the periphery of the hypersphere is considered as a closed space, while the interior is regarded as an open space. Then, because the prototypes obtained by using the SGD algorithm in the training phase are not on the hypersphere completely, to avoid a low OSR performance due to a large prototype, the norm gaps radius loss (RL) is designed as follows:  
\[L_{r}=(\left\|\mathbf{m}_{y}\right\|_{2}-r)^{2} \tag{21}\]  
where \(r\) is the hypersphere radius that can be trained jointly with the feature extractor and prototypes.