Next Article in Journal
Methodology and Experimental Investigation of Linear Creep Behavior in Two-Layer Reinforced Concrete Beams
Previous Article in Journal
Multifunctional Cementitious Composites from Fabrication to Their Application in Pavement: A Comprehensive Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Heterogeneous Graph Neural Network with Multi-View Contrastive Learning for Cross-Lingual Text Classification

School of Computer Science and Engineering, Nanjing University of Science and Technology, Nanjing 210094, China
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(7), 3454; https://doi.org/10.3390/app15073454
Submission received: 18 February 2025 / Revised: 18 March 2025 / Accepted: 20 March 2025 / Published: 21 March 2025
(This article belongs to the Section Computing and Artificial Intelligence)

Abstract

:
The cross-lingual text classification task remains a long-standing challenge that aims to train a classifier on high-resource source languages and apply it to classify texts in low-resource target languages, bridging linguistic gaps while maintaining accuracy. Most existing methods achieve exceptional performance by relying on multilingual pretrained language models to transfer knowledge across languages. However, little attention has been paid to factors beyond semantic similarity, which leads to the degradation of classification performance in the target languages. This study proposes a novel framework, a heterogeneous graph neural network with multi-view contrastive learning for cross-lingual text classification, which integrates a heterogeneous graph architecture with multi-view contrastive learning for the cross-lingual text classification task. This study constructs a heterogeneous graph to capture both syntactic and semantic knowledge by connecting document and word nodes using different types of edges, including Part-of-Speech tagging, dependency, similarity, and translation edges. A Graph Attention Network is applied to aggregate information from neighboring nodes. Furthermore, this study devises a multi-view contrastive learning strategy to enhance model performance by pulling positive examples closer together and pushing negative examples further apart. Extensive experiments show that the framework outperforms the previous state-of-the-art model, achieving improvements of 2.20% in accuracy and 1.96% in F1-score on the XGLUE and Amazon Review datasets, respectively. These findings demonstrate that the proposed model makes a positive impact on the cross-lingual text classification task overall.

1. Introduction

Deep learning [1], a prominent subfield of artificial intelligence, leverages neural networks to identify complex patterns in large datasets, driving significant progress across multiple fields [2,3]. In particular, it has made substantial strides in numerous Natural Language Processing (NLP) tasks, such as text classification [4], machine translation [5], and information retrieval [6]. However, a significant limitation of deep-learning models is their heavy reliance on large amounts of labeled data for optimal performance [7]. Labeled data, however, is often scarce for low-resource languages. As a result, an increasing number of recent studies are focusing on the field of cross-lingual knowledge transfer [8,9].
Cross-Lingual Text Classification (CLTC) [10,11,12] is a branch of cross-lingual knowledge transfer task, aiming to classify texts in target languages with limited or no annotated data by training a classifier on source language data. The main challenge in CLTC is overcoming the inherent semantic and syntactic disparities between languages, with the ultimate goal of enabling effective transfer knowledge from the source language to the target language. Existing methods mainly implement the semantic similarity among languages to bridge cross-lingual gaps [13], including effective multilingual pretrained language models [9,14], which leverage transformer-based neural networks trained on large-scale multilingual datasets. However, the performance of multilingual pretrained language models are often constrained by their ability to capture syntactic information and handle complex structural dependencies across languages [15]. Furthermore, their failure to explicitly model interlingual syntactic variations may ultimately compromise generalization performance in the target language.
To overcome the limitations in learning representations of textual syntactic structures, recent researchers have focused on leveraging Graph Neural Networks (GNNs). These models capture relational information inherent in graphs by aggregating and transforming information from neighboring nodes [16], thereby enabling them to model both local and global dependencies and effectively capture global long-range word dependencies and syntactic structures.
Motivated by recent breakthroughs in GNN-based CLTC and driven by the need to address existing challenges [17], Wang et al. [18] introduced a heterogeneous graph construction method to encode both source and target texts. However, this model neglects the dependency relationships between words, and the use of machine translation often introduces substantial inaccuracies, compromising the reliability of results. On this basis, this study proposes a heterogeneous GNN framework integrated with multi-view contrastive learning, named XCLHG, to effectively capture structured information by combining semantic and syntactic knowledge. In this framework, a heterogeneous graph is constructed in which words and documents serve as nodes, connected by various types of edges, including Part-of-Speech (POS) tagging, dependency, translation, and similarity edges.
Additionally, in order to improve the quality of language representations by bringing semantically equivalent samples from different languages closer together in the embedding space, this study devises a multi-view contrastive learning strategy; the two views are Translation-Level Contrastive Learning (TL-CL) and Label-Level Contrastive Learning (LL-CL), respectively.
This study presents a novel framework, XCLHG, that integrates a heterogeneous GNN with multi-view contrastive learning to address the challenges of CLTC. The main contributions are as follows:
  • Theoretical advances: The proposed framework introduces an innovative approach that captures both syntactic and semantic knowledge by constructing a heterogeneous graph, where documents and words are interconnected through multiple edge types. The integration of multi-view contrastive learning facilitates the alignment of cross-lingual features, thereby advancing the theoretical understanding of structured representation learning.
  • Practical implications: Accurate classification of text across multiple languages provides significant real-world benefits. Enhanced text analysis enabled by the proposed framework facilitates more effective evaluation of customer feedback, targeted advertising, and refined product recommendation systems. Consequently, these advancements contribute to global market research and public policy development by ensuring that diverse linguistic perspectives are integrated into decision-making processes.
  • Empirical performance: Extensive experiments demonstrate that the proposed approach substantially outperforms state-of-the-art methods. Notably, a 2.20% improvement in accuracy on the XGLUE dataset confirms the effectiveness of the framework in facilitating knowledge transfer from high-resource to low-resource languages.
The remainder of this paper is organized as follows. Section 2 reviews related work in CLTC. Section 3 describes the proposed methodology in detail, including the formal problem formulation, the construction of a heterogeneous graph, and the design of a multi-view contrastive learning strategy. Section 4 presents the datasets, experimental setup, and analysis of the results. Finally, Section 5 concludes the paper by discussing the limitations of the study and potential directions for future research.

2. Related Work

In recent years, the rapid advancement of deep-learning architectures in NLP has led to substantial progress in a wide range of fundamental tasks in text analysis and mining [19]. Jovanovic et al. [20] proposed an improved variant of the popular particle swarm optimization algorithm, integrating decomposition techniques to enable networks to capture and interpret underlying trends in the input data. This refined approach demonstrated outstanding performance in predicting Amazon sales. Alohali et al. [21] developed an enhanced deep-learning model that integrates metaheuristic optimization, specifically designed for intelligent systems to accurately identify and classify textual emotions. Recent innovations in text classification have not only enhanced the understanding of textual nuances but have also paved the way for rapid and transformative growth in the field of CLTC. Early approaches in CLTC are mainly divided into two groups: linear transformation methods and multilingual pre-trained methods.

2.1. Linear Transformation Methods

