Semiparametric Token-Sequence Co-Supervision

Hyunji Lee, Doyoung Kim, Jihoon Jun, Se June Joo, Joel Jang, Kyoung-Woon On, Minjoon Seo

Abstract

In this work, we introduce a semiparametric token-sequence co-supervision training method. It trains a language model by simultaneously leveraging supervision from the traditional next token prediction loss, calculated over the parametric token embedding space, and the next sequence prediction loss, calculated over the nonparametric sequence embedding space. The nonparametric sequence embedding space is constructed by a separate language model tasked to condense an input text into a single representative embedding. Our experiments demonstrate that a model trained via both supervisions consistently surpasses models trained via each supervision independently. Analysis suggests that this co-supervision encourages a broader generalization capability across the model. Specifically, the robustness of the parametric token space established during pretraining effectively enhances the stability of the nonparametric sequence embedding space.

Introduction

Standard Large Language Models (LLMs) are primarily trained using Next-Token Prediction (NTP). While effective, this approach has two major drawbacks. First, there is a granularity gap: humans anticipate entire concepts and sequences, whereas NTP restricts a model's predictive horizon to a single token. Second, vocabulary constraints limit models to a finite, internal "parametric" vocabulary, making it difficult to effectively integrate external, "nonparametric" information during generation.

Previous attempts to address this often involve Retrieval-Augmented Generation (RAG) as a post-training patch. This paper argues that models should be trained to navigate both internal vocabulary and external sequence spaces simultaneously.

Methodology: Token-Sequence Co-Supervision

The authors propose a multi-task training objective that combines two types of supervision: Parametric (NTP) and Nonparametric (Next Sequence Prediction - NSP).

Comparison between standard Next Token Prediction (NTP) and the proposed Token-Sequence Co-Supervision (NTP + NSP) framework.

Architecture and Loss

The framework utilizes two models: a Generator (Gen) and a Sequence Embedder (Emb<sub>seq</sub>). The Sequence Embedder is an autoregressive LM tasked with condensing an entire input sequence into a single representative embedding.

Detailed architectural view of the co-supervision process, showing the interaction between the Generator and the Sequence Embedder through the $L_{NTP}$ and $L_{NSP}$ loss functions.

During training, the model receives a combined loss: $L_{co-supervision} = L_{NTP} + \lambda L_{NSP}$

The $L_{NSP}$ component uses InfoNCE contrastive learning to align the Generator's internal state with the embedding of the "correct" next sequence while pushing it away from irrelevant "negative" sequences in the same batch.

Experimental Results

The method was evaluated across 10 information-seeking datasets from the KILT and ALCE benchmarks, including Natural Questions (NQ), TriviaQA, and HotpotQA.

  • Performance Gains: Co-supervised models outperformed separate supervision baselines by an average of +14.2 points across the KILT benchmark.
  • Retrieval Accuracy: Retrieval performance (identifying the correct paragraph) saw a significant boost of +16.6.
  • Scalability: The performance gap between co-supervision and standard methods widened as the external document corpus increased from 20 to 100 documents, proving the method is robust for large-scale applications.

Key Insights

  • The Anchor Effect: The stable, pretrained parametric token space acts as an anchor for the new nonparametric space. The robustness of the original vocabulary helps the model learn more volatile sequence embeddings effectively.
  • Synergy: Models trained with co-supervision consistently outperformed those trained on NTP or NSP alone, suggesting the tasks are mutually reinforcing rather than competing.
  • Distribution Compatibility: Performance is highest when the Generator and Sequence Embedder share the same base architecture (e.g., both are Llama-2), likely due to shared underlying data distributions.

Conclusion

Semiparametric Token-Sequence Co-Supervision provides a robust framework for bridging the gap between internal model parameters and external knowledge. By treating external sequences as "extended tokens," the model achieves superior generalization and retrieval capabilities without the need for heavy cross-encoders during inference. Future work will explore extending this framework to multi-modal embedding spaces, such as images and structured knowledge graphs.

Summary updated

BibTeX
@inproceedings{lee2024semiparametric,
  author = {Hyunji Lee and Doyoung Kim and Jihoon Jun and Se June Joo and Joel Jang and Kyoung-Woon On and Minjoon Seo},
  title = {{Semiparametric Token-Sequence Co-Supervision}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=btK4sOa7ry},
}

Loading related content...

Figure