TRANSMISSION // 2611.41554v1

Why sentence embeddings may favor encoders trained from scratch

Source published

A controlled comparison suggests decoder-based sentence embeddings gain much of their strength from pre-training, not an inherent architectural edge.

AI-generated conceptual illustration for Why sentence embeddings may favor encoders trained from scratch
AI-generated conceptual illustration; not documentary evidence.

Decoder-based language models have become powerful tools for turning sentences into vectors used in search and other language tasks. But is the decoder architecture itself better for this job—or does it benefit from having absorbed far more text before adaptation? A new preprint compares matched models to help separate those explanations.

Sentence embeddings turn text into vectors so a computer can compare meanings quickly. They help power tasks such as finding relevant documents, grouping similar texts and retrieving evidence for AI systems. Encoder models have traditionally been built for this purpose, while more recent approaches adapt large decoder-based language models. Those adapted decoders often perform strongly, but their architecture and extensive pre-training have usually arrived as a package deal.

A study by Tatsuki Okada and colleagues asks a simple question: when the comparison is more controlled, does a decoder still have an advantage? The authors report that the key difference is not necessarily the model family. Much of the apparent edge, they argue, comes from knowledge acquired during large-scale pre-training.

Comparing models on more equal terms

The researchers trained encoder and decoder models from scratch, then adapted them to produce sentence embeddings using the same two-stage contrastive-learning recipe. In this approach, models learn to place related sentences near each other in vector space and less-related examples farther apart.

The main comparisons matched models on parameter count, tokenizer, training data and training procedures. They covered Japanese and English, with models at 0.5 billion and 1 billion parameters. The scratch-trained models received pre-training budgets of about 10 billion or 20 billion tokens, depending on size. The researchers also adapted already pre-trained decoders—models that had seen far more text—using the same sentence-embedding training procedure.

Performance was tested on Japanese and English benchmark tasks spanning retrieval, semantic similarity, classification, reranking and clustering. The paper also measured encoding speed and memory use, and tested language abilities such as sentence similarity, inference, commonsense reasoning and extractive question answering.

What the comparisons showed

Across the main settings, randomly initialized encoders scored higher on average than randomly initialized decoders after the same sentence-embedding training. The trend also held in additional tests using different decoder designs. In one English 0.5B comparison, the encoder remained ahead at several different pre-training budgets, though the gap narrowed as the models received more training.

The story changed when the researchers started with a pre-trained decoder. After adaptation, these models achieved the highest overall benchmark averages in the main comparisons. The authors report that the gain was not explained by training volume alone: a model pre-trained on roughly 100 billion tokens performed comparably to one pre-trained on roughly 18 trillion tokens. That comparison suggests that other differences, including the composition or quality of the pre-training data, may matter too. It does not identify which of those factors is responsible.

On the Japanese retrieval task for the 0.5B models, the scratch-trained encoder outperformed a decoder adapted from a model pre-trained on roughly 10 trillion tokens. That result is a useful reminder that an overall average does not settle every practical choice: performance depends on the task and evaluation setting.

The authors also found that sentence-level abilities—such as semantic similarity, inference and commonsense reasoning—tracked embedding performance more closely than extractive question answering, which involves locating answer spans in text. This is an observed association, not proof that improving those abilities will cause better embeddings.

In speed tests on Japanese models using an A100 GPU, the encoder processed more texts per second than the matched scratch-trained decoder at the tested sequence lengths. With the decoder’s key-value cache disabled, peak memory use was similar in those comparisons. The speed advantage should be read in context: the researchers note that the encoder’s local-attention design may favor it in these tests, and the measurements concern particular implementations and hardware.

What the study can—and cannot—settle

The results support a practical, limited conclusion: if training from scratch under conditions like these, an encoder is a strong choice; if a suitable pre-trained decoder is already available, adapting it can yield high-performing embeddings without repeating language-model pre-training. They do not show that encoders are always better, or that every pre-trained decoder will work well for every task.

The study covers two languages and models up to 1 billion parameters, not the full range of languages, architectures, model sizes or embedding methods. Although the comparisons carefully match many factors, encoder and decoder designs and their training objectives still differ in ways the study cannot fully separate. The benchmark results also depend on the selected datasets and training recipe.

This article is based on the authors’ arXiv preprint, which is a research manuscript made publicly available before journal publication. Its findings should be treated as evidence from one study, not as a settled rule for all embedding systems. The authors have released model checkpoints and code, which may help others test how broadly the conclusions hold.

Automatically matched by shared topic keywords. These links do not imply that the sources agree or establish a consensus.