Apparatus for verifying analysis of overt and covert attitudes in pre-trained language models

By utilizing social media text processing and IAT theory, we construct explicit and implicit attitude analysis modules to quantify the differences between explicit and implicit attitudes in pre-trained language models. This solves the problem of difficulty in distinguishing between these attitudes in existing technologies and reveals the potential of human bias.

CN116629249BActive Publication Date: 2026-11-27TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310482308.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-30
Publication Date
2026-11-27
Estimated Expiration
2043-04-30

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately distinguish between explicit and implicit attitudes of individuals or groups in pre-trained language models within large populations, and traditional methods rely on explicit textual expressions, failing to delve into implicit attitudes.

Method used

The data processing module parses social media text, and uses IAT theory to construct explicit and implicit attitude analysis modules. Pre-trained language models are trained separately, and bias measurement methods in the field of NLP are combined to quantify the differences between explicit and implicit attitudes, using word-level, sentence-level and context-level measurement methods.

Benefits of technology

We achieved the ability to quantify significant differences between explicit and implicit attitudes in pre-trained language models, revealing the potential of human biases and validating the effectiveness of the method in relation to psychological measurements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116629249B_ABST
    Figure CN116629249B_ABST
Patent Text Reader

Abstract

The application discloses an analysis device for verifying explicit and implicit attitudes of a group in a pre-trained language model, comprising a data processing module, which is used for analyzing and extracting the comment data of users in a social group, and processing and analyzing the comments of users in the Chinese and English Wikipedia, twitter and microblog according to the concept words and attribute words mentioned in the implicit association test; the text corpus is divided into the explicit and implicit attitudes of the social group to a target concept; a model training module is used for constructing a pre-trained language model for learning the explicit and implicit attitudes of the social group; and the pre-trained language model containing the explicit and implicit attitudes of the social group is trained by using a group implicit comment set A and a group explicit comment set B; and an explicit and implicit attitude analysis module is used for quantifying the explicit and implicit attitudes of the social group in the pre-trained language model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of social computing and social psychology, and in particular to an analytical device and method for distinguishing explicit and implicit attitudes of a group in a pre-trained language model based on corpus segmentation. Background Technology

[0002] In recent years, with the rapid development of the internet, social media has been changing the way we communicate, connect, and share interests at an astounding pace, gradually becoming an essential part of our work and life. More and more people are choosing to express their opinions through social media, resulting in massive amounts of text data. This social media text data directly or indirectly reflects users' attitudes towards a particular event.

[0003] Current research on individual or group attitudes mainly focuses on the field of social psychology, forming a relatively complete research system of explicit and implicit attitudes. Explicit attitudes are direct expressions of people's views and feelings, which are conscious and controllable; while implicit attitudes refer to the true attitudes of people towards specific things that are not directly expressed but are deep in their consciousness [1,2]. At the same time, with the help of natural language processing technology, language has also begun to be used to analyze attitude biases [3-6]. By analyzing the emotions and semantics of individual or group discourse, it is possible to explore the attitudes of individuals or groups towards certain events, objects, people or concepts [7].

[0004] In the field of psychology, Self-Report Assessment (SRA)[8] and Implicit Association Test (IAT)[2] are often used to measure explicit and implicit attitudes, respectively. SRA is a statement or series of answers by the subject to questions about their own state, feelings, thoughts, beliefs, past behavior, etc., usually conducted in the form of questionnaires or interviews. However, the subject may not be able to respond truthfully, partly due to memory errors, not remembering their own behavior and feelings, and partly due to social pressure, making false statements about sensitive objects (such as personal feelings, special preferences, politics, culture, religion, etc.)[9]. IAT is a classic implicit attitude measurement method proposed by Greenwald et al. in 1998. The cognitive and physiological basis of IAT is that objects (such as a thing) and attributes (such as good and bad) are stored in the nodes of the brain's neural network, and the distance between the two on the neural network affects the efficiency of the cognitive process in establishing associations between objects and attributes. Therefore, IAT indirectly measures the cognitive distance of objects and attributes in the subject's subconscious by measuring the speed at which the subject classifies objects and attributes related to implicit attitudes, thereby obtaining the subject's implicit attitudes

