A cross-linguistic, cross-target stance detection method based on direct preference alignment
By constructing a cross-linguistic inference preference dataset and training a strategy model using a direct preference alignment loss function, the problem of cross-linguistic stance detection under the lack of labeled data in the target language is solved, and high-quality cross-linguistic and cross-target stance detection results are achieved.
Patent Information
- Application Number
- CN202611176004.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-11-17
AI Technical Summary
Existing cross-language stance detection methods suffer from unstable reasoning logic, obvious translation traces, and insufficient fine-grained stance analysis capabilities when there is a lack of labeled data in the target language, making it difficult to achieve high-quality stance detection in cross-language and cross-target scenarios.
By constructing a cross-language reasoning preference dataset, we can guide and correct the reasoning path of the target language using high-quality reasoning logic in the source language, and train a policy model through the direct preference alignment loss function to enhance the standardization and logical rigor of the target language expression.
It improves the performance of stance detection under conditions where there is a lack of labeled data for the target language, enhances the overall performance of the model in cross-language and cross-target detection tasks, and strengthens the comprehensive modeling ability of target language expression habits and stance logic consistency.
Smart Images

Figure CN123117323A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing, cross-lingual text analysis, and large language model alignment, specifically to a cross-lingual, cross-target stance detection method based on direct preference alignment. Background Technology
[0002] Cross-linguistic stance detection aims to determine the supportive, opposing, or neutral stance of a target language text relative to a given target, given that the source language has labeled data while the target language lacks labeled data. This is an important research direction in natural language processing, cross-linguistic information mining, and social media text analysis. In cross-target scenarios, the same text may exhibit different stances towards different targets. Therefore, this task not only requires the model to have cross-linguistic transfer capabilities but also the ability to perform fine-grained semantic analysis and reasoning around specific targets.
[0003] In recent years, with the development of large language models, researchers have begun to apply them to cross-linguistic stance detection tasks, improving the model's discriminative performance in the target language environment through methods such as cue learning, supervised fine-tuning, and reinforcement learning. Existing methods typically utilize annotated source language data, transferring discriminative capabilities from the source language to the target language through translation or knowledge transfer. While these methods improve model performance to some extent, when the target language lacks annotated data, the inference process generated by the model is still prone to problems such as obvious translation traces in the source language, unnatural expression in the target language, and insufficient analysis of specific targets, thus affecting the final stance detection results.
[0004] Furthermore, some existing alignment methods rely on reward models or complex training mechanisms, which not only involve cumbersome training processes but also struggle to simultaneously ensure the standardization of target language expression, consistency of stance logic, and the granularity of target parsing in cross-language scenarios. Especially in cross-language and cross-target scenarios, the models often only provide superficial judgments, failing to form logically rigorous reasoning paths that conform to the target language's conventions. Therefore, how to effectively transfer high-quality reasoning processes without complex reward modeling and improve cross-language and cross-target stance detection performance remains an unresolved technical problem. Summary of the Invention
[0005] This invention provides a cross-language, cross-target stance detection method based on direct preference alignment to address the problems of existing methods, such as unstable reasoning logic, obvious translation traces, and insufficient fine-grained stance analysis capabilities in target-oriented situations where labeled data for the target language is lacking.
[0006] The technical solution of this invention is: a cross-language, cross-target stance detection method based on direct preference alignment, the method comprising:
[0007] Step 1: Define the cross-language, cross-target stance detection task and construct cross-language training samples; given labeled samples in the source language, the samples include text, corresponding targets, and stance labels, and use machine translation to map the source language samples to the target language space to obtain the target language training samples;
[0008] Step 2: Construct a cross-language reasoning preference dataset. For the target language training samples, first generate the initial reasoning path of the target language as the discarded reasoning path, and then combine the source language label information and the high-quality reasoning logic of the source language to guide and correct the initial reasoning path of the target language to generate the preferred reasoning path, thereby constructing a preference dataset consisting of input samples, preferred reasoning paths and discarded reasoning paths.
[0009] Step 3: Train the policy model based on direct preference alignment; construct the policy model to be optimized and the frozen reference model, calculate the preference difference between the preferred inference path and the abandoned inference path on the preference dataset, and update the policy model parameters according to the direct preference alignment loss function so that the model is more inclined to generate inference paths that conform to the expression norms of the target language and are logically rigorous in the target language space.
[0010] Step 4: Perform cross-language and cross-target stance prediction; input the target language test samples into the trained policy model, generate the corresponding inference results, and output the stance category relative to the target;
[0011] Furthermore, Step 1 specifically includes the following:
[0012] Step 1.1: Define the source language as a labeled training set. ,in and They represent the first Source language text and its corresponding target, For the corresponding stance label.
[0013] Step 1.2: Use machine translation to map the source language training set to the target language space to obtain the target language training set. ,in and Representing the source language text respectively and objectives The target language text and target obtained through translation, A label representing a stance of inheritance;
[0014] Step 1.3: Represent the target language sample as And it serves as the input for subsequent preference construction and model training.
[0015] Furthermore, Step 2 specifically includes the following:
[0016] Step 2.1: On the source language training set, combine the source language text, corresponding target, and real position labels to generate a high-quality source language inference path that is consistent with the labels, which serves as the source language logic anchor. During the generation process, the real position labels are explicitly introduced into the inference generation process to constrain the model output to be consistent with the real labels. When the inference conclusion generated by the model is inconsistent with the real position labels, the model is guided to correct the inference chain until a high-quality source language inference path consistent with the real position labels is obtained.
[0017] Step 2.2, Target Language Samples It uses basic prompts to drive a large language model to directly generate the initial inference path for the target language. The initial inference path is then used as the discarded inference path; wherein the discarded inference path has at least one of the following characteristics: it retains traces of source language translation, its expression does not conform to the target language habits, and it does not perform fine-grained semantic reasoning around the specified target;
[0018] Step 2.3: Using source language logical anchors, source language position labels, and target language input samples, establish the initial inference path for the target language. Perform cross-language guided correction to generate the target language optimal reasoning path. The preferred reasoning path shall satisfy at least two of the following conditions: it maintains logical consistency with the source language's true position label, conforms to the target language's syntax and expression habits, and is capable of fine-grained semantic parsing around the specified target.
[0019] Step 2.4: Construct a cross-language inference preference dataset ,in, Input samples for the target language. To optimize the reasoning path, This is the reasoning path to be discarded.
[0020] Furthermore, Step 3 specifically includes the following:
[0021] Step 3.1: Construct the strategy model to be optimized. and reference model The reference model keeps its parameters frozen during training;
[0022] Step 3.2: Transfer the preference dataset Each preference triple in Input the policy model and the reference model, and calculate the conditional probabilities of the preferred reasoning path and the abandoned reasoning path under the two models respectively;
[0023] Step 3.3: Construct a direct preference alignment loss function based on the difference in the log-likelihood ratio between the preferred and rejected inference paths. ,in The Sigmoid activation function is used. This is a parameter for controlling the intensity of preference.
[0024] Step 3.4: Update the policy model parameters by minimizing the loss function to increase the generation probability of the preferred inference path and decrease the generation probability of the abandoned inference path, thereby achieving the alignment of the target language inference distribution.
[0025] Furthermore, Step 4 specifically includes the following:
[0026] Step 4.1: Input the target language test sample into the trained policy model to generate inference paths related to the input text and its corresponding target;
[0027] Step 4.2: Output the stance category of the input text relative to the corresponding target based on the reasoning path. The stance category includes Favor, Against, and Neutral.
[0028] Step 4.3: Use the model output as the cross-language, cross-target position detection result.
[0029] The present invention also provides a cross-language, cross-target stance detection system based on direct preference alignment, the system comprising: a module for executing the cross-language, cross-target stance detection method based on direct preference alignment.
[0030] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the cross-language, cross-target position detection method based on direct preference alignment.
[0031] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the cross-language, cross-target position detection method based on direct preference alignment.
[0032] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the cross-language, cross-target stance detection method based on direct preference alignment.
[0033] The beneficial effects of this invention are:
[0034] This invention proposes a cross-linguistic, cross-target stance detection method based on direct preference alignment to improve stance detection performance under conditions where labeled data for the target language is lacking. The method offers the following key advantages: First, by constructing a cross-linguistic reasoning preference dataset, it guides and corrects the target language reasoning path using high-quality reasoning logic from the source language, enabling the model to more effectively perform cross-linguistic reasoning transfer. Second, by introducing a direct preference alignment mechanism, it effectively distinguishes between preferred and rejected reasoning paths without explicitly building a reward model or undergoing complex online sampling processes, thereby improving training efficiency and stability. Finally, this invention enhances the model's comprehensive modeling ability regarding target language expression habits, stance logic consistency, and fine-grained semantics, thus improving the overall performance of the model in cross-linguistic, cross-target stance detection tasks. Experimental results show that the proposed method achieves superior results on multiple publicly available cross-linguistic stance detection datasets, demonstrating good effectiveness and generalization ability. Attached Figure Description
[0035] Figure 1 This is the framework for the cross-language, cross-target stance detection method based on direct preference alignment in this invention. Detailed Implementation
[0036] The method proposed in this embodiment was implemented on four publicly available cross-linguistic stance detection datasets: Politics-Czech, Society-Czech, Independence, and Election.
[0037] The Politics-Czech and Society-Czech datasets were reconstructed from relevant cross-linguistic stance corpora. In the experiments, German was used as the source language and Czech as the target language to verify the model's ability to transfer stance across languages in German-to-Czech scenarios. The Independence dataset contains Spanish and Catalan social media texts; in the experiments, Spanish was used as the source language and Catalan as the target language. The Election dataset was selected from multilingual political commentary corpora; English was used as the source language and French as the target language. These datasets cover different language types and various socio-political issues, and can be used to verify the stance detection performance of the method of this invention in cross-linguistic and cross-target scenarios. Statistical information for each dataset is shown in Table 1.
[0038] Table 1 Dataset Statistics
[0039] Existing cross-linguistic stance detection methods are prone to problems such as degraded reasoning chains, grammatical shifts, and imprecise stance target parsing when labeled data for the target language is lacking. Furthermore, existing alignment methods based on supervised fine-tuning or reinforcement learning suffer from drawbacks such as difficulty in constructing reward models, complex training processes, and insufficient stability. To address these issues, this invention is proposed, as follows: Figure 1 As shown, a cross-language, cross-target stance detection method based on direct preference alignment is described, the method comprising:
[0040] Step 1: Define the cross-language, cross-target stance detection task and construct cross-language training samples; given labeled samples in the source language, the samples include text, corresponding targets, and stance labels, and use machine translation to map the source language samples to the target language space to obtain the target language training samples;
[0041] Furthermore, Step 1 specifically includes the following:
[0042] Step 1.1: Define the source language as a labeled training set. ,in and They represent the first Source language text and its corresponding target, For the corresponding stance label.
[0043] Step 1.2: Use machine translation to map the source language training set to the target language space to obtain the target language training set. ,in and Representing the source language text respectively and objectives The target language text and target obtained through translation, A label representing a stance of inheritance;
[0044] Step 1.3: Represent the target language sample as And it serves as the input for subsequent preference construction and model training.
[0045] Step 2: Construct a cross-language reasoning preference dataset. For the target language training samples, first generate the initial reasoning path of the target language as the discarded reasoning path, and then combine the source language label information and the high-quality reasoning logic of the source language to guide and correct the initial reasoning path of the target language to generate the preferred reasoning path, thereby constructing a preference dataset consisting of input samples, preferred reasoning paths and discarded reasoning paths.
[0046] Furthermore, Step 2 specifically includes the following:
[0047] Step 2.1: On the source language training set, combine the source language text, corresponding target, and real position labels to generate a high-quality source language inference path that is consistent with the labels, which serves as the source language logic anchor. During the generation process, the real position labels are explicitly introduced into the inference generation process to constrain the model output to be consistent with the real labels. When the inference conclusion generated by the model is inconsistent with the real position labels, the model is guided to correct the inference chain until a high-quality source language inference path consistent with the real position labels is obtained.
[0048] Step 2.2, Target Language Samples It uses basic prompts to drive a large language model to directly generate the initial inference path for the target language. The initial inference path is then used as the discarded inference path; wherein the discarded inference path has at least one of the following characteristics: it retains traces of source language translation, its expression does not conform to the target language habits, and it does not perform fine-grained semantic reasoning around the specified target;
[0049] Step 2.3: Using source language logical anchors, source language position labels, and target language input samples, establish the initial inference path for the target language. Perform cross-language guided correction to generate the target language optimal reasoning path. The preferred reasoning path shall satisfy at least two of the following conditions: it maintains logical consistency with the source language's true position label, conforms to the target language's syntax and expression habits, and is capable of fine-grained semantic parsing around the specified target.
[0050] Step 2.4: Construct a cross-language inference preference dataset ,in, Input samples for the target language. To optimize the reasoning path, This is the reasoning path to be discarded.
[0051] Step 3: Train the policy model based on direct preference alignment; construct the policy model to be optimized and the frozen reference model, calculate the preference difference between the preferred inference path and the abandoned inference path on the preference dataset, and update the policy model parameters according to the direct preference alignment loss function so that the model is more inclined to generate inference paths that conform to the expression norms of the target language and are logically rigorous in the target language space.
[0052] Furthermore, Step 3 specifically includes the following:
[0053] Step 3.1: Construct the strategy model to be optimized. and reference model The reference model keeps its parameters frozen during training;
[0054] Step 3.2: Transfer the preference dataset Each preference triple in Input the policy model and the reference model, and calculate the conditional probabilities of the preferred reasoning path and the abandoned reasoning path under the two models respectively;
[0055] Step 3.3: Construct a direct preference alignment loss function based on the difference in the log-likelihood ratio between the preferred and rejected inference paths. ,in The Sigmoid activation function is used. This is a parameter for controlling the intensity of preference.
[0056] Step 3.4: Update the policy model parameters by minimizing the loss function to increase the generation probability of the preferred inference path and decrease the generation probability of the abandoned inference path, thereby achieving the alignment of the target language inference distribution.
[0057] Step 4: Perform cross-language and cross-target stance prediction; input the target language test samples into the trained policy model, generate the corresponding inference results, and output the stance category relative to the target;
[0058] Furthermore, Step 4 specifically includes the following:
[0059] Step 4.1: Input the target language test sample into the trained policy model to generate inference paths related to the input text and its corresponding target;
[0060] Step 4.2: Output the stance category of the input text relative to the corresponding target based on the reasoning path. The stance category includes Favor, Against, and Neutral.
[0061] Step 4.3: Use the model output as the cross-language, cross-target position detection result.
[0062] The present invention also provides a cross-language, cross-target stance detection system based on direct preference alignment, the system comprising: a module for executing the cross-language, cross-target stance detection method based on direct preference alignment.
[0063] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the cross-language, cross-target position detection method based on direct preference alignment.
[0064] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the cross-language, cross-target position detection method based on direct preference alignment.
[0065] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the cross-language, cross-target stance detection method based on direct preference alignment.
[0066] Evaluation metrics: This embodiment uses accuracy (Acc) and average F1 score (...). This is used as the primary evaluation indicator. Since this embodiment involves three positional labels: "support," "oppose," and "neutral," the precise F1 score for each category is calculated separately, and the average of the F1 scores for the three categories is obtained. Accuracy is used to measure the overall predictive ability of the model. The value is used to comprehensively measure the model's balanced recognition performance across different stance categories.
[0067] To verify the effectiveness of the model proposed in this invention, the method of this invention is compared with the following baseline methods of different labeling frameworks, as follows:
[0068] ADAN: The ADAN model is an adversarial domain adaptive network. By introducing a domain discriminator to carry out adversarial training, it prompts the feature extractor to learn language-independent aligned representations, thereby achieving decoupling of heterogeneous language spaces.
[0069] mBERT-FT: This model performs full parameter fine-tuning on multilingual BERT on source language data, serving as a benchmark for measuring the native transferability of pre-trained models.
[0070] CCSD: This model adopts a dual knowledge distillation framework, extracts general features by decoupling cross-language and cross-target dimensions, and uses unlabeled data for logical reasoning. It is an important benchmark in the field of cross-language stance detection.
[0071] ATOM: This model mines cross-linguistic general topic representations through clustering, and uses these to generate topic-aware cues using an iterative memory network. Then, through adversarial training, these cues are made linguistically invariant, thereby transferring knowledge from a high-resource source language to a low-resource target language.
[0072] TaRA: This model constructs intralingual and cross-lingual target relationship graphs to model the semantic associations between different targets, and aligns highly relevant target samples through a contrastive learning strategy, thereby solving the problem of target inconsistency in cross-lingualism and promoting knowledge transfer.
[0073] Table 2 Comparison of the proposed method with different baseline models
[0074] The proposed method was effectively compared on four cross-lingual stance detection datasets: Politics-Czech, Society-Czech, Independence, and Election. To verify the effectiveness of the proposed model, it was compared with various cross-lingual baseline models and fine-tuning methods based on large language models. The specific results are shown in Table 2, leading to the following conclusions: First, the proposed model performs exceptionally well on all four cross-lingual stance detection datasets, achieving the best performance and significantly outperforming existing baseline models and large language model methods based on cueing or supervised fine-tuning. Second, compared with traditional SFT methods and inference methods based solely on textual thought chains, the proposed method, by introducing a direct preference alignment mechanism, can more effectively improve the model's inference quality and stance discrimination ability in the target language environment. When using Qwen2.5-7B as the base model, the proposed method performs well on the Independence dataset. The performance improved by 12.8%, and on the Election dataset, it improved by 10.18% compared to SFT. Finally, the superior performance of the method in this invention is mainly attributed to the following two aspects: First, by constructing a cross-language reasoning preference dataset, the high-quality reasoning logic in the source language is used to guide and correct the reasoning process in the target language, enabling the model to better learn reasoning paths that conform to the expression habits of the target language; second, through direct preference alignment training, the model's ability to prefer optimal reasoning paths is enhanced, and low-quality reasoning with translation traces or semantic shifts is suppressed, thereby further improving the overall performance of the model in cross-language and cross-target stance detection tasks.
[0075] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A cross-language, cross-target stance detection method based on direct preference alignment, characterized in that, The method includes the following steps: Step 1: Define the cross-language, cross-target stance detection task and construct cross-language training samples; given labeled samples in the source language, the samples include text, corresponding targets, and stance labels, and use machine translation to map the source language samples to the target language space to obtain the target language training samples; Step 2: Construct a cross-language reasoning preference dataset. For the target language training samples, first generate the initial reasoning path of the target language as the discarded reasoning path, and then combine the source language label information and the high-quality reasoning logic of the source language to guide and correct the initial reasoning path of the target language to generate the preferred reasoning path, thereby constructing a preference dataset consisting of input samples, preferred reasoning paths and discarded reasoning paths. Step 3: Train the policy model based on direct preference alignment; construct the policy model to be optimized and the frozen reference model, calculate the preference difference between the preferred inference path and the abandoned inference path on the preference dataset, and update the policy model parameters according to the direct preference alignment loss function so that the model is more inclined to generate inference paths that conform to the expression norms of the target language and are logically rigorous in the target language space. Step 4: Perform cross-language and cross-target stance prediction; input the target language test samples into the trained policy model, generate the corresponding inference results, and output the stance category relative to the target.
2. The cross-language, cross-target stance detection method based on direct preference alignment according to claim 1, characterized in that: Step 1 specifically includes the following: Step 1.1: Define the source language as a labeled training set. ,in and They represent the first Source language text and its corresponding target, For the corresponding stance labels; Step 1.2: Use machine translation to map the source language training set to the target language space to obtain the target language training set. ,in and Representing the source language text respectively and objectives The target language text and target obtained through translation, A label representing a stance of inheritance; Step 1.3: Represent the target language sample as And it serves as the input for subsequent preference construction and model training.
3. The cross-language, cross-target stance detection method based on direct preference alignment according to claim 1, characterized in that: Step 2 specifically includes the following: Step 2.1: On the source language training set, combine the source language text, corresponding target, and real position labels to generate a high-quality source language inference path that is consistent with the labels, which serves as the source language logic anchor. During the generation process, the real position labels are explicitly introduced into the inference generation process to constrain the model output to be consistent with the real labels. When the inference conclusion generated by the model is inconsistent with the real position labels, the model is guided to correct the inference chain until a high-quality source language inference path consistent with the real position labels is obtained. Step 2.2, Target Language Samples It uses basic prompts to drive a large language model to directly generate the initial inference path for the target language. The initial inference path is then used as the discarded inference path; wherein the discarded inference path has at least one of the following characteristics: it retains traces of source language translation, its expression does not conform to the target language habits, and it does not perform fine-grained semantic reasoning around the specified target; Step 2.3: Using source language logical anchors, source language position labels, and target language input samples, establish the initial inference path for the target language. Perform cross-language guided correction to generate the target language optimal reasoning path. The preferred reasoning path shall satisfy at least two of the following conditions: it maintains logical consistency with the source language's true position label, conforms to the target language's syntax and expression habits, and is capable of fine-grained semantic parsing around the specified target. Step 2.4: Construct a cross-language inference preference dataset ,in, Input samples for the target language. To optimize the reasoning path, This is the reasoning path to be discarded.
4. The cross-language, cross-target stance detection method based on direct preference alignment according to claim 1, characterized in that: Step 3 specifically includes the following: Step 3.1: Construct the strategy model to be optimized. and reference model The reference model keeps its parameters frozen during training; Step 3.2: Transfer the preference dataset Each preference triple in Input the policy model and the reference model, and calculate the conditional probabilities of the preferred reasoning path and the abandoned reasoning path under the two models respectively; Step 3.3: Construct a direct preference alignment loss function based on the difference in the log-likelihood ratio between the preferred and rejected inference paths. ,in The Sigmoid activation function is used. This is a parameter for controlling the intensity of preference. Step 3.4: Update the policy model parameters by minimizing the loss function to increase the generation probability of the preferred inference path and decrease the generation probability of the abandoned inference path, thereby achieving the alignment of the target language inference distribution.
5. The cross-language, cross-target stance detection method based on direct preference alignment according to claim 1, characterized in that: Step 4 specifically includes the following: Step 4.1: Input the target language test sample into the trained policy model to generate inference paths related to the input text and its corresponding target; Step 4.2: Output the stance category of the input text relative to the corresponding target based on the reasoning path. The stance category includes Favor, Against, and Neutral. Step 4.3: Use the model output as the cross-language, cross-target position detection result.
6. A cross-language, cross-target stance detection method system based on direct preference alignment, characterized in that, The system includes a module for performing the cross-language, cross-target stance detection method based on direct preference alignment as described in any one of claims 1 to 5.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the cross-language, cross-target stance detection method based on direct preference alignment as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the cross-language, cross-target stance detection method based on direct preference alignment as described in any one of claims 1 to 5.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the cross-language, cross-target stance detection method based on direct preference alignment as described in any one of claims 1 to 5.
