Low-resource aspect-level sentiment analysis data generation method based on large language model and multi-agent collaborative verification
By employing a large language model and multi-agent collaborative verification method, the quality and redundancy issues of data generation in low-resource sentiment analysis are addressed. This generates high-quality, low-redundancy training data, improving the model's generalization ability and classification accuracy under low-resource conditions, making it suitable for various sentiment analysis scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV OF FINANCE & ECONOMICS
- Filing Date
- 2026-05-25
- Publication Date
- 2026-07-14
AI Technical Summary
In low-resource sentiment analysis scenarios, existing technologies struggle to generate high-quality, highly controllable, diverse, and low-redundancy training data, resulting in issues such as terminology illusion, sentiment misalignment, high redundancy, uncontrollable quality, and disconnect between synthesis and verification.
We adopt a method based on a large language model and multi-agent collaborative verification. Through multi-level verification of attribute-constrained data synthesis, seed data-driven reconstruction, aspect localization agent, sentiment realignment agent and semantic integrity audit agent, combined with aspect-semantic dual-constraint deduplication module, we generate high-quality, non-redundant training data.
It significantly improves the accuracy and usability of data labeling, reduces model training costs, and enhances generalization ability and classification accuracy under low-resource conditions. It is applicable to aspect-level sentiment analysis in fields such as restaurants and laptops, and can be extended to scenarios such as e-commerce reviews and public opinion analysis.
Smart Images