[10] .

[0005] In the field of natural language processing, attitude analysis based on text language [11,12] mainly relies on the explicit expression of attitudes in the text and has not conducted in-depth research on implicit attitudes. Researchers have made new attempts to combine or compare psychological measurements with natural language processing techniques. In 2017, Caliskan et al. published an article in Science comparing cognitive distance in IAT with semantic distance and found that semantically oriented word embedding association test (WEAT) [4] is related to IAT. In 2018, Garg used this method to investigate the evolution of attitudes of the population over the past century

[13] . In 2019, May used BERT to develop this idea to sentence-level discrimination [5]. Then, these embeddings were applied to a large number of downstream applications and further amplified biases [14,15]. Recent studies have shown that the representation learning results of population language are related to population attitude biases. Pre-trained language models such as ELMo

[16] and BERT

[17] have become increasingly common. In 2018, Kiritchenko and Mohammad proposed the Fair Evaluation Corpus (EEC) to analyze 219 automatic sentiment analysis systems to uncover group attitude biases towards certain genders and races

[18] . In 2019, Kurita et al. discovered attitude biases in BERT pre-trained language models using WEAT[6]. In 2021, Silva systematically studied attitude biases in Transformer

[19] .

[0006] As can be seen from the research status described above, research on individuals or groups has significant shortcomings in both social psychology and natural language processing. First, psychology-based measurement methods all require active participation from subjects, which, limited by testing time and the number of participants, makes them difficult to apply to large-scale populations. Second, while text-based attitude measurement methods, the main research basis of this invention, do not significantly affect testing time or the number of participants and can be applied to attitude measurement in large groups, these methods primarily rely on explicit expressions in the text. They only preliminarily reveal the correlation between lexical and sentence-level semantic representations and IAT (Information Aspect-Based Attitude Measurement), without delving into implicit attitudes. Furthermore, related studies have not clearly distinguished between explicit and implicit attitudes, making it impossible to accurately differentiate between the two attitudes when differences exist in pre-trained language models. Therefore, it is necessary to deeply analyze the theoretical connotations of IAT and propose a new approach to distinguish between explicit and implicit attitudes in pre-trained language models.

[0007] References: [1] Timothy D. Wilson, Samuel Lindsey, Tonya Y. Schooler. 2000. Amodel of dual attitudes, 107(1): 101-126. [2] Greenwald A G, McGhee D E, Schwartz J L K. Measuring individualdifferences in implicit cognition: the implicit association test[J]. Journalof personality and social psychology, 1998, 74(6): 1464. [3] Bolukbasi T, Chang K W, Zou J Y, et al. Man is to computerprogrammer as woman is to homemaker? debiasing word embeddings[J]. Advancesin neural information processing systems, 2016, 29: 4349-4357. [4] Caliskan A, Bryson J J, Narayanan A. Semantics derivedautomatically from language corpora contain human-like biases[J]. Science,2017, 356(6334): 183-186. [5] May C, Wang A, Bordia S, et al. On Measuring Social Biases inSentence Encoders[C] / / NAACL-HLT (1). 2019. [6] Kurita K, Vyas N, Pareek A, et al. Measuring Bias inContextualized Word Representations[C] / / Proceedings of the First Workshop onGender Bias in Natural Language Processing. 2019: 166-172. [7] Handbook of natural language processing[M]. CRC Press, 2010. [8] Mansour B E , Mupinga D M . STUDENTS' POSITIVE AND NEGATIVEEXPERIENCES IN HYBRID AND ONLINE CLASSES[J]. College Student Journal, 2007,41(1):242-248. [9]Heppener, Wampold, Owen, et al. Research Design in Counseling[M].2016.

[10] Nosek B A , Greenwald A G , Banaji M R . Understanding andUsing II. Method Variables and Construct Validity. 2005.

[11] Hube C. Bias in wikipedia[C] / / Proceedings of the 26thInternational Conference on World Wide Web Companion. 2017: 717-721.

[12] Hube C, Fetahu B. Detecting biased statements in wikipedia[C] / / Companion proceedings of the the web conference 2018. 2018: 1779-1786.

