Modeling the Evolution of Word Senses with Force-Directed Layouts of Co-occurrence Networks (2021)

Abstract: Languages evolve over time and the meaning of words can shift. Furthermore, individual words can have multiple senses. However, existing language models often only reflect one word sense per word and do not reflect semantic changes over time. While there are language models that can either model semantic change of words or multiple word senses, none of them cover both aspects simultaneously. We propose a novel force-directed graph layout algorithm to draw a network of frequently co-occurring words. In this way, we are able to use the drawn graph to visualize the evolution of word senses. In addition, we hope that jointly modeling semantic change and multiple senses of words results in improvements for the individual tasks.

## introduction language is dynamic and constantly evolving which leads to changes in the context in which individual words are used and thereby shifting the meaning of words over time. in addition to this semantic change, novel words are introduced or existing words get additional meanings. on the other hand, certain old word meanings can also disappear from active usage in a language. this results in multiple word senses per word which in turn can change or shift their meaning over time. current language models typically do not reflect the dynamic and multi-sense aspect of words. there are approaches which tackle one of the aspects, for example, multiple senses @xcite or semantic change @xcite . static word embeddings, such as word2vec @xcite , can only reflect the prevalent meaning a the word as it appears in the training data. contextualized word embeddings, such as bert @xcite , circumvent this issue by including the surrounding words for each usage of the word. however, by using this approach, the representation of a word has to be computed for each time it appears. furthermore, these models cannot inherently tell which or even how many different senses a word has or how it changed over time. the boundary between a new word sense and a shift in meaning is blurred. to illustrate this, consider the term "rock". it has various meanings, e.g., in the context of geology: stone and in the context of music: genre. but those individual meanings are not static. rock music in the 1960's is a lot different compared to rock in the 1990's, for example. nevertheless, in this case we would argue that the meaning has evolved -the context of usage has changed, and not that there was a new sense added. the problem naturally decomposes into two parts: identifying a sense for a given word in context and tracking the shift in meaning over time. in this work, we propose a novel data-driven approach that can reflect multiple senses of words as well as how word senses change by jointly modeling different senses over time. we deliberately refrain from defining the senses of a word to be able to also model subtle nuances of different contexts and word usage. to do so, we define a special forcedirected graph layout algorithm to align networks of frequently co-occurring words. by modeling words as nodes and connecting co-occurring words via edges, we create a web of language (dorogovtsev and mendes, 2001). the algorithm explicitly models multiple word senses by dividing the input data into time slices and duplicating nodes to accommodate changing co-occurrence frequencies. the resulting network layout allows for easy interaction and can be easily explained and understood. this is in contrast to complex embedding models, which function as a black box and are hard to understand intuitively. with this approach, we model the problems of word sense induction and evolution as a kind of community detection task within a graph. but instead of defining a clustering over the nodes, we propose to visualize the relatedness of words using a force-directed graph layout approach. ## related work modeling language as a graph has a long tradition @xcite @xcite . we propose to employ word cooccurrence graphs to jointly solve the problems of multiple senses and diachrony. accordingly, related work can be split into word sense disambiguation, word sense evolution, and approaches that combine both tasks. current state-of-the-art models to represent words make use of embeddings. contextualized word embeddings, such bert, account for different word senses by computing individual vectors for a word based on its context. classical, static word embeddings, such as word2vec, use a single vector to represent an individual word. this is problematic because they fail to capture polysemy. @xcite presented a multi-prototype vector-space model (vsm). the meaning of a word is represented as a set of sense specific vectors. based on that, @xcite developed a neural network architecture that learns multiple word embeddings per word. however, both of these approaches use a fixed number of clusters, even though different words might have a different number of senses. @xcite use a model based on latent dirichlet allocation (lda) to solve the word sense induction (wsi) problem. while this approach uses a fixed number of senses across all words, @xcite combine lda with a varying number of senses per word. however, this approach requires prior knowledge of the number of senses per word. hierarchical dirichlet process (hdp), an extension of lda, can learn the number of topics (or senses in this case) from the data automatically. besides the work on detecting word senses, there is also a plethora of work on diachronic modeling of word senses. @xcite separated a text corpus into multiple time slices and trained a model on each time slice to get different word embedding models over time. diachronic word embeddings were investigated by aligning embeddings trained on consecutive time slices @xcite . @xcite developed the concept of dynamic word embeddings. each document has a timestamp. this allows the word embeddings to change over time. unlike previous approaches, a single model is used to derive the shifts of word embeddings over time. one advantage of such an approach is that the complete training data can be used for one single model. while these papers focus on shifts of words over time, they do not discover if a word has multiple senses. @xcite use a network to model the co-occurrence of terms in documents. terms that are co-occurring together are connected by an edge. topics are discovered by finding edges of frequently co-occurring terms. for each document, the publication time is stored which allows filtering the results by a given time span. @xcite use a layout with multiple vertical line segments to visualize the trends of topics over time. each vertical line segment corresponds to a time slice. for each time slice, the topic distribution is calculated. common terms of the underlying topics are grouped together and plotted on the vertical line segments. this visualization shows how different topics split up or converge over time. very recently, semeval-2020 @xcite ) featured a task for unsupervised lexical semantic change detection, which has led to a plethora of diachronic approaches. @xcite use co-occurrence networks to find changes in word senses over time. they distinguish between four different types of the evolution of language senses: the birth of new sense; splits of a sense; joins of senses; death of senses. candidate nodes for splits are computed with a distributed thesaurus. for each candidate node, a clustering algorithm is run on the neighborhood graph. each cluster represents a sense of the term associated with the candidate node. as shown by @xcite however, matching clusters across more than two or three time slices causes problems such as sense shifting when matching partially overlapping clusters. @xcite use deep contextualized embeddings to track the senses of words over time. for each word, the distribution of the senses is calculated on a temporal slice of the corpus. over time, these distributions show which senses gain or loose importance. while this approach tracks the senses over time, it does not discover them. instead, the senses are extracted from the oxford dictionary. ## force-direct graph layout algorithm in this section we describe our force-directed graph layout algorithm for a network of co-occurring words. in this network, each node corresponds to a word in the vocabulary. we first split the corpus in to disjunct sets of documents based on their publication date to create partial corpora across time. for each set, we compute a network of frequently co-occurring words, where the weighted edges represent the frequency of how often words appear in the same context. in our preliminary experiments, we saw promising results by limiting the vocabulary to nouns and using sentences as context windows. in future work, we intend to compare the raw co-occurrence frequencies to more sophisticated measures, such as pointwise mutual information (pmi). we call the sub-networks for individual time periods period graphs and edges within each period graph intra-edges. we connect nodes representing identical words in neighboring period graphs with inter-edges. all edges are undirected. force-directed layout. our layout algorithm is inspired by traditional force-directed algorithms. attractive and repulsive forces are applied on nodes based on their edges and on their proximity to other nodes on a two-dimensional canvas. during the layout process, the positions are iteratively updated to minimize the aggregated forces. traditionally, nodes are allowed to move freely in both dimensions. we restrict this layout as follows. we assign each period graph to equidistant vertically aligned parallel axes, which are ordered from left to right according to their time period. nodes of each period graph are only allowed to move along their respective axis similar to arc diagrams @xcite . all other concepts of traditional force-directed layout algorithms remain the same. as two nodes connected by an intra-edge move further apart on the axis of their respective layer graph, the attractive force grows. repulsive forces between nodes prevent that all nodes are clustered together. additionally, we introduce another force to reduce the angle of inter-edges. figure 1 illustrates a period graph. initially, nodes are placed randomly along the axis. as a result, some of the edge span long distances. the positions are then iteratively updated until they converge. as shown in figure 1b , connected components are clearly separated and all edge lengths are minimal. formally, we define the forces between nodes as follows. let v t be the set of nodes of the period graph for time slice t and p v the position along the vertical axis for node v. the updated position of each node in each period graph in an iteration is defined as we use k as a parameter to control the overall strength of the forces in our system. in physics, this k is a proportionality constant called coulomb's constant @xcite . the value of k is proportional to the electric permittivity of the charged particles in a vacuum. as in other force-directed tail shyness quiet mouse mammal bread cheese power computer rat duck @xcite (a) single-sense pre-layout tail shyness quiet mouse mammal bread cheese power computer rat duck @xcite (b) final layout graph layout algorithms, we use a repulsive force to prevent overlapping nodes: we limit the calculation of repulsive forces between all pairs of nodes to nodes from the same period graph. representing multiple meanings. thus far, we described a layout for a graph based on a fixed vocabulary with only one meaning for each word. to reflect multiple senses of a word, we allow the addition of duplicate nodes in a period graph. during the iterative updates of the graph layout, words with multiple senses will cause significantly more stress in the force-directed layout than others. this is due to the fact, that they are associated with different domains, which are likely located far from one another. we use this to our advantage to discover ambiguous words. first, we run the layout algorithm as described above until it converges. we call the resulting layout our initial layout. in forcebased graph drawing algorithms, some nodes induce higher forces on connected or surrounding nodes, causing significant stress in the graph. we identify such nodes duplicate them when the forces of the connecting edges exceed a certain threshold, which will be determined experimentally. let node v be such an ambiguous word, then we split it into two nodes v and v . the intra-edges that were previously incident to v are replaced by ∀@xmath0: afterwards, we add inter-edges to connect v and v to their respective nodes in the previous and following period graphs. this splitting operation can be repeated for the same word again to reflect more than two meanings. figure 2 shows an example of the layout before and after adjustment for multiple meanings of words and balancing the forces. over time, the vocabulary expands and a new meaning of the word "mouse" appears in the context of computers. note, that in the early days of computing, mice were not used as input devices yet, thus the new sense surfaces only in the last time slice. ## evaluation plan word sense detection is hard to evaluate given the lack of annotated ground truth data @xcite . general thesauri could be used but only for the period graph for the latest time slice. to our knowledge, there are no established datasets to evaluate both, the multi-sense aspect of a model, as well as the dynamic evolution of senses. thus, it is necessary to evaluate our approach with respect to both aspects individually and compare results to respective state-of-the-art approaches. evaluation of word similarities. even though our proposed algorithm focuses on word sense detection, the underlying co-occurrence network can as well be used for other analysis tasks, e.g., word similarity. the vicinity of nodes in a period graph should roughly compare to the neighborhood of vectors in word embeddings trained or fine-tuned on the same set of documents of one time slice. ## conclusion in this paper, we proposed a novel approach for a multi-sense time-sensitive word similarity model. as it is based on a force-directed graph layout of aligned co-occurrence networks, it allows direct and intuitive interpretation as opposed to most black box embedding models. in future work, we are developing the model further and plan to perform an extensive evaluation as discussed in section 4. to this end, we will compare our model to existing state-of-the-art language models for word sense disambiguation and evolution, as well as to community detection methods working on graphs.