Hostname: page-component-74656f9884-skzmx Total loading time: 0 Render date: 2026-11-05T21:06:40.210Z Has data issue: false hasContentIssue false

Enhancing deep neural networks with morphological information

Published online by Cambridge University Press:  21 February 2022

Matej Klemen*
Affiliation:
Faculty of Computer and Information Science, University of Ljubljana, Večna pot 113, Ljubljana, Slovenia
Luka Krsnik
Affiliation:
Faculty of Computer and Information Science, University of Ljubljana, Večna pot 113, Ljubljana, Slovenia
Marko Robnik-Šikonja
Affiliation:
Faculty of Computer and Information Science, University of Ljubljana, Večna pot 113, Ljubljana, Slovenia
*
*Corresponding author. E-mail: matej.klemen@fri.uni-lj.si
Rights & Permissions [Opens in a new window]

Abstract

Deep learning approaches are superior in natural language processing due to their ability to extract informative features and patterns from languages. The two most successful neural architectures are LSTM and transformers, used in large pretrained language models such as BERT. While cross-lingual approaches are on the rise, most current natural language processing techniques are designed and applied to English, and less-resourced languages are lagging behind. In morphologically rich languages, information is conveyed through morphology, for example, through affixes modifying stems of words. The existing neural approaches do not explicitly use the information on word morphology. We analyse the effect of adding morphological features to LSTM and BERT models. As a testbed, we use three tasks available in many less-resourced languages: named entity recognition (NER), dependency parsing (DP) and comment filtering (CF). We construct baselines involving LSTM and BERT models, which we adjust by adding additional input in the form of part of speech (POS) tags and universal features. We compare the models across several languages from different language families. Our results suggest that adding morphological features has mixed effects depending on the quality of features and the task. The features improve the performance of LSTM-based models on the NER and DP tasks, while they do not benefit the performance on the CF task. For BERT-based models, the added morphological features only improve the performance on DP when they are of high quality (i.e., manually checked) while not showing any practical improvement when they are predicted. Even for high-quality features, the improvements are less pronounced in language-specific BERT variants compared to massively multilingual BERT models. As in NER and CF datasets manually checked features are not available, we only experiment with predicted features and find that they do not cause any practical improvement in performance.

Information

Type
Article
Copyright
© The Author(s), 2022. Published by Cambridge University Press
Figure 0

Table 1. The collected datasets for NER task and their properties: the number of sentences and tagged words. We display the results for the languages using their ISO 639-2 three-letter code, provided in the “Code” column

Figure 1

Table 2. Dependency parsing datasets and their properties: the treebank, number of tokens, number of sentences and the information about the size of splits. We display the dataset information using the language ISO 639-2 three-letter code provided in the “Code” column

Figure 2

Table 3. Comment filtering datasets and their properties: number of examples, size of the split and class distribution inside subsets

Figure 3

Figure 1. The baseline LSTM-based (left) and BERT-based (right) models for the NER task, along with our modifications with morphological information. The dotted border of POS vectors and morphological feature vectors (feats) marks that their use is optional and varies across experiments. The $\odot$ symbol between layers represents the concatenation operation. The $w_i$ symbol stands for token i; in case of LSTM, tokens enter the model sequentially, and we show the unrolled network, while BERT processes all tokens simultaneously.

Figure 4

Figure 2. The deep biaffine graph-based dependency parser along with our enhancements at the input level. The dotted border of input embedding vectors, POS vectors and morphological features (feats) is optional and varies across experiments. The $\odot$ symbol between layers represents the concatenation operation. The $w_i$ symbol stands for token i; tokens enter the LSTM model sequentially, and we show the unrolled network.

Figure 5

Figure 3. The baseline LSTM (top) and BERT (bottom) models for the CF task, along with our modifications with morphological information. The dotted border of UPOS vectors and morphological features (feats) marks that their use is optional and varies across experiments. The $\odot$ symbol between layers represents the concatenation operation. The $w_i$ symbol stands for token i; in the case of LSTM, tokens enter the model sequentially, and we show the unrolled network, while BERT processes all tokens simultaneously.

Figure 6

Table 4. $F_1$ scores of different models on the NER task in 11 languages. The left part of the table shows the results for the LSTM models and the right part for the BERT models. The best scores for each language and neural architecture are marked with the bold typeface. Best scores for which the difference to the respective baseline is statistically significant are underlined

Figure 7

Table 5. LAS scores for different models on the DP task in different languages using (a) LSTM or (b) BERT contextual embeddings. The best scores for each language and each type of contextual embeddings are marked with the bold typeface. Statistically significant differences at $p=0.01$ level in the best scores compared to the baseline of the same architecture are underlined

Figure 8

Table 6. $F_1$ scores for baseline and enhanced models on the CF task in different languages. The left part of the table shows results for LSTM models, and the right part shows the results for BERT models. We report the mean and standard deviation over five runs. The highest mean score for each language is marked with the bold typeface separately for LSTM and BERT models. Note, however, that none of the improvements over the baselines is statistically significant at $p=0.01$ level

Figure 9

Table 7. LAS scores achieved by models that are trained for up to 5 additional epochs (a maximum training time of 15 epochs instead of 10). The results for 10 epochs are presented in Table 5. Statistically significant differences in best scores at $p=0.01$ level compared to the baselines of the same architecture are underlined

Figure 10

Table 8. LAS scores achieved by DP models that are trained with predicted (noisy) instead of human-annotated morphological features. We provide the accuracy of predicted UPOS tags and universal features in Appendix A. Statistically significant differences in the best scores compared to baselines at $p=0.01$ level are underlined

Figure 11

Table 9 LAS scores in the DP task achieved by more specific multilingual (top) and monolingual (bottom) BERT models. The more specific multilingual BERT models were trained on a smaller set of languages (three or five) than the original multilingual BERT model (104). For the base parsers with BERT embeddings, we display the improvement in LAS over using the original multilingual BERT for 104 languages ($\uparrow_{mtl}$). Statistically significant differences of best scores to mBERT baselines at $p=0.01$ level are underlined

Figure 12

Table B1. LAS achieved using a cased (instead of uncased) multilingual BERT model on a random sample of eight languages in the DP task. Statistically significant differences between baselines and best scores at $p=0.01$ level are underlined