Chinese-cross language dependency syntactic analysis method based on structural feature migration
By comparing the syntactic structure of Chinese and Vietnamese, we designed a double affine dependency syntax analysis model, and used technologies such as XLM-RoBERTa and Mambaformer/BiLSTM to solve the problem of low accuracy of Vietnamese dependency syntax analysis and significantly improve the accuracy of Vietnamese syntax analysis. sex and efficiency.
Patent Information
- Application Number
- CN202410744592.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-10-11
AI Technical Summary
Existing dependency syntax analysis methods have low accuracy in Vietnamese, especially in parsing syntactic structures and dependencies. Especially for languages with fewer resources, it is difficult to build efficient syntax analysis models.
Using the Chinese-Vietnamese cross-language dependency syntax analysis method based on structural feature transfer, by comparing the syntactic structures of Chinese and Vietnamese, a double affine dependency syntax analysis model is designed, and the XLM-RoBERTa model is used for cross-language word embedding mapping, combined with Mambaformer and BiLSTM The encoder,uses the KAN network to extract syntactic features and,compute dependencies through a double affine parsing layer.
It significantly improves the accuracy of Vietnamese dependency syntax analysis, enhances the expressive ability of word vectors, captures common features between languages, improves the precision and accuracy of syntactic analysis, and solves the problem of scarcity of low-resource language data.
Smart Images

