학술

Mitigating regional bias in Vietnamese hate speech detection via contrastive learning with adversarial fairness

PLOS ONE
CC BY
이 매체는 공공·자유 라이선스로 본문을 직접 표시합니다.

Figures
Abstract
Vietnamese hate speech detection (HSD) models can inadvertently latch onto regional dialect cues as spurious shortcuts, producing unfair performance gaps across the country’s language varieties. Prior fairness work, however, has largely targeted gender or race in English, and existing Vietnamese HSD resources carry no regional annotation, leaving dialect-driven bias unmeasured. We first construct the Vietnamese Fair Hate Speech Detection dataset (ViFHSD), a dialect-aware corpus of 23,147 comments curated from widely used Vietnamese HSD datasets. Regional labels come from a lexicon of region-specific markers; toxicity labels come from an ensemble large language model (LLM) majority-voting pipeline, validated against native annotators. Building on ViFHSD, we propose Contrastive Learning with Adversarial Fairness (CLAF), which couples a supervised contrastive objective with an adversarial region discriminator and a gradient reversal layer to discourage the predictor from relying on dialect information. Across five pretrained backbones, standard fine-tuning shows large regional disparities, whereas CLAF attains the lowest statistical-parity (SPD) and equal-opportunity (EO) gaps on every backbone, outperforming its adversarial-only and contrastive-only ablations, at a modest macro-F1 cost of 0.6 to 3.2 points. On PhoBERT-v2, for instance, SPD falls from 30.45 to 26.32 and EO from 14.46 to 8.63 for a macro-F1 change of only . Probing analysis shows these gains arise at the predictor output rather than by erasing dialect information from the representation. Together, ViFHSD and CLAF move Vietnamese HSD toward more regionally consistent moderation within the studied distribution, while making the residual out-of-distribution trade-offs explicit.
Citation: Duong T-C, Le A-C, Le TVQ, Nguyen NP (2026) Mitigating regional bias in Vietnamese hate speech detection via contrastive learning with adversarial fairness. PLoS One 21(11): e0363138. https://doi.org/10.1371/journal.pone.0363138
Editor: Hossein Hassani, University of Kurdistan Hewler, IRAQ
Received: February 12, 2026; Accepted: November 3, 2026; Published: November 24, 2026
Copyright: © 2026 Duong et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: All data underlying the findings reported in this study are publicly available. The dataset used in this manuscript can be accessed from the Figshare repository at: https://doi.org/10.6084/m9.figshare.31261294. All source code can be accessed from the GitHub repository at: https://github.com/duongtrongchi/claf.
Funding: The author(s) received no specific funding for this work.
Competing interests: The authors have declared that no competing interests exist.
Introduction
Hate Speech Detection (HSD) plays an important role in online content moderation systems [1]. HSD is a classification task that the model predicts whether a piece of content contains derogatory, offensive, inflammatory, or attacking language directed at an individual or group based on attributes such as ethnicity, gender, religion, political stance, or other social characteristics [2]. Automatically detecting hateful content helps reduce verbal violence, limit the spread of inflammatory information, and support a safer and healthier communication environment [3].
Although deep learning models have achieved substantial advances in detecting hateful content, ensuring fairness within such systems remains a significant challenge. Prior research has consistently demonstrated that language models are susceptible to various forms of bias [4], often resulting in misclassification of minority groups or less frequent linguistic varieties. Existing work predominantly focuses on examining and mitigating gender or racial bias, largely within English-language datasets and Western contexts [5]. Several notable studies have pursued bias reduction in toxic language classification through data curation strategies, demographic attribute modeling, or adversarial learning techniques aimed at suppressing sensitive information in intermediate representations. Nevertheless, these efforts remain limited to major language communities and fail to address the unique challenges presented by languages characterized by strong regional variation, such as Vietnamese [6].
Language is inherently intertwined with its socio-cultural context. A term that may sound neutral in one region can be perceived as vulgar or offensive in another. Likewise, an opposing political viewpoint may be incorrectly labeled as hateful if the training data carries regional bias. Ignoring regional linguistic diversity risks introducing unfairness into moderation systems, especially for low-resource languages like Vietnamese. This research gap becomes even more critical in the Vietnamese context, where regional differences are strongly reflected in vocabulary, tone, sentence structure, and expressive nuance.
To address these challenges, we propose a research framework combining Fair Representation Learning and Contrastive Learning to analyze and mitigate regional bias in Vietnamese language models. Specifically, we formulate the following research questions:
- RQ1. To what extent do pretrained Vietnamese language models exhibit performance disparities across regional dialect groups?
- RQ2. Is regional identity encoded in intermediate model representations, and to what extent do debiasing methods actually remove it from the representation?
- RQ3. How effective are data-level and representation-level debiasing methods in reducing regional disparities, and what are the accuracy–fairness trade-offs?
- RQ4. How do debiasing methods qualitatively change model behavior on regionally marked inputs?
Our proposed framework addresses the problem of regional bias through three core components integrated into the learning pipeline: (1) Regional Bias Quantification, focusing on a systematic analysis of performance disparities and the encoding of regional identity across representation layers; (2) Multi-strategy Debiasing, encompassing a comparative evaluation of data-centric techniques and representation-level adversarial learning; and (3) Robustness and Qualitative Assessment, providing critical insights into the accuracy–fairness trade-offs and model behavior under distribution shifts. By employing Adversarial Learning alongside Fair Representation Learning, our framework optimizes task performance while reducing the predictor’s reliance on regional identity at the output level. Rather than erasing dialect information from the representation, CLAF discourages the classifier from using it, so that predictions depend primarily on semantic toxicity rather than regional markers — an effect we quantify directly in our probing analysis.
Our main contributions are as follows:
- (1) We introduce ViFHSD, a curated, region-annotated dataset for regional dialects to facilitate fairness research in Vietnamese.
- (2) We propose Contrastive Learning with Adversarial Fairness (CLAF), which couples supervised contrastive learning with an adversarial region discriminator to mitigate dialect-based bias at the predictor level under an explicit accuracy–fairness trade-off.
- (3) We conduct a comprehensive empirical study across multiple backbones, quantifying the accuracy–fairness trade-off and providing actionable guidance for building robust content moderation systems in linguistically diverse settings.
Related work
Fairness and Bias in hate speech detection
Fairness in the detection of hate speech has emerged as an important research topic. Many studies show that modern large language model systems often bias toward specific demographic or linguistic groups [7,8]. Models trained on imbalanced or biased datasets are prone to misclassifying minority speech as toxic [9]. Prior work demonstrates that dialectal variation is especially vulnerable: African American English, for example, is disproportionately flagged as hateful or offensive despite being non-toxic in context.
A series of influential studies provide empirical evidence for these biases. Large-scale evaluations of production-grade toxicity systems reveal substantial unintended biases encoded during training, even when massive datasets are used [10]. Subsequent analyses further show that many misclassifications arise from dialectal or sociolectal features rather than genuinely hateful intent [11]. Mitigation attempts include adversarial training methods designed to suppress sensitive demographic signals in model representations [12].
In general, previous research has focused on demographic attributes in the Western world with a domain focus on race and gender. Despite increasing interest in dialect fairness, existing studies remain restricted to English or high-resource languages. To date, no work has examined fairness in HSD with respect to regional linguistic variation in Vietnamese.
Hate speech detection in Vietnamese
Research on HSD in Vietnamese has grown in recent years, supported by the release of several benchmark datasets. Commonly used resources include UIT-ViCTSD [13], ViHSD [14], and toxicity corpora from the VLSP shared tasks. These datasets have facilitated the development of Vietnamese pre-trained language models such as ViSoBERT [15], CafeBERT [16], and ViHateT5 [17], enabling strong results on toxicity classification benchmarks.
Despite this progress, existing Vietnamese HSD research faces several notable limitations. First, none of the datasets include regional dialect annotations, even though Vietnamese exhibits substantial linguistic variation across the North, Central, and South. Second, no prior work has systematically evaluated the fairness of the model across regional groups, with most studies focusing exclusively on improving accuracy or efficiency. This overlooks the risk that region-dependent vocabulary and discourse styles may be misclassified as toxic when training data is regionally imbalanced.
Given the pronounced regional diversity of Vietnamese manifested in lexical choices, pragmatic markers, tone, idioms, and syntactic constructions, ignoring regional factors may introduce systematic unfairness in content moderation applications. This motivates the need for a dedicated investigation into regional fairness in Vietnamese HSD.
Representation learning and debiasing methods
Prior studies on fairness in text classification and hate speech detection suggest that performance disparities often arise when models exploit spurious correlations between the target label and demographic or linguistic attributes. We organize prior work by debiasing mechanism data-level, representation-level, and contrastive and highlight the open gap for regional dialect fairness in Vietnamese.
Data-level debiasing.
Data-centric debiasing aims to reduce unwanted correlations directly in the training corpus by intervening on data distributions. Common strategies include [18,19]: (1) re-sampling or re-weighting to balance group frequencies; (2) counterfactual data augmentation (CDA) that generates attribute-swapped examples; and (3) masking or removing sensitive markers. These methods are attractive because they do not require architectural changes and can be applied to many model families. However, they depend critically on (a) reliable sensitive-attribute annotations at scale, and/or (b) high-coverage lexical resources to identify attribute markers [8]. For Vietnamese regional dialects, both conditions are typically weak: dialect labels can be noisy, and regionally marked vocabularies are incomplete or context-dependent. As a consequence, purely data-level interventions may reduce some surface cues while leaving deeper dialect signals in syntax, pragmatics, or discourse patterns untouched, limiting their effectiveness for regional fairness in Vietnamese HSD.
Representation-level debiasing.
Representation-level debiasing attempts to prevent sensitive information from being encoded in intermediate representations. A widely used approach is adversarial training with a gradient reversal layer (GRL), where an auxiliary discriminator predicts the sensitive attribute from the representation while the encoder is trained to make such prediction difficult. This paradigm is closely related to fair/invariant representation learning, which seeks to retain task-relevant semantics while suppressing sensitive factors. Empirical results across toxicity detection and general text classification indicate that adversarial objectives can reduce demographic leakage and mitigate unintended bias, often with manageable performance trade-offs [12,20,21]. Nevertheless, existing studies predominantly target high-resource languages (especially English) and common demographic attributes (e.g., gender, race). To the best of our knowledge, adversarial debiasing has not been systematically investigated for regional dialect attributes, nor in the context of Vietnamese NLP fairness and Vietnamese HSD.
Contrastive learning for fair and robust representations.
Contrastive learning (CL) has recently become a strong alternative for learning semantically meaningful and robust text representations. By pulling together representations that share the same underlying semantics (positive pairs) and pushing apart those that differ (negative pairs), CL can encourage models to rely less on superficial or spurious features, which may include sensitive cues. This makes CL a promising tool for fairness: if positives are constructed to preserve label semantics while varying dialectal surface forms, the representation can become more invariant to region-specific signals.
Several influential frameworks demonstrate that CL improves representation quality and downstream generalization [22,23]. More recent efforts further explore debiased contrastive objectives and adversarially informed CL, showing that contrastive alignment can mitigate certain demographic biases or improve robustness under distribution shift [24]. However, two limitations remain: (i) prior CL-based fairness work rarely considers regional linguistic variation as the sensitive factor, and (ii) it is still underexplored how to combine CL with adversarial debiasing in a unified framework for hate speech detection, particularly in low-resource settings such as Vietnamese.
Differences from prior work
Our study differs from existing literature along several important dimensions:
(1) Prior HSD fairness research targets gender or race in English datasets; we instead study regional-dialect fairness in Vietnamese, a dimension not previously examined. (2) Existing Vietnamese HSD work neither measures disparities across dialect regions nor annotates region, since no dataset supports it; we build a dialect-annotated corpus and measure those disparities directly. (3) Where prior methods use data augmentation or a single adversarial objective, CLAF couples supervised contrastive learning with an adversarial region discriminator to reduce regional bias at the predictor level.
Taken together, and to our knowledge, this is the first Vietnamese HSD study to pair a region-annotated fairness corpus with a probing analysis of how pretrained models encode regional identity, showing that debiasing reduces output-level reliance on that signal without erasing it from the representation.
Methodology
Definitions and assumptions
Notation. Let denote the training set, where is a Vietnamese text instance, is the hate-speech label (e.g., Clean, Offensive, Hate), and is a sensitive attribute indicating the regional dialect group. We use a neural encoder to map an input text to a sentence-level representation. Concretely, given a token sequence , the encoder produces contextualized hidden states and we use the [CLS] vector as:
(1)For notational simplicity, we use Z to denote the random variable induced by h over the data distribution (i.e., ), and sometimes write z for a realization of Z. A task classifier predicts the toxicity label , while a discriminator attempts to infer the sensitive attribute .
Mutual information (conceptual measure). We quantify the statistical dependency between a learned representation Z and the sensitive attribute S using mutual information [25]:
(2)Smaller I(Z;S) indicates that Z contains less information about S, and the ideal case I(Z;S) = 0 implies statistical independence (). In our work, mutual information provides an information-theoretic motivation for dialect-invariant representations; in practice we enforce invariance via an adversarial surrogate objective, rather than estimating I(Z;S) directly [26].
In this paper, we use the term dialect to refer to regional language variety in written Vietnamese, operationalized via region-associated lexical markers (region-specific tokens) rather than phonological features.
Definition 1 (Regional attributes and dialectal vocabularies). The Regional Attribute Set is the collection of labels representing the major Vietnamese dialect regions:
(3)The Dialectal Vocabulary is a family of sets containing characteristic terms associated with each attribute:
(4)where V(s) denotes the set of region-specific tokens indicative of dialect group s. These dialectal vocabularies are used to derive or validate sensitive labels, and to characterize region-associated lexical markers in the data.
Definition 2 (-Fair Representation). A latent representation Z is considered -fair with respect to a sensitive attribute S if the mutual information between them is bounded by a small constant [25]:
(5)In the ideal case , the representation is independent of S (i.e., ), meaning that the representation contains no exploitable dialectal information. This notion can be viewed as enforcing a demographic-parity-style constraint in the representation space: downstream predictions derived from Z become insensitive to S [27]. Since I(Z;S) is typically intractable to compute for high-dimensional neural representations, we approximate this objective by minimizing the ability of an adversary to predict S from h, which serves as a practical surrogate for suppressing dialect information.
Definition 3 (-Fair Predictor). A predictor is considered -fair with respect to the sensitive attribute S if
(6)or, in the equal-opportunity form, if . In the ideal case , these conditions recover exact statistical parity () and equal opportunity (), respectively. The empirical disparities and are finite-sample estimators of exactly these dependencies, and vanish as .
Remark 1. Because the predicted label is a deterministic function of Z, we have , so the variables form a Markov chain . By the data processing inequality,
(7)and, conditioning on Y, the analogous bound holds for the equal-opportunity form. Hence any -fair representation (Definition 2) is also an -fair predictor (Definition 3): bounding immediately bounds .
Remark 2. The converse of Remark 1 does not hold. Since Eq. (7) is an inequality, the slack may be large: predictor fairness ( small) can be attained while I(Z;S) remains large, provided the residual dialectal information lies in directions of Z that does not exploit. This gap is precisely what our adversarial objective targets at the output level, and what our probing analysis quantifies.
Assumptions. Our approach relies on the following assumptions, which are common in content–attribute disentanglement and fair representation learning.
Assumption 1 (Content-Attribute separability). We assume that the target label Y (semantic hate-speech content) and the sensitive attribute S (regional dialect) are not perfectly correlated, i.e.,
(8)This condition states that knowing the dialect group does not deterministically determine the hate-speech label. Moreover, we assume there exists a latent factorization of the learned representation such that
(9)where captures content features useful for predicting Y while remaining invariant to S, and captures dialectal/style-related variations correlated with S. Intuitively, this assumption guarantees a non-trivial invariant subspace that preserves predictive information for hate-speech detection even when dialect information is suppressed. It rules out degenerate cases in which dialectal markers are the only discriminative cues for Y (e.g., a slur appears exclusively in a single region), because in such cases enforcing dialect invariance would inevitably erase all information needed to predict Y.
Assumption 2 (Reliability of sensitive labels.). We assume that the sensitive labels S provided in training data, derived from dialectal markers or metadata, are reliable proxies for the true dialectal origin of the text. Although such labels can be noisy in practice, we treat them as sufficiently informative supervision signals for adversarial debiasing. When available, we exclude ambiguous samples (e.g., “Unknown” region) from adversarial supervision by masking them in the discriminator loss.
Problem definition
In this work, we study fair Vietnamese hate speech detection under regional dialect variation. Each training instance is a triple drawn from , where x is a Vietnamese text sequence, y is the toxicity label, and s denotes the regional dialect attribute (1). Concretely, an input text is tokenized as
(10)and the target label is a 3-way classification variable
(11)corresponding to Clean (0), Offensive (1), and Hate (2). The sensitive attribute takes values in
(12)capturing major Vietnamese dialect regions.
We learn an encoder that maps the input to a latent representation
(13)followed by a classifier that outputs the prediction
(14)The primary learning objective is to achieve high accuracy on Y, typically by minimizing the expected task loss:
(15)Fair representation learning objective. Beyond predictive performance, we aim to mitigate regional bias so that the predictor becomes insensitive to the sensitive attribute S. Following Definition 3, our fairness target is at the output level,
(16)which is exactly the quantity estimated by and . By Remark 1, enforcing the stronger representation-level condition (Definition 2) is one sufficient route to Eq. (16), but not a necessary one.
At the same time, Z must retain sufficient task-relevant information for hate-speech detection. We formalize this requirement as preserving non-trivial dependence between Z and Y, e.g.,
(17)for some threshold . Combining fairness and utility, our problem can be posed as the following constrained optimization:
(18)Equivalently, we may optimize its Lagrangian relaxation:
(19)where controls the trade-off between accuracy and dialect invariance.
Eqs. (16)–(19) provide an information-theoretic motivation for dialect-invariant representations. In practice we do not minimize I(Z;S) directly; the adversarial surrogate Eq. (26)–Eq. (27) enforces invariance at the output level. As shown empirically, this surrogate lowers the adversary’s accuracy without reducing the probeable I(Z;S)—i.e., acts as an output-fairness regularizer rather than a representation-level information minimizer.
Feasibility and scope. The problem formulation relies on Assumption 1, ensuring that dialect markers are not the sole discriminative cues for predicting Y; otherwise enforcing could destroy predictive information. In the following sections, we present a practical learning framework that approximates the objective in Eq. (19) by integrating supervised contrastive learning to strengthen Z for predicting Y, and adversarial training to reduce the predictor’s reliance on dialectal information about S.
Framework overview
As illustrated in Fig 1, our proposed framework aims to learn a robust and fair representation for Vietnamese hate speech detection. To solve the optimization problem defined in Eq. (19), we design a multi-task learning architecture that maximizes the predictive power for the target label Y while discouraging the predictor from relying on the sensitive regional attribute S at the output level. The framework consists of a Text Encoder, a Supervised Contrastive Learning module, a Task-Specific Classifier, and an adversarial Region Discriminator with a gradient reversal layer.
An input comment is encoded into a shared [CLS] representation that feeds three heads: a hate speech detection (HSD) module producing the task loss LHSD, an adversarial region discriminator producing LAdv, and a supervised contrastive objective over the [CLS] embeddings producing LCL. The three terms are summed into a single training objective (Total Loss). The adversarial and contrastive terms discourage the predictor from relying on regional-dialect cues, while LHSD preserves detection accuracy.
Encoder module
Given an input Vietnamese text sequence , we employ a Transformer-based encoder to obtain contextualized token representations. Let denote the last-layer hidden states. We use the representation of the [CLS] token as the sentence-level feature:
(20)This shared representation h is used by all components in our framework, including the main task classifier, the region discriminator, and the contrastive objective.
Supervised contrastive learning
To improve representation quality and enforce clearer separation boundaries among semantic classes (Clean, Offensive, Hate), we adopt Supervised Contrastive Learning (SCL). SCL pulls representations from the same class closer while pushing those from different classes apart, thereby strengthening task-relevant structure in the latent space.
Given a mini-batch of N instances , we compute their encoder features and use L2-normalized vectors to measure cosine similarity. For each anchor i, define the candidate index set and the positive set
(21)The supervised contrastive loss [23] is defined as:
(22)where is a temperature hyperparameter controlling the softness of the similarity distribution. By explicitly grouping same-label examples, SCL encourages the encoder to learn toxicity-discriminative representations while maintaining compact intra-class clusters. The supervised contrastive term sharpens toxicity-class structure in the embedding; it does not impose a fairness constraint on its own, since its positives and negatives are defined by the toxicity label y rather than the region attribute s (Eq. 22). Fairness is instead enforced jointly, through the adversarial region discriminator (Eq. 26) within the overall objective (Eq. 28).
Adversarial debiasing learning
Classifier and region discriminator.
For the primary hate-speech detection task, the shared feature h is fed into a linear classifier to produce a probability distribution over the three toxicity classes:
(23)We optimize this classifier by minimizing the standard cross-entropy loss:
(24)where is the one-hot indicator for class c and is the predicted probability.
To mitigate regional bias, we introduce a region discriminator that attempts to predict the sensitive dialect attribute from the same representation h:
(25)The dataset contains samples with an “Unknown” sensitive label, we exclude them from adversarial learning using a binary mask :
(26)so that the discriminator is optimized only on reliable region classes.
Gradient reversal for dialect invariance.
We enable adversarial debiasing via a Gradient Reversal Layer (GRL) inserted between the encoder and the region discriminator [28]. During the forward pass, GRL acts as the identity function; during backpropagation, it multiplies the incoming gradient by :
(27)Consequently, the discriminator parameters are optimized to minimize , while the encoder parameters receive reversed gradients and are driven to maximize the discriminator loss.
This min–max interaction penalizes the dialect signal that the current discriminator can exploit, discouraging the predictor from relying on region-identifiable information while h remains useful for predicting toxicity labels. As our probing analysis later shows (Table 6), this pressure manifests at the predictor output rather than as erasure of dialect information from h.
Overall training objective
We train the model end-to-end using a composite objective that balances task performance, dialect invariance, and representation quality:
(28)where and control the strength of adversarial debiasing and supervised contrastive alignment, respectively. With GRL, the encoder is optimized to reduce and while counteracting the region discriminator through the reversed gradients of , yielding toxicity-focused representations whose predictions rely less on regional cues.
Here denotes the gradient-reversal coefficient applied within the GRL; the discriminator is trained with an unweighted cross-entropy loss. We write for notational symmetry, but scales only the reversed gradient flowing into the encoder.
Experiments
Datasets
ViHSD.
The ViHSD [14] dataset is one of the most popular datasets in HSD research. The data is divided into 24,048 samples for training, 2,672 for development, and 6,680 for testing. Each sample in the dataset has one of three labels: “hate,” “offensive,” or “clean.” The “clean” label means the comments contain absolutely no harassment. The “offensive” label indicates the comments include harassing words but do not target any specific individual or group. The “hate” label means the comments contain harassment and are intended to attack an individual or group based on characteristics.
VOZ-HSD.
The VOZ-HSD [17] is a large-scale dataset consisting of over 10.7 million samples crawled from the VOZ forums, one of the most popular online communities in Vietnam. Compared to other social platforms such as Facebook or TikTok, VOZ is well-known for its open discussion culture, where users often express their thoughts freely and use informal or highly colloquial language. Thanks to this characteristic, the dataset captures a wide range of real-life user-generated content with a high density of toxic and offensive expressions, making it especially suitable for hate speech research.
The collected data spans diverse topics—including news, sports, travel, cars, entertainment, and daily conversation threads helping the dataset maintain rich contextual variety and strong realism. This diversity allows models trained on VOZ-HSD to better understand the linguistic patterns commonly appearing in Vietnamese social media environments.
Data curation.
To support the analysis of regional bias in Vietnamese hate speech detection, we constructed a new dataset derived primarily from VOZ-HSD, with a small paraphrased subset from ViHSD. While the original corpus provides more than 10 million comments, using the raw data directly causes problems related to noise and domain relevance. Therefore, we applied a strategy to create a high-quality dataset of 23,147 samples.
The construction process consists of three main phases:
- (1) Regional Data Extraction. To assign dialect labels, we compiled a lexicon of region-specific personal pronouns and address terms—the most frequent and reliable regional markers in informal Vietnamese, and widely documented in Vietnamese dialectology [29]. The lexicon holds 64 unique entries: 22 Northern, 17 Central, and 25 Southern. Central (mi, tau, hắn) and Southern (ổng, bả, tụi by) forms are strongly region-specific, whereas several Northern entries coincide with standard nationwide pronouns. Using this lexicon, we filtered the raw corpus to retain comments with clear regional patterns, and labeled each comment with the region contributing the most matched markers; comments with a between-region tie, or with no matched marker, are labeled Unknown. Because the dialect labels drive the fairness analysis, we validated a stratified subset against native annotators, who confirmed the lexicon-assigned region with Cohen’s (Table 1).
- (2) Control group sampling: A fairness model must differentiate the regional language from standard Vietnamese. If the training data contains only regional characteristics, the model may be incorrect for regional labels or neutral text. To avoid this issue, we sample comments without any regional markers. These samples are labeled Unknown and represent Standard Vietnamese. It helps the model avoid overfitting to dialectal features and provides a baseline to assess how the model treats neutral language compared to region-specific text.
- (3) Quality assurance and balancing: The initial extraction is highly imbalanced and contains various noisy samples. To handle these problems, we remove duplicates, remove non-Vietnamese comments, and remove comments with many special characters. Then, we apply downsampling to reduce dominance from larger classes. Finally, a subset of the data is manually reviewed to confirm the accuracy of regional labels and ensure the Unknown class is correctly represented.
To establish ground truth labels Y, we implement an ensemble LLM annotation strategy. As illustrated in Fig 2, our framework employs a consensus-based mechanism using GPT-4o, GPT-4.1-mini, and Gemini-2.5 Pro. The annotation process is conducted as follows:
- (1) Prompting strategy: Each model is independently prompted with annotation guidelines and definitions of each class Clean, Hate, Offensive based on the ViHSD annotation guide. The models are tasked with classifying each text sample x into one of three categories: Clean, Offensive, or Hate Speech. To anchor the Clean class with human-verified labels and to diversify the neutral-language portion of the corpus beyond a single platform, we sampled a small subset of approximately 1,500 Clean-labeled comments from ViHSD. To avoid redistributing the original comments verbatim, these texts were paraphrased via back-translation before entering the curation pipeline; we verified that the released corpus shares no substantive verbatim content with ViHSD. Because paraphrasing can shift toxicity nuances, the original ViHSD human labels were provided to the annotation ensemble as a reference for these items.
- (2) Majority Voting: Let be the set of predictions from the models for a given sample. The final ground truth label y is determined via majority voting:
(a) Regional labeling. Each comment in the raw corpus is matched against a regional dictionary of North, Central, and South dialect markers. Comments containing a regional pattern are labeled with their dialect (North/Central/South); the rest are sampled as a control group and labeled Unknown. (b) Toxicity labeling. Guided by shared annotation guidelines, three large language models (GPT-4o, GPT-4.1-mini, and Gemini-2.5-pro) independently label each comment. A sample keeps the majority label when at least two of the three agree () and is discarded otherwise, yielding the final task label Y.
A label is accepted as ground truth only if at least two out of three models agree. (3) Conflict Resolution: To ensure the highest label reliability, samples resulting in complete disagreement are considered ambiguous and discarded from the dataset. Full three-way disagreement — the discard condition of Eq. (29) — is rare: it affects only 196 samples, and its count remains low across every region: 39 (North), 69 (Central), 38 (South), and 50 (Unknown).
Human validation of LLM annotations
Because every toxicity label in ViFHSD is produced by LLM ensemble majority voting, a natural concern is whether the automatic labels are themselves regionally biased—that is, whether they are systematically less reliable for one dialect than another. We therefore validate the ensemble labels against native human annotators and verify that label reliability is stable across regions.
Validation design. We drew a stratified validation sample of N = 972 comments from ViFHSD, balanced across the three dialect regions (North, 322; Central, 327; South, 323). Three native Vietnamese annotators independently labeled each comment as Clean, Offensive, or Hate Speech, following the same ViHSD guidelines given to the LLM ensemble. The annotators were blinded to the ensemble label, so their judgments form an independent reference rather than a check of the pipeline against itself. We summarize reliability with two complementary statistics. Cohen’s measures agreement between the ensemble label and the human reference—the majority vote of the three annotators—and so reports how faithfully the automatic labels reproduce human judgment. Fleiss’ measures agreement among the three annotators themselves, and so captures the intrinsic difficulty of the task for each region. Reporting both separates two questions that a single number would conflate: whether the ensemble is trustworthy, and whether the underlying task is harder for some dialects than others. We compute each statistic per region, so that a dialect-specific weakness, if present, would surface as a depressed for that region.
Label reliability is high and stable across regions. Table 2 reports the results. Ensemble–human agreement is almost perfect in every region: Cohen’s ranges from 0.876 (North) to 0.957 (South), with an overall value of 0.923, and all four values fall within the “almost perfect” band () of the conventional Landis–Koch scale [30]. Inter-annotator agreement is correspondingly substantial, with Fleiss’ between 0.621 and 0.767. No region is an outlier: the spread of Cohen’s across regions is only 0.081, and even its smallest value stays well above the 0.81 threshold. Across dialects, then, the ensemble reproduces human labels with near-equal fidelity.
A finer reading reinforces this conclusion. The two statistics rank the regions identically—North < Central < South for both Cohen’s and Fleiss’ . Where the three humans agree less among themselves, the ensemble also agrees slightly less with their consensus. The modest regional variation we do observe thus tracks the intrinsic ambiguity of the comments rather than a blind spot specific to the ensemble: Northern-dialect comments are harder to annotate for humans and models alike, not selectively mislabeled by the automatic pipeline. We conclude that the ensemble labels are reliable and, more importantly for our analysis, equally reliable across regions.
Dataset statistics
Our curated corpus (ViFHSD) contains 23,147 Vietnamese comments annotated with a regional attribute (North, Central, South, or Unknown) and a toxicity label (Clean, Offensive, Hate Speech). As shown in Fig 3, the data are split into Train/Dev/Test, with Train containing most instances. The regional distribution is not perfectly uniform, and the Unknown group provides a neutral reference that helps separate dialectal markers from toxicity cues. Across all splits, the label distribution is skewed: Clean and Offensive dominate, while Hate Speech is consistently the smallest class. This imbalance motivates reporting robust metrics and analyzing fairness gaps across regions in addition to overall predictive performance.
(a) The distribution of samples by regional categories, including North, Central, South, and the Unknown (Standard Vietnamese) control group. (b) The distribution of toxicity labels (Clean, Offensive, Hate Speech) derived from the ensemble LLM annotation strategy.
Toxicity base rates across regions. A regionally skewed labeling process would confound the fairness analysis, so we examine the joint distribution of toxicity and region on the full corpus (Table 3). Toxic content (Offensive Hate) varies across dialects—60.3% for North and 44.5% for South, but only 30.8% for Central—driven mainly by Offensive comments. Four observations indicate that this variation reflects the sampled content rather than dialect-driven annotation bias. First, Hate is rare and comparable in every region (2.9–5.5%), so no dialect is disproportionately flagged as hateful. Second, the region–toxicity association is weak (Cramér’s V = 0.186). Third, the dialect-free Unknown control is itself among the most toxic (56.5%), so a high toxic rate is not tied to carrying dialectal markers. Fourth, native annotators agree with the ensemble equally well in every region (Cohen’s –0.957, Table 2), so the ensemble does not over-label any dialect relative to human judgment. We therefore attribute the base-rate differences to the sampled sources (VOZ-HSD and ViHSD) rather than to region-conditional labeling bias. These differences also require caution when interpreting SPD: closer positive-prediction rates do not necessarily indicate less unfair use of dialectal cues. We therefore interpret SPD alongside EO and predictive performance.
Evaluation metrics
We evaluate our approach along two dimensions: (i) utility for Vietnamese hate speech detection and (ii) fairness across regional dialect groups. For utility, we report Accuracy and F1-score. For fairness, we report Statistical Parity Difference (SPD) and Equal Opportunity (EO) measured across regions.
Binary convention for fairness metrics. Since our main task is a 3-way classification (Clean, Offensive, Hate), we follow a common practice to define a positive outcome for fairness evaluation. Specifically, we treat Toxic as the positive class, i.e., if , and otherwise. Similarly, y = 1 denotes that the ground-truth label is Toxic.
Acc. Accuracy measures the overall frequency of correct predictions:
(30)where TP, TN, FP, and FN denote true positives, true negatives, false positives, and false negatives, respectively.
F1. F1-score summarizes the balance between precision and recall and is widely used for imbalanced classification. We first define precision and recall for the positive class:
(31)The F1-score is the harmonic mean of precision and recall:
(32)SPD. Statistical Parity Difference measures whether the positive prediction rate is independent of the sensitive attribute. We compute the maximum gap in positive prediction rates between any two regions:
(33)where denotes the set of regional attributes. Smaller indicates closer positive-prediction rates across regions. When regional Toxic base rates differ, this reduction does not by itself establish improved fairness, because it may reflect convergence of output rates rather than correction of unfair weighting of dialectal cues.
EO. Equal Opportunity focuses on individuals who truly belong to the positive class (y = 1) and measures disparities in true positive rates across regions. We compute the maximum gap in true positive rates between any two regions:
(34)Smaller indicates more equitable opportunity across dialect regions.
Experimental setup
This section describes the experimental settings used to evaluate the proposed debiasing framework, including implementation details, training configurations, and comparison methods. All experiments are designed to assess both task performance and robustness under different fairness-aware learning strategies.
Baselines and comparison methods
To comprehensively evaluate the effectiveness of the proposed framework, we compared it against the following baselines across all backbone models:
- Baseline. The model is fine-tuned using only the standard cross-entropy loss on the main task (), without any explicit debiasing or fairness constraints.
- Resampling. A weighted random sampler is applied during training to balance the distribution of regional labels within each batch, aiming to mitigate bias at the data level.
- CDA. Region-associated markers are swapped to generate attribute-swapped (counterfactual) examples, weakening the correlation between region and toxicity in the training data.
- GRL. The model is trained using both the main task loss and an adversarial loss (), encouraging region-invariant representations without contrastive learning.
- Contrastive Learning. The model is trained using the main task loss combined with supervised contrastive loss (), without adversarial debiasing.
- FCL. A contrastive-only fairness baseline that applies the supervised contrastive loss on both the toxicity labels and the region labels, but subtracts the region term so the encoder is discouraged from forming region-coherent clusters, achieving region-invariance through the contrastive geometry rather than an adversarial discriminator.
- CLAF (Ours). The proposed joint framework that integrates adversarial debiasing and fairness-aware contrastive learning, optimized using the full objective .
All methods were evaluated under identical experimental conditions to ensure a fair comparison.
Implementation details
We implemented all models using PyTorch and the Hugging Face Transformers library. Experiments were conducted on a single RTX 4090 GPU with 48GB of memory. Unless otherwise stated, all models were initialized from the same pretrained backbone and fine-tuned end-to-end.
Reproducibility and random seeds. To account for the stochasticity inherent in neural network training, we conducted each experiment using five different random seeds: {42, 444, 1002, 2048, 3047}. Reported results correspond to the mean performance across these five runs. This evaluation protocol reduces variance due to random initialization and provides a more reliable estimate of model performance.
Debiasing components. For the adversarial debiasing module, we masked instances labeled as Unknown during discriminator loss computation. This design choice prevents the model from learning neutrality as a distinct regional attribute, which could otherwise introduce spurious correlations.
A detailed summary of all training configurations and hyperparameters for the adversarial and contrastive components is provided in Table 4.
Training configuration. All backbone models were optimized using AdamW with a learning rate of . We trained each model for 5 epochs with a batch size of 32 and a maximum input sequence length of 128 tokens. Hyperparameters were kept consistent across all comparison methods unless explicitly stated otherwise.
Hyperparameter selection.
To keep the comparison controlled and to avoid per-backbone tuning that could confound the fairness analysis, we selected one hyperparameter configuration per method and reused it, unchanged, across all five backbones. All coefficients were tuned on a single reference model, PhoBERT-v2 [31], chosen because it is a strong monolingual Vietnamese encoder and optimizes stably across seeds in our setting (see the standard deviations in Table 5), making it a reliable basis for tuning.
Search procedure. The general training settings were held fixed for every method and backbone (AdamW, learning rate , batch size 32, 5 epochs, and a maximum sequence length of 128; Table 4). We tuned only the method-specific coefficients: the gradient-reversal strength , the contrastive weight , and the contrastive temperature . Each method was tuned independently, so the adversarial-only baseline (GRL) and the full model (CLAF) need not share the same . We used Optuna [32] with 30 trials, searching , , and . All trials were scored on the ViFHSD development split; the held-out test split was never used for model selection.
Selection objective. The search operationalizes the accuracy–fairness trade-off of RQ3 directly. We select the configuration that minimizes the regional disparities and while keeping macro-F1 close to the standard cross-entropy baseline; that is, among the configurations that do not substantially degrade accuracy, we keep the fairest one.
Results & analysis
Overall trends across backbones
As shown in Table 5, the strongest monolingual Vietnamese backbones (PhoBERT, PhoBERT-v2) yield the highest utility under standard fine-tuning (CE), while ViSoBERT is comparable to the better multilingual model (mBERT [33]); both multilingual backbones (mBERT, distilBERT [34]) otherwise trail the Vietnamese-specific encoders. Crucially, CE exhibits substantial regional disparities across all backbones (SPD 29–32 and EO 14–18), suggesting that regional cues can act as spurious shortcuts for toxicity prediction.
Probing region information in representations
To test whether CLAF achieves fairness by erasing region information from the representation, we train a post-hoc MLP probe on the frozen classifier-input representation Z and report its accuracy, the mutual-information lower bound , and the MDL compression ratio (Table 6). The result is the opposite of erasure: CLAF yields the highest on all three probed backbones (ViSoBERT 1.16, PhoBERT-v2 0.69, mBERT 1.09 bits; all significant vs. CE at p < 0.05), so region information is more, not less, decodable from Z than under standard fine-tuning. The same upward direction appears for the adversarial-only GRL baseline, locating the effect in adversarial training rather than in CLAF specifically. This directly substantiates Eq. (19) and Remark 2: because is highest for CLAF while and are simultaneously the lowest (Table 5), the adversarial term cannot be acting as a representation-level information minimizer. Its effect is instead confined to the predictor output, consistent with the slack of the data processing inequality (Remark 1): output fairness improves while I(Z;S) is left large.
Table 7 corroborates this at the level of the CLAF adversary itself. The deployed adversary appears to collapse to near-floor accuracy on ViSoBERT (0.02) and mBERT (0.03), but this is largely a label-permutation artifact: after optimal alignment the same adversary recovers the region at 0.69 and 0.67 (PhoBERT-v2 is already aligned at 0.49). A fresh post-hoc probe does better still (0.91, 0.88, and 0.76), leaving a uniformly positive gap (+ 0.22, + 0.21, and + 0.27) that quantifies the dialect information the adversary suppresses at its output but does not remove from Z.
Why does adversarial training make S more decodable? This increase in decodability is not specific to our setting: it is the dialectal analogue of a known failure mode of adversarial attribute removal. Elazar and Goldberg [20] showed that driving an adversary to chance during training does not erase the protected attribute—a post-hoc classifier on the frozen representation recovers it almost as well as from an undebiased model. Our probing reproduces and sharpens this effect. The deployed adversary collapses to near-floor accuracy (0.02–0.03, Table 7), but this collapse is a label-permutation artifact—the adversary inverts the North and Central labels—so after optimal alignment it recovers region at 0.67–0.69, and a fresh probe does better still ( to + 0.27). The adversary is thus mis-aligned, not region-agnostic, and S remains—indeed becomes more—linearly accessible in Z.
We hypothesize two compounding mechanisms. First, the gradient-reversal adversary is a co-trained linear discriminator; to defeat the current adversary the encoder need only rotate the region-encoding subspace out of the adversary’s present decision directions, not destroy it. Because the adversary is a moving target, this rotation reorganizes rather than removes dialect information, leaving it recoverable—and often more linearly separable—to an unconstrained post-hoc probe. This outcome is exactly the slack of the data-processing inequality in Remark 2: output fairness ( small) is achieved while I(Z;S) is left large, because is trained to ignore the directions where S lives. Second, the supervised contrastive term amplifies the effect: by pulling same-class points together it increases the overall linear separability of the geometry, raising the decodability of any attribute correlated with the toxicity clusters, including region. Consistent with this decomposition, the adversarial-only GRL baseline already raises above CE, and adding the contrastive term (CLAF) raises it further (Table 6).
Per-region utility
We report macro-F1 separately for each region. Fig 4 shows per-region macro-F1 for the three representative backbones (PhoBERT-v2, mBERT, ViSoBERT) under every mitigation method, broken down into North, Central, South, and the Unknown control group.
A consistent difficulty ordering emerges across all three backbones: the South region attains the highest macro-F1, the North is intermediate, and the Central region is the hardest. Because this ranking is preserved regardless of backbone, it reflects a property of the regional data rather than the inductive bias of any single model. The driver is not sample size—Central is in fact the largest dialect region (6,837 comments vs. 4,135 for North and 3,244 for South; Table 3)—but its label distribution and reliability: Central is the most skewed toward Clean (69.2% Clean, 26.9% Offensive, 3.9% Hate), so its minority toxic classes offer the least signal for a class-averaged metric like macro-F1, and it carries the noisiest regional labels, with the lowest lexicon–human agreement (83.3% vs. 100% and 97.6%; Table 1) and the most LLM three-way disagreement.
Crucially, the mitigation methods do not erase this ordering: CLAF preserves the South > North > Central ranking on all three backbones. Its utility cost, however, is distributed unevenly, falling mainly on Central and South while North is least affected: on mBERT and ViSoBERT the largest single drop is on the Central slice (ViSoBERT , mBERT ), with South reduced somewhat less (ViSoBERT ); on PhoBERT-v2 every region stays within about one point. The Central slice remains the lowest and noisiest region under all methods, and the contrastive-heavy variants depress it most (FCL on PhoBERT-v2, CLAF itself on mBERT and ViSoBERT). This pattern is consistent with our central finding: CLAF narrows the measured regional disparities in the predictor’s outputs without improving macro-F1 in the weakest-performing region; indeed, macro-F1 decreases slightly in Central. Thus, the reduction in regional disparities reflects output-level regularization rather than a redistribution of predictive utility toward Central.
Class-conditional fairness
The aggregate Toxic gap in Table 5 pools the Offensive and Hate classes into a single positive label. Because these two classes differ sharply in frequency and in how regionally marked they are, we decompose the regional gap into an Offensive-only and a Hate-only positive class (Table 8), measuring SPD and EO within each slice.
The decomposition reveals that the two classes contribute to regional unfairness in different ways. The Offensive-only slice dominates the statistical-parity gap: SPD is large for every backbone under CE (e.g., 28.41 for ViSoBERT, 29.89 for PhoBERT-v2, 29.02 for mBERT), reflecting that offensive predictions are frequent and their positive rate varies most across regions. The Hate-only slice, by contrast, carries a small SPD (around 2–3 points) but a much larger and noisier EO (above 30 for several backbones), a direct consequence of the data scarcity of the Hate class: with few positive Hate examples per region, the true-positive rate is estimated from small subgroups and becomes unstable.
CLAF’s gains concentrate where the signal is reliable. On the Offensive-only slice it produces the largest reductions on all three backbones, significant on ViSoBERT () and PhoBERT-v2 (); on mBERT the reduction is comparable in size () but does not reach significance. On the data-scarce Hate-only slice the changes are smaller and mostly within noise, the exception being PhoBERT-v2, where CLAF lowers both Hate-only metrics significantly (SPD , EO ).
Out-of-distribution evaluation
To assess whether the fairness gains transfer beyond the training distribution, we evaluate every model zero-shot on the UIT-ViCTSD test split: models are trained on ViFHSD and applied to UIT-ViCTSD without any adaptation (Table 9).
Two effects of the distribution shift are immediately visible. First, toxic-class utility is low across all methods and backbones (F1tox lies in the 14–29 range), reflecting the gap in domain and annotation convention between the two corpora. Second, the statistical-parity gap compresses sharply: SPD falls from roughly 30 in-distribution (Table 5) to single digits (2.55–6.86), because UIT-ViCTSD carries a much weaker and differently distributed regional signal in positive-prediction rates. The equal-opportunity gap does not compress comparably: EO stays in the tens and even rises on PhoBERT-v2 (in-distribution out-of-distribution ). Consequently, SPD differences between methods are small and must be read against the reported standard deviations, whereas EO retains a wider spread (11–33).
Within this band, no single method dominates, but the fairness ordering partially transfers. CLAF retains an advantage on equal opportunity: it attains the lowest EO on mBERT (11.23 vs. 13.33 for CE), reduces EO on ViSoBERT (15.44 vs. 16.84), and yields the highest accuracy on mBERT (86.43). This advantage does not extend to statistical parity: CLAF’s SPD is no better than CE on any backbone, and F1tox declines under the shift, so the in-distribution gains transfer only in part. The most reliable out-of-distribution fairness instead comes from the adversarial-only GRL on ViSoBERT, which attains the lowest SPD in the table (2.55) together with a low EO (12.63, second only to CLAF’s 11.23 on mBERT). We also note that the single largest EO (, FCL on ViSoBERT) reflects seed instability rather than a consistent effect, as its standard deviation indicates.
Overall, the out-of-distribution results temper the in-distribution findings: debiasing methods that reduce regional disparities on ViFHSD do not uniformly preserve those reductions under domain shift, and the accuracy–fairness trade-off persists. This is consistent with our stated limitations and motivates evaluating robustness across broader domains and annotation schemes in future work.
Hyperparameter sensitivity and Pareto front
The adversarial coefficient governs the trade-off between utility and dialect invariance in CLAF, so we sweep it over and examine both the resulting Pareto front (Fig 5) and the one-dimensional sensitivity curves (Fig 6) for PhoBERT-v2, ViSoBERT, and mBERT.
Each point plots macro-F1 (%) against a fairness gap (top row: SPD; bottom row: EO), annotated with its value. Increasing trades utility for fairness, tracing the frontier from which the operating point is selected.
Top row: macro-F1 (%); bottom row: EO (%), both as a function of . The dashed line marks the selected value .
The sensitivity curves reveal a clear two-regime behavior. As increases, the fairness gap EO trends downward on all three backbones (non-monotonically, with small local fluctuations), confirming that stronger gradient reversal suppresses region-predictive signal at the output. Utility, however, is not affected uniformly: macro-F1 stays essentially flat across the low-to-moderate range () and collapses only once is pushed to 1.5 and 3, where the encoder is forced to discard so much information that toxicity prediction degrades. This collapse is sharpest for ViSoBERT and mBERT, whose macro-F1 falls steeply beyond (to at ), while PhoBERT-v2 degrades more gracefully (). On the reference model PhoBERT-v2, (dashed line) sits at the knee of the trade-off: it realizes most of the attainable fairness improvement while remaining in the flat, utility-preserving regime, and we adopt it as the single operating point for all CLAF results in Table 5.
The Pareto fronts in Fig 5 tell the same story in the joint utility–fairness plane, where each point is annotated with its . Sweeping traces a frontier along which lowering the fairness gap (SPD on the top row, EO on the bottom) is exchanged for macro-F1: small coefficients cluster in the high-utility, high-disparity corner, and increasing moves the operating point toward lower disparity. On PhoBERT-v2 and mBERT, lies on the efficient part of the frontier, just before the curve bends back toward steep utility loss. On ViSoBERT it is marginally inside the frontier—a slightly smaller coefficient () attains a comparable or lower SPD and EO at similar macro-F1—but the difference is within seed noise. That a single transferred coefficient is not exactly optimal on every backbone is expected, and indeed confirms that the operating point follows a consistent criterion fixed once on the reference model rather than being hand-tuned per backbone; this directly addresses the accuracy–fairness trade-off posed in RQ3.
Effectiveness of mitigation strategies
Resampling yields little fairness benefit. It barely moves SPD (by less than one point on every backbone) and tends to worsen equal opportunity: relative to CE, EO rises on four of five backbones (e.g., mBERT , ViSoBERT , PhoBERT ) and falls only negligibly on PhoBERT-v2 (). This indicates that data-level balancing alone is insufficient when region markers remain predictive. Representation-level methods are more reliable. GRL reduces both SPD and EO relative to CE on all five backbones while keeping utility essentially intact (macro-F1 changes by at most 0.7 points and improves on four of five). CL preserves or slightly improves macro-F1 on most backbones but gives only small and inconsistent fairness changes, whereas the contrastive-only FCL variant can sharply degrade utility on weaker backbones (e.g., distilBERT macro-F1 ), indicating sensitivity to model capacity and optimization dynamics.
CLAF reduces measured regional disparities at a modest utility cost
Across all five backbones, CLAF achieves the lowest SPD and EO of any method, indicating the strongest reduction of the measured regional disparities at a small, explicitly reported utility cost. Compared to CE, CLAF reduces SPD/EO by: (i) PhoBERT: SPD () and EO (); (ii) PhoBERT-v2: SPD () and EO (); (iii) ViSoBERT: SPD () and EO (); (iv) mBERT: SPD () and EO (); (v) distilBERT: SPD () and EO (). Under a paired t-test (p < 0.05), the SPD reductions are significant on all five backbones and the EO reductions on four; the exception is mBERT, whose EO carries the highest seed variance ().
Importantly, these gains come at a modest utility cost: relative to CE, CLAF lowers macro-F1 by between 0.6 points (PhoBERT-v2, not significant) and 3.2 points (ViSoBERT). We do not claim F1 is preserved; instead we report this accuracy–fairness trade-off explicitly, in line with RQ3.
Synergy between adversarial and contrastive learning
The ablations indicate that combining the two components reduces regional disparity more than either alone, on every backbone. For example, on ViSoBERT, EO is 14.97 with GRL and 16.52 with CL, but drops to 12.18 with CLAF; on distilBERT, EO is 15.75 (GRL) and 16.56 (CL) versus 10.01 (CLAF). CLAF attains a lower SPD and EO than both ablations on all five backbones. This pattern is consistent with the two objectives acting on complementary fronts: the adversarial term discourages the predictor from relying on region-predictive signal at its output, while the contrastive term sharpens toxicity-class structure in the embedding. Crucially, as our probing analysis shows, the joint gain does not come from erasing region information from the representation—which remains decodable (Table 6)—but from how the two objectives together reduce output-level disparity beyond either component alone.
Qualitative evidence via t-SNE visualization
To examine whether the learned representations remain entangled with regional attributes, we visualize test-set embeddings with t-SNE, colored by region in Fig 8 and by toxicity label in Fig 7. Both figures show all seven methods: (a) CE, (b) Resampling, (c) GRL, (d) CL, (e) CLAF, (f) FCL, and (g) CDA.
Compared with CE, the contrastive-based methods (CL, FCL, CLAF) yield more compact, better-separated class clusters, indicating that the contrastive objective sharpens toxicity-discriminative structure in the embedding space.
Colored by region (Fig 8), the CE baseline (a) forms clusters that correlate with regional colors, indicating that the encoder encodes region-specific cues. Resampling (b) increases mixing in places but still leaves noticeable region-dominated structure, matching its mixed fairness results in Table 5. Crucially, region structure remains visible under the representation-level methods as well: even GRL (c) and CLAF (e) do not visibly erase it. This is consistent with our probing analysis (Table 7), which shows that dialect information stays decodable from the representation; t-SNE therefore does not support a “region removal” interpretation.
Region structure remains visible across all methods including GRL and CLAF consistent with our probing analysis (Table 7) that dialect information stays decodable from the representation.
Colored by toxicity label (Fig 7), the contrastive-based methods (CL, FCL, and our CLAF) yield more compact, better-separated Clean/Offensive/Hate clusters than CE, indicating that the contrastive objective sharpens toxicity-discriminative structure in the embedding. We therefore read t-SNE only as qualitative support for task-structure shaping, not as evidence of region removal, and rely on the quantitative SPD/EO results for fairness claims.
Qualitative case study
The aggregate fairness metrics (Table 5) show that cross-entropy fine-tuning (CE) carries a larger regional gap than CLAF, but they do not reveal how that gap manifests on individual comments. To address RQ4, we inspect test comments that carry explicit dialectal markers and compare the CE and CLAF predictions against the ground-truth label. Table 10 lists representative cases: CE most often over-flags benign dialectal wording as Offensive or Hate—consistent with its higher SPD/EO—whereas CLAF, whose predictor is discouraged from relying on region-identifiable information, recovers the correct label without the regional shortcut.
Conclusions
This paper studied a practical yet underexplored source of unfairness in Vietnamese hate speech detection: regional dialect cues that models can exploit as spurious shortcuts. To enable controlled evaluation, we introduced ViFHSD, a dialect-aware benchmark of 23,147 Vietnamese comments curated from existing HSD corpora, with regional labels derived from a lexicon of region-specific markers and toxicity labels obtained via an ensemble LLM majority-voting pipeline. We then proposed CLAF, a unified training framework that combines supervised contrastive learning with adversarial debiasing via a gradient reversal layer.
Across five pretrained backbones, standard fine-tuning yields substantial regional disparities, whereas CLAF attains the lowest SPD and EO on every backbone at a modest, explicitly reported utility cost (a macro-F1 drop of 0.6 to 3.2 points). Our probing and t-SNE analyses clarify the mechanism: CLAF does not achieve fairness by erasing dialect information from the representation—region remains decodable from the embedding—but by reducing the predictor’s reliance on that information at the output, while the contrastive objective retains task-relevant separability. Overall, CLAF consistently reduces the measured regional gaps across the five tested encoder backbones. However, the SPD reductions should be interpreted as closer positive-prediction rates, rather than sufficient evidence of reduced dialect-driven bias, given the unequal regional Toxic base rates. We outline concrete next steps in the Limitations and Future Work sections below.
Limitations
Although CLAF reduces measured regional disparities, it does so at a modest, explicitly reported utility cost rather than at no cost, and several further limitations should be noted. First, toxicity supervision comes from an ensemble LLM majority-voting pipeline, which scales annotation but may deviate from human judgment in borderline, sarcastic, or context-dependent cases, and discarding fully disagreed instances can bias the benchmark toward easier examples. We validated these automatic labels against native annotators on a stratified 972-comment sample (our human-validation analysis), but that check is limited in scale. Second, dialect labels are assigned via lexicon-based matching, which is inherently incomplete and sensitive to polysemy, creative spelling, and code-switching, potentially leading to noisy regional attribution and residual sampling bias. Third, adversarial debiasing acts at the predictor output and does not remove region information from the representation, as our probing analysis shows; consequently some accuracy–fairness trade-offs persist, especially under distribution shift or for under-represented regional groups, as our out-of-distribution evaluation confirms. Fourth, unequal regional Toxic base rates limit the interpretation of SPD. A lower SPD may reflect convergence in positive-prediction rates rather than reduced reliance on dialectal cues, particularly because regional information remains encoded in the representations. We therefore interpret SPD alongside EO and predictive performance rather than as standalone evidence of improved fairness.
Future work
Although our method reduces the measured regional disparities while keeping strong predictive performance, several directions remain for future work.
Strengthen dialect labeling beyond lexicons. We will broaden dialect coverage and combine multiple labeling signals (e.g., expanded lexicons, subword/character patterns, and lightweight classifiers) to reduce noisy regional attribution. We also plan to quantify dialect-label uncertainty and examine whether residual sampling bias remains after improved labeling.
Study robustness and remaining trade-offs. We will evaluate accuracy–fairness trade-offs more explicitly under distribution shift, across broader domains, and for under-represented regional groups. Finally, we will stress-test robustness to emerging slang and new forms of code-switching to better reflect real-world moderation settings.
References
- 1.
Fasching N, Lelkes Y. Model-Dependent Moderation: Inconsistencies in Hate Speech Detection Across LLM-based Systems. In: Che W, Nabende J, Shutova E, Pilehvar MT, editors. Findings of the Association for Computational Linguistics: ACL 2025. Vienna, Austria: Association for Computational Linguistics; 2025. p. 22271–85. Available from: https://aclanthology.org/2025.findings-acl.1144/
- 2.
Yimam SM, Dementieva D, Fischer T, Moskovskiy D, Rizwan N, Saha P. Demarked: A strategy for enhanced abusive speech moderation through counterspeech, detoxification, and message management. arXiv:2406.19543. 2024. https://arxiv.org/abs/2406.19543
- 3.
Sheth P, Kumarage T, Moraffah R, Chadha A, Liu H. Cross-Platform Hate Speech Detection with Weakly Supervised Causal Disentanglement. arXiv:2404.11036. 2024. https://arxiv.org/abs/2404.11036
- 4.
Gallegos IO, Rossi RA, Barrow J, Tanjim MM, Kim S, Dernoncourt F, et al. Bias and Fairness in Large Language Models: A Survey. arXiv:2309.00770. 2024. https://arxiv.org/abs/2309.00770
- 5.
Talat Z, Névéol A, Biderman S, Clinciu M, Dey M, Longpre S, et al. You reap what you sow: On the Challenges of Bias Evaluation Under Multilingual Settings. In: Fan A, Ilic S, Wolf T, Gallé M, editors. Proceedings of BigScience Episode #5 – Workshop on Challenges & Perspectives in Creating Large Language Models. virtual+Dublin: Association for Computational Linguistics; 2022. p. 26–41. Available from: https://aclanthology.org/2022.bigscience-1.3/
- 6.
Dinh NV, Dang TC, Thanh Nguyen L, Nguyen KV. Multi-Dialect Vietnamese: Task, Dataset, Baseline Models and Challenges. In: Al-Onaizan Y, Bansal M, Chen YN, editors. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing. Miami (FL): Association for Computational Linguistics; 2024. p. 7476–98. Available from: https://aclanthology.org/2024.emnlp-main.426/
- 7.
Sap M, Card D, Gabriel S, Choi Y, Smith NA. The Risk of Racial Bias in Hate Speech Detection. In: Korhonen A, Traum D, Màrquez L, editors. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Florence, Italy: Association for Computational Linguistics; 2019. p. 1668–78. Available from: https://aclanthology.org/P19-1163/
- 8.
Blodgett SL, Barocas S, Daumé III H, Wallach H. Language (Technology) is Power: A Critical Survey of “Bias” in NLP. In: Jurafsky D, Chai J, Schluter N, Tetreault J, editors. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Online: Association for Computational Linguistics. 2020. p. 5454–76. Available from: https://aclanthology.org/2020.acl-main.485/
- 9.
Iftimie D, Zinn E. Evaluating simple debiasing techniques in RoBERTa-based hate speech detection models. arXiv:2501.15430. 2025. https://arxiv.org/abs/2501.15430
- 10.
Borkan D, Dixon L, Sorensen J, Thain N, Vasserman L. Nuanced Metrics for Measuring Unintended Bias with Real Data for Text Classification. In: Companion Proceedings of The 2019 World Wide Web Conference. WWW’19. New York (NY): Association for Computing Machinery; 2019. p. 491–500. Available from: https://doi.org/10.1145/3308560.3317593
- 11.
Davidson T, Warmsley D, Macy M, Weber I. Automated Hate Speech Detection and the Problem of Offensive Language. In: Proceedings of the International AAAI Conference on Web and Social Media. 2017. 11 p. https://doi.org/10.1609/icwsm.v11i1.14955
- 12.
Zhang BH, Lemoine B, Mitchell M. Mitigating Unwanted Biases with Adversarial Learning. In: Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society. AIES ’18. New York (NY): Association for Computing Machinery; 2018. p. 335–40. Available from: https://doi.org/10.1145/3278721.3278779
- 13.
Nguyen LT, Van Nguyen K, Nguyen NLT. Constructive and Toxic Speech Detection for Open-Domain Social Media Comments in Vietnamese. In: Advances and Trends in Artificial Intelligence. Artificial Intelligence Practices. Cham: Springer International Publishing; 2021. p. 572–83. Available from: https://doi.org/10.1007/978-3-030-79457-6_49
- 14.
Luu ST, Nguyen KV, Nguyen NLT. A Large-Scale Dataset for Hate Speech Detection on Vietnamese Social Media Texts. In: Fujita H, Selamat A, Lin JCW, Ali M, editors. Advances and Trends in Artificial Intelligence. Artificial Intelligence Practices. Cham: Springer International Publishing; 2021. p. 415–26.
- 15.
Nguyen N, Phan T, Nguyen DV, Nguyen K. ViSoBERT: A Pre-Trained Language Model for Vietnamese Social Media Text Processing. In: Bouamor H, Pino J, Bali K, editors. Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. Singapore: Association for Computational Linguistics; 2023. p. 5191–207. Available from: https://aclanthology.org/2023.emnlp-main.315/
- 16.
Do PNT, Tran SQ, Hoang PG, Nguyen KV, Nguyen NLT. VLUE: A New Benchmark and Multi-task Knowledge Transfer Learning for Vietnamese Natural Language Understanding. In: Duh K, Gomez H, Bethard S, editors. Findings of the Association for Computational Linguistics: NAACL 2024. Mexico City, Mexico: Association for Computational Linguistics; 2024. p. 211–22. Available from: https://aclanthology.org/2024.findings-naacl.15/
- 17.
Thanh Nguyen L. ViHateT5: Enhancing Hate Speech Detection in Vietnamese With a Unified Text-to-Text Transformer Model. In: Ku LW, Martins A, Srikumar V, editors. Findings of the Association for Computational Linguistics: ACL 2024. Bangkok, Thailand: Association for Computational Linguistics; 2024. p. 5948–61. Available from: https://aclanthology.org/2024.findings-acl.355/
- 18.
Dixon L, Li J, Sorensen J, Thain N, Vasserman L. Measuring and Mitigating Unintended Bias in Text Classification. In: Proceedings of the 2018 AAAI/ACM Conference on AI, Ethics, and Society. AIES ’18. New York (NY): Association for Computing Machinery; 2018. p. 67–73. Available from: https://doi.org/10.1145/3278721.3278729
- 19.
Zmigrod R, Mielke SJ, Wallach H, Cotterell R. Counterfactual Data Augmentation for Mitigating Gender Stereotypes in Languages with Rich Morphology. In: Korhonen A, Traum D, Màrquez L, editors. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. Florence, Italy: Association for Computational Linguistics; 2019. p. 1651–61. Available from: https://aclanthology.org/P19-1161/
- 20.
Elazar Y, Goldberg Y. Adversarial Removal of Demographic Attributes from Text Data. In: Riloff E, Chiang D, Hockenmaier J, Tsujii J, editors. Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing. Brussels, Belgium: Association for Computational Linguistics; 2018. p. 11–21. Available from: https://aclanthology.org/D18-1002/
- 21.
Xia M, Field A, Tsvetkov Y. Demoting Racial Bias in Hate Speech Detection. In: Ku LW, Li CT, editors. Proceedings of the Eighth International Workshop on Natural Language Processing for Social Media. Online: Association for Computational Linguistics. 2020. p. 7–14. Available from: https://aclanthology.org/2020.socialnlp-1.2/
- 22.
Gao T, Yao X, Chen D. SimCSE: Simple Contrastive Learning of Sentence Embeddings. In: Moens MF, Huang X, Specia L, Yih SWt, editors. Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing. Online and Punta Cana, Dominican Republic: Association for Computational Linguistics. 2021. p. 6894–910. Available from: https://aclanthology.org/2021.emnlp-main.552/
- 23.
Khosla P, Teterwak P, Wang C, Sarna A, Tian Y, Isola P, et al. Supervised Contrastive Learning. arXiv:2004.11362. 2021. https://arxiv.org/abs/2004.11362
- 24.
Shen A, Han X, Cohn T, Baldwin T, Frermann L. Contrastive Learning for Fair Representations. arXiv:2109.10645. 2021. Available from: https://arxiv.org/abs/2109.10645
- 25.
Zemel R, Wu Y, Swersky K, Pitassi T, Dwork C. Learning Fair Representations. In: Dasgupta S, McAllester D, editors. Proceedings of the 30th International Conference on Machine Learning. vol. 28 of Proceedings of Machine Learning Research. Atlanta (GA): PMLR; 2013. p. 325–33. Available from: https://proceedings.mlr.press/v28/zemel13.html
- 26. Ganin Y, Ustinova E, Ajakan H, Germain P, Larochelle H, Laviolette F. Domain-Adversarial Training of Neural Networks. J Mach Learn Res. 2016;17(59):1–35.
- 27.
Madras D, Creager E, Pitassi T, Zemel R. Learning Adversarially Fair and Transferable Representations. arXiv:1802.06309. 2018. https://arxiv.org/abs/1802.06309
- 28.
Ganin Y, Lempitsky V. Unsupervised Domain Adaptation by Backpropagation. arXiv:1409.7495. 2015. Available from: https://arxiv.org/abs/1409.7495
- 29.
Hoàng TC. Tiếng Việt trên các miền đất nước: Phương ngữ học. Hà Nội: Nhà xuất bản Khoa học Xã hội; 1989.
- 30. Landis JR, Koch GG. The measurement of observer agreement for categorical data. Biometrics. 1977;33(1):159–74. pmid:843571
- 31.
Nguyen DQ, Tuan Nguyen A. PhoBERT: Pre-trained language models for Vietnamese. In: Cohn T, He Y, Liu Y, editors. Findings of the Association for Computational Linguistics: EMNLP 2020. Online: Association for Computational Linguistics. 2020. p. 1037–42. Available from: https://aclanthology.org/2020.findings-emnlp.92/
- 32.
Akiba T, Sano S, Yanase T, Ohta T, Koyama M. Optuna: A Next-generation Hyperparameter Optimization Framework. In: Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. 2019. p. 2623–31.
- 33.
Devlin J, Chang MW, Lee K, Toutanova K. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In: Burstein J, Doran C, Solorio T, editors. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers). Minneapolis, Minnesota: Association for Computational Linguistics; 2019. p. 4171–86. Available from: https://aclanthology.org/N19-1423/
- 34.
Sanh V, Debut L, Chaumond J, Wolf T. DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter. arXiv:1910.01108. 2020. https://arxiv.org/abs/1910.01108

관련 뉴스