ChatPaper.aiChatPaper

LLM2Vec-Gen: Incrustaciones Generativas a partir de Modelos de Lenguaje Grandes

LLM2Vec-Gen: Generative Embeddings from Large Language Models

March 11, 2026
Autores: Parishad BehnamGhader, Vaibhav Adlakha, Fabian David Schmidt, Nicolas Chapados, Marius Mosbach, Siva Reddy
cs.AI

Resumen

Los codificadores de texto basados en LLM típicamente codifican el contenido semántico de su entrada. Sin embargo, las tareas de incrustación requieren mapear entradas diversas a salidas similares. Normalmente, esta relación entrada-salida se aborda entrenando modelos de incrustación con datos emparejados mediante aprendizaje contrastivo. En este trabajo, proponemos un nuevo enfoque auto-supervisado, LLM2Vec-Gen, que adopta un paradigma diferente: en lugar de codificar la entrada, aprendemos a representar la respuesta potencial del modelo. Específicamente, añadimos tokens especiales entrenables al vocabulario del LLM, los adjuntamos a la entrada y los optimizamos para representar la respuesta del LLM en una secuencia de longitud fija. El entrenamiento se guía por la propia finalización del LLM para la consulta, junto con un profesor de incrustación no supervisado que proporciona objetivos de destilación. Esta formulación ayuda a salvar la brecha entrada-salida y transfiere capacidades del LLM, como la alineación de seguridad y el razonamiento, a las tareas de incrustación. Crucialmente, el backbone del LLM permanece congelado y el entrenamiento requiere solo consultas no etiquetadas. LLM2Vec-Gen logra un rendimiento auto-supervisado de vanguardia en el Massive Text Embedding Benchmark (MTEB), mejorando en un 9.3% sobre el mejor profesor de incrustación no supervisado. También observamos hasta un 43.2% de reducción en la recuperación de contenido dañino y una mejora del 29.3% en las capacidades de razonamiento para tareas de incrustación. Finalmente, las incrustaciones aprendidas son interpretables y pueden decodificarse en texto para revelar su contenido semántico.
English
LLM-based text embedders typically encode the semantic content of their input. However, embedding tasks require mapping diverse inputs to similar outputs. Typically, this input-output is addressed by training embedding models with paired data using contrastive learning. In this work, we propose a novel self-supervised approach, LLM2Vec-Gen, which adopts a different paradigm: rather than encoding the input, we learn to represent the model's potential response. Specifically, we add trainable special tokens to the LLM's vocabulary, append them to input, and optimize them to represent the LLM's response in a fixed-length sequence. Training is guided by the LLM's own completion for the query, along with an unsupervised embedding teacher that provides distillation targets. This formulation helps to bridge the input-output gap and transfers LLM capabilities such as safety alignment and reasoning to embedding tasks. Crucially, the LLM backbone remains frozen and training requires only unlabeled queries. LLM2Vec-Gen achieves state-of-the-art self-supervised performance on the Massive Text Embedding Benchmark (MTEB), improving by 9.3% over the best unsupervised embedding teacher. We also observe up to 43.2% reduction in harmful content retrieval and 29.3% improvement in reasoning capabilities for embedding tasks. Finally, the learned embeddings are interpretable and can be decoded into text to reveal their semantic content.
PDF211March 13, 2026