[13] Garg N, Schiebinger L, Jurafsky D, et al. Word embeddingsquantify 100 years of gender and ethnic stereotypes[J]. Proceedings of theNational Academy of Sciences, 2018, 115(16): E3635-E3644.

[14] Leino K, Fredrikson M, Black E, et al. Feature-Wise BiasAmplification[C] / / International Conference on Learning Representations(ICLR). 2019.

[15] Zhao J, Wang T, Yatskar M, et al. Men Also Like Shopping:Reducing Gender Bias Amplification using Corpus-level Constraints[C] / / EMNLP.2017.

[16] Peters M E, Neumann M, Iyyer M, et al. Deep contextualized wordrepresentations[C] / / Proceedings of NAACL-HLT. 2018: 2227-2237.

[17] Devlin J, Chang M W, Lee K, et al. BERT: Pre-training of DeepBidirectional Transformers for Language Understanding[C] / / NAACL-HLT (1).2019.

[18] Kiritchenko S, Mohammad S. Examining Gender and Race Bias in TwoHundred Sentiment Analysis Systems[C] / / Proceedings of the Seventh JointConference on Lexical and Computational Semantics. 2018: 43-53.

[19] Silva A, Tambwekar P, Gombolay M. Towards a ComprehensiveUnderstanding and Accurate Evaluation of Societal Biases in Pre-TrainedTransformers[C] / / Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human LanguageTechnologies. 2021: 2383-2389. Summary of the Invention

[0008] The purpose of this invention is to overcome the shortcomings of the prior art and provide an analysis device and method for distinguishing explicit and implicit attitudes of a group in a pre-trained language model based on corpus segmentation.

[0009] The objective of this invention is achieved through the following technical solution: An analytical device for verifying explicit and implicit attitudes of a group in a pre-trained language model includes a data processing module, a model training module, and an explicit and implicit attitude analysis module. The data processing module is used to parse and extract the speech data published by users in social groups. Based on the concept words and attribute words mentioned in the implicit association test, it processes and analyzes the speech data of users in Chinese and English Wikipedia, Twitter and Weibo. The text corpus is segmented into the explicit and implicit attitudes of social groups towards the target concept. First, the target words in sentences containing both concept words and attribute words in the text corpus are masked to obtain the implicit speech set A of the group. Then, the target words in sentences containing only concept words or attribute words in the text corpus are masked to obtain the explicit speech set B of the group. The model training module is used to construct a pre-trained language model that learns the explicit and implicit attitudes of social groups; and to train pre-trained language models containing the explicit and implicit attitudes of social groups using the implicit speech set A and the explicit speech set B of the group, respectively. The explicit and implicit attitude analysis module utilizes existing bias measurement methods in the NLP field to measure the association between corresponding target words and attribute words based on the distance between word embeddings and sentence embeddings in the vector space and the conditional probability between target words in the context, thereby quantifying the explicit and implicit attitudes of social groups in the pre-trained language model.

[0010] This invention also provides an analytical method for verifying explicit and implicit attitudes of a group in a pre-trained language model, comprising: (1) Based on the concept words and attribute words mentioned in the implicit association test, analyze the processing of user comments on Chinese and English Wikipedia, Twitter and microblog; segment the text corpus into the explicit and implicit attitudes of social groups toward the target concept; First, target words in sentences containing both concept words and attribute words in the text corpus are masked to obtain the implicit speech set A of the group. Then, target words in sentences containing only concept words or attribute words in the text corpus are masked to obtain the explicit speech set B of the group. (2) Use the implicit speech set A and the explicit speech set B of the group to train a pre-trained language model containing the explicit and implicit attitudes of the social group, respectively. (3) Using existing bias measurement methods in the NLP field, the association between corresponding target words and attribute words is measured based on the distance between word embeddings and sentence embeddings in the vector space and the conditional probability between target words in the context, thereby quantifying the explicit and implicit attitudes of social groups in the pre-trained language model.

[0011] 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 executes the program to implement the steps of the method for analyzing explicit and implicit attitudes of the group in the pre-trained language model.

[0012] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for analyzing explicit and implicit attitudes of the population in the pre-trained language model.

