[Paper Review] Reference-Aware Language Models
This paper introduces reference-aware language models that treat reference decisions as discrete stochastic latent variables, enabling dynamic, context-sensitive generation of referring expressions (e.g., pronouns, named entities, database entries). By modeling reference as a latent choice over external lists, databases, or internal state, the framework outperforms deterministic attention and standard language modeling baselines in recipe generation, task-oriented dialogue, and coreference modeling, with significant gains in perplexity and zero-shot generalization to unseen table entries.
We propose a general class of language models that treat reference as an explicit stochastic latent variable. This architecture allows models to create mentions of entities and their attributes by accessing external databases (required by, e.g., dialogue generation and recipe generation) and internal state (required by, e.g. language models which are aware of coreference). This facilitates the incorporation of information that can be accessed in predictable locations in databases or discourse context, even when the targets of the reference may be rare words. Experiments on three tasks shows our model variants based on deterministic attention.
Motivation & Objective
- To address the limitation of existing language models in explicitly modeling referring expressions (e.g., pronouns, named entities) as dynamic decisions rather than static tokens.
- To enable models to choose not only what to generate but also from where—external databases, ingredient lists, or prior discourse—using stochastic latent variables.
- To improve performance in applications requiring coreference resolution, list referencing, and database interaction by modeling reference decisions explicitly.
- To demonstrate that treating reference as a latent variable enables better generalization, especially for rare or unseen table entries in dialogue and recipe generation.
Proposed method
- The model introduces a latent variable $ z_i $ at each token position to represent the decision of whether and from where to generate a referring expression.
- The conditional probability $ p(x_i | c_i) $ is computed as a marginal over $ z_i $, with $ p(x_i | z_i, c_i) $ modeling the generation from a source (e.g., list, database, or prior tokens), and $ p(z_i | c_i) $ modeling the choice of source.
- For unobserved $ z_i $, the model marginalizes over all possible referents during training, treating reference decisions as latent variables to enable end-to-end learning.
- The framework supports three settings: reference to static lists (e.g., ingredients), reference to external databases (e.g., restaurant attributes), and coreference resolution within a document (e.g., pronouns).
- The model uses a mixture-of-experts approach where different generation modes (copying, transforming, generating) are conditioned on the latent reference decision.
- The model is trained via maximum likelihood on the marginal likelihood $ p(x_i | c_i) = \sum_{z_i} p(x_i | z_i, c_i) p(z_i | c_i) $, allowing it to learn when to copy and when to generate from vocabulary.
Experimental results
Research questions
- RQ1Can modeling reference decisions as stochastic latent variables improve language model performance in tasks requiring dynamic referencing?
- RQ2Does treating reference as a latent choice lead to better generalization on unseen or rare referents, such as new database entries?
- RQ3How does explicit modeling of reference compare to attention-based mechanisms in terms of perplexity and generation quality?
- RQ4Can the model learn to vary referring expression forms (e.g., 'Jane' vs. 'she') based on context, beyond simple copying?
Key findings
- The reference-aware model with latent reference decisions achieved lower perplexity than standard language models and models using deterministic attention, especially on entity and table-specific tokens.
- In coreference-based language modeling, the model with latent reference decisions reduced entity perplexity from 44.52 (LM) to 28.56 (Pointer + init), demonstrating improved coreference handling.
- The Table Pointer model (explicit reference to database cells) achieved the lowest perplexity on table tokens (32.62) and significantly outperformed models without explicit reference, especially on unseen table entries.
- The model with latent reference decisions generalized better to rare or unseen table entries, as shown by lower perplexity on test-only table tokens compared to models without explicit reference modeling.
- Initialization of the pointer model with pre-trained language model weights improved performance on both entity and non-entity words, suggesting effective weight transfer between the two components.
- Visualization of attention heatmaps confirmed that the model correctly learned to select relevant referents based on context, such as ingredient lists or database entries.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.