## 3 The Proposed Method
### Heterogeneous Graph Construction  
To leverage both semantic and syntactic structured information, this study constructs a heterogeneous graph. Following previous work [18; 28], documents and words from both source and target languages are represented as nodes, which are connected by different edge types. Specifically syntactic relationships are captured by connecting nodes via POS and dependency edges, and semantic relationships are captured by connecting nodes via translation and similarity edges. Details of the heterogeneous graph construction are shown in the left part of Figure 2. The edge types are as follows:  
* POS edges: POS edges connect documents with words based on their co-occurrence relationships. To capture syntactic structure and contextual relationships between documents and words, words are linked with co-occurrence documents via their POS edges, categorized as Noun, Verb, and ADJ edges.
* Dependency edges: To capture syntactic structural information of source and target documents, a parsing toolkit (detailed in the experimental setup) is used to identify  
Figure 1: Architecture of the proposed model, XCLHG. For clarity, the diagram omits the visualization of data preprocessing steps.  
dependency relations between words, subsequently connecting the words using dependency edges.
* Translation edges: To establish stronger connections between source and target languages, each document is translated and linked to its corresponding translation.
* Similar edges: To facilitate knowledge transfer from the source to the target language, cosine similarity is employed to identify the top-K most similar documents for a specific document in the corpus, and these documents are connected using similarity edges.  
```
0: anchor node \(H_{S}\), translated language node \(H_{T}\), non-translated node \(H_{N}\), positive node \(H_{pos}\), negative node \(H_{neg}\), temperature coefficient \(\gamma\), batch-size \(B\), epochs \(e\). the set of edge types \(\tau\), adjacency matrix \(A\), weight matrix \(W\), edge types attention \(\beta\), the number of category \(C\) and the source language label \(y\), hyper-parameter \(\lambda\) and \(\mu\)
0: The model \(M\)
1: Initialization parameter \(M\)
2:for epoch in range \((1,e+1)\)do
3:for\(i\) in range \((1,B+1)\)do
4: # Compute the node feature representations of heterogeneous GAT
5:\(h_{S}=\sigma(\sum_{\tau_{1}\in T}\beta_{\tau_{1}}A_{\tau_{i}}H_{S_{\tau_{i}}}W _{\tau_{1}})\)
6:\(h_{T}=\sigma(\sum_{\tau_{1}\in T}\beta_{\tau_{1}}A_{\tau_{i}}H_{T_{\tau_{i}}}W _{\tau_{1}})\)
7:\(h_{N}=\sigma(\sum_{\tau_{1}\in T}\beta_{\tau_{1}}A_{\tau_{i}}H_{N_{\tau_{i}}}W _{\tau_{i}})\)
8:\(h_{pos}=\sigma(\sum_{\tau_{1}\in T}\beta_{\tau_{1}}A_{\tau_{i}}H_{pos_{\tau_{ i}}}W_{\tau_{1}})\)
9:\(h_{neg}=\sigma(\sum_{\tau_{1}\in T}\beta_{\tau_{1}}A_{\tau_{1}}H_{neg_{S_{\tau _{i}}}}W_{\tau_{1}})\)
10: # define heterogeneous GAT _loss_
11:\(L_{ce}=-\sum_{i}\sum_{\tau=1}^{C}y\cdot\log softmax(h)\)
12: # Compute the similarity between the source and translated sample
13:\(Sim(h_{S},h_{T})=\frac{h_{S}\cdot h_{T}}{||h_{S}||||h_{T}||}\)
14: # define translation-level contrastive learning loss
15:\(L_{tl-cl}=-\log\frac{exp(Sim(h_{S}h_{T})/\tau)}{\sum exp(Sim(h_{S}h_{N})/ \tau)}\)
16: # Compute the similarity between the anchor and positive samples
17:\(Sim(h_{S},h_{pos})=\frac{h_{S}\cdot h_{pos}}{||h_{S}||||h_{pos}||}\)
18: # define label-level contrastive learning loss
19:\(L_{tl-cl}=-\sum_{i\in B}\log\frac{1}{C_{i}}\sum_{y_{i}=y_{C},C\
eq i}\frac{ exp(sim(h_{S}h_{pos}/\gamma)}{\sum_{\xi\in B,\xi\
eq neg}exp(sim(h_{S}h_{neg}/\gamma)}\)
20: # Compute the total _loss_
21:\(L_{XCLHG}=L_{ce}+\lambda L_{tl-cl}+\mu L_{ll-cl}\)
22:endfor
23: # Back propagation and optimization
24: Update model M using gradient descent to minimize \(L_{XCLHG}\)
25:endfor
26: return M
```  
**Algorithm 1** XCLHG Training Algorithm