Saved in:
Bibliographic Details
Main Authors: Zhmoginov, Andrey, Lee, Jihwan, Vladymyrov, Max, Sandler, Mark
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2506.05672
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910991758917632
author Zhmoginov, Andrey
Lee, Jihwan
Vladymyrov, Max
Sandler, Mark
author_facet Zhmoginov, Andrey
Lee, Jihwan
Vladymyrov, Max
Sandler, Mark
contents Large Language Models (LLMs) based on Transformers excel at text processing, but their reliance on prompts for specialized behavior introduces computational overhead. We propose a modification to a Transformer architecture that eliminates the need for explicit prompts by learning to encode context into the model's weights. Our Contextually Guided Transformer (CGT) model maintains a contextual summary at each sequence position, allowing it to update the weights on the fly based on the preceding context. This approach enables the model to self-specialize, effectively creating a tailored model for processing information following a given prefix. We demonstrate the effectiveness of our method on synthetic in-context learning tasks and language modeling benchmarks. Furthermore, we introduce techniques for enhancing the interpretability of the learned contextual representations, drawing connections to Variational Autoencoders and promoting smoother, more consistent context encoding. This work offers a novel direction for efficient and adaptable language modeling by integrating context directly into the model's architecture.
format Preprint
id arxiv_https___arxiv_org_abs_2506_05672
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Contextually Guided Transformers via Low-Rank Adaptation
Zhmoginov, Andrey
Lee, Jihwan
Vladymyrov, Max
Sandler, Mark
Machine Learning
Computation and Language
Large Language Models (LLMs) based on Transformers excel at text processing, but their reliance on prompts for specialized behavior introduces computational overhead. We propose a modification to a Transformer architecture that eliminates the need for explicit prompts by learning to encode context into the model's weights. Our Contextually Guided Transformer (CGT) model maintains a contextual summary at each sequence position, allowing it to update the weights on the fly based on the preceding context. This approach enables the model to self-specialize, effectively creating a tailored model for processing information following a given prefix. We demonstrate the effectiveness of our method on synthetic in-context learning tasks and language modeling benchmarks. Furthermore, we introduce techniques for enhancing the interpretability of the learned contextual representations, drawing connections to Variational Autoencoders and promoting smoother, more consistent context encoding. This work offers a novel direction for efficient and adaptable language modeling by integrating context directly into the model's architecture.
title Contextually Guided Transformers via Low-Rank Adaptation
topic Machine Learning
Computation and Language
url https://arxiv.org/abs/2506.05672