Prior work has explored many approaches to cross-lingual representation learning through linear transformation [22,23,24]. These methods represent semantic features across different languages by mapping words to continuous vector spaces. Subsequently, linear transformations are employed to project these language-specific representations into a shared, unified vector space [25]. Zhou et al. [22] proposed a strategy of bilingual sentiment word embeddings to bridge the semantic gap between English and Chinese. Wang et al. [23] employed structural correspondence learning to effectively exploit target-language domain knowledge, minimizing knowledge degradation during semi-supervised transfer. Kuriyozov et al. [24] proposed a method that maps languages into a common cross-lingual space through pairwise alignment. Although linear transformation methods are widely applied, they still have significant limitations. In particular, these methods struggle to address lexical gaps between languages, such as culturally specific vocabulary, and fail to effectively handle polysemous words. Furthermore, alignment at the word or sentence level tends to be insufficient, especially when handling culturally unique expressions or polysemous words. Additionally, these methods exhibit limited effectiveness in handling languages with substantial differences in word order or syntactic structures.

2.2. Pre-Trained Methods

Pre-trained models transfer knowledge during the pre-training phase and perform classification tasks during the fine-tuning phase [26]. Based on the central content of this study, pre-trained models are subdivided into three categories: transformer-based models, GNN models, and contrastive learning models. Transformer-based models offer significant advantages over traditional linear mapping methods, primarily in the following aspects [12]. They apply neural network architectures to capture the dynamic semantics of words and sentences, which enhances contextual awareness. Furthermore, they employ a shared multilingual vocabulary and joint pre-training to facilitate implicit semantic space alignment. Xia et al. [27] proposed a meta-learning-based framework to push the source and target language representations closer together. Vo et al. [28] integrated topic modeling with a graph attention network to enhance the semantic information of textual representations in multilingual context. Maurya et al. [29] categorized languages into three groups based on central languages and applied meta-learning to optimize parameter initialization. Zheng et al. [26] incorporated a code-switching technique and a syntactic-based mBERT model to capture syntactic and lexical information for cross-lingual knowledge transfer. Miah et al. [30] proposed a framework that preprocesses target language data by translating it into the base language, and classification results were determined by a majority vote from three distinct models. Typically, transformer-based methods outperform those relying on linear transformations. However, these approaches often overlook the structural information inherent in sentences, which is crucial for accurate text classification [17].
Compared to transformer-based approaches, GNNs offer distinct advantages for cross-lingual text classification by capturing the complex relational structures inherent in text [18]. GNNs excel at modeling the intricate syntactic and semantic dependencies critical to understanding multilingual data. Moreover, they naturally facilitate multi-scale representation learning by aggregating information from local neighborhoods, capturing fine-grained, word-level co-occurrences and syntactic patterns, as well as those from broader global contexts that reflect document-level semantic coherence [31]. In the field of text mining, numerous studies employing GNNs, such as TensorGCN [32] and TG Transformer [33], have consistently surpassed transformer-based methods in performance. Nonetheless, these GNN-based techniques have yet to fully capture the global semantic information embedded in text documents, nor have they provided sufficiently structured representations. Recent studies have focused on modeling long-term heterogeneous dependencies among documents to enhance text representation quality [12]. Extensive experiments in these studies have demonstrated that heterogeneous text graph modeling and representation learning, realized through various GNN architectures, can yield more robust and informative representations [18]. However, a notable limitation of GNNs is that they assign equal weight to all neighboring nodes, which does not reflect real-world scenarios. To solve this issue, a Graph Attention Network (GAT) was introduced to adjust and assign different weights to neighbors using a self-attention mechanism [34]. GATs offer inherent flexibility in capturing complex, node-dependent relationships within graph-structured data, effectively addressing the key limitations of traditional GNNs, such as the over-smoothing phenomenon [35]. With its novel attention mechanism, GATs consistently outperform conventional methods across a wide range of graph-based tasks. Building on these strengths, Wang et al. [18] introduced a heterogeneous GAT to encode both source and target texts.
The fundamental principle of contrastive learning lies in constructing sample pairs to learn more discriminative feature representations. This is achieved by maximizing the similarity between “positive” samples and minimizing the similarity between “negative” samples [36]. Specifically, anchor samples serve as the reference samples for similarity computation in contrastive learning. Positive samples are semantically similar to or belong to the same category as the anchor, and the model is trained to bring their representations as close as possible to that of the anchor. In contrast, negative samples are semantically dissimilar or belong to different categories. The model learns to push their representations farther away from the anchor. Contrastive learning has demonstrated promising capabilities in cross-lingual NLP tasks for enhancing discriminative feature learning, effectively separating differently labeled instances in the latent representation space [37]. Recent studies on text representation learning have demonstrated the remarkable flexibility and scalability of contrastive learning [36]. By integrating contrastive strategies with various neural architectures, including autoencoders, transformers, and GNNs, researchers have achieved robust performance across a wide range of domains and tasks [37]. Wang et al. [38] proposed a self-supervised heterogeneous graph neural network with co-contrastive learning, which leverages meta-path and network schema views to learn robust node embeddings. In contrast, this study diverges significantly from their approach. First, our graph construction method is fundamentally different; we design our heterogeneous graph to specifically capture the syntactic and grammatical structures of text, thereby providing a more robust representation of its intrinsic semantic and syntactic properties. Second, our contrastive learning framework employs a novel dual-view strategy comprising Translation-Level Contrastive Learning (TL-CL) and Label-Level Contrastive Learning (LL-CL). Compared with the method in [38], our dual-view strategy exhibits superior effectiveness in cross-lingual alignment, thereby offering a more precise solution for CLTC.

3. The Proposed Method

This section introduces the framework of the proposed model, Heterogeneous Graph Neural Network with Multi-View Contrastive Learning for Cross-Lingual Text Classification (XCLHG), including details on the construction of the heterogeneous graph and the design of a multi-view contrastive learning strategy for the CLTC task.

3.1. Problem Definition

Let x s r c D s r c and x t g t D t g t represent samples from the source and target languages, respectively, with y s r c denoting the set of labels associated with the source language dataset D s r c . The goal of CLTC task is to build a model that transfers knowledge from the source language to the target language while utilizing only the labeled data from the source language for training.
f ( X ; θ ) y
where θ represents the model parameters, which are trained on the source language data and applied directly to unlabeled data from the target language, X refers to a text sample from either source or target language, y is the predicted label, and f ( · ) represents the model. Additionally, this study assumes that the source and target languages share the same class types.

3.2. The Proposed Framework Structure

This study proposes an XCLHG framework, which consists of four key components: node embedding, heterogeneous graph construction, information propagation, and multi-view contrastive learning, as illustrated in Figure 1. Specifically, the input texts are preprocessed using a machine translation system and language-specific taggers. Subsequently, node embeddings are generated by encoding source and target language words and documents using a multilingual pre-trained language model. To capture both syntactic and semantic information from the source and target languages, this study constructs a heterogeneous text graph, where documents and words are the nodes, connected by multiple types of edges. A GAT is employed to aggregate information from neighboring nodes. After the GAT encoders integrate information from each type of edge to produce comprehensive node embeddings, a multi-view contrastive learning module, which consists of translation-level and label-level views, is applied to align these embeddings. In this step, distances between corresponding feature representations from the two views (positive samples) are minimized, while distances between non-corresponding feature representations (negative samples) are maximized. This collaborative integration mechanism ensures that the complementary features from both views are mutually refined, resulting in robust and discriminative representations for CLTC. The detailed algorithm of XCLHG is presented in Algorithm 1. Based on this framework, three loss functions are formulated as follows:
-
L C E encourages the GAT to output predictions similar to the ground truth, which encodes structured semantic and syntactic information of the source and target language document nodes.
-
L T L C L encourages the model to minimize the distance between the original documents and their translated counterparts via contrastive learning, thereby reducing errors introduced during translation.
-
L L L C L reduces the distance between samples with the same label, while increasing the distance between those with different labels.
In the following sections, the construction of a heterogeneous graph is first presented (Section 3.3), followed by an introduction to the application of a GAT for cross-lingual text classification (Section 3.4). Additionally, a detailed description of the employed multi-view contrastive learning strategies, including the formulation of the loss functions, is provided (Section 3.5).

