## 3 Model and Proposed Method
### Embedded Zero-Shot Image Classification Based on Bidirectional Feature Mapping
#### 3.2.2 Feature Mapping Module  
We propose a feature mapping module that is dominated by a bidirectional feature mapping network and supplemented with a visual-semantic mapping network. This module can fully utilize the feature intrinsic information and can learn more semantic information and the intrinsic connection between visual and semantic features. In the following section, each important module in the bidirectional feature mapping network will be described in detail separately, mainly including the spatial mapping module, the attention module, and the model optimization module. The purpose of the attention module is mainly to weight the mapped and aligned features so that the model focuses on the information that is more useful for the target task and improves the performance and efficiency of the model. The visual-guided and attribute-guided attention mechanisms are used on the visual attribute features and attribute visual features after mapping alignment, respectively, to further enhance the visual details and attribute semantic information to the aligned features while compensating for possible missing information and to highlight the attribute semantics-related visual regions and attribute-specific semantic information in the image. Schematic diagrams of the visual-guided and attribute-guided attention mechanisms are shown in Figures 5 and 6, respectively. The corresponding mathematical formulas for the visual-guided and attribute-guided attention-based mechanisms are shown in Equations (3) and (4), respectively:  
\[\tau_{r}^{a}=\frac{\exp(f^{\prime}W_{3}v_{a})}{\sum_{r=1}^{R}\exp(f^{\prime} W_{3}v_{a})} \tag{3}\]\[\beta^{r}_{a}=\frac{\exp(v_{a}W_{4}f^{r})}{\sum_{a=1}^{A}\exp(v_{a}W_{4}f^{r})} \tag{4}\]  
where \(v_{a}\) denotes the \(a\)th attribute semantic feature vector, and \(f^{r}\) denotes the visual feature of the \(r\)th local region of the image; \(W_{3}\) is a learnable matrix for measuring the similarity between the attribute semantic feature and each local visual feature of the sample; and \(W_{4}\) is a learnable matrix for calculating the similarity between the local visual feature and each attribute semantic feature. In this way, two sets of attentional weights \([\tau^{a}_{t}]^{A}_{a=1}\) and \([\beta^{r}_{a}]^{R}_{r=1}\) can be obtained. Then, based on these two sets of attentional weights, attentional features can be obtained, i.e., the obtained attentional weights \([\tau^{a}_{t}]^{A}_{a=1}\) and \([\beta^{r}_{a}]^{R}_{r=1}\) are subjected to a weighting operation with visual attribute features and attribute visual features, respectively, which are computed as shown in Equations (5) and (6):  
\[V_{r}=\sum_{a=1}^{A}\tau^{a}_{r}s(f,v) \tag{5}\]  
\[F_{a}=\sum_{r=1}^{R}\beta^{r}_{a}s(v,f) \tag{6}\]  
where \(V_{r}\) and \(F_{a}\) denote the final obtained visual attribute features and attribute visual features. The purpose of the spatial mapping module is mainly to learn the feature spatial mapping function, so that the model can realize the knowledge migration from seen to unseen classes more effectively. The main part of the module consists of two branches, i.e., a bidirectional feature mapping network, which includes mapping of attribute semantic features to visual space and mapping of visual features to attribute semantic space. The auxiliary part includes the mapping of visual features to the semantic space of category labels, which is used to assist the learning of the main part so that the model learns more  
Figure 5: Schematic diagram of the attention mechanism based on visual guidance. Figure 6: Schematic of attention mechanism based on attribute guidance. semantic knowledge. The structure of the feature space mapping module is shown in Figure 7. In the feature space mapping module, \(\mathcal{V}\) denotes the visual feature space, \(\mathcal{A}\) denotes the attribute semantic space, \(\mathcal{L}\) denotes the category label semantic space, and \(\mathcal{Z}\) denotes the category semantic vector space.