# Aspect-Based Sentiment Analysis Using Aspect Map
## 4 Learning AMEN and AMSAN
### Aspect Map-Based Sentiment Analysis Network (AMSAN)  
The aspect map-based sentiment analysis network (AMSAN) is trained with \(\mathcal{D}_{s}\), and classifies the sentiment polarity \(s\) of a text \(\mathbf{t}\) for a target aspect \(c\) using the aspect map \(\mathcal{A}^{c}\). The architecture of AMSAN to fulfill this task is shown in the left side of Figure 7. AMSAN consists of a word embedding layer, two convolutional layers, a fully connected layer and a classification layer. Its first two layers (the word embedding layer and the first convolutional layer) are identical to those of AMEN. Thus, the output of these layers is \(\mathbf{Z}\) whose elements are \(\mathbf{z}^{h_{k}}\)s in Equation (2). The aspect map \(\mathcal{A}^{c}\) obtained from AMEN is then applied to \(\mathbf{Z}\). This application captures sentiment expressions because AMSAN is trained to classify sentiment polarity. To transform the positional information of the aspect expressions in \(\mathcal{A}^{c}\) to regional information, the local max pooling (LMP) with size \(p\) is applied to \(\mathcal{A}^{c}\). By this operation, the aspect region map \(\mathcal{R}^{c}\in\mathbb{R}^{\lceil\frac{N}{p}\rceil}\) is produced. Then, \(\mathbf{Z}\) is also reduced to \(\mathbf{Z}^{p}\) by LMP with the identical pooling size \(p\) to scale down \(\mathbf{Z}\) to the length of \(\mathcal{R}^{c}\). After that, the sentiment expressions of \(\mathbf{t}\) for \(c\) are obtained by the element-wise multiplication of \(\mathcal{R}^{c}\) and \(\mathbf{Z}^{p}\). That is, \(\mathbf{Z}^{\mathcal{R}^{c}}\), the matrix for sentiment expressions for \(c\), is computed by  
\[\mathbf{Z}^{\mathcal{R}^{c}}=\mathbf{Z}^{p}\odot\mathcal{R}^{c}, \tag{8}\]  
where \(\odot\) is the element-wise multiplication operator. Figure 7 explains these operations with an example text \(\mathbf{t}\). In this figure, \(\mathbf{Z}\) activates the sentiment expressions \"_nice_\" and \"_bad_\" in \(\mathbf{t}\), and the phrase \"_view of river_\" is indicated as an aspect expression for _LOCATION_ by \(\mathcal{A}^{LOCATION}\). However, only the sentiment expression \"_nice_\" remains in \(\mathbf{Z}^{\mathcal{R}^{c}}\) because \(\mathbf{Z}^{p}\) is affected locally by \(\mathcal{R}^{c}\). \(\mathbf{Z}^{\mathcal{R}^{c}}\) is delivered to the second convolutional layer. After the operation of Equation (1) is applied to \(\mathbf{Z}^{\mathcal{R}^{c}}\), the global max pooling is performed to the output of the convolutional layer. The result of this layer is \(\mathbf{g}\), which is the globally max-pooled vector. To incorporate the target aspect \(c\) into  
Figure 7: Architecture of aspect map-based sentiment analysis network (AMSAN). Aspect map for _LOCATION_ is used to identify a neighboring word “_nice_” as an aspect-specific sentiment expression. For this, local max pooling is adopted for both the aspect map and convolutional feature map of AMSAN. AMSAN, \(\mathbf{g}\) is concatenated with \(\mathbf{a}^{c}\), where \(\mathbf{a}^{c}\) is a \(D\)-dimensional word embedding vector of \(c\). Then, the concatenated vector is fed to the fully connected layer to induce a higher-level representation \(\mathbf{f}\in\mathbb{R}^{F}\). That is,  
\[\mathbf{f}=f(\mathbf{W}_{f}\cdot[\mathbf{g};\mathbf{a}^{c}]+\mathbf{b}_{f}), \tag{9}\]  
where \(\mathbf{W}_{f}\in\mathbb{R}^{(K\cdot|H|+D)\times F}\) is a weight matrix of the fully connected layer and \(\mathbf{b}_{f}\) is a bias vector of the layer. After all these layers, the classification layer finally determines the sentiment polarity of \(\mathbf{t}\) for the target aspect \(c\) by  
\[\mathbf{y}=f(\mathbf{W}_{y}\cdot\mathbf{f}+\mathbf{b}_{y}). \tag{10}\]  
Here, \(\mathbf{W}_{y}\) and \(\mathbf{b}_{y}\) indicate a weight matrix and a bias for the classification layer, respectively.