[0013] Compared with the prior art, the beneficial effects of the technical solution of the present invention are: 1. Based on the IAT theoretical framework, this invention analyzes and compares existing bias measurement methods in the field of NLP, and proves that this method can quantify the differences between explicit and implicit attitudes of social groups in pre-trained language models.

[0014] 2. This invention includes a corpus segmentation method to achieve separate measurements of explicit and implicit biases. Furthermore, it thoroughly investigates, at both the word and sentence levels, the significant differences in explicit and implicit attitudes implied by pre-trained language models after inheriting and amplifying human biases.

[0015] 3. This method utilizes existing pre-trained language model-based representation learning techniques to simulate psychological measurement methods, revealing the potential of existing artificial intelligence methods in distinguishing between explicit and implicit attitudes. Attached Figure Description

[0016] Figure 1 This is an analysis of the theoretical basis of the method of this invention.

[0017] Figure 2 and Figure 3 This is a schematic diagram of the overall framework structure of the method of the present invention. Detailed Implementation

[0018] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.

[0019] The implicit attitude analysis method for groups based on word vectors and BERT proposed in this embodiment includes three modules: a data processing module, a model training module, and an explicit and implicit attitude analysis module.

[0020] 1. Data Processing Module The data processing module is used to process user-generated content data within social groups. The experimental materials include four relevant datasets, which are widely used in related research: the English Wikipedia dataset, the Twitter dataset, the Chinese Wikipedia dataset, and the Weibo dataset.

[0021] First, the text is segmented using the nltk natural language processing toolkit, and the sentence structure is analyzed using the Stanford parsing tool to obtain a training dataset in which there are clear syntactic dependencies between target words.

[0022] Subsequently, the processing and analysis of user comments on Chinese and English Wikipedia, Twitter, and Weibo were conducted based on the conceptual and attribute words mentioned in the Implicit Association Test (IAT). Following the IAT theoretical framework, several test targets (including socially sensitive concepts such as race and gender) were selected, and then categorized according to the conceptual and attribute words contained in the text.

[0023] The specific processing procedure is as follows: Figure 2As shown, by masking the target words in sentences containing both concept words and attribute words in the text, we obtain the implicit speech set A of the group. Then, by masking the target words in sentences containing only concept words or attribute words in the text, we obtain the explicit speech set B of the group.

[0024] 2. Model Training Module To verify the effectiveness of the method and the potential impact of pre-trained language model parameters, this embodiment uses three pre-trained language models—BERT, RoBERTa, and ALBERT—for training. The specific model architectures are as follows: The pre-trained language models are bert-base-uncase, bert-base-chinese, xlm-roberta-base, chinese-roberta-wwm-ext, alber-base-v2, and albert-base-chinese-cluecorpussmall. Then, the pre-trained language models are fine-tuned using a dataset containing each target concept, processed by the data processing module, to obtain explicit and implicit attitude pre-trained language models of each group towards the target concept, which are used for subsequent measurements.

[0025] 3. Explicit and Implicit Attitude Analysis Module This invention will design a test dataset to measure the explicit and implicit attitudes of the population towards the target word in the pre-trained language model at the word level and sentence level, respectively.

[0026] Specifically, given a set of concept words X and Y of equal size, and a set of attribute words A and B of equal size.

[0027] For word-level measurement, WEAT is formally expressed as: […]. Words Word vectors, Word vectors and The cosine similarity between them. The bias of concepts X and Y relative to attributes A and B can then be calculated using the following formula: Here, each addend represents the difference in mean cosine similarity between word x and attribute sets A and B. right Perform a permutation test to calculate and The significance of the association between them is then determined by the one-sided nature of the permutation test. Value The effect size of bias is calculated using the following formula: Among them, effect size It is used to measure the significance of bias between the concept set and the attribute set. The larger the effect size, the more severe the bias.

[0028] For sentence-level measurement, SEAT extends word-level testing to the sentence level by filling the target vocabulary to be measured into semantically bleached sentence templates, such as "This is..." <word> ”, " <word>is here”, "This will <word>"and" <word>"are things". These templates make extensive use of personal and demonstrative pronouns, conveying as little semantic information as possible, except for the inserted concept words and attribute words, to focus on the association between the pre-trained language model and the given concept words and attribute words. As shown in Table 1, the target words are inserted into the template sentences to obtain the dataset used for testing.

