Style Locality for Controllable Generation with kNN Language Models

Recent language models have been improved by the addition of external memory. Nearest neighbor language models retrieve similar contexts to assist in word prediction. The addition of locality levels allows a model to learn how to weight neighbors based on their relative location to the current text in source documents, and have been shown to further improve model performance. Nearest neighbor models have been explored for controllable generation but have not examined the use of locality levels. We present a novel approach for this purpose and evaluate it using automatic and human evaluation on politeness, formality, supportiveness, and toxicity textual data. We find that our model is successfully able to control style and provides a better fluency-style trade-off than previous work.

  • Published in:
    arXiv
  • Type:
    Article
  • Authors:
    Nawezi, Gilles; Flek, Lucie; Welch, Charlie
  • Year:
    2023

Citation information

Nawezi, Gilles; Flek, Lucie; Welch, Charlie: Style Locality for Controllable Generation with kNN Language Models, arXiv, 2023, https://arxiv.org/abs/2311.00475, Nawezi.etal.2023a,

Associated Lamarr Researchers

Prof. Dr. Lucie Flek

Prof. Dr. Lucie Flek

Area Chair NLP to the profile