Hostname: page-component-74656f9884-rdgjk Total loading time: 0 Render date: 2026-11-07T02:44:07.008Z Has data issue: false hasContentIssue false

Imparting interpretability to word embeddings while preserving semantic structure

Published online by Cambridge University Press:  09 June 2020

Lütfi Kerem Şenel
Affiliation:
Center for Information and Language Processing (CIS), Ludwig Maximilian University (LMU), Munich, Germany
İhsan Utlu
Affiliation:
Electrical and Electronics Engineering Department, Bilkent University, Ankara, Turkey ASELSAN Research Center, Ankara, Turkey
Furkan Şahinuç
Affiliation:
Electrical and Electronics Engineering Department, Bilkent University, Ankara, Turkey ASELSAN Research Center, Ankara, Turkey
Haldun M. Ozaktas
Affiliation:
Electrical and Electronics Engineering Department, Bilkent University, Ankara, Turkey
Aykut Koç*
Affiliation:
Electrical and Electronics Engineering Department, Bilkent University, Ankara, Turkey National Magnetic Resonance Research Center (UMRAM), Bilkent University, Ankara, Turkey
*
*Corresponding author. Email: aykut.koc@bilkent.edu.tr
Rights & Permissions [Opens in a new window]

Abstract

As a ubiquitous method in natural language processing, word embeddings are extensively employed to map semantic properties of words into a dense vector representation. They capture semantic and syntactic relations among words, but the vectors corresponding to the words are only meaningful relative to each other. Neither the vector nor its dimensions have any absolute, interpretable meaning. We introduce an additive modification to the objective function of the embedding learning algorithm that encourages the embedding vectors of words that are semantically related to a predefined concept to take larger values along a specified dimension, while leaving the original semantic learning mechanism mostly unaffected. In other words, we align words that are already determined to be related, along predefined concepts. Therefore, we impart interpretability to the word embedding by assigning meaning to its vector dimensions. The predefined concepts are derived from an external lexical resource, which in this paper is chosen as Roget’s Thesaurus. We observe that alignment along the chosen concepts is not limited to words in the thesaurus and extends to other related words as well. We quantify the extent of interpretability and assignment of meaning from our experimental results. Manual human evaluation results have also been presented to further verify that the proposed method increases interpretability. We also demonstrate the preservation of semantic coherence of the resulting vector space using word-analogy/word-similarity tests and a downstream task. These tests show that the interpretability-imparted word embeddings that are obtained by the proposed framework do not sacrifice performances in common benchmark tests.

Information

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

Figure 1. Function g in the additional cost term.

Figure 1

Table 1. Sample concepts and their associated word groups from Roget’s Thesaurus

Figure 2

Algorithm 1 Algorithm for extracting concept word groups

Figure 3

Table 2. GloVe parameters

Figure 4

Figure 2. Most frequent 1000 words sorted according to their values in the 32nd dimension of the original GloVe embedding are shown with “$\bullet$” markers. “$\circ$” and “$+$” markers show the values of the same words for the 32nd dimension of the embedding obtained with the proposed method where the dimension is aligned with the concept JUDGMENT. Words with “$\circ$” markers are contained in the concept JUDGMENT while words with “$+$” markers are not contained.

Figure 5

Table 3 Words with largest dimension values for the proposed algorithm

Figure 6

Table 4. Words with largest dimension values for the proposed algorithm—less satisfactory examples

Figure 7

Figure 3. Interpretability scores averaged over 300 dimensions for the original GloVe method, the proposed method, and five alternative methods along with a randomly generated baseline embedding for $\lambda = 5$.

Figure 8

Table 5. Word intrusion test results: correct answers out of 300 questions

Figure 9

Table 6. Correlations for word-similarity tests

Figure 10

Table 7. Precision scores for the analogy test

Figure 11

Table 8. Precision scores for the semantic analogy test

Figure 12

Table 9. Accuracies (%) for sentiment classification task

Figure 13

Table 10. Comparisons against Random Token Projection/Roget Center Projection baselines

Figure 14

Figure 4. Effect of the weighting parameter k is tested using interpretability (top left, $n_{min}=5$ and $\lambda=5$), word-analogy (top right) and word-similarity (bottom) tests for $k \in [0.02-0.4]$.

Figure 15

Table 11. Effect of embedding dimension to the imparting performance

Figure 16

Figure 5. Interpretability scores averaged over 300 dimensions for the proposed method for different forms of function g(x).