Assessing multiple word embeddings for named entity recognition of professions and occupations in health-related social media (2021)

Abstract: This paper presents our contribution to the ProfNER shared task. Our work focused on evaluating different pre-trained word embedding representations suitable for the task. We further explored combinations of embeddings in order to improve the overall results.

## introduction the profner task @xcite , part of the smm4h workshop and shared task @xcite organized at naacl 2021, focused on identification of professions and occupations from health-relevant twitter messages written in spanish. it offered two sub-tasks: a) a binary classification task, deciding if a particular tweet contains a mention of an occupation, given the context, and b) extracting the actual named entities, by specifying the entity type, start and end offset as well as the actual text span. @xcite have shown that domain specific embeddings have an impact on the performance of a ner system. the profner task is at a confluence between multiple domains. the classification sub-task suggests that tweets will actually contain not only health-related messages but probably also more general domain messages. however, the second task focuses on the analysis of healthrelated messages. finally, social media can be regarded as a domain in itself. therefore, our system was constructed on the assumption that word embeddings from multiple domains (general, healthrelated, social media) will have different impact on the performance of a ner system. we evaluated different pre-trained embeddings alone and in combination, as detailed in the next section. our interest for the task stemmed from our involvement with the curlicat 1 project for the cef at action, where ner in different domains (including health-related) is needed. additionally, 1 https://curlicat-project.eu/ pre-trained word embeddings for romanian language, such as pais , and tufis , (2018), are considered for suitability in different tasks within the european language equality (ele) foot_0 project. ## system description and results we used a recurrent neural network model based on lstm cells with token representation using pretrained word embeddings and additional character embeddings, computed on the fly. the actual prediction is performed by a final crf layer. for the implementation we used the neuroner foot_1 @xcite package. we considered the two sub-tasks to be intertwined. if a correct classification is given for the first sub-task, then this can be used in the second task to guide the ner process to execute only on the classified documents. however, also the reverse can be applied. a document containing correctly identified entities for the second sub-task should be classified as belonging to the domain of interest. we employed the second approach and first performed ner and then used this information for classification. for the purposes of the ner sub-task we considered the following word embedding representations: spanish medical embeddings foot_2 @xcite , wikipedia embeddings foot_3 @xcite , twitter embeddings foot_4 (miranda-escalada et al., 2021a). these were generated using the fasttext toolkit @xcite we first experimented with individual representations and then began experimenting with sets of two embeddings concatenated. for the words present in the first considered embedding we added the corresponding vector from the second embedding or a zero vector. this provided an input vector of size 600 (resulting from concatenating two vectors of size 300 each), which required the adaptation of the network size accordingly. additionally we considered a full combination of twitter and wikipedia embeddings, placing zero-valued vectors if words were also missing from the first embedding. a final experiment was conducted on a concatenation of 3 embeddings (total vector size 900). results on the validation set are presented in experiments show that given the recurrent neural architecture used, the best single embeddings results, considering overall f1 score, for both subtasks are provided by the wikipedia embeddings (a general domain representation). however, the medical embeddings seem to achieve higher precision. considering the ner task, the combination of wikipedia and twitter achieves the highest f1 from the two embeddings experiments, while the three embeddings combination provides the final best score. for the first subtask we used the predictions given by a ner model and considered a tweet with at least one recognized entity to belong to the domain required by the subtask. in order to improve recall we further extracted a list of professions from the training set of the ner subtask. this list was filtered and we removed strings that tend to appear many times in tweets labelled "0" in the training set belonging to the classification task. the filtered list was applied in addition to the ner information and texts that had no extracted entities were labelled "1" if they contained any string from the list. this allowed us to further increase the classifier's performance. ## conclusions we investigated the suitability of different representations for analysing text from the health domain in social media, particularly twitter messages. contrary to our initial assumption, a general domain representation (wikipedia based) provided the best ner results, considering single representations. however, a combination of word embeddings achieved the highest f1 score. for both validation and test datasets, the best models considering f1 are a combination of twitter and wikipedia for the ner task and a combination of all three models for the classification task. we consider this to be explainable by the characteristic of social media messages where people do not necessarily restrict their language to in-domain vocabulary (in this case health related) but rather mix in-domain messages with out-of-domain messages or even combine in the same message sentences from multiple domains.