Figure CN118761408A_ABST
Abstract
Description
[0001] Technical language
[0002] The present invention relates to a Chinese-Vietnamese cross-lingual dependency parsing method based on structural feature transfer, belonging to the technical field of natural language processing. Background Art
[0003] Mastering different languages, especially those of Southeast Asian countries, can not only deepen the understanding and communication of the cultures of these countries, but also contribute to economic development, enhance personal competitiveness in the workplace, and reduce misunderstandings and conflicts caused by language barriers. Therefore, improving the ability of dependency parsing for Southeast Asian languages such as Vietnamese is of great significance for promoting various tasks in natural language processing (NLP), such as named entity recognition, part-of-speech tagging, and more advanced artificial intelligence applications, such as sentiment analysis, Chinese-Vietnamese machine translation, etc.
[0004] With the rapid development of NLP technology, the processing ability of large language models for Vietnamese and other Southeast Asian languages has been significantly improved. Nevertheless, information transmission between different languages still faces many challenges, especially in the accurate parsing of syntactic structures and dependency relationships. In addition, constructing an efficient syntactic analysis model usually requires relying on large-scale and accurate annotated data, which is a major problem for languages with fewer resources. To effectively address these challenges, this study proposes a Chinese-Vietnamese cross-lingual dependency parsing method based on structural feature transfer. In the present invention, a dual-affine dependency parsing model based on structural feature transfer is designed to enhance the ability of Vietnamese dependency parsing. First, a comparative analysis of the syntactic structures of Chinese and Vietnamese is carried out, and it is found that there are commonalities between the two languages in some aspects. For example, they both have a subject-verb-object structure (such as "I eat an apple" in Chinese and ) in Vietnamese), both use adjectives to modify nouns ("red apple" in Chinese corresponds to ) in Vietnamese), and there is also the phenomenon of adverbs modifying verbs ("run fast" in Chinese corresponds to ) in Vietnamese). Through in-depth comparative analysis of language structures, the present invention can better understand the similarities between the two languages, and then design a more accurate and efficient cross-lingual dependency parsing model, which has important practical significance for various application scenarios such as language teaching, translation, and information retrieval. Summary of the Invention
[0005] The technical problem to be solved by the present invention is: The present invention provides a Chinese-Vietnamese cross-lingual dependency parsing method based on structural feature transfer, which is used to solve the problem of low accuracy of existing dependency parsing methods and has achieved good experimental results in Vietnamese dependency parsing.
[0006] The technical solution of the present invention is: a Chinese-Vietnamese cross-language dependency syntactic analysis method based on structural feature migration, and the specific steps of the method are as follows:
[0007] Step 1: Collect Chinese and Vietnamese data annotated with UD grammatical structure rules;
[0008] Step 2: First, use Chinese and Vietnamese to fine-tune the XLM-RoBERTa pre-trained model, so that the cross-language pre-trained model maps the Chinese and Vietnamese word embedding representations to the same representation space, and uses the rich semantic information and syntactic knowledge of Chinese to enhance the model's Vietnamese word vector representation capabilities. Then take the average output of the last four hidden layers of the fine-tuned XLM-Roberta model and use it as the main input of the syntactic analysis model;
[0009] Step 3: Input the obtained sentence representation into the Mamba module to pre-encode all word vectors. The design inspiration of the Mamba model comes from the structured state space in control theory. By selectively transmitting and forgetting the spatial structure and contextual information of the input Chinese and Vietnamese sentences, it can effectively capture the contextual relationship and spatial information between words, laying the foundation for subsequent in-depth analysis.
[0010] Step 4: Use the encoder that combines Mambaformer and BiLSTM to deeply encode the pre-encoded word representation. First, use the multi-head attention mechanism to calculate the degree of association between each word and all other words to obtain the word representation vector weighted by the attention weight. Then input it into Mamba to capture the deep spatial structure information between words, especially the syntactic structure. The representation obtained after multi-layer Mambaformer is input into multi-layer BiLSTM to further enhance the model's ability to capture the contextual information and temporal dynamic characteristics of the data.
[0011] Step 5: Then, by using KAN's sophisticated parameterization method, the syntactic features of the encoded word representation are accurately extracted to obtain the representation of each word as the head word and dependent word, as well as the representation of their corresponding dependency labels.
[0012] Step 6: Finally, the scores of each unlabeled dependency and labeled dependency are calculated through the biaffine parsing layer, and then the dependency syntactic tree corresponding to each sentence is obtained by decoding;
[0013] Furthermore, the specific steps of Step 1 are as follows:
[0014] Step 1.1: Collect the latest labeled Chinese and Vietnamese datasets from the Universal Dataset (UD) official website. Further, the specific steps of Step 2 are as follows:
[0015] Step 2.1: Download the XLM-RoBERTa model from the official website, select XLM-RoBERTa-base as the experimental model, and use the word segmenter of this model as the word segmenter for Chinese and Vietnamese data;
[0016] Step 2.2: Input Chinese and Vietnamese sentences w0w1...w n To fine-tune the pre-trained model, map the Chinese and Vietnamese word representations into the same representation space, so that the model captures the common features of the two languages;
[0017] Step 2.3: Then take the average output of the last four hidden layers of the fine-tuned XLM-Roberta model and calculate the average output of each word w after dimensionality reduction. i The corresponding word indicates
[0018] Step 2.4: Then and randomly initialized word embedding representations Add, and then represent the characters corresponding to each word Concatenate as the final input representation x i .
[0019] Furthermore, the specific steps of Step 3 are as follows:
[0020] Step 3.1: Input the word representation obtained from the input layer into the single-layer Mamba module to perform shallow information encoding on the word. By selectively transmitting and forgetting the spatial structure and contextual information of the input Chinese and Vietnamese sentences, the word representation is effectively integrated with contextual and spatial information.
[0021] Step 3.2: Then, the original input and the Mamba pre-coded representation are residually connected, and then the size of the constraint vector is normalized to make the model more stable and speed up the learning and convergence of the model.
[0022] Furthermore, the specific steps of Step 4 are as follows:
[0023] Step 4.1: Input the pre-encoded representation into the Mambaformer encoder. First, the multi-head attention mechanism calculates the representation x of each word. i With other words to represent x jThe correlation between them is the attention score, and then the important words are highlighted by taking the weighted sum of the attention score and all word representations, while the unimportant words are relatively less focused.
[0024] Step 4.2: Then perform residual connection and normalization on the weighted representation and the representation before weighting;
[0025] Step 4.3: Input the representation obtained in the previous step into Mamba to selectively memorize data information and capture deeper spatial structure information between words, especially syntactic structure information;
[0026] Step 4.4: Then perform residual connection and normalization on the output of Mamba and its input;
[0027] Step 4.5: Repeat steps 4.1-4.4, and use the stacked multi-layer Mambaformer encoder to enhance the representation ability of the word vector to obtain the final output m0m1...m n ;
[0028] Step 4.6: Then input the final output of the multi-layer Mambaformer into the multi-layer BiLSTM to represent the word m0m1...m n Serialize and encode to obtain context-dependent representation h0h1...h n .
[0029] Furthermore, the Step 5 specifically includes the following:
[0030] Step 5.1: Then the context-dependent representation h i is input into KAN, which transforms the input features through a series of learnable unary functions and then obtains each word w by summing them up. i As the vector representation of the central word and each word w i Vector representation as a modifier and their corresponding vector representations of dependency labels, which allows the model to capture richer semantic information.
[0031] Furthermore, the Step 6 specifically includes the following:
[0032] Step 6.1: Represent the vector of the central word and vector representation of modifiers The vector representation of the dependency label is input into the biaffine parsing layer Biaffines, which calculates the score S of the dependency relationship between words without labels and the score S of the dependency relationship with labels. l;
[0033] Step 6.2: Finally, use the maximum spanning tree algorithm to decode and obtain the dependency syntactic tree corresponding to the syntactic structure of each sentence.
[0034] The beneficial effects of the present invention are:
[0035] 1. This paper innovatively combines the currently popular Mambaformer encoder with the traditional BiLSTM encoder to effectively capture key vocabulary features, spatial structure information, and context sequence information in the data. This fusion significantly enhances the expressive power of word vectors and provides a solid foundation for syntactic analysis;
[0036] 2. The present invention adopts a new neural network architecture, Kolmogorov-Arnold Networks (KAN), to replace the traditional multi-layer perceptron (MLP). The KAN network not only improves the interpretability of the model but also makes the syntactic analysis process more sophisticated and accurate by placing learnable activation functions on the edges of the network instead of on the nodes.
[0037] 3. This paper proposes a method for structural feature migration, which can efficiently use the knowledge of rich resource languages to guide the model to learn the grammatical structure of low resource languages. This method effectively solves the problem of scarcity of high-quality low resource language data and significantly improves the accuracy of cross-language dependency syntactic analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 It is a flow chart of the present invention; DETAILED DESCRIPTION
[0039] Example 1: Figure 1 As shown in the figure, a Chinese-Vietnamese cross-language dependency parsing method based on structural feature transfer is presented. The method uses a biaffine parsing model (Biaffine Parser) for experiments. The method is mainly divided into six parts: an input layer enhanced by a pre-trained model, a Mamba embedding layer, a Mambaformer encoding layer, a BiLSTM encoding layer, a KAN feature extraction layer, and a BiAffines layer. The specific steps of the method are as follows:
[0040] Step 1: Collect labeled Chinese and Vietnamese UD datasets, and perform other operations such as word segmentation, truncating long sentences, filling short sentences to unify the length, etc.
[0041] Step 2: Fine-tune the XLM-RoBERTa pre-trained model by co-training the Chinese and Vietnamese datasets, so that the cross-language pre-trained model maps the Chinese and Vietnamese word embedding representations to the same representation space, and uses the rich semantic information and syntactic knowledge of Chinese to enhance the model's Vietnamese word vector representation ability. Then, extract the average output of the last four hidden layers of the fine-tuned XLM-Roberta pre-trained model as the embedding representation of each word. The rich grammatical structure knowledge of Chinese is used to guide the model to deeply understand the grammatical structure of Vietnamese and improve the model's syntactic analysis performance.
[0042] The specific steps of Step 2 are as follows:
[0043] Step 2.1: Download the XLM-RoBERTa model from the official website, select XLM-RoBERTa-base as the experimental model, and use the word segmenter of this model as the word segmenter for Chinese and Vietnamese data;
[0044] Step 2.2: Input Chinese and Vietnamese sentences w0w1...w n To fine-tune the pre-trained model, map the Chinese and Vietnamese word representations into the same representation space, so that the model captures the common features of the two languages;
[0045] Step 2.3: Then take the average output of the last four hidden layers of the fine-tuned XLM-Roberta model and calculate the average output of each word w after dimensionality reduction. i The corresponding word indicates
[0046] Step 2.4: Then and randomly initialized word embedding representations Add, and then represent the characters corresponding to each word Concatenate as the final input representation x i The formula is as follows:
[0047]
[0048] Step 3: Input the obtained sentence representation into the Mamba module to pre-encode all word vectors. The design inspiration of the Mamba model (selective structured state space model) comes from the structured state space in control theory. By selectively transmitting and forgetting the input Chinese and Vietnamese data information, it can effectively capture the contextual relationship and spatial information between words, laying the foundation for subsequent in-depth analysis.
[0049] The specific steps of Step 3 are as follows:
[0050] Step 3.1: Input the word representation obtained from the input layer into the single-layer Mamba module to perform shallow information encoding on the word. By selectively transmitting and forgetting the input Chinese and Vietnamese data information, the word representation is effectively integrated with context and spatial information.
[0051] Step 3.2: Then, the original input and the Mamba preliminary encoded representation are residually connected, and then the size of the constraint vector is normalized to make the model more stable and speed up the learning and convergence of the model.
[0052] Step 4: Use the encoder combining Mambaformer and BiLSTM to deeply encode the initially encoded word representation. First, use the multi-head attention mechanism to calculate the degree of association between each word and all other words to obtain the word representation vector weighted by the attention weight. Then input it into Mamba to capture the deep spatial structure information between words, especially the syntactic structure. The representation obtained after multi-layer Mambaformer is input into multi-layer BiLSTM to further enhance the model's ability to capture the contextual information and temporal dynamic characteristics of the data.
[0053] The specific steps of Step 4 are as follows:
[0054] Step 4.1: Input the representation obtained by preliminary encoding into the Mambaformer encoder (composed of an attention mechanism and a Mamba module) to deeply explore the deep contextual connections and spatial information between words. At the same time, the model is guided to capture the common features of the syntactic structure knowledge of Chinese and Vietnamese more deeply by migrating the syntactic structure information of Chinese. First, the multi-head attention mechanism calculates the relationship between each word representation and other word representations x j The correlation between them is the attention score. Then, the important words are highlighted by taking the weighted sum of the attention score and all word representations, while the unimportant words are relatively less concerned. The formula is as follows:
[0055]
[0056] ma i =Multihead(Q,K,V)=[head1,…,head n ]W (3)
[0057] Among them, Q, K, V are all x i Each head calculates its own weighted attention score, and finally combines the outputs of all heads to produce the final multi-head attention output ma i ;
[0058] Step 4.2: Then perform residual connection and normalization on the weighted representation and the representation before weighting;
[0059] Step 4.3: Input the representation obtained in the previous step into Mamba to selectively memorize data information and capture deeper spatial structure information between words, especially syntactic structure information. The formula is as follows:
[0060]
[0061] y(t)=Ch(t)+Dx(t) (4)
[0062] The state vector h(t) can capture the potential state of the sequence at time step t, and the input x(t) is the input feature of the sequence at this time step, that is, the output ma of the multi-head attention. i , is the derivative of h(t), which is used to represent the rate of change of the state h(t) over time. A, B, C, and D are all selective memory matrices similar to gated units. A is the state transfer matrix, which describes how h(t) changes over time. The B matrix maps the external input x(t) to the state transformation. Finally, the time state h(t) and input x(t) are mapped to the output through the C observation matrix and the D direct transfer matrix;
[0063] Step 4.4: Then perform residual connection and normalization on the output of Mamba and its input;
[0064] Step 4.5: Repeat this operation and stack multiple layers of Mambaformer encoders to enhance the syntactic structure representation ability of word vectors to obtain the final output m0m1...m n ;
[0065] Step 4.6: Then input the final output of the multi-layer Mambaformer into the multi-layer BiLSTM to represent the word m0m1...m n Serialize and encode to obtain context-dependent representation h0h1...h n , the formula is as follows:
[0066] h i =BiLSTM(m i ) (5)
[0067] Step 5: Then, by using KAN's sophisticated parameterization method, the syntactic features of the encoded word representation are accurately extracted to obtain the representation of each word as the head word and dependent word, as well as the representation of their corresponding dependency labels.
[0068] Furthermore, the Step 5 specifically includes the following:
[0069] Step 5.1: Then the context-dependent representation h i It is input into KAN (Kolmogorov-Arnold Networks), which transforms the input features through a series of learnable unary functions and then obtains each word w through summation. i As the vector representation of the central word and each word w i Vector representation as a modifier and their corresponding vector representations of dependency labels, which enables the model to capture richer semantic information.
[0070] (1) The KAN network is essentially a combination of spline curves and MLP. Its basic principle is that a single input vector can be mapped to another output function through two layers of nested superposition of a finite number of single-variable continuous functions, thereby achieving the approximation of input to ideal output. The formula is as follows:
[0071]
[0072] where Φ q is an external function, is an internal function, and finally the ideal output representation is approximated by summing up multivariate functions. The internal function can be defined as a matrix calculation with parameters. Each element in the matrix is actually a function or operator. The KAN layer can be defined as:
[0073]
[0074] KAN(x)=(Φ L-1 Φ L-2 …Φ1Φ0)x (8)
[0075] where p=1,2,…,n in ,q=1,2,…,n out represents the number of internal and external functions, Φ i is the function matrix (B-spline function matrix) corresponding to the i-th KAN layer, and x represents the input vector; the KAN network first defines a basic activation function b(x), and then makes the subsequent learned spline function spline(x) and the basic activation function perform residual connection formula as follows:
[0076]
[0077] (2) The KAN network transforms the input features through a series of transformation operations to obtain each word w i As the vector representation of the central word and each word w i Vector representation as a modifier The formula is defined as follows:
[0078]
[0079] Step 6: Finally, the score of each unlabeled dependency and labeled dependency is calculated through the biaffine parsing layer Biaffines, and then the dependency syntactic tree corresponding to each sentence is decoded.
[0080] Furthermore, the Step 6 specifically includes the following:
[0081] Step 6.1: Represent the vector of the central word and vector representation of modifiers The vector representation of the dependency label is input into the biaffine parsing layer Biaffines, which calculates the score S of the dependency relationship between words without labels and the score S of the dependency relationship with labels. l ;
[0082] Step 6.2: Finally, use the maximum spanning tree algorithm to decode and obtain the dependency syntactic tree corresponding to the syntactic structure of each sentence;
[0083] (1) The scores of each unlabeled dependency arc and labeled dependency arc are calculated through biaffine linearity. The score of each dependency arc can be calculated using a matrix form. The calculation process of the unlabeled dependency relationship score is as follows:
[0084]
[0085] The matrix U 1 represents the double affine parameter, score(i←j) represents the core word w j Directive modifier w i The fraction of unlabeled dependency arcs;
[0086] The labeled dependency score is calculated as follows:
[0087]
[0088] Among them, U 2 and U 3 is the weight matrix, and b is the bias. The dependency label prediction and dependency arc prediction are calculated using their own multi-layer perceptron and bi-affine scoring layer respectively;
[0089] (2) Decode using the maximum spanning tree algorithm to obtain the best dependency syntax tree. The formula is as follows:
[0090]
[0091] The syntactic analysis model defines a local cross entropy loss function for each position i to optimize the model parameters. The loss function is defined as follows:
[0092]
[0093] Among them, wj represents the correct core word of word wi, and l represents the type of dependency relationship between them.
[0094] The present invention uses the labeled Chinese and Vietnamese datasets in the Universal Dependencies (UD) tree library for training and testing, and then uses the standard UAS and LAS indicators as the evaluation criteria for the dependency parsing model. The calculation formula is as follows:
[0095]
[0096] To prove the effectiveness of the present invention, three mainstream Vietnamese dependency parsing methods are selected as benchmark models. 1) Pre-trained syntactic analysis model (Pre-training): Only the monolingual labeled Vietnamese UD dataset is input into the pre-training model, and then BiLSTM is used for encoding to capture contextual information, followed by syntactic analysis. 2) Direct transfer syntactic analysis model (Fine-tuning): Fine-tuning is performed by inputting Chinese and Vietnamese into the pre-training model, and then encoding is performed with BiLSTM to directly transfer Chinese knowledge to Vietnamese. 3) Mambaformer-based syntactic analysis model (Mambaformer parser): Based on the second method, the original BiLSTM is replaced with the popular Mambaformer architecture to enhance the model's global information capture capabilities and spatial information capture capabilities. In the present invention, the XLM-RoBERTa model is firstly fine-tuned with Chinese and Vietnamese data to enhance the performance of the dual-affine syntactic analysis model. Then, Mambaformer and BiLSTM are combined together for encoding to effectively capture the common features of the grammatical structure and semantic information of the Chinese and Vietnamese languages, significantly enhancing the expressive power of word vectors. Finally, the KAN network is used to improve the interpretability of the model and make the syntactic analysis process more refined and accurate.
[0097] The experimental results of the present invention are shown in Table 1 below. First of all, it is worth pointing out that although the performance of the basic model of syntactic analysis is enhanced by adding Chinese and Vietnamese data to fine-tune the pre-trained model, the method proposed in the present invention still shows the best results, which further verifies the effectiveness of the method. Secondly, replacing the original BiLSTM with the popular Mambaformer architecture enhances the model's global information capture ability and spatial structure information capture ability, which is also significantly helpful for the analysis of syntactic structure. Finally, the comprehensive application of this series of strategies further improves the performance of the model's syntactic analysis, affirms the value of the combination of Mambaformer and BiLSTM for syntactic analysis tasks, and also emphasizes the necessity of cross-language structural feature migration between Chinese and Vietnamese. The two complement each other.
[0098] Table 1 Comparison of test set scores of different models
[0099]
[0100] Table 2 Comparison of test set scores with different model layers and original word discard interference
[0101]
[0102]
[0103] Table 2 is based on the model we proposed. We convert the data into the digital numbers (token id) of the words corresponding to the tokenizer and then randomly discard them. We replace the numbers of some words with masks and add some noise so that the model does not rely too much on certain specific words in the sentence, thereby increasing the robustness and generalization performance of the model. As can be seen from the table, when the number of layers of the model is relatively small, the noise will weaken the performance of the model. When the number of layers of the model is deeper, adding a small amount of noise can effectively improve the syntactic analysis performance of the model. The best result is the combination of six-layer Mambaformer and three-layer BiLSTM. The experimental score obtained by discarding 0.1 of the original words is the highest.
[0104] Table 3 Comparison of test set scores of Mambaformer with different layers
[0105]
[0106] As shown in Table 3, we replaced BiLSTM with Mambaformer of different layers, but did not perform residual concatenation with BiLSTM in order to explore the impact of the number of layers on the syntactic analysis performance model. From the table, we can see that three and six layers have the best results. The more layers there are, the larger the model parameters are, which makes it easy to overfit.
[0107] Table 4 Comparison of test set scores of KAN networks with different parameters
[0108]
[0109] Table 4 shows the effect of the changes of two main hyperparameters on the performance of the model, based on the original model containing only BiLSTM. We replace the last classification feature extraction layer MLP with the KAN network. The table shows the effect of the changes of the two main hyperparameters on the performance of the model. The parameter grid size is the number of segments of the activation function B-spline basis function learned. As can be seen from the table, although increasing the parameter can theoretically increase the model's fitting ability and capture more complex features, it is easy to cause overfitting. The parameter scale noise is the effect of the layer noise. Increasing the parameter scale noise can effectively increase the generalization performance and robustness of the model.
[0110] The above tables and drawings fully demonstrate the effectiveness and rationality of the present invention, but the present invention is not limited to the above embodiments. Various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A Chinese-Vietnamese cross-language dependency syntactic analysis method based on structural feature transfer, Features: The specific steps of the method are as follows: Step 1: Collect Chinese and Vietnamese data annotated with UD grammatical structure rules; Step 2: First, use Chinese and Vietnamese to fine-tune the XLM-RoBERTa pre-trained model so that the cross-language pre-trained model maps the word embedding representations of Chinese and Vietnamese to the same representation space. Then, take the average of the outputs of the last four hidden layers of the fine-tuned XLM-Roberta model and use it as part of the input of the syntactic analysis model. Step 3: Input the obtained sentence representation into the Mamba module to pre-encode all word vectors; By selectively transferring and forgetting the spatial structure and contextual information of the input Chinese and Vietnamese sentences, the contextual relationship and spatial information between words are effectively captured; Step 4: Use the encoder combined with Mambaformer and BiLSTM to deeply encode the pre-encoded word representation; first use the multi-head attention mechanism to calculate the degree of association between each word and all other words to obtain the word representation vector weighted by the attention weight; then input it into Mamba to capture the deep spatial structure information between words, especially the syntactic structure; the representation obtained after multi-layer Mambaformer is input into multi-layer BiLSTM to further enhance the model's ability to capture the contextual information of the data and the temporal dynamic characteristics; Step 5: Then, by using KAN’s sophisticated parameterization method, we can accurately extract the syntactic features of the encoded word representations, and obtain the representations of each word as the central word and dependent word, as well as the representations of their corresponding dependency labels; Step 6: Finally, the scores of each unlabeled dependency and labeled dependency are calculated through the dual affine parsing layer, and then the dependency syntactic tree corresponding to each sentence is decoded.
2. The Chinese-Vietnamese cross-language dependency syntactic analysis method based on structural feature transfer according to claim 1, Features: The specific steps of Step 1 are as follows: Step 1.1: Collect the latest labeled Chinese and Vietnamese datasets from the Universal Dataset (UD) official website.
3. The Chinese-Vietnamese cross-language dependency syntactic analysis method based on structural feature transfer according to claim 1, Features: The specific steps of Step 2 are as follows: Step 2.1: Download the XLM-RoBERTa model from the official website, select XLM-RoBERTa-base as the experimental model, and use the word segmenter of this model as the word segmenter for Chinese and Vietnamese data; Step 2.2: Input Chinese and Vietnamese sentences 0 w 1 ... n To fine-tune the pre-trained model, map the Chinese and Vietnamese word representations into the same representation space, so that the model captures the common features of the two languages; Step 2.3: Then take the average output of the last four hidden layers of the fine-tuned XLM-Roberta model and calculate the average output of each word w after dimensionality reduction. i The corresponding word indicates Step 2.4: Then and randomly initialized word embedding representations Add, and then represent the characters corresponding to each word Concatenate as the final input representation x i .
4. The Chinese-Vietnamese cross-language dependency syntactic analysis method based on structural feature transfer according to claim 1, Features: The specific steps of Step 3 are as follows: Step 3.1: Input the word representation obtained from the input layer into the single-layer Mamba module to perform shallow information encoding on the word. By selectively transmitting and forgetting the spatial structure and contextual information of the input Chinese and Vietnamese sentences, the word representation is effectively integrated with contextual and spatial information. Step 3.2: Then, the original input and the Mamba pre-coded representation are residually connected, and then the size of the constraint vector is normalized to make the model more stable and speed up the learning and convergence of the model.
5. The Chinese-Vietnamese cross-language dependency syntactic analysis method based on structural feature transfer according to claim 1, Features: The specific steps of Step 4 are as follows: Step 4.1: Input the pre-encoded representation into the Mambaformer encoder. First, the multi-head attention mechanism calculates the representation x of each word. i With other words to represent x j The correlation between them is the attention score, and then the important words are highlighted by taking the weighted sum of the attention score and all word representations, while the unimportant words are relatively less focused. Step 4.2: Then perform residual connection and normalization on the weighted representation and the representation before weighting; Step 4.3: Input the representation obtained in the previous step into Mamba to selectively memorize data information and capture deeper spatial structure information between words, especially syntactic structure information; Step 4.4: Then perform residual connection and normalization on the output of Mamba and its input; Step 4.5: Repeat steps 4.1-4.4, and use the stacked multi-layer Mambaformer encoder to enhance the representation ability of the word vector to obtain the final output. 0 m 1 ...m n ; Step 4.6: Then input the final output of the multi-layer Mambaformer into the multi-layer BiLSTM to represent the word. 0 , 1 ...m n Perform serialization encoding to obtain context-dependent representation h 0 h 1 ...h n .
6. The Chinese-Vietnamese cross-language dependency syntactic analysis method based on structural feature transfer according to claim 1, Features: The Step 5 specifically includes the following: Step 5.1: Then the context-dependent representation h i is input into KAN, which transforms the input features through a series of learnable unary functions and then obtains each word w by summing them up. i As the vector representation of the central word and each word w i Vector representation as a modifier and their corresponding vector representations of dependency labels, which enables the model to capture richer semantic information.
7. The Chinese-Vietnamese cross-language dependency syntactic analysis method based on structural feature transfer according to claim 1, Features: The Step 6 specifically includes the following: Step 6.1: Represent the vector of the central word and vector representation of modifiers The vector representation of the dependency label is input into the biaffine parsing layer Biaffines, which calculates the score S of the dependency relationship between words without labels and the score S of the dependency relationship with labels. l ; Step 6.2: Finally, use the maximum spanning tree algorithm to decode and obtain the dependency syntactic tree corresponding to the syntactic structure of each sentence.
Citation Information
Cited By
Power system operation maintenance method and system based on retrieval enhancement technology
CN119557463A
A method and system for power system operation and maintenance based on retrieval enhancement technology
CN119557463B
Vietnamese dependency syntax tree bank construction method based on joint optimization training
CN119577060A
