Abstract
This study addresses the problem of identifying the meaning of unknown words or entities in a discourse with respect to the word embedding approaches used in neural language models. We proposed a method for on-the-fly construction and exploitation of word embeddings in both the input and output layers of a neural model by tracking contexts. This extends the dynamic entity representation used in Kobayashi et al. (2016) and incorporates a copy mechanism proposed independently by Gu et al. (2016) and Gulcehre et al. (2016). In addition, we construct a new task and dataset called Anonymized Language Modeling for evaluating the ability to capture word meanings while reading. Experiments conducted using our novel dataset show that the proposed variant of RNN language model outperformed the baseline model. Furthermore, the experiments also demonstrate that dynamic updates of an output layer help a model predict reappearing entities, whereas those of an input layer are effective to predict words following reappearing entities.
Introduction
Standard neural language models often struggle with unknown words, typically relegating them to a generic <unk> category. This approach leads to an "identity crisis," where distinct entities are treated as identical, and a "context gap," where static embeddings fail to capture document-specific nuances. This paper introduces the Dynamic Neural Text Model, which addresses these issues by building and updating word embeddings on-the-fly based on local discourse context.
Methodology
The proposed model constructs unique representations for unknown entities as it processes a text. When an entity appears, a bidirectional RNN "ContextEncoder" generates a context vector from its immediate surroundings.
Dual-Layer Updates and Merging
As an entity recurs, the model merges new context vectors with previous ones using a Gated Recurrent Unit (GRU). A key innovation is the simultaneous update of two layers:
- Input Layer ($x$): Helps the model understand the entity's meaning to better predict subsequent words.
- Output Layer ($y$): Acts as a copy mechanism, improving the prediction of the entity's future occurrences.
Anonymized Language Modeling (ALM)
To evaluate the model's ability to capture meaning from context, the authors introduced the ALM task. Using the OntoNotes corpus, they replaced specific noun phrases with anonymous identifiers (e.g., [ 1 ], [ 2 ]). This forces the model to rely entirely on discourse context rather than pre-existing lexical knowledge.
Results and Key Insights
The Dynamic Neural Text Model achieved a perplexity of 60.7, significantly outperforming the standard LSTM baseline (64.8). The experiments revealed a functional "division of labor": updating the output layer is crucial for predicting entity reappearance, while updating the input layer allows the model to predict words following an entity (e.g., predicting "played" after "pianist").
As illustrated in Figure 4, the model's performance advantage increases as it encounters more instances of an entity, demonstrating its ability to accumulate and refine meaning through "one-shot learning" within a single document.
Discussion
While the current focus is on nouns and entities, which comprise the majority of unknown words, future work could extend this approach to other parts of speech. Additionally, the authors suggest exploring more efficient computational methods for on-the-fly embedding construction and integrating subword-level information to further enhance entity representations.
Summary updated