# A Statistical English Syntax Analysis Model Based on Linguistic Evaluation Information

Authors: Peng Shu; Sun Cuiqin
Journal: Security and Communication Networks
 (2022)

---

## Abstract

Language evaluation research currently focuses on the analysis of scholars from various native language backgrounds, whereas the local grammatical characteristics of other groups, particularly English language learners, are discussed less frequently. Local grammar offers a new perspective for analyzing the meaning characteristics of evaluation languages from the point of view of the people who employ them. In order to provide context for this paper, past research on local syntax is reviewed. The language model generates text that can be analyzed to determine the model’s aggressiveness when perturbed. To evaluate the method’s precision and efficacy, we compared the aggressiveness of pretrained models under various conditions using an English database. The results demonstrate that the method is capable of automatically and effectively evaluating the aggressiveness of language models. We then examine the scales of model parameters and the relationships between words in the training corpus.


---

## Body

## 1. Introduction

Evaluation is an essential aspect of academic writing in both English language and classroom settings. When evaluating the level of academic writing and the quality of articles, it is essential to consider the applicability of the evaluation language. According to corpus research, Chinese learners have always had difficulty evaluating meaning expression, which hinders their ability to improve their pragmatic competence in academic English writing. This restriction on the expression of meaning affects even Chinese scholars, diminishing the readability and persuasiveness of their articles. Prior research was limited to an observational perspective and relied on evaluation phrase resources to determine how well Chinese students were doing with their English evaluation language by analyzing the frequency of evaluation phrases in specific corpora [1–6]. There is no discussion of how the evaluation function is realized in terms of specific functions and meanings in this method, which is objective and systematic. Local grammar can provide a new analytical method for evaluating the exploration of meaning in language, according to the findings of a corpus-based study. For the evaluation language’s local grammar, the evaluation function is used as the description object, the evaluation analysis terms are adopted, and special subtleties are used to match form and meaning one by one, resulting in a precise and accurate description of how the evaluation function is implemented. The granularity of the evaluation reveals the regularity of the expression. As a result, researchers attempted to use evaluation local grammar to conduct a comparative study of academic texts and precisely analyze the meaning use characteristics of evaluation language in a specific population, which provides a new observation perspective for academic discourse analysis. This study, however, is limited to a horizontal comparison of academic papers written by Chinese and Western scholars in order to examine the evaluation of language by Chinese scholars, as well as how they fail to take into consideration local grammatical features when evaluating people with lower language proficiency. The characteristics and problems of Chinese scholars’ academic papers can also be traced back to the development of language characteristics in Chinese academic papers [7, 8].Academic text generation in the English language is a major area of study within the field of Natural Language Processing. Text generation research can benefit numerous well-known NLP tasks, such as machine translation and dialogue generation. Pretrained language models for text generation tasks have become a major research focus in recent years. Typically, unsupervised learning techniques are used to train these models on vast quantities of unlabeled text in order to prepare them for a variety of tasks that follow. The performance of these language models in tasks such as text generation, reading comprehension, and intelligent question answering has been exemplary [9–11].In a number of academic studies, it has been demonstrated that when perturbed, generative pretrained models, such as the GPT2, can generate offensive texts, such as those that contain racist or sexist language [12–17]. As a result, the study of language models with ambiguous aggressive tendencies, as well as their application, is dangerous. As a result, the widespread use of such language models is hampered by the fact that the user is unaware of the specific level of aggressive tendencies exhibited by the language model, raising concerns about abuse.Because the aggression of the language model is not visible to the outside world but rather manifests itself in the generated text, it is an excellent candidate for this classification. As a result, the language model’s attack capability is not fully demonstrated during the text generation process, making offensive text generation unlikely. We cannot pass the evaluation at this time because the generated text obscures the language model’s true aggression level. The level of aggression in the generated text is typically used to determine the level of aggression in the language model [18, 19].Consequently, this paper uses corpus data from common English learners to reveal the meaning characteristics of evaluation language in the writing of Chinese English learners, employing the path and method of local grammar. In addition, this paper proposes an automated method for evaluating language model aggression in light of the problem. In order to compare and contrast the aggressiveness levels of various models, the probability is increased to an observable level.


## 2. Syntactic Analysis of English Learners and Text Generation

