# SBNN: A Searched Binary Neural Network for SAR Ship Classification
## 3 SBNN
### Searched Normal Cell and Reduction Cell
#### 3.2.1 Efficient Searching  
Thanks to the high flexibility, NAS can break through the limitations of subjective understanding and imagination [17, 18, 32]. Nowadays, NAS is considered as an automatic way to reduce the cost of time and labor in designing network architectures. In this paper, the prototype floating-point network is searched by PC-DARTS, which has a low searching cost and a friendly hardware requirement [22]. Take the information propagated from node \(i\) to node \(j\) as an example, the mixture operation \(f_{i,j}(. )\) in searching stage can be formulated as:  
\[f_{i,j}(x_{i};S_{i,j})=\sum_{o\in O}\frac{\exp\{a_{i,j}^{o}\}}{\sum_{o^{\prime} \in O}\exp\{a_{i,j}^{o^{\prime}}\}}o(S_{i,j}*x_{i})+(1-S_{i,j}) \tag{1}\]  
where: \(O\) denotes a pre-defined space of operations, and \(o(. )\) is a fixed operation in \(O\). \(x_{i}\) is the output of node \(i\). \(a_{i,j}^{o}\) is a learnable parameter for weighting the candidate operation \(o(. )\), and \(S_{i,j}\) denotes the randomly sampled channels. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Name** & **Type** & **Input(s)** & **Input Shape(s)** & **Output Shape** \\ \hline Stem & \(5\times 5\) Convolution & SAR Image & \(1\times 100\times 100\) & \(12\times 48\times 48\) \\ \hline Cell1 & Binary Normal Cell & \begin{tabular}{c} \#1 Stem \\ \#2 Stem \\ \end{tabular} & \begin{tabular}{c} \#1 12 \(\times 48\times 48\) \\ \#12 \(\times 48\times 48\) \\ \end{tabular} & \(24\times 48\times 48\) \\ \hline Cell2 & Binary Reduction Cell & \begin{tabular}{c} \#1 Stem \\ \#2 Cell1 \\ \end{tabular} & \begin{tabular}{c} \#1 12 \(\times 48\times 48\) \\ \#2 \(\times 48\times 48\) \\ \end{tabular} & \(48\times 24\times 24\) \\ \hline Cell3 & Binary Normal Cell & \begin{tabular}{c} \#1 Cell1 \\ \#2 Cell2 \\ \end{tabular} & \begin{tabular}{c} \#1 24 \(\times 48\times 48\) \\ \#2 \(\times 24\times 24\) \\ \end{tabular} & \(48\times 24\times 24\) \\ \hline Cell4 & Binary Reduction Cell & \begin{tabular}{c} \#1 Cell2 \\ \#2 Cell3 \\ \end{tabular} & \begin{tabular}{c} \#1 48 \(\times 24\times 24\) \\ \#2 \(\times 24\times 24\) \\ \end{tabular} & \(96\times 12\times 12\) \\ \hline Cell5 & Binary Normal Cell & \
\begin{tabular}{c} \#1 Cell3 \\ \#2 Cell4 \\ \end{tabular} &
\begin{tabular}{c} \#1 48 \(\times 24\times 24\) \\ \#2 \(96\times 12\times 12\) \\ \end{tabular} & \(96\times 12\times 12\) \\ \hline GAP & Global Average Pooling & Cell5 & \(96\times 12\times 12\) & \(96\) \\ \hline Classifier & Linear & GAP & \(96\) & \(3\) or \(6\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The details of SBNN network architecture. Sampling channels can directly reduce the searching cost and improve the memory efficiency. On the downside, the searching may become unstable. Edge normalization in PC-DARTS ensures the stability of searching. The computation of \(x_{j}\), which denotes the output of node \(j\), is:  
\[x_{j}=\sum_{i<j}\frac{\exp\{\beta_{i,j}\}}{\sum_{i^{\prime}<j}\exp\{\beta_{i^{ \prime},j}\}}f_{i,j}(x_{i}\beta_{i,j}) \tag{2}\]  
where \(\beta_{i,j}\) is an edge normalization coefficient. When searching on a natural optical image dataset, such as ImageNet, the candidate operations are usually \(3\times 3\) Conv, \(5\times 5\) Conv, \(3\times 3\) Dil_Conv, \(5\times 5\) Dil_Conv, Average Pooling, Max Pooling and Skip Connect [21]. Each \(3\times 3\) or \(5\times 5\) Conv operation contains two Depthwise Separable Convolution blocks. A Dil_Conv operation only has one Depthwise Separable Convolution blocks where the first convolution is dilated [33]. According to the recently researches, Max Pooling has an unsatisfied performance in binary networks [24]. Figure 2: The architectures of the cells in SBNN. PC-DARTS gives weight-free operations, i.e., Average Pooling, Max Pooling and Skip Connect, very large values resulting an unstable searching in the SAR ship dataset which has a small data size and a high task difficulty. Weight-free operations can give more consistent outputs, which means they are more likely to be placed in the target network.