[0029] Table 1 Template sentences used for testing (T: target, A: attribute)

[0030] Then, the test data of filling in concept words and attribute words template sentences are converted into sentence vectors through a pre-trained language model, which replaces the word vectors in the word-level measurement. The cosine similarity between sentence vectors is then calculated and substituted into the formula to calculate the effect value of the bias between sentences.

[0031] As for the measurement of contextual word embeddings, LPBS utilizes the characteristic of training pre-trained language models such as BERT using masked language modeling objectives. The probability of each word appearing is influenced by all other words in the sentence. Therefore, since the same attribute term has different effects on the probability of different conceptual terms (such as male and female) appearing, that is... Therefore, WEAT, SEAT, and LPBS can be used to measure bias in pre-trained language models such as BERT.

[0032] For reference sentence-level measurement, the target vocabulary was inserted into the template sentences shown in Table 1 to obtain the test dataset. After masking the concept words and attribute words in the template sentences according to the order in Table 2, the relative measure of bias between paradigms (e.g., male and female) was calculated.

[0033] Table 2 Template Construction Process

[0034] The calculation process is as follows: The sentence "[MASK] is a programmer" is input into the pre-trained language model, and the probability assigned to "he is a programmer" is calculated. Next, the sentence "[MASK] is a [MASK]" is input into the pre-trained language model, and the prior probability assigned to "he is a [MASK]" is calculated. This means that the pre-trained language model predicts the probability of "he" without any other cues; then, by analyzing the probability of concept words... Divide by prior probability And use the natural logarithm to calculate the correlation. This replaces the cosine similarity in the above formula to measure the bias of the target concept.

[0035] Next, attitude measurement and analysis were performed on the fine-tuned pre-trained language model using three methods: WEAT, SEAT, and LPBS. To demonstrate the feasibility of the method proposed in this embodiment, the un-fine-tuned pre-trained language model was used as a control. The specific experimental results are shown in the table below.

[0036] Table 3

[0037] Table 4

[0038] Tables 3 and 4 show the effect values ​​of the BERT pre-trained language model trained using explicit and implicit attitudes from four corpora, respectively. These effect values ​​measure the significance of bias between the concept set and the attribute set; a larger effect value indicates a more severe bias. * indicates... .

[0039] Table 5

[0040] Table 6

[0041] Tables 5 and 6 represent the effect values ​​of the RoBERTa pre-trained language model trained using explicit and implicit attitudes from four corpora, respectively. These effect values ​​measure the significance of bias between the concept set and the attribute set; a larger effect value indicates a more severe bias. * indicates... .

[0042] Table 7

[0043] Table 8

[0044] Tables 7 and 8 show the effect values ​​of training the ALBERT pre-trained language model using explicit and implicit attitudes from four corpora, respectively. These effect values ​​measure the significance of bias between the concept set and the attribute set; a larger effect value indicates a more severe bias. * indicates... .

[0045] In this embodiment, to study the explicit and implicit attitudes of groups in Chinese and English corpora from different sources, experiments were conducted using datasets from Chinese and English Wikipedia, Twitter, and Weibo, along with six pre-trained language models with different parameter levels. The analysis results show that, compared to the untuned pre-trained language model, both the explicit and implicit attitudes of the groups were learned by the pre-trained language model. Furthermore, compared to non-social concepts (flower-insect, musical instrument-weapon), the differences between implicit and explicit attitudes were more significant in social concepts (male-female). Simultaneously, the experimental results are similar to those of the classic psychological experiment IAT: flowers are more strongly associated with positive attributes than insects, and musical instruments are more strongly associated with weapons; compared to women, men are more strongly associated with career and science, while women are more strongly associated with family and art.

[0046] Secondly, regarding language usage scenarios, formal social media platforms like Wikipedia typically require people to express explicit attitudes to conform to mainstream societal values, which is not necessary on relatively free social media platforms like Weibo and Twitter. This explains why the difference between explicit and implicit attitude biases is more significant on Wikipedia than on social media. Finally, similar results were obtained on pre-trained language models with different parameters, sizes, and training methods, increasing the credibility of the experimental results.