The primary purpose of language in academic works is evaluation, which is also an important aspect of discourse behavior or a prominent academic discourse function. Through the use of this technique, the author’s viewpoint is effectively conveyed to the audience, and the persuasiveness of the article is enhanced. The discovery of multiword sequences in academic papers indicated that evaluations are frequently achieved through a succession of multiword sequences that represent the author’s attitude, evaluation, and value judgment regarding a topic, thereby persuading or convincing readers. According to corpus linguistics research, recurring lexical and grammatical patterns are the most important means by which academic texts convey their evaluative meaning. Other researchers who have studied this phenomenon assert that reporting verbs in academic English texts have complex evaluative meanings that reflect the author’s perspective. When the word show is used to refer to nonhuman entities, such as the results displayed, it implies objective, conclusive, and incontestable evaluative connotations.An examination of the learner corpus revealed that Chinese English learners lack the phraseological methods that native speakers use to evaluate expressions. Several Chinese students have observed that their peers use fewer viewpoint noun phrases, such as advantages, than their American counterparts. Other researchers have discovered that Chinese learners use sequences of posture adverbs, such as more broadly, that are commonly employed by native English authors much less frequently than English speakers. Several studies have established the resources necessary to evaluate phrases, but little attention has been paid to the semantic internalization of assessment phrases within the meaning of the words they are used to evaluate. In fact, assessment words in academic writings have a variety of micromeanings, including the identity of the person who conducted the academic evaluation, the type of published evaluation opinion, and the subject of the evaluation. These interpretations most directly reflect the author’s perspective, attitude, and concerns, as well as the academic English writing norms for relevance. However, the aforementioned study paths and methods can only consider evaluation in terms of its general function or meaning, and can only attach it to a specific phrase sequence and observe its frequency in the corpus, not both. Observational perspective has this limitation. As a result, it is difficult to investigate micromeanings in the evaluation language when employing this method, and it is not recommended.Using local grammar to describe and evaluate a language’s structure and functionality can reveal the language’s intrinsic micromeanings and organizational norms, according to corpus-based research on local grammar. The form-meaning characteristics of language are analyzed, evaluated, and merged. It is achieved by extracting samples of evaluation language from the corpus and classifying the various functions and meanings in each instance into a series of functional categories, followed by a local grammatical analysis employing grammatical patterns.A review of commonly used corpora revealed that the meaning sequence target + link + evaluation + qualification occurs frequently in academic writing by native English speakers but not in texts written by Chinese or British students. The findings reveal a disparity in the evaluation language employed by the two student groups, as well as in their usage patterns of academic English in its evaluation sense. Both groups of students emphasized the use of patterns to express this meaning sequence in their own unique manner. However, native English scholars use a broader range of phrase patterns to convey this meaning sequence. There is a deficiency in the expression of the meaning sequence of aim + link + evaluation + limitation for both Chinese and non-Chinese learners, as well as a lack of diverse phrase resources to implement this meaning sequence.Chinese students used internal detail functions or meanings more individually and intensively than the other two categories of local grammar patterns, despite frequently articulating the two groups of local grammar patterns described above. When expressing a link plus an evaluation plus a goal, for instance, Chinese students limit the meaning of evaluation to necessity (e.g., necessary 89 times and important 78 times), difficulty (e.g., difficult 51 times and easy 46 times), certainty (e.g., 76 times true and 23 times obvious), pros and cons (e.g., good 108 times), and possibility (e.g., good 108 times and possible 56 times). In contrast, British students cited logic (e.g., 113 times) and interest (e.g., 230 times) significantly more frequently in their evaluations than Chinese students.As a result of the study’s findings, Chinese students may find it difficult to apply a varied variety of language in the process of academic English writing to organize meaning, explain ideas, and persuade readers. Long-term meaning patterns may have a negative impact on Chinese researchers’ capacity to define academic meaning and function in their publications. All of these considerations must be addressed in the classroom while teaching academic English writing in order to ensure that students use and arrange meaning effectively, as well as to remind them that they must choose suitable meaning at the appropriate time [20–24].There is significant research value in this form of text generating and text controllability is a crucial goal for text generation. Researchers are attempting to regulate text output by training a variety of generative models from the ground up with the goal of regulating text generation. In some cases, researchers have shown that using VAE in conjunction with a text discriminator can result in the generation of text that has specific qualities encoded according to the attribute encoding learned by the encoder during the VAE training process. Several researchers have proposed the use of several generators and a discriminator for multiple-label categorization in GAN cooperative training for multiple-label classification [25–28]. Unlike many generators, which are designed to produce text with specific attributes, discriminators try to distinguish between fake and true text. The internet text corpus was used to train a model CTRL with 1.6 billion parameters from the ground up, starting with nothing but text. It is possible to generate new text with numerous attributes using an attribute fragment model [29, 30]. These properties include subjects, specific entities, and the relationships between entities. Using de novo trained models, it is possible to regulate the creation of offending content, but data annotation is prohibitively expensive. When the CTRL model’s aggressive features, which may be accessed automatically, are used, it is difficult to prevent offensive text from being generated in response [31–34].Therefore, this paper introduces a plug-and-play model (PPLM) and text generation model.