Figure CN122389883A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of natural language processing and sentiment analysis technology, specifically relating to a low-resource aspect-level sentiment analysis data generation method based on large language models and multi-agent collaborative verification. Background Technology
[0002] With the rapid growth of internet text data, aspect-level sentiment analysis (ABSA) has become a core technology in scenarios such as public opinion analysis, intelligent recommendation, and user feedback mining. As an important branch of sentiment analysis, its core task is to accurately identify specific aspect terms from comment text and determine the corresponding sentiment polarity, which is a key technology connecting users' subjective evaluations with practical applications. In real-world scenarios, many domains suffer from scarce labeled data and severely insufficient sample sizes, resulting in low resource availability. Target domains typically have only tens to hundreds of seed samples, which is insufficient to meet the training needs of deep learning models. Direct training can easily lead to overfitting, weak generalization ability, and low prediction accuracy, severely restricting the large-scale application of ABSA technology in low-resource domains.
[0003] To alleviate the resource shortage, existing technologies generally employ data synthesis and data augmentation to expand training data. Among these, data synthesis methods based on Large Language Models (LLMs) have become the mainstream solution due to their advantages such as high generation efficiency and good text fluency. However, existing synthesis methods based on Large Language Models still have significant shortcomings; the generated data is difficult to meet the requirements of the ABSA task in terms of accuracy, controllability, diversity, and redundancy.
[0004] On the one hand, existing data augmentation methods can be divided into two categories: one is simple operations based on rules such as replacement, deletion, and back translation, which are easy to implement but lack data diversity and are prone to destroying the original semantics; the other is free generation based on large language models, which has high text fluency but has serious uncontrollable labeling problems, specifically manifested as aspect term illusion, boundary offset, and sentiment polarity misalignment, resulting in low aspect recognition and sentiment polarity matching, which cannot meet the strict requirements of ABSA task for annotation accuracy.
[0005] On the other hand, existing methods generally lack multi-dimensional, progressive quality verification mechanisms for ABSA tasks. Most only perform single-dimensional verification of text fluency, failing to design layered verification processes from core dimensions such as aspect terminology accuracy, sentiment polarity consistency, and semantic integrity, making it difficult to comprehensively correct defects in synthesized data. Furthermore, existing technologies lack multi-agent collaborative verification mechanisms, making it impossible to achieve layer-by-layer optimization of aspect localization, sentiment realignment, and semantic integrity auditing, resulting in data quality that is difficult to meet the standards for stable training. In addition, data synthesis and quality verification are independent of each other, lacking a collaborative working mechanism, preventing timely correction of defects during the process, further reducing data usability.
[0006] In addition, the redundancy problem of synthetic data is prominent. Existing methods mostly use a single template or batch generation, which easily leads to cross-batch redundancy phenomena where the same aspect set is accompanied by highly similar semantic text. This not only wastes storage and computing resources, but also exacerbates model overfitting. Traditional deduplication methods rely solely on text similarity judgment and do not take into account the aspect structure inherent in the ABSA task. This can easily lead to the problem of mistakenly deleting valid samples or retaining highly redundant samples, thus failing to achieve accurate deduplication.
[0007] In summary, in low-resource-level sentiment analysis scenarios, how to automatically generate high-quality, highly controllable, highly diverse, and low-redundancy training data, and solve technical challenges such as terminology illusion, sentiment misalignment, high redundancy, uncontrollable quality, and disconnect between synthesis and verification, has become a key issue that urgently needs to be addressed in this field. Summary of the Invention
[0008] To address the challenges of scarce aspect-level sentiment analysis data, unstable generation quality, and biased and redundant annotations in low-resource scenarios, this invention proposes a low-resource aspect-level sentiment analysis data generation method based on a large language model and multi-agent collaborative verification. First, source data acquisition is completed by downloading the Lap14, Res14, Res15, and Res16 datasets from public datasets, covering two core domains: restaurants and laptops. This serves as the foundational source data for subsequent data generation and enhancement. Second, an attribute-constrained data synthesis method is employed to generate basic synthesized data: first, a target domain set is defined, and corresponding aspect categories and terminology sets are generated using a large language model; then, the aspect categories are used as contextual input models to mine and generate association pairs between aspect terms and sentiment-polarity opinion words, and four core attribute feature values are summarized to construct an attribute candidate pool; finally, complete attribute combinations are sampled from the candidate pool as hard constraints, and a fixed large language model is used to uniformly generate comment texts that meet the requirements of domain, aspect, terminology, and sentiment polarity, ensuring the stability of the generated quantity and quality. Subsequently, the data was further expanded using a seed data-driven reconstruction method: on the one hand, a sample combination strategy was implemented, randomly selecting two samples with complete ABSA labels from the source data to form a sample pair, inputting them into a large language model to integrate core information, generating new text, and outputting a merged explanation. After passing the verification function, the sample was included in the dataset; on the other hand, selective reconstruction was implemented, designing two masking strategies based on a single seed sample: context preservation and aspect preservation. This guided the model to complete text reconstruction while preserving sentiment polarity or aspect terms, and data augmentation was completed after semantic and label filtering. Building upon this foundation, a multi-agent collaborative verification process is initiated: First, the aspect localization agent is run, guiding the large language model to identify and correct aspect term illusions and boundary offsets through preset prompt word rules, completing candidate term matching and localization, eliminating invalid instances, and outputting a standardized aspect label set. Next, the sentiment realignment agent is activated, using state-aware cues to capture aspect term modification traces. If a term is corrected, the sentiment polarity is re-inferred based on the new term, ensuring accurate alignment between sentiment labels and corrected terms. Then, the semantic integrity audit agent is executed, performing zero-drift rewriting on the verified text, optimizing syntax and removing redundancy while preserving core information. Semantic consistency evaluation and quantitative scoring are then used to select high-quality data that is semantically complete and syntactically unambiguous. Finally, a data retrieval-enhanced deduplication module completes the final purification, constructing an aspect-semantic dual-constraint deduplication mechanism. The cosine similarity of sentence semantic embeddings is calculated under the premise of complete consistency of the aspect set, and high-similarity duplicate samples are eliminated with a threshold of 0.90, ultimately yielding high-quality, non-redundant, and accurately labeled low-resource aspect-level sentiment analysis training data.
[0009] To achieve the above objectives, the technical solution of the present invention is as follows: a method for generating low-resource aspect-level sentiment analysis data based on a large language model and multi-agent collaborative verification, the method comprising the following steps:
[0010] Step S1: Obtaining source data;
[0011] Step S2: Data composition method for attribute constraints;
[0012] Step S3: Seed data-driven reconstruction method;
[0013] Step S4: The aspect localization agent identifies and calibrates the sentiment aspect terms in the initial synthesized text, generating a unified and standardized aspect label set to provide a benchmark for subsequent steps;
[0014] Step S5: Emotion realignment agent, detects modifications to aspect terms, and if modifications are found, re-infers the emotion polarity to ensure that the emotion label and the corrected terms are accurately matched.
[0015] Step S6: The semantic integrity auditing agent performs zero-drift rewriting optimization on the processed synthetic text, and then selects high-quality text with semantic integrity and no bias through semantic consistency evaluation;
[0016] Step S7: Data retrieval enhancement and deduplication module, based on the dual constraints of aspect set consistency and semantic similarity, eliminates duplicate and redundant data to ensure the quality and richness of training data;
[0017] Step S8: High-quality data collection. Summarize the qualified data after the verification process in the previous stage to form a high-quality, low-resource aspect-level sentiment analysis training dataset.
[0018] As an improvement of the present invention, step S1: acquisition of source data. First, download the Lap14, Res14, Res15 and Res16 datasets from public datasets. These data cover two major areas: restaurants and laptops, and are used as the basic source data for subsequent data synthesis and enhancement.
[0019] As an improvement of the present invention, step S2: the data synthesis method for attribute constraints, in order to achieve high-quality, strongly constrained initial data generation, the present invention adopts an integrated process of domain guidance, attribute construction, and model generation, which is specifically divided into the following sub-steps:
[0020] Sub-step 2-1: Domain and aspect terminology generation, defining the target domain set. (Representing the food and beverage and notebook industries respectively), using Large Modeling (LLM) to generate corresponding aspect category sets based on a given industry. and a set of terms This process is formally represented as
[0021] Sub-step 2-2: Candidate pool construction, which categorizes the generated aspects. As contextual input to the LLM, it further mines and generates the corresponding relationships between aspect terms and viewpoint terms. ,Right now ,in The set of opinion words representing specific emotional polarities is then used to summarize the four core attribute feature values generated above, thus constructing an attribute candidate pool. .
[0022] Sub-steps 2-3 involve data synthesis under attribute constraints. During the data synthesis phase, data is selected from the candidate pool. A complete set of attribute combinations is sampled. (in ), combine the attributes As a hard constraint input into the pre-defined prompts, it guides the LLM-generated comment text to conform to the specified domain context. Below, we focus on specific aspects and categories. Explicitly includes target aspect terms And naturally incorporate viewpoints with specific emotional polarities. To ensure the quantity stability and quality consistency of the data synthesis, a single LLM is used to complete all data synthesis operations, i.e. To address the shortcomings of existing technologies, such as synthesized text easily deviating from requirements and large data differences caused by different models, this step ensures accurate orientation of the generated content through hard attribute constraints and guarantees the consistency of data distribution through a unified synthesis model. This effectively avoids the problems of data drift and poor adaptability, and provides high-quality basic data for subsequent training.
[0023] As an improvement of the present invention, step S3: the seed data-driven reconstruction method, in order to further expand sample diversity, the present invention adopts a dual strategy of sample combination and selective reconstruction to achieve data augmentation while preserving label validity, specifically divided into the following sub-steps:
[0024] Sub-step 3-1: Sample combination. This strategy first involves combining samples from the source dataset. Two samples containing complete aspect-level sentiment analysis (ABSA) labels were randomly selected from the data. and (in ), forming sample pairs Each sample All contain text Aspects and categories Terminology Opinion words and emotional tags Subsequently, the sample pair is input into the Large Language Model (LLM), and the instruction model integrates the core information of both to generate new text. To ensure logical consistency in the generation process and resolve potential semantic conflicts, the model needs to synchronously output merged interpretations. This clarifies the basis for aspect integration and the methods for handling emotional consistency. Formally, this information integration process can be represented as... Furthermore, it must satisfy constraints such as aspect fusion consistency and sentiment polarity alignment; finally, through a verification function... Filter the generated results, only those that are... When the result is true, the new sample will be... Included in augmented dataset ,Right now .
[0025] Sub-step 3-2: Selective reconstruction, this strategy uses a single seed sample containing explicit aspect terms. Based on this, two specific masking strategies are designed to guide a large language model in text reconstruction. One of them is context-preserving reconstruction. First, a masking window is defined. The window covers the terminology. and the specified quantities before and after (e.g.) (Number) context words. Next, the original text... China belongs to The vocabulary in the region is replaced with special markers. Generate masked text Subsequently, the instruction-based large language model completes the masked region based on the preserved contextual information and strictly constrains the sentiment polarity of the generated content. Sentiment labels compared to the original sample Maintain consistency. This constraint completion process can be represented as follows: This ensures that the reconstructed text remains semantically coherent without shifting its emotional tone; secondly, it preserves the aspect of the reconstruction, starting from the non-aspect terminology region, according to a preset ratio ( Two random samples were taken to construct two independent mask sets. and Then, these two mask sets are applied to the original text respectively. Above, generate two different masked texts. and Finally, these two masked texts are input into the large language model, and then analyzed using aspect terms. As the core semantic anchor This guides the model to reconstruct a semantically coherent and expressively diverse complete comment around the fixed term. This core semantic reconstruction process can be formalized as follows: Finally, the data augmentation process is completed by screening the reconstructed samples for semantic coherence and label alignment. Addressing the shortcomings of existing data augmentation techniques, such as sentiment bias, semantic distortion, and insufficient sample diversity, this step ensures sentiment consistency and semantic coherence through context-preserving reconstruction and enhances the diversity of sample expression through aspect-preserving reconstruction. This dual strategy effectively avoids the generation of redundant and invalid samples, solving the problems of low-quality and poorly adaptable augmented data in low-resource scenarios.
[0026] As an improvement of this invention, step S4: Aspect localization agent, in order to solve the problems of aspect term illusion, boundary offset, and inaccurate localization in large model generation, this invention designs an LLM collaborative verification mechanism based on prompt word rules to achieve accurate aspect terms, specifically divided into the following sub-steps:
[0027] Sub-step 4-1: Terminology anomaly identification and correction, based on preset prompt word rules This guides LLM to identify aspect terminology illusion and boundary offset issues in synthetic data, and clarifies the criteria for identifying illusion terms. Reasonable threshold for terminology boundaries ,pass Correcting anomalous terms, among which The terminology to be verified. This is a terminology correction function.
[0028] Sub-step 4-2: Candidate term matching and localization, through... The pre-defined matching logic guides the LLM to select candidate terms. With the original seed sentence By comparing, verifying, and relocating the terms within the sentence, the precisely located terms can be obtained. This process is represented as .
[0029] Sub-step 4-3: Invalidity Removal and Standardization Output. Invalid instances are removed based on the LLM validation results, and a standardized aspect label set is output. ,Right now ,in This is consistent with the verification function expression in step S3. Addressing the shortcomings of existing technologies, such as the difficulty in accurately removing invalid samples and the lack of standardized terminology leading to poor adaptability, this step ensures standardized terminology through the aforementioned precise removal and standardized output. This effectively avoids invalid data interfering with subsequent processes, thereby improving the overall validity of the data.
[0030] As an improvement of the present invention, step S5: the emotion realignment agent, in order to avoid the emotion labeling offset caused by aspect terminology correction and to achieve strong binding alignment between terms and emotions, is specifically divided into the following sub-steps:
[0031] Sub-step 5-1: State-aware cues and terminology modification detection. A state-aware cues strategy is adopted to standardize the state output by the aspect-localizing agent (i.e., the standardized aspect label set). The complete input is sent to the LLM. This prompting strategy can accurately capture the modification traces of aspect terms in the standardized state and detect in real time whether aspect terms have been modified.
[0032] Sub-step 5-2: Sentiment polarity re-inference and alignment. When an aspect term is detected to have been modified, the model is based on the modified term. Re-infer emotional polarity and generate new emotional labels. To address the labeling distortion and decreased data validity issues caused by the lack of synchronized updates to sentiment tags after modifications to aspect terms in existing technologies, this step employs a re-inference mechanism based on the revised terminology to ensure... The semantics of the revised terms are precisely matched, thereby eliminating the sentiment annotation bias caused by the terminology modification and ensuring the accuracy of the synthesized data.
[0033] As an improvement of the present invention, step S6: the semantic integrity auditing intelligent agent, in order to improve the fluency, standardization and semantic fidelity of the generated text, completes text optimization and quality screening while keeping the labels unchanged, specifically divided into the following sub-steps:
[0034] Sub-step 6-1: Zero-drift rewriting optimization of synthesized text, targeting the synthesized text after aspect localization and sentiment realignment processing. A zero-drift rewriting operation is performed, which optimizes the text's grammatical structure, corrects grammatical errors, and removes redundant expressions and invalid information while strictly maintaining the original meaning of the text and without changing the core information of the terminology and sentiment tags. .
[0035] Sub-step 6-2: Semantic consistency assessment and high-quality screening. This involves tracing the modification records before and after text rewriting, systematically assessing the semantic consistency and syntactic ambiguity of the text based on these records, and using a semantic integrity scoring function. A quantitative scoring process is performed to select texts that are semantically unbiased and syntactically unambiguous, ultimately generating high-quality and semantically complete synthetic data. Addressing the shortcomings of existing technologies, such as the lack of standardized semantic evaluation, susceptibility to bias, and inconsistent data quality, this step effectively ensures the quality and consistency of the synthetic data through the aforementioned quantitative evaluation mechanism, providing reliable support for subsequent processes.
[0036] As an improvement of the present invention, step S7: data retrieval enhancement deduplication module, in order to improve the richness and uniqueness of the final dataset and avoid redundant and duplicate samples, the present invention constructs an aspect-semantic dual-constraint deduplication mechanism: taking the complete consistency of aspect sets as a necessary condition, only calculating the sentence semantic embedding cosine similarity for samples with the same aspect; setting the similarity threshold to 0.90, if it is higher than this threshold, it is judged as semantic duplication and removed, ultimately ensuring high quality, low redundancy and high diversity of training data.
[0037] As an improvement of the present invention, step S8: collection of high-quality data, summarizing all effective synthetic data after processing by the data retrieval enhancement deduplication module, and uniformly organizing them into a standardized high-quality dataset with semantic integrity, accurate annotation, and no duplication or redundancy, which can provide reliable data for training low-resource sentiment analysis models and downstream related tasks.
[0038] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned low-resource aspect-level sentiment analysis data generation method based on a large language model and multi-agent collaborative verification.
[0039] A computer-readable storage medium storing computer instructions that, when executed by a processor, implement the aforementioned low-resource aspect-level sentiment analysis data generation method based on a large language model and multi-agent collaborative verification.
[0040] Compared with the prior art, the advantages of the present invention are as follows:
[0041] (1) This invention proposes a low-resource aspect-level sentiment analysis data generation method based on large language models and multi-agent collaborative verification. Through a dual-path generation mechanism of attribute-constrained synthesis and seed data-driven reconstruction, it effectively solves the problems of scarce and unevenly distributed aspect-level sentiment analysis labeled data in low-resource scenarios. Based on publicly available small sample datasets, it can ensure the high alignment of generated text with aspect and sentiment labels through hard attribute constraints, and improve data diversity through sample combination and mask reconstruction, providing high-quality and highly adaptable training sample support for sentiment analysis in low-resource domains.
[0042] (2) This invention innovatively constructs a multi-agent collaborative verification system. Through step-by-step verification by the aspect localization agent, the sentiment realignment agent, and the semantic integrity auditing agent, it significantly improves the defects in the large language model-generated data, such as aspect term illusion, boundary offset, sentiment labeling misalignment, and semantic incoherence. The aspect localization agent achieves accurate term correction and localization, the sentiment realignment agent avoids polarity deviation caused by term modification, and the semantic integrity auditing agent optimizes text quality without changing the core labels, greatly improving the labeling accuracy and usability of the synthesized data.
[0043] (3) The present invention designs a semantic dual-constraint retrieval enhancement deduplication module, which uses aspect set consistency as a prerequisite and combines semantic similarity threshold filtering to ensure efficient data deduplication while maximizing the preservation of semantic richness and aspect coverage of samples, avoiding the loss of effective information caused by traditional global deduplication. The entire process uses a single large language model to complete generation and verification, ensuring the stability and consistency of data quality and effectively reducing noise and errors caused by switching between multiple models.
[0044] (4) The method of this invention can complete high-quality data augmentation entirely based on publicly available small datasets, without the need for large-scale manual annotation and additional domain corpora, significantly reducing data construction costs and resource consumption, and possessing strong engineering applicability. The generated standardized data can be directly used for aspect-level sentiment analysis tasks in fields such as restaurants and laptops, effectively improving the model's generalization ability and classification accuracy under low-resource conditions. At the same time, it can be extended to various fine-grained opinion mining scenarios such as e-commerce reviews, user feedback, and public opinion analysis, possessing significant practical value and broad application prospects.
[0045] (5) The method of the present invention has outstanding performance in low-resource ABSA tasks. Experiments have verified that its comprehensive performance surpasses that of existing comparative methods, especially in the extremely scarce 2%-shot scenario. The average F1 score is 1.82% higher than that of the second best method, which can more effectively alleviate the data sparsity problem. The leading advantage further expands to 4.55% at the 5% ratio. It has been verified that the method can effectively improve the purity of training corpus and solve the problems of data redundancy and semantic conflict in existing methods.
[0046] (6) The method of the present invention has excellent generalization and scene adaptability. It performs stably under different basic models, datasets and few sample scenarios. The method has achieved state-of-the-art results, with an F1 value of 78.63% on the Res15 dataset. It has stronger adaptability to the restaurant field and can effectively adapt to low-resource ABSA tasks in multiple fields, thus expanding the scope of application. Attached Figure Description
[0047] Figure 1 This is an overall model diagram of an embodiment of the present invention;
[0048] Figure 2 This is a flowchart illustrating the method processing of an embodiment of the present invention. Detailed Implementation
[0049] To enhance understanding of the present invention, the invention will be further explained below with reference to specific embodiments.
[0050] Example 1: A low-resource aspect-level sentiment analysis data generation method based on large language models and multi-agent collaborative verification. This method effectively alleviates the problems of insufficient and unevenly distributed aspect-level sentiment analysis labeled data in low-resource scenarios through a dual-path data augmentation mechanism of attribute-constrained synthesis and seed data-driven reconstruction. Furthermore, a multi-agent step-by-step verification mechanism significantly improves issues such as aspect term illusion, boundary shift, sentiment labeling misalignment, and semantic incompleteness in text generated by large language models, thereby generating high-quality, highly consistent, and highly diverse aspect-level sentiment analysis training data. In addition, an aspect-semantic dual-constraint retrieval enhancement deduplication strategy is designed to maximize sample richness while ensuring data uniqueness, significantly improving the generalization ability and classification accuracy of subsequent sentiment analysis models.
[0051] The specific model flow is shown in Figure 1, and the detailed implementation steps are as follows:
[0052] Step S1: Obtaining source data. First, download the Lap14, Res14, Res15, and Res16 datasets from public datasets, covering the restaurant and laptop domains. Standardize these datasets into source data containing text, aspect categories, aspect terms, opinion words, and sentiment polarity labels to provide a foundation for subsequent data synthesis and reconstruction.
[0053] Step S2: Attribute-constrained data synthesis method. To achieve controllable, standardized, and domain-aligned initial data generation, this invention adopts a strategy of domain-guided, attribute-constrained, and unified generation of large models, specifically divided into the following sub-steps:
[0054] Sub-step 2-1: Domain and aspect terminology generation, defining the target domain set. (Representing the food and beverage and notebook industries respectively), using Large Modeling (LLM) to generate corresponding aspect category sets based on a given industry. and a set of terms This process is formally represented as
[0055] Sub-step 2-2: Candidate pool construction, which categorizes the generated aspects. As contextual input to the LLM, it further mines and generates the corresponding relationships between aspect terms and viewpoint terms. ,Right now ,in The set of opinion words representing specific emotional polarities is then used to summarize the four core attribute feature values generated above, thus constructing an attribute candidate pool. .
[0056] Sub-steps 2-3 involve data synthesis under attribute constraints. During the data synthesis phase, data is selected from the candidate pool. A complete set of attribute combinations is sampled. (in ), combine the attributes As a hard constraint input into the pre-defined prompts, it guides the LLM-generated comment text to conform to the specified domain context. Below, we focus on specific aspects and categories. Explicitly includes target aspect terms And naturally incorporate viewpoints with specific emotional polarities. To ensure the quantity stability and quality consistency of the data synthesis, a single LLM is used to complete all data synthesis operations, i.e. .
[0057] Step S3: Seed data-driven reconstruction method. To further expand the data scale and improve expression diversity, this invention adopts a dual strategy of sample combination and selective mask reconstruction to achieve data augmentation while preserving label validity. Specifically, it consists of the following sub-steps:
[0058] Sub-step 3-1: Sample combination. This strategy first involves combining samples from the source dataset. Two samples containing complete aspect-level sentiment analysis (ABSA) labels were randomly selected from the data. and (in ), forming sample pairs Each sample All contain text Aspects and categories Terminology Opinion words and emotional tags Subsequently, the sample pair is input into the Large Language Model (LLM), and the instruction model integrates the core information of both to generate new text. To ensure logical consistency in the generation process and resolve potential semantic conflicts, the model needs to synchronously output merged interpretations. This clarifies the basis for aspect integration and the methods for handling emotional consistency. Formally, this information integration process can be represented as... Furthermore, it must satisfy constraints such as aspect fusion consistency and sentiment polarity alignment; finally, through a verification function... Filter the generated results, only those that are... When the result is true, the new sample will be... Included in augmented dataset ,Right now .
[0059] Sub-step 3-2: Selective reconstruction, this strategy uses a single seed sample containing explicit aspect terms. Based on this, two specific masking strategies are designed to guide a large language model in text reconstruction. One of them is context-preserving reconstruction. First, a masking window is defined. The window covers the terminology. and the specified quantities before and after (e.g.) (Number) context words. Next, the original text... China belongs to The vocabulary in the region is replaced with special markers. Generate masked text Subsequently, the instruction-based large language model completes the masked region based on the preserved contextual information and strictly constrains the sentiment polarity of the generated content. Sentiment labels compared to the original sample Maintain consistency. This constraint completion process can be represented as follows: This ensures that the reconstructed text remains semantically coherent without shifting its emotional tone; secondly, it preserves the aspect of the reconstruction, starting from the non-aspect terminology region, according to a preset ratio ( Two random samples were taken to construct two independent mask sets. and Then, these two mask sets are applied to the original text respectively. Above, generate two different masked texts. and Finally, these two masked texts are input into the large language model, and then analyzed using aspect terms. As the core semantic anchor This guides the model to reconstruct a semantically coherent and expressively diverse complete comment around the fixed term. This core semantic reconstruction process can be formalized as follows: Finally, the data augmentation process is completed by filtering the reconstructed samples based on semantic coherence and label alignment.
[0060] Step S4: Aspect localization agent. To address issues such as aspect term illusion, boundary offset, and inaccurate localization during large model generation, this invention designs an LLM collaborative verification mechanism guided by prompt word rules to achieve accurate aspect terminology. This is specifically divided into the following sub-steps:
[0061] Sub-step 4-1: Terminology anomaly identification and correction, based on preset prompt word rules This guides LLM to identify aspect terminology illusion and boundary offset issues in synthetic data, and clarifies the criteria for identifying illusion terms. Reasonable threshold for terminology boundaries ,pass Correcting anomalous terms, among which The terminology to be verified. This is a terminology correction function.
[0062] Sub-step 4-2: Candidate term matching and localization, through... The pre-defined matching logic guides the LLM to select candidate terms. With the original seed sentence By comparing, verifying, and relocating the terms within the sentence, the precisely located terms can be obtained. This process is represented as .
[0063] Sub-step 4-3: Invalid removal and standardized output. Invalid instances are removed based on the LLM validation results, and a standardized aspect label set is output. ,Right now ,in It is consistent with the expression of the verification function in step S3.
[0064] Step S5: Sentiment realignment of the agent. To avoid sentiment labeling shifts caused by aspect terminology correction and to achieve strong binding alignment between terms and sentiment polarity, this is specifically divided into the following sub-steps:
[0065] Sub-step 5-1: State-aware cues and terminology modification detection. A state-aware cues strategy is adopted to standardize the state output by the aspect-localizing agent (i.e., the standardized aspect label set). The complete input is sent to the LLM. This prompting strategy can accurately capture the modification traces of aspect terms in the standardized state and detect in real time whether aspect terms have been modified.
[0066] Sub-step: 5-2: Sentiment polarity re-inference and alignment. When aspect terms are detected to be modified, the model will use the modified terms. Centered on this, and re-inferring emotional polarity, to ensure new emotional labels It closely matches the revised terminology content, strictly avoiding sentiment annotation bias caused by terminology changes.
[0067] Step S6: The semantic integrity auditing agent, in order to improve text fluency, standardization, and semantic fidelity, completes text optimization and quality screening without changing the core aspects and sentiment tags. This is specifically divided into the following sub-steps:
[0068] Sub-step 6-1: Zero-drift rewriting optimization of synthesized text, targeting the synthesized text after aspect localization and sentiment realignment processing. A zero-drift rewriting operation is performed, which optimizes the text's grammatical structure, corrects grammatical errors, and removes redundant expressions and invalid information while strictly maintaining the original meaning of the text and without changing the core information of the terminology and sentiment tags. .
[0069] Sub-step 6-2: Semantic consistency assessment and high-quality screening. This involves tracing the modification records before and after text rewriting, systematically assessing the semantic consistency and syntactic ambiguity of the text based on these records, and using a semantic integrity scoring function. Quantitative scoring is performed to select texts that are semantically unbiased and syntactically unambiguous, ultimately generating high-quality and semantically complete synthetic data.
[0070] Step S7: Data retrieval enhancement deduplication module. To eliminate redundant samples and improve dataset richness and training stability, this invention constructs an aspect-semantic dual-constraint deduplication mechanism: taking complete consistency of aspect sets as a necessary condition, only calculating sentence semantic embedding cosine similarity for samples with the same aspects; setting a similarity threshold of 0.90, samples higher than this threshold are judged as duplicates and removed, ultimately obtaining high-quality, low-redundancy, and highly diverse aspect-level sentiment analysis training data.
[0071] Step S8: High-quality data collection. All effective synthetic data processed by the data retrieval enhancement and deduplication module are summarized to form a standardized high-quality dataset that is uniform, semantically complete, accurately labeled, and free of duplication and redundancy. This dataset can provide reliable data support for training low-resource sentiment analysis models and downstream related tasks.
[0072] After the above steps, a high-quality aspect sentiment analysis dataset with accurate annotations can be obtained.
[0073] This application also provides the following verification tests to further demonstrate the technical effects of this application.
[0074] 1. Experimental Data and Setup
[0075] Training and testing were conducted on four ABSA benchmark datasets (Lap14, Res14, Res15, and Res16), with 20% of the training set randomly allocated for validation. Experiments used 2% and 5% few-sample settings to simulate low-resource scenarios, and the DeepSeek-v3 model was used to generate the data. The core parameters of the method in this application are set as follows: 20,000 samples are generated in the attribute constraint synthesis stage; the maximum number of combined samples in the seed-driven reconstruction stage is 1,000, the aspect masking window m=0 and 2, the masking probability pmask=0.6, and the number of samples generated per response K=4; the maximum number of iterations in the post-refinement and unification stage is 3.
[0076] 2. Comparison Method Settings
[0077] The following three types of comparison methods were selected for experimental comparison:
[0078] (1) Baseline ABSA models: including TAG-BERT, Paraphrase and InstructABSA, used to provide basic performance references;
[0079] (2) Low-resource augmentation methods: covering data augmentation (MELM, AugGPT, CoTAM), pre-training (BERT-PT, SPT-ABSA, etc.), knowledge distillation and data synthesis, used to verify the synthesis quality advantages of the framework in this application in data-scarce scenarios;
[0080] 3. Experimental Results and Analysis
[0081] The experimental results are shown in Table 1. Among all the comparative methods, the method proposed in this application achieved the best average F1 score under both 2% and 5% low resource settings, effectively verifying the significant effectiveness of the proposed method in low resource scenarios. Detailed analysis is as follows:
[0082] (1) In a resource-poor scenario with a sample ratio of 2%, when using InstructABSA as the base model, the average F1 score of this method reaches 70.81%, which is 7.94% higher than the best method among the current comparison methods. This shows that the dual-path generation mechanism of "attribute constraint synthesis + seed-driven reconstruction" adopted by this method can efficiently expand high-quality data from two dimensions, explicit attribute constraints and implicit seed reconstruction, in the case of extremely scarce reference samples, and greatly make up for the deficiency of insufficient data.
[0083] (2) On the Res15 dataset, the method in this application achieved an F1 score of 78.63% with a sample ratio of 2%, far exceeding all other comparative methods. This is mainly due to the "three-agent quality assurance" system and the "aspect-semantic dual-constraint deduplication" strategy introduced in this application, which effectively filters out illusion and noise data in the process of generating large models under low resources and removes redundant samples, so that the synthesized data still has high purity and high information density in complex contexts.
[0084] (3) In a 5% sample ratio scenario, the method in this application, using Paraphrase as the base model, achieves an average F1 score of 65.52%, which is 4.16% higher than the 61.36% of the DS2-ABSA method. Furthermore, it consistently outperforms methods that directly utilize large models such as GPT-4 for hints or fine-tuning across various base models. This demonstrates that the approach in this application, which trains a lightweight, dedicated ABSA model using synthesized high-quality data, has a superior performance ceiling and robustness compared to directly relying on massive computing power to call general-purpose large models.
[0085] In summary, the experimental data fully validates the effectiveness of the data generation and processing mechanism proposed in this application.
[0086] Although embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the specification and embodiments. They can be applied to various fields suitable for the present invention. For those skilled in the art, other modifications can be easily made. Therefore, without departing from the general concept defined by the claims and their equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.
[0087] Table 1. Comparison of F1 performance between the proposed method and existing methods under low resource settings of 2% and 5% (unit: %)
[0088]
[0089] Through attribute-constrained synthesis, seed-driven reconstruction, multi-agent collaborative verification, and enhanced deduplication through retrieval, this method can efficiently generate high-quality labeled data under low-resource conditions. It significantly alleviates the problems of data scarcity, high noise, and high labeling costs in aspect-level sentiment analysis tasks. At the same time, it can be directly applied to fine-grained opinion mining scenarios such as e-commerce review analysis, user feedback mining, and domain public opinion monitoring, effectively improving model accuracy and practical implementation results.
[0090] Based on the same inventive concept, the apparatus corresponding to the low-resource aspect-level sentiment analysis data generation method based on large language model and multi-agent collaborative verification described in this invention includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the computer program is loaded onto the processor, it implements the above-mentioned data generation method.
[0091] It should be noted that the above embodiments are not intended to limit the scope of protection of the present invention. Equivalent transformations or substitutions made based on the above technical solutions all fall within the scope of protection of the claims of the present invention.
Claims
1. A method for generating low-resource aspect-level sentiment analysis data based on large language models and multi-agent collaborative verification, characterized in that, The method includes: Step S1: Obtaining source data; Step S2: Data composition method for attribute constraints; Step S3: Seed data-driven reconstruction method; Step S4: The aspect localization agent identifies and calibrates the sentiment aspect terms in the initial synthesized text, generating a unified and standardized aspect label set to provide a benchmark for subsequent steps; Step S5: Emotion realignment agent, detects modifications to aspect terms, and if modifications are found, re-infers the emotion polarity to ensure that the emotion label and the corrected terms are accurately matched. Step S6: The semantic integrity auditing agent performs zero-drift rewriting optimization on the processed synthetic text, and then selects high-quality text with semantic integrity and no bias through semantic consistency evaluation; Step S7: Data retrieval enhancement and deduplication module, based on the dual constraints of aspect set consistency and semantic similarity, eliminates duplicate and redundant data to ensure the quality and richness of training data; Step S8: High-quality data collection, summarizing the qualified data after the verification process in the previous stage to form a high-quality, low-resource aspect-level sentiment analysis training dataset.
2. The method for generating low-resource aspect-level sentiment analysis data based on a large language model and multi-agent collaborative verification as described in claim 1, characterized in that, Step S1: Obtaining source data. Download the Lap14, Res14, Res15, and Res16 datasets from public datasets. These datasets cover the restaurant and laptop domains and will be used as source data.
3. The method for generating low-resource aspect-level sentiment analysis data based on a large language model and multi-agent collaborative verification as described in claim 1, characterized in that, Step S2: Data composition method for attribute constraints, the specific steps are as follows: Sub-step 2-1: Domain and aspect terminology generation, defining the target domain set. (Representing the food and beverage and notebook industries respectively), using Large Modeling (LLM) to generate corresponding aspect category sets based on a given industry. and a set of terms This process is formally represented as , Sub-step 2-2: Candidate pool construction, which categorizes the generated aspects. As contextual input to the LLM, it further mines and generates the corresponding relationships between aspect terms and viewpoint terms. ,Right now ,in The set of opinion words representing specific emotional polarities is then used to summarize the four core attribute feature values generated above, thus constructing an attribute candidate pool. , Sub-steps 2-3 involve data synthesis under attribute constraints. During the data synthesis phase, data is selected from the candidate pool. A complete set of attribute combinations is sampled. (in ), combine the attributes As a hard constraint input into the pre-defined prompts, it guides the LLM-generated comment text to conform to the specified domain context. Below, we focus on specific aspects and categories. Explicitly includes target aspect terms And naturally incorporate viewpoints with specific emotional polarities. To ensure the quantity stability and quality consistency of the data synthesis, a single LLM is used to complete all data synthesis operations, i.e. .
4. The method for generating low-resource aspect-level sentiment analysis data based on a large language model and multi-agent collaborative verification as described in claim 1, characterized in that, Step S3: The seed data-driven reconstruction method uses two approaches—sample combination and selective reconstruction—to synthesize data. The specific steps are as follows: Sub-step 3-1: Sample combination. This strategy first involves combining samples from the source dataset. Two samples containing complete aspect-level sentiment analysis (ABSA) labels were randomly selected from the data. and (in ), forming sample pairs Each sample All contain text Aspects and categories Terminology Opinion words and emotional tags Subsequently, the sample pair is input into the Large Language Model (LLM), and the instruction model integrates the core information of both to generate new text. To ensure logical consistency in the generation process and resolve potential semantic conflicts, the model needs to synchronously output merged interpretations. This clarifies the basis for aspect integration and the methods for handling emotional consistency. Formally, this information integration process is represented as... Furthermore, it must satisfy constraints such as aspect fusion consistency and sentiment polarity alignment; finally, through a verification function... Filter the generated results, only those that are... When the result is true, the new sample will be... Included in augmented dataset ,Right now , Sub-step 3-2: Selective reconstruction, using a single seed sample containing explicit aspect terms. Based on this, two specific masking strategies are designed to guide a large language model in text reconstruction. One of them is context-preserving reconstruction. First, a masking window is defined. The window covers the terminology. And the specified number of context words before and after it, then, the original text China belongs to The vocabulary in the region is replaced with special markers. Generate masked text Subsequently, the instruction-based large language model completes the masked region based on the preserved contextual information and strictly constrains the sentiment polarity of the generated content. Sentiment labels compared to the original sample To maintain consistency, the constraint completion process is represented as follows: This ensures that the reconstructed text remains semantically coherent while maintaining its emotional tone. Secondly, for aspect-based preservation and reconstruction, two independent mask sets are constructed by first randomly sampling twice from the non-aspect term regions according to a preset ratio. and Then, these two mask sets are applied to the original text respectively. Above, generate two different masked texts. and Finally, these two masked texts are input into the large language model, and then analyzed using aspect terms. As the core semantic anchor The model is guided to reconstruct a semantically coherent and expressively diverse complete comment around this fixed term.
5. The method for generating low-resource aspect-level sentiment analysis data based on a large language model and multi-agent collaborative verification as described in claim 1, characterized in that, Step S4: Construct the aspect-localization agent, specifically implemented as follows: Sub-step 4-1: Terminology anomaly identification and correction, based on preset prompt word rules This guides LLM to identify aspect terminology illusion and boundary offset issues in synthetic data, and clarifies the criteria for identifying illusion terms. Reasonable threshold for terminology boundaries ,pass Correcting anomalous terms, among which The terminology to be verified. For terminology correction function, Sub-step 4-2: Candidate term matching and localization, through... The pre-defined matching logic guides the LLM to select candidate terms. With the original seed sentence By comparing, verifying, and relocating the terms within the sentence, the precisely located terms can be obtained. The process is represented as , Sub-step 4-3: Invalid removal and standardized output. Invalid instances are removed based on the LLM validation results, and a standardized aspect label set is output. ,Right now ,in It is consistent with the expression of the verification function in step S3.
6. The method for generating low-resource aspect-level sentiment analysis data based on large language models and multi-agent collaborative verification as described in claim 1, characterized in that, Step S5: Construct an emotion realignment agent, specifically implemented as follows: Sub-step 5-1: State-aware cues and terminology modification detection. A state-aware cues strategy is adopted to standardize the state output by the aspect-localizing agent (i.e., the standardized aspect label set). The complete input into the LLM file allows this suggestion strategy to accurately capture modification traces of aspect terms in the standardized state and detect in real time whether aspect terms have been modified. Sub-step: 5-2: Sentiment polarity re-inference and alignment. When aspect terms are detected to be modified, the model will use the modified terms. Centered on this, and re-inferring emotional polarity, to ensure new emotional labels It closely matches the revised terminology content, strictly avoiding sentiment annotation bias caused by terminology changes.
7. The method for generating low-resource aspect-level sentiment analysis data based on large language models and multi-agent collaborative verification as described in claim 1, characterized in that, Step S6: Construct a semantic integrity auditing agent. The specific steps are as follows: Sub-step 6-1: Zero-drift rewriting optimization of synthesized text, targeting the synthesized text after aspect localization and sentiment realignment processing. A zero-drift rewriting operation is performed, which optimizes the text's grammatical structure, corrects grammatical errors, and removes redundant expressions and invalid information while strictly maintaining the original meaning of the text and without changing the core information of the terminology and sentiment tags. , Sub-step 6-2: Semantic consistency assessment and high-quality screening. This involves tracing the modification records before and after text rewriting, systematically assessing the semantic consistency and syntactic ambiguity of the text based on these records, and using a semantic integrity scoring function. Quantitative scoring is performed to select texts that are semantically unbiased and syntactically unambiguous, ultimately generating high-quality and semantically complete synthetic data.
8. The method for generating low-resource aspect-level sentiment analysis data based on large language models and multi-agent collaborative verification according to claim 1, characterized in that, Step S7: Construct a data retrieval enhancement deduplication module. This module improves data quality by building an aspect-semantic dual-constraint deduplication mechanism. Specifically, it uses aspect set consistency as a necessary condition, meaning further comparison is only performed when the aspect term sets of two data sets are completely identical. Then, it calculates the cosine similarity of the semantic embeddings of the sentences from the two data sets. The preset similarity threshold is 0.
90. This threshold is used to filter out highly similar samples (i.e., semantically repetitive data). When a data point is identified as semantically duplicated, it is removed, thereby effectively eliminating redundant data and ensuring the quality and richness of the final training data. Step S8: High-quality data collection. Summarize all qualified data after the data retrieval enhancement and deduplication process in Step S7, standardize and organize the data to form a high-quality, low-resource aspect-level sentiment analysis training dataset that meets the requirements of terminology standardization, sentiment alignment, semantic completeness, and no redundancy.
9. 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 a low-resource aspect-level sentiment analysis data generation method based on large language model and multi-agent collaborative verification as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by the processor, the computer instructions implement the low-resource aspect-level sentiment analysis data generation method based on large language models and multi-agent collaborative verification as described in any one of claims 1-8.