我们介绍 semantic-features,这是一个基于 Chronis 等人(2023)的可扩展、易于使用的库,用于通过将语言模型(LMs)的上下文化词嵌入投影到可解释空间来研究这些嵌入。我们在一项实验中应用该工具,测量与格构式选择(介词式或双宾语式)对话语语义解释的语境影响(Bresnan,2007)。具体而言,我们检验与“I sent the letter to London.”相比,“I sent London the letter.”中的“London”是否更可能被解释为有生命的指称对象(例如作为人名)。为此,我们设计了一个包含450个句子对的数据集,每对分别采用一种与格构式,其中接收者在“人”与“地点”属性上存在歧义。通过应用 semantic-features,我们表明三个掩码语言模型的上下文化词嵌入表现出预期的敏感性。这使我们对该工具的实用性感到乐观。
英文摘要:
We introduce semantic-features, an extensible, easy-to-use library based on Chronis et al. (2023) for studying contextualized word embeddings of LMs by projecting them into interpretable spaces. We apply this tool in an experiment where we measure the contextual effect of the choice of dative construction (prepositional or double object) on the semantic interpretation of utterances (Bresnan, 2007). Specifically, we test whether "London" in "I sent London the letter." is more likely to be interpreted as an animate referent (e.g., as the name of a person) than in "I sent the letter to London." To this end, we devise a dataset of 450 sentence pairs, one in each dative construction, with recipients being ambiguous with respect to person-hood vs. place-hood. By applying semantic-features, we show that the contextualized word embeddings of three masked language models show the expected sensitivities. This leaves us optimistic about the usefulness of our tool.
Does BERT Make Any Sense? Interpretable Word Sense Disambiguation with Contextualized Embeddings
Indian Institute of Technology (BHU)(印度理工学院(瓦拉纳西))
诸如由ELMo提供的上下文化词嵌入(CWE)(Peters等人,2018),Flair NLP(Akbik et al.,2018)或BERT(Devlin et al.,2019)是NLP最近的一项重大创新。CWE根据其各自的上下文提供单词的语义向量表示。它们相对于静态词嵌入的优势已经在许多任务中表现出来,例如文本分类、序列标记或机器翻译。由于相同词类型的向量可以根据相应的上下文而变化,因此它们隐含地提供了词义消歧(WSD)的模型。我们介绍了一个简单而有效的方法,WSD使用最近邻分类CWE。我们比较了不同CWE模型的性能,并报告了两个标准WSD基准数据集的改进情况。我们进一步表明,预训练的BERT模型能够将多义词放置到嵌入空间的不同“意义”区域中,而ELMo和Flair NLP似乎不具备这种能力。