Word Embeddings Are Steers for Language Models
- URL: http://arxiv.org/abs/2305.12798v2
- Date: Thu, 6 Jun 2024 06:07:27 GMT
- Title: Word Embeddings Are Steers for Language Models
- Authors: Chi Han, Jialiang Xu, Manling Li, Yi Fung, Chenkai Sun, Nan Jiang, Tarek Abdelzaher, Heng Ji,
- Abstract summary: We name such steers LM-Steers and find them existing in LMs of all sizes.
On tasks such as language model detoxification and sentiment control, LM-Steers can achieve comparable or superior performance.
An LM-Steer is transferrable between different language models by an explicit form calculation.
- Score: 57.83026781380927
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Language models (LMs) automatically learn word embeddings during pre-training on language corpora. Although word embeddings are usually interpreted as feature vectors for individual words, their roles in language model generation remain underexplored. In this work, we theoretically and empirically revisit output word embeddings and find that their linear transformations are equivalent to steering language model generation styles. We name such steers LM-Steers and find them existing in LMs of all sizes. It requires learning parameters equal to 0.2% of the original LMs' size for steering each style. On tasks such as language model detoxification and sentiment control, LM-Steers can achieve comparable or superior performance compared with state-of-the-art controlled generation methods while maintaining a better balance with generation quality. The learned LM-Steer serves as a lens in text styles: it reveals that word embeddings are interpretable when associated with language model generations and can highlight text spans that most indicate the style differences. An LM-Steer is transferrable between different language models by an explicit form calculation. One can also continuously steer LMs simply by scaling the LM-Steer or compose multiple LM-Steers by adding their transformations. Our codes are publicly available at \url{https://github.com/Glaciohound/LM-Steer}.
Related papers
- What Languages are Easy to Language-Model? A Perspective from Learning Probabilistic Regular Languages [78.1866280652834]
Large language models (LM) are distributions over strings.
We investigate the learnability of regular LMs (RLMs) by RNN and Transformer LMs.
We find that the complexity of the RLM rank is strong and significant predictors of learnability for both RNNs and Transformers.
arXiv Detail & Related papers (2024-06-06T17:34:24Z) - Backward Lens: Projecting Language Model Gradients into the Vocabulary
Space [94.85922991881242]
We show that a gradient matrix can be cast as a low-rank linear combination of its forward and backward passes' inputs.
We then develop methods to project these gradients into vocabulary items and explore the mechanics of how new information is stored in the LMs' neurons.
arXiv Detail & Related papers (2024-02-20T09:57:08Z) - Exploring In-Context Learning of Textless Speech Language Model for Speech Classification Tasks [98.5311231450689]
In-context learning (ICL) has played an essential role in utilizing large language models (LLMs)
This study is the first work exploring ICL for speech classification tasks with textless speech LM.
arXiv Detail & Related papers (2023-10-19T05:31:45Z) - Meta-Tuning LLMs to Leverage Lexical Knowledge for Generalizable Language Style Understanding [24.355564722047244]
We show that current large language models struggle to capture some language styles without fine-tuning.
We investigate whether LLMs can be meta-trained based on representative lexicons to recognize new styles they have not been fine-tuned on.
arXiv Detail & Related papers (2023-05-24T00:17:36Z) - Augmented Language Models: a Survey [55.965967655575454]
This survey reviews works in which language models (LMs) are augmented with reasoning skills and the ability to use tools.
We refer to them as Augmented Language Models (ALMs)
The missing token objective allows ALMs to learn to reason, use tools, and even act, while still performing standard natural language tasks.
arXiv Detail & Related papers (2023-02-15T18:25:52Z) - Language Models as Agent Models [42.37422271002712]
I argue that LMs are models of intentional communication in a specific, narrow sense.
Even in today's non-robust and error-prone models, LMs infer and use representations of fine-grained communicative intentions.
arXiv Detail & Related papers (2022-12-03T20:18:16Z) - Replacing Language Model for Style Transfer [6.364517234783756]
We introduce replacing language model (RLM), a sequence-to-sequence language modeling framework for text style transfer (TST)
Our method autoregressively replaces each token of the source sentence with a text span that has a similar meaning but in the target style.
The new span is generated via a non-autoregressive masked language model, which can better preserve the local-contextual meaning of the replaced token.
arXiv Detail & Related papers (2022-11-14T13:35:55Z) - Towards Language Modelling in the Speech Domain Using Sub-word
Linguistic Units [56.52704348773307]
We propose a novel LSTM-based generative speech LM based on linguistic units including syllables and phonemes.
With a limited dataset, orders of magnitude smaller than that required by contemporary generative models, our model closely approximates babbling speech.
We show the effect of training with auxiliary text LMs, multitask learning objectives, and auxiliary articulatory features.
arXiv Detail & Related papers (2021-10-31T22:48:30Z) - Conditioned Natural Language Generation using only Unconditioned
Language Model: An Exploration [8.623022983093444]
Transformer-based language models have shown to be very powerful for natural language generation (NLG)
We argue that the original unconditioned LM is sufficient for conditioned NLG.
We evaluated our approaches by the samples' fluency and diversity with automated and human evaluation.
arXiv Detail & Related papers (2020-11-14T17:45:11Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.