## 3. Statistical English Syntax Analysis Model

Pretrained language models do not require retraining because of PPLM’s use of discriminators to fine-tune activation layer parameters. This decreases the amount of computation required. PPLM’s objectives are as follows:(1)PX|a,where X is the text and a is the attribute.Further, (1) can be decomposed into(2)PX|a=PXPa|X.Then, we have(3)Ht=Qti,Pti,…,Qtl,Ptl,where Ht is the history matrix and Qti,Pti is the key-value pairs. The generation process of xt+1 is as follows:(4)Xt+1=SoftmaxWOt+!,where W is a linear transformation.Assume thatΔHt always equals the gradient supplied by the attribute model pa|X at each iteration of a time step. There is a better chance that the ΔHt+Ht text will meet the specified attributes. There are three steps to the updating process:First, outputHt and uses the attribute model to get pa|X.Second, language models are updated using attribute model gradients as a way to increase the likelihood that generated text will have a desired attribute.Last, using the revised language model, the distribution is obtained and new text is sampled.The updated formula ofΔHt is as follows:(5)ΔHt=ΔHt+α∇ΔHtloga|ΔHt+Ht∇ΔHtloga|ΔHt+Htβ,where α is the step size, β is the scaling factor, and ∇ΔHtloga|ΔHt+Ht is the gradient.Using this method of control may result in content that does not adhere to grammatical standards. Divergence or norm is used to control the distance between the generated text and the language model in order to ensure fluency.The following is the formula for a bag of words and a classifier model used in this paper:(6)logpa|X=log∑pt+1wi,logpa|X=logfOt+1,Ot+2,where wi is the keyword and Ot+1 and Ot+2 are the embedded representation.The purpose of evaluating the aggressiveness of a language model is to determine whether or not the model demonstrates actual aggression. Only the content that language models generate can be used to evaluate them, and that content must be persuasive. It is challenging to automatically analyze the aggressiveness of a language model because the text it generates does not accurately reflect the model’s true level of aggression during the text generation process as a whole [35].In order to answer the question of how to quantify language model hostility, a method for assessing the aggressiveness of artificial language models was developed. This model, which is based on the PPLM paradigm, has three modules. The modules consist of generation, induction, and evaluation. Two modules are responsible for creating offensive text: the generation module, which is free to construct a text sequence based on precontent, and the induction module, which guides the generation module toward generating more offensive content. The evaluation module evaluates the level of aggression exhibited by the language model in response to the generated incendiary text. Figure1 depicts an illustrative diagram of the evaluation procedure.Figure 1
Flowchart of evaluation method.The probability of generating the sequence of this article is(7)px=∏i=1npxi|x0,…,xi−1.Using the language model as a reference, the generation module generates text sequences for evaluation while the induction module directs the generation process in order to generate offensive texts. Finally, the evaluation module assesses the offensiveness of the texts that have been generated. As a result, the induction module generates offensive language as a result of the situation. According to Bayes’ rule, the following is the probability that a language model will generate inappropriate content:(8)PXt|a=PXtPa|Xt.The final predictions for offensive text classification are as follows:(9)Ot=∑i=1tOixt,pa|Xt=fOt.This study employs the attribute classifier as an attribute model in the controllable production of PPLM to guide the language model in producing objectionable text in order to guide the language model in producing problematic text. It is then possible to use attribute models in conjunction with a piece of text to determine if it is unacceptable based on whether it has been evaluated using a language model in the forward pass. Taking advantage of the gradient of the attribute classifier, apply the approach to update the language model’s internal activation layer parameters, which areHt. When changes are made to the history matrix, a new one is created. The revised language model is currently generating the regenerated text that will be evaluated (in this case, k pieces of text), which is being evaluated.After guiding the development of a full-text sequence, it is necessary to automatically analyze the text to determine its level of aggression. The aggressive classifier is created using the same methodology as the attribute classifier. Instead of an attribute classifier, it was decided to use a pretrained language model, such as BERT, to classify the objectionable text. This decision was made to increase the classification model’s precision. It has been fine-tuned to perfection for the specific task at hand. In addition, the aggressive classifier incorporates the full-text sequence into its calculation of classification.A classifier that recognizes offensive text may be utilized to classify the generated textX and predict whether each piece of text is offensive. This formula illustrates how the final evaluation metric for language model aggression is calculated: it is the proportion of offensive content in the generated text.(10)p=Iyi=1k.An aggressive language model is one in which the aggression indexp exceeds a predetermined threshold.


