## 3 Methodology
### Marker Classification-Enhanced Decoding Module  
A sentence contains multiple quadruples with explicit and implicit aspects and opinion terms. Marker-based template methods can recover quadruples using different markers during the inference process. However, the special markers for implicit and explicit sentiments are the same for sequences with implicit sentiments. The generation model fails to distinguish between explicit and implicit sentiment expressions correctly. To address this issue, we design a Marker Classification Enhanced Decoding (MCED) module, as shown in Figure 3. During training, we introduced the auxiliary token \"NULL\" to the input sequences to help effectively distinguish between implicit aspect terms and opinion words. For sequences containing implicit or explicit aspect terms, we append an explicit suffix \"NULL\" to obtain the input sequence \(W=\{w_{1},w_{2},\dots,w_{n-1},NULL\}\), where the sequence length is N. Special markers [AT] and [OT], containing information about aspect terms and opinion terms, are used during the generation process. The designed markers can assist the model in identifying different types of elements and also guide the localization of element features [7, 8,34].  
We extend the BIO tags by setting nine types of tags, \(T=\{B-EA,I-EA,B-IA,I-IA,O,B-EO,I-EO,B-IO,I-IO\}\), which are explicit or implicit aspect words and opinion words in the tag sequence. We utilize the decoding final layer hidden state as the marker representation and compute the label features for aspect terms and opinion terms based on the label position \(P_{M}\).  
\[HM_{AT}=\mathrm{H}_{dt}\otimes\mathrm{P}_{M}^{\mathrm{AT}} \tag{4}\]  
\[HM_{\mathrm{OT}}=\mathrm{H}_{dt}\otimes\mathrm{P}_{M}^{\mathrm{OT}} \tag{5}\]  
\[M_{AT}=\sigma(W_{1}HM_{AT}+b_{1}) \tag{6}\]  
\[M_{\mathrm{OT}}=\sigma(W_{1}HM_{OT}+b_{1}) \tag{7}\]  
where \(W_{1}\) is the transition matrix, \(b_{1}\) is the bias, and \(\sigma\) denotes the ReLU activation function. The number of quadruples in a sentence is denoted as \(K\), where \(M_{AT}=\{m_{1}^{AT},m_{2}^{AT},\dots,m_{K}^{AT}\}\) and \(M_{\mathrm{OT}}=\{m_{1}^{\mathrm{OT}},m_{2}^{\mathrm{OT}},\dots,m_{K}^{\mathrm{ OT}}\}\) represent the sets of label features for aspect and opinion terms, respectively.  
Aspect terms and opinion terms within multiple quadruples are mutually independent, but aspect terms or opinion terms among themselves can be shared. To predict the BIO tags from the marker features \(M_{AT}\) and \(M_{\mathrm{OT}}\), using a fully connected network, where \(m_{i}^{AT}\in M_{AT}\), \(m_{i}^{OT}\in M_{OT}\) and \(m_{i}^{AT},m_{i}^{OT}\in\mathbb{R}^{d\times N}\), we can formulate the process as follows:  
\[p_{i}^{AT}=\mathrm{softmax}(W_{2}m_{i}^{AT}+b_{2}) \tag{8}\]  
\[p_{i}^{OT}=\mathrm{softmax}(W_{2}m_{i}^{OT}+b_{2}) \tag{9}\]  
During the decoding stage, the model can enhance its ability to extract aspect terms and opinion terms by sharing explicit and implicit term features in sequences containing multiple quadruples. This is achieved through the interactive learning between BIO tags and marker features. The training loss function for this process is defined as cross-entropy. Specifically, for the generation processes of prompt templates \(\mathcal{T}_{ACSO}\) and \(\mathcal{T}_{OCSA}\), the corresponding losses are denoted as \(L_{MT}^{ACSO}\) and \(L_{MT}^{OCSA}\), respectively, with the following formulas.  
\[\mathcal{L}_{MT}^{ACSO-AT}=-\sum_{i=1}^{K}\sum_{j=1}^{N}\sum_{t\in T}(\mathrm{ p}_{ij}^{AT}==t)\cdot\log(\mathrm{p}_{ij}^{AT}\big{|}t). \tag{10}\]  
\[\mathcal{L}_{MT}^{ACSO-OT}=-\sum_{i=1}^{K}\sum_{j=1}^{N}\sum_{t\in T}(\mathrm{ p}_{ij}^{OT}==t)\cdot\log(\mathrm{p}_{ij}^{OT}\big{|}t). \tag{11}\]  
\[\mathcal{L}_{MT}^{ACSO}=\mathcal{L}_{MT}^{ACSO-AT}+\mathcal{L}_{MT}^{ACSO-OT} \tag{12}\]  
Figure 3: The process of the marker classification-enhanced decoding module.