[0047] Preferably, embodiments of this application also provide a specific implementation of an electronic device capable of implementing all steps in the methods for analyzing explicit and implicit attitudes of the pre-trained language model as described in the above embodiments. The electronic device specifically includes the following: Processor, memory, communications interface, and bus; The processor, memory, and communication interface communicate with each other via a bus; the communication interface is used to realize information transmission between server-side devices, metering devices, and user-side devices.

[0048] The processor is used to call the computer program in memory. When the processor executes the computer program, it implements all the steps in the group explicit and implicit attitude analysis method in the verification pre-trained language model in the above embodiments.

[0049] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the method for analyzing explicit and implicit attitudes of the group in the pre-trained language model as described in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the method for analyzing explicit and implicit attitudes of the group in the pre-trained language model as described in the above embodiments.

[0050] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0051] While this application provides method operation steps as shown in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-inventive labor. The order of steps listed in the embodiments is merely one possible execution order among many and does not represent the only execution order. In actual device or client product execution, the method can be executed in the order shown in the embodiments or drawings or in parallel (e.g., in a parallel processor or multi-threaded processing environment).

[0052] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0053] This invention is not limited to the embodiments described above. The above description of specific embodiments is intended to illustrate and explain the technical solutions of this invention. The specific embodiments described above are merely illustrative and not restrictive. Without departing from the spirit and scope of the claims, those skilled in the art can make many specific modifications based on the teachings of this invention, and these modifications all fall within the scope of protection of this invention.< / word> < / word> < / word> < / word>

Claims

1. An analytical device for verifying explicit and implicit attitudes of a group in a pre-trained language model, characterized in that, It includes a data processing module, a model training module, and explicit and implicit attitude analysis modules; The data processing module is used to parse and extract the speech data published by users in social groups. Based on the concept words and attribute words mentioned in the implicit association test, it processes and analyzes the speech data of users in Chinese and English Wikipedia, Twitter and Weibo. The text corpus is segmented into the explicit and implicit attitudes of social groups towards the target concept. First, the target words in sentences containing both concept words and attribute words in the text corpus are masked to obtain the implicit speech set A of the group. Then, the target words in sentences containing only concept words or attribute words in the text corpus are masked to obtain the explicit speech set B of the group. The model training module is used to construct a pre-trained language model that learns the explicit and implicit attitudes of social groups; and to train pre-trained language models containing the explicit and implicit attitudes of social groups using the implicit speech set A and the explicit speech set B of the group, respectively. The explicit and implicit attitude analysis module utilizes existing bias measurement methods in the NLP field to measure the association between corresponding target words and attribute words based on the distance between word embeddings and sentence embeddings in the vector space and the conditional probability between target words in the context, thereby quantifying the explicit and implicit attitudes of social groups in the pre-trained language model.

2. An analytical method for verifying explicit and implicit attitudes of a group in a pre-trained language model, characterized in that, include: (1) Based on the concept words and attribute words mentioned in the implicit association test, analyze the processing of user comments in Chinese and English Wikipedia, Twitter and microblog; segment the text corpus into the explicit and implicit attitudes of social groups toward the target concept; First, target words in sentences containing both concept words and attribute words in the text corpus are masked to obtain the implicit speech set A of the group. Then, target words in sentences containing only concept words or attribute words in the text corpus are masked to obtain the explicit speech set B of the group. (2) Use the implicit speech set A and the explicit speech set B of the group to train a pre-trained language model containing the explicit and implicit attitudes of the social group respectively. (3) Using existing bias measurement methods in the NLP field, the association between corresponding target words and attribute words is measured based on the distance between word embeddings and sentence embeddings in the vector space and the conditional probability between target words in the context, thereby quantifying the explicit and implicit attitudes of social groups in the pre-trained language model.

3. 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 steps of the method for analyzing explicit and implicit attitudes of the group in the pre-trained language model as described in claim 2.

4. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method for analyzing explicit and implicit attitudes of a pre-trained language model as described in claim 2.

Citation Information

Patent Citations

  • Group implicit site analysis method based on word vectors and Bert

    CN112836486A

  • Viewpoint abstract evaluation system based on pre-training language model

    CN113032550A