## 4. Results

There are databases for college English, travel and tourism English, and popular English classifications among these resources. Each of these databases holds approximately 300,000 records. Approximately 30,000 of them contain offensive material, while the remaining 70,000 are deemed to be nonoffensive. Due to the class imbalance present in this dataset, a more accurate attribute classifier and a more aggressive classifier are required. Positive texts outnumber negative texts in this aggressive text dataset (texts that were identified as nonaggressive), resulting in an even distribution of positive and negative text.The attribute classifier is trained using the data from this balanced dataset as part of the induction module, and the language model is trained using the generated text from the language model as part of the language model’s training. The remaining 75% of the data are used to create the aggressive classification data set, which is then employed to train the aggressiveness classification classifier.The attribute classifier of the PPLM is connected to a fully connected layer at the language model’s output layer, which is the language model’s output layer. During training, we only learn the parameters of the fully connected layer because we freeze the internal parameters of the language model that will be evaluated before we begin evaluating the language model. This algorithm uses Adam optimization, and its learning rate is roughly 0.005 percent. We employ a combination of our aggressive BERT language model and Adam’s Adam optimizer with a learning rate of 0.005 and a learning rate that decreases rapidly as the number of training epochs increases.To train the attribute classifier, we use the attribute classification dataset as a training set. After that, 80 percent of the data are randomly picked for training, with the remaining 20 percent of the data being used to evaluate the effectiveness of the attribute classifier. As indicated in Figure2, there is a shift in the accuracy rate of the attribute categorization process as the process progresses.Figure 2
Accuracy variation on the training and test sets.The change of the loss function is shown in Figure3.Figure 3
Loss variation on the training and test sets.The accuracy and loss on the evaluation set are shown in Figure4.Figure 4
Accuracy and loss variation on the evaluation set sets.Once training begins, the loss of training and validation sets decreases rapidly, and both accuracy and precision increase as training progresses. The losses on the training and validation sets become more consistent as training progresses. More than eighty percent of the attribute classifier’s final predictions are accurate. Our investigation employs four language models with varying parameter sizes: GPT2-IMDB, GPT2-medium, GPT2-Large, and GPT2. From these four models, we can determine whether the aggression level of the language model has an effect on the parameter scale. Figure5 depicts the results of the experiment.Figure 5
Comparison of results before and after processing on multiple models.The results of the experiment indicate that the aggression levels of the four models are equivalent prior to the guiding procedure. In comparison to before the instruction, the application of the PPLM methodology increases the level of hostility of each language model. Due to the fact that our strategy instructs the language model to generate hostile content, it enables a more accurate evaluation of the language model’s level of hostility. In contrast, as we increased the language model parameters, the level of animosity in the language model gradually decreased, as expected. We believe that language models with a large number of parameters have a greater capacity for learning and acquire more nonaggressive language expressions when they learn language information from vast amounts of data, a process we refer to as deep learning.This study addresses the issue of evaluating language model hostility by proposing a mechanism for automatically evaluating language model aggression. For the language model to be evaluated as offensive, controlled text generation must be used to instruct it to generate offensive text, and an offensive classifier must be trained to automatically classify these texts. This paper uses a scale of model parameters, a training corpus, and prepositional words to investigate and validate the impact of aggressiveness on the model’s performance.


## 5. Conclusion

Current research on language evaluation focuses on the analysis of scholars from a variety of native language backgrounds, whereas the grammatical characteristics of other groups, especially English learners, are discussed less frequently. Local grammar provides a previously unavailable fresh perspective on analyzing the meaning characteristics of evaluation languages from the perspective of the people who use them. In order to provide context for this paper, a review of previous research on local syntax is conducted. In response to a perturbation, the language model produces a text that can be analyzed to determine the language model’s aggression. To evaluate the accuracy and efficacy of the method, we compared the aggressiveness of pretrained models under various conditions using an English database. The results demonstrate that the method is able to evaluate the aggressiveness of language models in an automated and efficient manner. We then investigate the scales of model parameters and the relationships between words in the training corpus.



---

*Source: 3766417-2022-07-30.xml*