Compressing Sequences in the Latent Embedding Space: K-Token Merging for Large Language Models

Zihao Xu, John Harvill, Ziwei Fan, Yizhou Sun, Hao Ding, Hao Wang


Abstract
Large Language Models (LLMs) incur significant computational and memory costs when processing long prompts, as full self-attention scales quadratically with input length. Token compression aims to address this challenge by reducing the number of tokens representing inputs. However, existing prompt-compression approaches primarily operate in token space and overlook inefficiencies in the latent embedding space. In this paper, we propose K-Token Merging, a latent-space compression framework that merges each contiguous block of token embeddings into a single embedding via a lightweight encoder. The compressed sequence is processed by a LoRA-adapted LLM, while generation remains in the original vocabulary. Experiments on structural reasoning (Textualized Tree), sentiment classification (Amazon Reviews), and code editing (CommitPackFT) show that K-Token Merging lies on the Pareto frontier of performance vs. compression, achieving up to 75% input length reduction with minimal performance degradation.
Anthology ID:
2026.emnlp-main.19
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
419–429
Language:
URL:
https://aclanthology.org/2026.emnlp-main.19/
DOI:
Bibkey:
Cite (ACL):
Zihao Xu, John Harvill, Ziwei Fan, Yizhou Sun, Hao Ding, and Hao Wang. 2026. Compressing Sequences in the Latent Embedding Space: K-Token Merging for Large Language Models. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 419–429, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
Compressing Sequences in the Latent Embedding Space: K-Token Merging for Large Language Models (Xu et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.19.pdf