3.3. 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 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.
Algorithm 1 XCLHG Training Algorithm
Input: anchor node H S , translated language node H T , non-translated node H N , positive node H p o s , negative node H n e g , temperature coefficient γ , batch-size B, epochs e. the set of edge types τ , adjacency matrix A, weight matrix W, edge types attention β , the number of category C and the source language label y, hyper-parameter λ and μ
Output: The model M
  1:
Initialization parameter M
  2:
for  e p o c h 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 = σ ( τ i τ β τ i A τ i H S τ i W τ i )
  6:
             h T = σ ( τ i τ β τ i A τ i H T τ i W τ i )
  7:
             h N = σ ( τ i τ β τ i A τ i H N τ i W τ i )
  8:
             h p o s = σ ( τ i τ β τ i A τ i H p o s τ i W τ i )
  9:
             h n e g = σ ( τ i τ β τ i A τ i H n e g τ i W τ i )
10:
            # define heterogeneous GAT l o s s
11:
             L c e = i v = 1 C y · log s o f t m a x ( h )
12:
            # Compute the similarity between the source and translated sample
13:
             S i m ( h S , h T ) = h S · h T | | h S | | | | h T | |
14:
            # define translation-level contrastive learning l o s s
15:
             L t l c l = log e x p ( S i m ( h S , h T ) / τ ) e x p ( S i m ( h S , h N ) / τ )
16:
            # Compute the similarity between the anchor and positive samples
17:
             S i m ( h S , h p o s ) = h S · h p o s | | h S | | | | h p o s | |
18:
            # define label-level contrastive learning l o s s
19:
             L l l c l = i B log 1 C i y i = y C , C i e x p ( s i m ( h S , h p o s / γ ) S B , S n e g e x p ( s i m ( h S , h n e g / γ )
20:
            # Compute the total l o s s
21:
             L X C L H G = L c e + λ L t l c l + μ L l l c l
22:
      end for
23:
      # Back propagation and optimization
24:
      Update model M using gradient descent to minimize L X C L H G
25:
end for
26:
return M

3.4. Heterogeneous Graph Attention Network

For the construction of the heterogeneous graph, as shown on the right in Figure 2, this study employs a multi-layer GAT to aggregate information from nodes connected by each type of edge. Specifically, the GAT framework consists of three components: node encoding, graph structure representation, and a classifier.
First, the node embeddings are generated using a multilingual pre-trained model. These embeddings are then fused using a dual-level graph attention mechanism, which first weighs the importance of different relation types at the edge-type level, and subsequently adjusts the contribution of each neighboring node at the node level. The integration of different edge types enables the model to comprehensively leverage complementary information. This integration process effectively captures heterogeneous graph information, resulting in robust and discriminative node embeddings. Specifically, the Graph Attention Network (GAT) individually encodes each type of edge (e.g., POS, dependency, translation, similarity), producing embeddings that encapsulate the diverse semantic and syntactic perspectives of the heterogeneous graph.

Node Encoding

Let x = ( w 1 , w 2 , , w n ) denotes an input document with n words. D = { x 1 , x 2 , , x m } represents a dataset of source and target languages, where m is the number of documents. The encoder is a multilingual pre-trained language model, such as multilingual BERT [14,39], XLM [9], XLM-RoBERTa [40], or mT5 [41], which can obtain rich contextual information. In this study, XLM-RoBERTa is specifically chosen to encode words and documents.
h i = f X L M R ( x i )
z i = f X L M R ( w i )
where z i and h i denote the word and document node features, respectively. f X L M R is a model used to encode each node. Notably, the node features remain fixed during model training.

Graph Representation Structure

After encoding all nodes with the multilingual pretrained language model, the resulting features serve as input to the GAT, enabling the model to capture correlations between nodes more effectively.
Inspired by [42], heterogeneous GATs exhibit variations in node importance, not only across different edge types but also among nodes connected by the same edge type. Therefore, this study employs a GAT with a dual-level attention mechanism, comprising type-level attention and node-level attention to aggregate neighborhood information and generate node representations.
The formulation of the type-level attention is defined as follows:
α τ = e x p ( L e a k y R e L U ( a T [ W τ i W τ j ] ) ) τ k τ e x p ( L e a k y R e L U ( a T [ W τ i W τ k ] ) )
where W and a are the weight matrix and weight vector, respectively, L e a k y R e L U is the activation function, ∥ denotes the concatenation operator, and τ represents the set of all neighboring nodes of different types. α τ is the attention coefficient of node i and node j for type-level.
Node importance varies across both different node types and among nodes of the same type. Here, the node-level attention can be defined as:
β i j = e x p ( L e a k y R e L U ( b T α τ [ W z i W z j ] ) ) z k N i e x p ( L e a k y R e L U ( b T [ W z i W z k ] ) )
where N i is the set of the neighboring nodes z k , β i j is the node-level attention coefficient between neighboring node i and node j, and b represents the weight vector.
Then, the representation of nodes h = { h i } i = 1 n can be expressed as follows:
h l + 1 = σ ( τ i τ β τ i A τ i h τ i l W τ i l )
where A τ i is a submatrix of the aforementioned adjacency matrix of the graph structure, τ denotes the set of edge types, σ represents the activation function, and l indicates the layer in the GAT architecture. When l = 0 , h 0 = f X L M R ( x i ) , which is computed by the multilingual model. Thus, the above computations yield global graph representations, capturing both semantic and structural information.

Classifier

After obtaining the representation of node features, h, a softmax function is applied to compute the final classification.
Z = s o f t m a x ( h l )
Setting l = 2 indicates that the GAT consists of two layers. Information from second-order neighbors is aggregated using the two-layer GAT, followed by a linear transformation of the document node representations to produce predictions.
Then, cross-entropy loss is employed during model training.
L c e = u D t r a i n v = 1 C y u v · log Z u v
where D t r a i n is the training dataset, C denotes the number of categories, y u v represents the label matrix, and Z u v represents the prediction probability. Specifically, gradient descent is employed to optimize the model.

3.5. Contrastive Learning

This study devises a multi-view contrastive learning strategy that leverages two complementary views to enhance cross-lingual alignment. As shown in Figure 3, multi-view contrastive learning, by simultaneously considering feature representations from multiple perspectives, effectively captures the rich semantic information in the data, thereby enhancing model performance and generalization capabilities. In the translation-level view, for each anchor document in the source language, its corresponding translated document is treated as positive samples. This view aims to minimize discrepancies introduced by machine translation, ensuring that the semantic representations of the original and translated texts are closely aligned. In contrast, in the label-level view, documents sharing the same class label, regardless of their languages, are considered positive pairs, while those with differing labels serve as negative pairs. This view reinforces the discriminative features among classes by pulling semantically similar documents closer in the latent space and pushing dissimilar ones apart.
By jointly optimizing these two views through their respective loss functions, the model benefits from complementary supervision signals derived from both views. The translation-level view primarily addresses cross-lingual semantic alignment, while the label-level view focuses on enhancing intra-class compactness and inter-class separability. The integration of these views results in more robust and discriminative node embeddings, thereby improving overall cross-lingual classification performance.

3.5.1. Translation-Level Contrastive Learning

In CLTC tasks, the Translation-Level Contrastive Learning (TL-CL) strategy effectively reduces translation errors by minimizing the distance between anchor samples and their translated counterparts, thereby enhancing model performance and generalization. Figure 3b shows how TL-CL applies contrastive learning within the proposed XCLHG framework. Specifically, a source, text x s r c , serves as the anchor, and its translated counterpart, x t r a n s , is treated as the positive sample. Subsequently, negative samples are randomly selected from the dataset, which comprises source, translated, and target documents. Using the model described above, feature representations for each example are obtained. Thus, the loss function of TL-CL can be defined as:
L T L C L = x i , x t D log e x p ( s i m + ( h ( x i ) , h ( x t ) / γ ) x e D , x e x i e x p ( s i m ( h ( x i ) , h ( x e ) / γ )
where s i m represents the similarity between examples, h ( · ) represents the heterogeneous graph neural network, and + and − denote positive and negative examples, respectively. x t represents the translated sample from x i and x e denotes a document in dataset D. Here, this study simply employs the cosine similarity to compute the similarity. γ is the temperature coefficient, which regulates the challenge of distinguishing between positive and negative examples. Intuitively, the contrastive learning loss function aims to maximize the similarity of positive examples while minimizing the similarity of negative examples.

3.5.2. Label-Level Contrastive Learning

The Label-Level Contrastive Learning (LL-CL) strategy narrows the distance of samples with the same labels, as shown in Figure 3c. Specifically, let B = { x 1 , x 2 , , x b } denote a collection of samples; b is the batch size. { x i , y i } represents a sample and label pairs in B. The LL-CL loss on the batch B is defined as:
P B ( i , c ) = e x p ( s i m + ( h ( x i ) , h ( x c ) / γ ) x k B , x k x i e x p ( s i m ( h ( x i ) , h ( x k ) / γ )
L L L C L = i B log 1 C i y i = y c , c i P B ( i , c )
where P B ( i , c ) represents the likelihood that x c is the most similar sample to x i , h ( · ) represents the heterogeneous graph neural network, x c is a document in B that belongs to the same category as x i , x k is a distinct sample from x i in the same batch, thereby serving as a negative example for comparative analysis during the contrastive learning process, and C i represents the set of samples in B that share the same label as x i . The LL-CL loss function is designed to maximize the similarity between examples within the same category while minimizing the similarity between examples from different categories.
The three loss functions mentioned above are combined and jointly trained in XCLHG. Specifically, the overall training loss, L X C L H G , is calculated as a combination of the heterogeneous graph neural network loss, L C E , the multi-view contrastive learning loss, L T L C L , and L L L C L on batch B; the coefficients λ and μ are introduced to balance the optimization objectives:
L X C L H G = L C E + λ L T L C L + μ L L L C L

4. Experiments and Discussion

This section demonstrates the significant performance improvements of the XCLHG framework on various multilingual datasets for the CLTC task. Subsequently, the datasets and experimental setup are detailed, followed by a comprehensive analysis of the results.

4.1. Dataset

This study conducts experiments on three datasets, including the Amazon Review dataset [43], the multilingual SLU dataset [44], and the XGLUE news classification dataset [45]. These datasets were selected based on criteria including the diversity of language pairs, the variety of application domains, and their extensive usage in previous studies, which collectively enable direct comparisons with state-of-the-art methods. Table 1 summarizes the statistical characteristics of these datasets. The CLTC task is then performed on each dataset.
Amazon Review Dataset (Amazon Reviews: https://webis.de/data/webis-cls-10.html accessed on 12 May 2023). This multilingual sentiment classification dataset comprises customer reviews in four languages (English, German, French, and Japanese) collected across three domains, Books, DVDs, and Music, thereby reflecting authentic real-world customer feedback scenarios. For the sentiment classification task, the original 5-point rating scale has been transformed into binary classification labels (positive/negative) using a threshold of 3.
Multilingual SLU Dataset (Multilingual SLU: https://nlpforthai.com/tasks/slu/ accessed on 12 May 2023). This intent classification dataset comprises twelve distinct intent types across three languages (English, Spanish, and Thai). It provides multilingual data that highlight the inherent challenges in accurately interpreting user intent within diverse linguistic contexts.
XGLUE News Classification Dataset (XGLUE News: https://microsoft.github.io/XGLUE/ accessed on 12 May 2023). This multilingual news text dataset comprises articles in five languages (English, French, Russian, German, and Spanish), with each article assigned to one of ten distinct content categories. It serves as a challenging benchmark for cross-lingual news classification by encompassing a wide array of languages and diverse topical domains.
It is worth noting that this study uses only the source language English as training data and evaluates the model on target languages, including German, Spanish, Russian, Thai, Japanese, and French.

4.2. Experiment Setting

XLM-R is fine-tuned with a learning rate of 4 × 10 5 on each dataset and is then used to encode all nodes. A two-layer GAT with a hidden size of 512 and a batch size of 32 is employed in the experiments. For optimization, the AdamW optimizer [46] with a learning rate of 3 × 10 5 is employed. The number of the most similar examples (K) in similarity edges is set to 3. The temperature coefficient of contrastive learning, γ , is set to 0.1 and λ = 1 , μ = 1 in Equation (10). The maximum sequence lengths for intent classification and other classification tasks are set to 128 and 512, respectively, consistent with [18]. This study implements the XCLHG model with the Python (3.9.2) programming language under the support of the well-known PyTorch (1.10.0) machine-learning framework. All experimental evaluations are executed on a GPU (Geforce RTX 3090, 24 GB).
For part-of-speech tagging, the Stanford POS Tagger [47] is used for English text; SpaCy (SpaCy: https://spacy.io accessed on 12 May 2023) for German, French, and Spanish; MeCab (MeCab: https://taku910.github.io/mecab/ accessed on 12 May 2023) for Japanese; TLTK (TLTK: https://pypi.org/project/tltk/ accessed on 12 May 2023) for Thai; and NLTK (NLTK: https://www.nltk.org/ accessed on 12 May 2023) for Russian. For identifying dependency relations, the Stanford Dependency Parser is used for English text; SpaCy for German, French, and Spanish; CaboCha (CaboCha: http://chasen.org/taku/software/cabocha/ accessed on 12 May 2023) for Japanese; and Stanza (Stanza: https://stanfordnlp.github.io/stanza/ accessed on 12 May 2023) for Thai and Russian. In data preprocessing, the Tencent Translation API (Tencent translation API: https://cloud.tencent.com/document/api/551/73920 accessed on 12 May 2023) is employed to translate both source and target language documents. The proposed XCLHG framework is compared with various baselines, including multilingual BERT, XLM, XLM-R, and mT5. Additionally, it is evaluated against state-of-the-art models such as CLHG [18], TG-CTC [28], Meta-XNLG [29], the Ensemble model [30], and LS-mBERT [26].

4.3. Experiment Results and Analysis

The proposed model is compared with several baseline and multilingual models. Accuracy and F1-scores are adopted as the evaluation metrics to ensure a consistent and fair comparison. The experimental results of classification accuracy and F1-score on the Amazon Review dataset are shown in Table 2 and Table 3, and the results of classification accuracy and F1-score on the XGLUE and SLU datasets are shown in Table 4 and Table 5, respectively.
Table 2 presents the accuracy results for the Amazon Review dataset; the proposed model achieves excellent performance across the three language datasets, outperforming not only the baselines but also state-of-the-art models in all domains and languages. Notably, the highest accuracy of 93.22% is reached on the German book review dataset. Furthermore, all models exhibit higher accuracy on the French and German datasets compared to Japanese, suggesting that linguistic similarity contributes to improved model performance.
Table 4 presents the results on two datasets, including the tasks of news and intent classification. The model XCLHG consistently outperforms all other models listed in the table. Notably, the model achieves an accuracy of up to 97.67% on the SLU Spanish dataset. This excellent performance can be attributed to two key factors: (1) the linguistic similarity of the languages involved, as discussed earlier, and (2) the shorter text lengths in the SLU dataset, which facilitate the construction of a more stable GAT. Additionally, both CLHG [18] and TG-CTC [28] employ graph-based approaches and achieve significantly higher performance compared to models evaluated on other datasets. The most significant improvement, compared to the suboptimal model, is observed on the XGLUE dataset, where a 2.20% increase in performance is achieved for Russian. As Russian is the most dissimilar language to English in the XGLUE dataset, this demonstrates that the proposed contrastive learning strategy effectively reduces the linguistic discrepancy between languages.
Table 3 and Table 5 present the F1-score results; the predicted F1-scores closely reflect the trends observed in the accuracy results. For the Amazon Review dataset, XCLHG achieves the highest F1-scores across all language subsets. Similarly, on the SLU and XGLUE datasets, XCLHG consistently outperforms competing models, achieving notably high F1-scores, particularly on the SLU Spanish subset, where it reaches approximately 93.52%. These results indicate that XCLHG not only delivers high accuracy but also maintains a balanced precision–recall performance, thereby reinforcing its effectiveness for CLTC.
Overall, the alignment between the accuracy and F1-scores further substantiates the robustness of the approach in capturing discriminative features across diverse multilingual contexts and clearly indicates that the XCLHG model significantly outperforms all competing multilingual models. The success of the model can be attributed to two key factors: (1) The design of a heterogeneous graph enables the effective integration of structural features, enhancing the model’s ability to capture complex relationships within the data. (2) The incorporation of multi-view contrastive learning facilitates the alignment of semantic representations by bringing together documents with the same label and their translated pairs, thereby enhancing cross-lingual consistency.

4.4. Visualization

To systematically investigate the behavior of the framework, the Amazon Reviews (Book) dataset was visualized using t-SNE [48], and the resulting two-dimensional embeddings are presented in Figure 4. For the English->French task in Figure 4a, the high-dimensional feature representations produced by the multilingual pre-trained language model are subsequently mapped to a two-dimensional space via the t-SNE algorithm. The visualization clearly illustrates that the embedding representations of source and target language documents exhibit significant divergence in feature space, forming distinct clusters aligned with linguistic boundaries. This observation is consistent with the cross-lingual alignment hypothesis in representation learning. Additionally, while the multilingual pretrained language model demonstrates strong document embedding capabilities, the visualization reveals that this model still results in a considerable number of misclassifications.
To facilitate visualization, the feature points of the source and target languages in the model without the contrastive learning module (referred to as the Heterogeneous Graph (HG) model) are presented as two separate images in Figure 4b. The distributions of the source and target languages exhibit fundamental consistency, indicating effective knowledge transfer from the source language to the target language. In Figure 4c, the visualization of the model shows tightly clustered representations of positive and negative documents, respectively. A comparative analysis of subfigures (b) and (c) demonstrates that the XCLHG framework achieves enhanced cluster separation in target language document embeddings compared to the HG architecture. The t-SNE visualizations empirically validate the effectiveness of multi-view contrastive learning for cross-lingual knowledge transfer by improving latent space alignment.

4.5. Ablation Study

To evaluate the contribution of each component in the model, this study designs seven variant experiments and tests them on the Amazon Review music dataset. The results are shown in Table 6 and clearly demonstrate that removing any single component leads to a performance drop, highlighting the importance of each part in the model.
Here, Variant 1, which removes both POS tags and dependency edges from the graph structures, exhibits significant performance degradation. This indicates that POS tags and dependency edges play a crucial role in providing syntactic information, which enhancing the construction of the graph. Moreover, Variant 2, which retains POS information, demonstrates a measurable performance improvement over Variant 1, particularly when applied to language pairs with significant linguistic divergence. Variant 4 demonstrates the importance of the similarity edge in the model, since it facilitates more effective semantic representation learning. Variant 3, which removes both the translation and multi-view contrastive learning modules, achieves the lowest performance, while adding the translation module yields better results, as shown in Variant 5. However, Variant 5, which lacks multi-view contrastive learning, remains the second-worst-performing; this indicates that the contrastive learning module is the most crucial among all added components. Furthermore, the results of Variant 6 and 7, which remove translation-level and label-label contrastive learning, respectively, show a decline in performance. This further emphasizes the effectiveness of the contrastive learning modules from different views.
In conclusion, the results of the ablation study strongly demonstrate the effectiveness of the XCLHG framework. The components work synergistically to enhance the model’s performance in multilingual environments.

4.6. Case Study

In this section, a case study is presented to illustrate the capability of the model to transfer knowledge from the source to the target language. As shown in Table 7, the experimental results indicate that, by integrating a heterogeneous graph with contrastive learning, the XCLHG model effectively captures both syntactic and semantic structural information across texts in different languages.
Three distinct languages are selected for analysis. The models yield correct predictions for both German and Spanish texts; however, for longer Russian texts, the CLHG method produces prediction errors. This can be attributed to the tendency of longer texts to lose structured information, thereby weakening the dependency relationships. To address this challenge, the proposed model employs a heterogeneous graph structure to fuse syntactic and semantic information, while also incorporating a multi-view contrastive learning strategy. This strategy both rectifies translation errors and pulls together samples within the same category, thereby mitigating the loss of dependencies in long texts and enhancing the overall accuracy and robustness of the model in CLTC tasks.

5. Conclusions

This study investigated the potential of CLTC, a critical task for transferring knowledge from high-resource to low-resource languages. Cross-lingual classification is inherently challenging due to the complex syntactic and semantic variations that exist across different languages, which traditional approaches have often struggled to address effectively. To overcome these challenges, a novel framework XCLHG was developed, integrating a heterogeneous graph structure with multi-view contrastive learning. Specifically, the heterogeneous graph captures syntactic–semantic relationships across languages, while multi-view contrastive learning bridges the gap between representations of different languages by maximizing similarity scores for positive samples and minimizing similarity distances between negative samples. The experimental results revealed exceptional performance in CLTC tasks. Evaluated using both F1-score and accuracy, the XCLHG framework consistently outperformed competing approaches. Notably, on the XGLUE dataset, notably, the proposed model achieved up to a 2.20% improvement in accuracy, providing compelling evidence that integrating heterogeneous graph construction with contrastive learning markedly enhances classification precision in CLTC.
The limitation of XCLHG is that the construction of the heterogeneous graph depends on various language-specific features, such as POS tagging, dependency parsing, similarity metrics, and translation edges. The performance of these linguistic tools may vary significantly across different languages, potentially leading to errors or inconsistencies in graph construction. Future work could address these pressing challenges by fine-tuning or developing domain- and language-specific models for tasks such as POS tagging and dependency parsing, which can reduce errors in the extracted linguistic features and lead to more accurate graph construction. In addition, future work will incorporate a comprehensive time complexity analysis to provide a more complete evaluation of the model’s performance and efficiency.

Author Contributions

Methodology, X.L. and K.Z.; software, X.L.; validation, K.Z.; data curation, K.Z.; writing—original draft preparation, X.L.; writing—review and editing, X.L.; visualization, X.L.; supervision, K.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data presented in this study are available in the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [PubMed]
  2. Zhao, T.; Wang, S.; Ouyang, C.; Chen, M.; Liu, C.; Zhang, J.; Yu, L.; Wang, F.; Xie, Y.; Li, J.; et al. Artificial intelligence for geoscience: Progress, challenges and perspectives. Innovation 2024, 5, 100691. [Google Scholar] [CrossRef] [PubMed]
  3. Zhao, X.; Wang, L.; Zhang, Y.; Han, X.; Deveci, M.; Parmar, M. A review of convolutional neural networks in computer vision. Artif. Intell. Rev. 2024, 57, 99. [Google Scholar] [CrossRef]
  4. Yadav, A.; Vishwakarma, D.K. Sentiment analysis using deep learning architectures: A review. Artif. Intell. Rev. 2020, 53, 4335–4385. [Google Scholar] [CrossRef]
  5. Cho, K.; van Merriënboer, B.; Gulçehre, Ç.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 25–29 October 2014. [Google Scholar]
  6. Wang, S.; Jiang, J. Learning Natural Language Inference with LSTM. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego, CA, USA, 12–17 June 2016; pp. 1442–1451. [Google Scholar]
  7. Conneau, A.; Schwenk, H.; Le Cun, Y.; Barrault, L. Very deep convolutional networks for text classification. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, EACL, Valencia, Spain, 3–7 April 2017; pp. 1107–1116. [Google Scholar]
  8. Liu, Z.; Winata, G.I.; Fung, P. Continual Mixed-Language Pre-Training for Extremely Low-Resource Neural Machine Translation. In Findings of the Association for Computational Linguistics, ACL-IJCNLP; Association for Computational Linguistics: Stroudsburg, PA, USA, 2021; pp. 2706–2718. [Google Scholar]
  9. Conneau, A.; Lample, G. Cross-lingual language model pretraining. Adv. Neural Inf. Process. Syst. 2019, 32, 7059–7069. [Google Scholar]
  10. Wan, X. Co-training for cross-lingual sentiment classification. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP, Singapore, 2–7 August 2009; pp. 235–243. [Google Scholar]
  11. Xu, R.; Yang, Y. Cross-lingual Distillation for Text Classification. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Vancouver, BC, Canada, 30 July–4 August 2017; pp. 1415–1425. [Google Scholar]
  12. Pibáň, P.; Šmíd, J.; Steinberger, J.; Mitera, A. A comparative study of cross-lingual sentiment analysis. Expert Syst. Appl. 2024, 247, 123247. [Google Scholar] [CrossRef]
  13. Eronen, J.; Ptaszynski, M.; Masui, F. Zero-shot cross-lingual transfer language selection using linguistic similarity. Inf. Process. Manag. 2023, 60, 103250. [Google Scholar] [CrossRef]
  14. Kenton, J.D.M.W.C.; Toutanova, L.K. Bert: Pre-training of deep bidirectional transformers for language understanding. Proc. Naacl-HLT 2019, 1, 4171–4186. [Google Scholar] [CrossRef]
  15. Hu, J.; Ruder, S.; Siddhant, A.; Neubig, G.; First, O.; Johnson, M. Xtreme: A massively multilingual multi-task benchmark for evaluating cross-lingual generalisation. In Proceedings of the International Conference on Machine Learning (PMLR), Virtual, 13–18 July 2020; pp. 4411–4421. [Google Scholar]
  16. Scarselli, F.; Gori, M.; Tsoi, A.C.; Hagenbuchner, M.; Monfardini, G. The graph neural network model. IEEE Trans. Neural Netw. 2008, 20, 61–80. [Google Scholar] [CrossRef] [PubMed]
  17. Yao, L.; Mao, C.; Luo, Y. Graph convolutional networks for text classification. In Proceedings of the AAAI Conference on Artificial Intelligence, Honolulu, HI, USA, 27 January–1 February 2019; Volume 33, pp. 7370–7377. [Google Scholar]
  18. Wang, Z.; Liu, X.; Yang, P.; Liu, S.; Wang, Z. Cross-lingual Text Classification with Heterogeneous Graph Neural Network. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), Virtual, 1–6 August 2021; pp. 612–620. [Google Scholar]
  19. Fields, J.; Chovanec, K.; Madiraju, P. A survey of text classification with transformers: How wide? how large? how long? how accurate? how expensive? how safe? IEEE Access 2024, 12, 6518–6531. [Google Scholar] [CrossRef]
  20. Jovanovic, A.; Bacanin, N.; Jovanovic, L.; Damasevicius, R.; Antonijevic, M.; Zivkovic, M.; Dobrojevic, M. Performance evaluation of metaheuristics-tuned recurrent networks with VMD decomposition for Amazon sales prediction. Int. J. Data Sci. Anal. 2024, 1–19. [Google Scholar] [CrossRef]
  21. Alohali, M.A.; Alasmari, N.; Almalki, N.S.; Khalid, M.; Alnfiai, M.M.; Assiri, M.; Abdelbagi, S. Textual emotion analysis using improved metaheuristics with deep learning model for intelligent systems. Trans. Emerg. Telecommun. Technol. 2024, 35, e4846. [Google Scholar] [CrossRef]
  22. Zhou, H.; Chen, L.; Shi, F.; Huang, D. Learning bilingual sentiment word embeddings for cross-language sentiment classification. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), Beijing, China, 26–31 July 2015; pp. 430–440. [Google Scholar]
  23. Wang, D.; Wu, J.; Yang, J.; Jing, B.; Zhang, W.; He, X.; Zhang, H. Cross-lingual knowledge transferring by structural correspondence and space transfer. IEEE Trans. Cybern. 2021, 52, 6555–6566. [Google Scholar] [CrossRef] [PubMed]
  24. Kuriyozov, E.; Doval, Y.; Gómez-Rodríguez, C. Cross-Lingual Word Embeddings for Turkic Languages. In Proceedings of the Twelfth Language Resources and Evaluation Conference, Marseille, France, 11–16 May 2020; pp. 4054–4062. [Google Scholar]
  25. Abdalla, M.; Hirst, G. Cross-Lingual Sentiment Analysis Without (Good) Translation. In Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 1: Long Papers), Taipei, Taiwan, 7 July 2017; pp. 506–515. [Google Scholar]
  26. Zheng, J.; Fan, F.; Li, J. Incorporating Lexical and Syntactic Knowledge for Unsupervised Cross-Lingual Transfer. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING), Turin, Italy, 20–25 May 2024; pp. 8986–8997. [Google Scholar]
  27. Xia, M.; Zheng, G.; Mukherjee, S.; Shokouhi, M.; Neubig, G.; Hassan, A. MetaXL: Meta Representation Transformation for Low-resource Cross-lingual Learning. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Online, 6–11 June 2021; pp. 499–511. [Google Scholar]
  28. Vo, T. An integrated topic modelling and graph neural network for improving cross-lingual text classification. ACM Trans. Asian Low-Resour. Lang. Inf. Process. 2022, 22, 1–18. [Google Scholar] [CrossRef]
  29. Maurya, K.; Desarkar, M. Meta-XNLG: A Meta-Learning Approach Based on Language Clustering for Zero-Shot Cross-Lingual Transfer and Generation. In Findings of the Association for Computational Linguistics; ACL: Stroudsburg, PA, USA, 2022; pp. 269–284. [Google Scholar]
  30. Miah, M.S.U.; Kabir, M.M.; Sarwar, T.B.; Safran, M.; Alfarhood, S.; Mridha, M.F. A multimodal approach to cross-lingual sentiment analysis with ensemble of transformer and LLM. Sci. Rep. 2024, 14, 9603. [Google Scholar] [CrossRef] [PubMed]
  31. Wu, L.; Chen, Y.; Ji, H.; Li, Y. Deep Learning on Graphs for Natural Language Processing. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Tutorials, Online, 6–11 June 2021; pp. 11–14. [Google Scholar]
  32. Liu, X.; You, X.; Zhang, X.; Wu, J.; Lv, P. Tensor graph convolutional networks for text classification. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; Volume 34, pp. 8409–8416. [Google Scholar]
  33. Zhang, H.; Zhang, J. Text graph transformer for document classification. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), Online, 16–20 November 2020. [Google Scholar]
  34. Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Adv. Neural Inf. Process. Syst. 2017, 30, 5998–6008. [Google Scholar]
  35. Veličković, P.; Cucurull, G.; Casanova, A.; Romero, A.; Liò, P.; Bengio, Y. Graph Attention Networks. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
  36. Jaiswal, A.; Babu, A.R.; Zadeh, M.Z.; Banerjee, D.; Makedon, F. A survey on contrastive self-supervised learning. Technologies 2020, 9, 2. [Google Scholar] [CrossRef]
  37. Hu, H.; Wang, X.; Zhang, Y.; Chen, Q.; Guan, Q. A comprehensive survey on contrastive learning. Neurocomputing 2024, 610, 128645. [Google Scholar] [CrossRef]
  38. Wang, X.; Liu, N.; Han, H.; Shi, C. Self-supervised heterogeneous graph neural network with co-contrastive learning. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Virtual, 14–18 August 2021; pp. 1726–1736. [Google Scholar]
  39. Pires, T.; Schlinger, E.; Garrette, D. How Multilingual is Multilingual BERT? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, 28 July–2 August 2019; pp. 4996–5001. [Google Scholar]
  40. Conneau, A.; Khandelwal, K.; Goyal, N.; Chaudhary, V.; Wenzek, G.; Guzmán, F. Unsupervised Cross-Lingual Representation Learning at Scale; ACL: Stroudsburg, PA, USA, 2020. [Google Scholar]
  41. Xue, L.; Constant, N.; Roberts, A.; Kale, M.; Al-Rfou, R.; Siddhant, A.; Barua, A.; Raffel, C. mT5: A Massively Multilingual Pre-trained Text-to-Text Transformer. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Online, 6–11 June 2021; pp. 483–498. [Google Scholar]
  42. Linmei, H.; Yang, T.; Shi, C.; Ji, H.; Li, X. Heterogeneous Graph Attention Networks for Semi-supervised Short Text Classification. In Proceedings of the Empirical Methods in Natural Language Processing, Association for Computational Linguistics, Hong Kong, China, 3–7 November 2019. [Google Scholar]
  43. Prettenhofer, P.; Stein, B.B. Cross-Language Text Classification Using Structural Correspondence Learning. In Proceedings of the 48th Annual Meeting of the Association for Computational Linguistics, Uppsala, Sweden, 11–16 July 2010. [Google Scholar]
  44. Schuster, S.; Gupta, S.; Shah, R.; Lewis, M. Cross-Lingual Transfer Learning for Multilingual Task Oriented Dialog. In Proceedings of the Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies Association for Computational Linguistics, Minneapolis, MN, USA, 2–7 June 2019. [Google Scholar]
  45. Liang, Y.; Duan, N.; Gong, Y.; Wu, N.; Guo, F.; Qi, W.; Gong, M.; Shou, L.; Jiang, D.; Cao, G.; et al. Xglue: A new benchmark dataset for cross-lingual pre-training understanding and generation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), Online, 16–20 November 2020. [Google Scholar]
  46. Loshchilov, I.; Hutter, F. Decoupled weight decay regularization. arXiv 2019, arXiv:1711.05101. [Google Scholar]
  47. Manning, C.D.; Surdeanu, M.; Bauer, J.; Finkel, J.R.; Bethard, S.; McClosky, D. The Stanford CoreNLP natural language processing toolkit. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics: System Demonstrations, Baltimore, MD, USA, 23–24 June 2014. [Google Scholar]
  48. Van der Maaten, L.; Hinton, G. Visualizing data using t-SNE. J. Mach. Learn. Res. 2008, 9, 2579–2605. [Google Scholar]
Figure 1. Architecture of the proposed model, XCLHG. For clarity, the diagram omits the visualization of data preprocessing steps.
Figure 1. Architecture of the proposed model, XCLHG. For clarity, the diagram omits the visualization of data preprocessing steps.
Applsci 15 03454 g001
Figure 2. This figure illustrates the architecture of the proposed heterogeneous graph. For simplicity, only Noun, Verb, and ADJ edges are plotted for POS edges.
Figure 2. This figure illustrates the architecture of the proposed heterogeneous graph. For simplicity, only Noun, Verb, and ADJ edges are plotted for POS edges.
Applsci 15 03454 g002
Figure 3. Illustration of multi-view contrastive learning. Distinct shapes represent different stance labels; blue and yellow indicate source and target languages, respectively. (a) Document feature representations. (b) Example of training for Translation-Level Contrastive Learning (TL-CL). (c) Example of training for Label-Level Contrastive Learning (LL-CL). (d) Result of contrastive learning and Classification Alignment (CA).
Figure 3. Illustration of multi-view contrastive learning. Distinct shapes represent different stance labels; blue and yellow indicate source and target languages, respectively. (a) Document feature representations. (b) Example of training for Translation-Level Contrastive Learning (TL-CL). (c) Example of training for Label-Level Contrastive Learning (LL-CL). (d) Result of contrastive learning and Classification Alignment (CA).
Applsci 15 03454 g003
Figure 4. Visualizations of the document features; t-SNE is applied to reduce the dimensionality of features. (a) is the feature representation in the datasets. In (b,c), the subgraph on the left is source language features, and the one on the right is target language features.
Figure 4. Visualizations of the document features; t-SNE is applied to reduce the dimensionality of features. (a) is the feature representation in the datasets. In (b,c), the subgraph on the left is source language features, and the one on the right is target language features.
Applsci 15 03454 g004
Table 1. The datasets used to evaluate the proposed model.
Table 1. The datasets used to evaluate the proposed model.
DatasetCategoryLanguagesTrainTest
Amazon Review (Books)2English20002000
German20002000
French20002000
Japanese20002000
Amazon Review (Dvd)2English20002000
German20002000
French20002000
Japanese20002000
Amazon Review (Music)2English20002000
German20002000
French20002000
Japanese20002000
XGLUE10English10,00010,000
German10,00010,000
French10,00010,000
Spanish10,00010,000
Russian10,00010,000
Multilingual SLU12English30,5218621
Spanish36173043
Thai21561692
Table 2. Classification accuracy (%) on Amazon Review dataset.
Table 2. Classification accuracy (%) on Amazon Review dataset.
GermanFrenchJapanese
ModelBooksDVDMusicBooksDVDMusicBooksDVDMusic
mBERT84.3582.8583.8584.5585.8583.6573.3574.8076.10
XLM86.8584.2085.9088.1086.9586.2080.9579.2078.02
XLM-R91.6587.6090.9789.3390.0789.1585.2686.7786.95
mT591.8388.8291.9891.0291.4290.3687.4188.2587.82
CLHG92.7088.6091.6290.6791.3890.4587.2187.3388.08
TGCTC92.6387.9192.5490.0391.3588.6886.5088.2789.07
Meta-XNLG90.3488.3789.6490.3390.3890.2687.2588.9187.79
EM92.7390.0691.8391.5592.0391.4788.9089.0689.14
LS-mBERT92.4390.5791.8592.3090.5792.5287.6289.4188.37
XCLHG93.2291.3192.9192.9892.6493.1389.1690.3189.73
Table 3. F1-score (%) for text classification on Amazon Review dataset.
Table 3. F1-score (%) for text classification on Amazon Review dataset.
GermanFrenchJapanese
ModelBooksDVDMusicBooksDVDMusicBooksDVDMusic
mBERT82.7181.2682.1182.9784.3582.1071.8373.2674.39
XLM85.1482.5684.4886.6285.4184.7379.2477.2076.52
XLM-R90.3386.1289.3886.3687.9186.2883.1384.7785.34
mT590.7286.9089.9889.1489.7488.0285.7186.5385.90
CLHG90.7087.1590.0488.7289.8388.1785.8686.1186.36
Meta-XNLG88.5986.7580.4988.2388.1288.6785.4286.7385.80
EM90.0388.1489.4789.5390.1189.2485.3786.1686.28
LS-mBERT90.1788.9590.1790.5890.3689.7486.2287.1386.97
XCLHG91.1889.9491.1791.2290.9391.2888.1687.9188.23
Table 4. Classification accuracy (%) on SLU and XGLUE datasets.
Table 4. Classification accuracy (%) on SLU and XGLUE datasets.
XGLUESLU
ModelGermanFrenchSpanishRussianSpanishThai
mBERT82.5378.4681.8379.0674.9172.97
XLM83.5278.8382.4979.4762.3081.60
XLM-R84.6178.9683.5179.9494.3885.17
mT-585.0379.6284.5381.2195.6887.32
CLHG85.0079.5884.8079.9196.8189.71
Meta-XNLG83.4179.0484.7778.0287.1284.33
EM84.5279.3185.1379.7085.6479.29
LS-mBERT85.7880.2485.6180.1482.0763.43
TGCTC85.3680.4585.6580.3297.2390.85
XCLHG86.4382.4387.3182.5297.6792.86
Table 5. F1-score (%) for text classification on SLU and XGLUE datasets.
Table 5. F1-score (%) for text classification on SLU and XGLUE datasets.
XGLUESLU
ModelGermanFrenchSpanishRussianSpanishThai
mBERT80.1776.5279.9876.8172.4070.22
XLM81.2976.1780.2376.9160.2489.93
XLM-R82.9376.7781.7577.9688.5781.49
mT-583.1477.8282.1378.4292.2984.90
CLHG83.2177.6482.5677.9892.5685.13
Meta-XNLG81.2877.2281.5875.4083.2481.77
LS-mBERT83.5478.1983.2077.7279.9360.72
XCLHG84.8279.1785.1679.1493.5290.73
Table 6. Ablation study on Amazon Review dataset.
Table 6. Ablation study on Amazon Review dataset.
XLM-R1234567Full Model
POS
dependency
translation
similarity
TL-CL
LL-CL
DE90.9791.9392.3791.2292.3491.9592.5892.3992.91
FR89.1592.0592.1191.7092.5792.4692.9992.7093.13
JA86.9588.1288.9287.4289.0288.7889.6389.2489.93
DE represents German, FR represents French and JA represents Japanese.
Table 7. Case study of proposed model.
Table 7. Case study of proposed model.
LanguageDatasetSampleResults
Ein wunderbares Buch. Hab es im Urlaub an einem Tag durchgelesen und bin begeistert. Genau die richtige Mischung aus Witz, Phantasie, Trauer und Nachdenklichkeit. Freue mich schon sehr auf das nächste Buch von Adena Halpern!label: positive
DEAmazon Review CLHG: ✓
English translation: A wonderful book. I read it on vacation in one day and I’m thrilled. Just the right mix of wit, imagination, grief and thoughtfulness. Looking forward to the next book by Adena Halpern!XCLHG: ✓
В этoм гoду за приз в размере oкoлo 66 тысяч дoлларoв пoбoрются шесть автoрoв рoманoв из Великoбритании, США и Канады. Председатель жюри премии уже заявил,чтo все книги, пoпавшие в кoрoткий списoк, - этo чудеса стилистическoй изoбретательнoсти, и выбрать пoбедителя будет непрoстo. Крoме денежнoгo приза, лауреат Букерoвскoй премии автoматически пoлучает приятный бoнус - резкий рoст прoдаж свoегo прoизведения пo всему миру, передает “Рoссия 24”.label: culture
RUXGLUE CLHG: ✕
English translation: This year, six authors of novels from the United Kingdom, the United States and Canada will compete for a prize of about $66,000. The chairman of the jury of the award has already stated that all the books on the short list are miracles of stylistic ingenuity, and it will not be easy to choose the winner. In addition to the cash prize, the winner of the Booker Prize automatically receives a pleasant bonus-a sharp increase in sales of his work around the world, reports “Russia 24”.XCLHG: ✓
cambia el dia para la alarma de la mañanalabel: modify alarm
ESSLU CLHG: ✓
English translation: Change the day for the morning alarmXCLHG: ✓
DE: German, RU: Russian and ES: Spanish, CLHG proposed by Wang et al. [18]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Li, X.; Zhang, K. Heterogeneous Graph Neural Network with Multi-View Contrastive Learning for Cross-Lingual Text Classification. Appl. Sci. 2025, 15, 3454. https://doi.org/10.3390/app15073454

AMA Style

Li X, Zhang K. Heterogeneous Graph Neural Network with Multi-View Contrastive Learning for Cross-Lingual Text Classification. Applied Sciences. 2025; 15(7):3454. https://doi.org/10.3390/app15073454

Chicago/Turabian Style

Li, Xun, and Kun Zhang. 2025. "Heterogeneous Graph Neural Network with Multi-View Contrastive Learning for Cross-Lingual Text Classification" Applied Sciences 15, no. 7: 3454. https://doi.org/10.3390/app15073454

APA Style

Li, X., & Zhang, K. (2025). Heterogeneous Graph Neural Network with Multi-View Contrastive Learning for Cross-Lingual Text Classification. Applied Sciences, 15(7), 3454. https://doi.org/10.3390/app15073454

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop