Abstract
Tokens are fundamental processing units of generative AI (GenAI) and large language models (LLMs), and token communication (TC) is essential for enabling remote AI-generate content (AIGC) and wireless LLM applications. Unlike traditional bits, each of which is independently treated, the semantics of each token depends on its surrounding context tokens. This inter-token dependency makes TC vulnerable to outage channels, where the loss of a single token can significantly distort the original message semantics. Motivated by this, this paper focuses on optimizing token packetization to maximize the average token similarity (ATS) between the original and received token messages under outage channels. Due to inter-token dependency, this token grouping problem is combinatorial, with complexity growing exponentially with message length. To address this, we propose a novel framework of semantic packet aggregation with lookahead search (SemPA-Look), built on two core ideas. First, it introduces the residual semantic score (RSS) as a token-level surrogate for the message-level ATS, allowing robust semantic preservation even when a certain token packet is lost. Second, instead of full search, SemPA-Look applies a lookahead search-inspired algorithm that samples intra-packet token candidates without replacement (fixed depth), conditioned on inter-packet token candidates sampled with replacement (fixed width), thereby achieving linear complexity. Experiments on a remote AIGC task with the MS-COCO dataset (text captioned images) demonstrate that SemPA-Look achieves high ATS and LPIPS scores comparable to exhaustive search, while reducing computational complexity by up to 40x. Compared to other linear-complexity algorithms such as the genetic algorithm (GA), SemPA-Look achieves 10x lower complexity, demonstrating its practicality for remote AIGC and other TC applications.
Introduction
As Large Language Models (LLMs) and Generative AI move to the wireless edge, communication systems are shifting from transmitting raw bits to transmitting tokens. In traditional network protocols, all bits and packets are treated equally. However, in Token Communication (TC), tokens have deep contextual dependencies. Losing a critical token (e.g., the word "not") due to a dropped packet can completely invert or destroy the semantics of the message.
To prevent this, we need to intelligently group tokens into packets so that even if some packets are lost in an erasure channel, the surviving packets retain the core meaning of the original message. The goal is to maximize the Average Token Similarity (ATS) between the sent and received messages. However, because token similarity relies on complex neural embeddings (like CLIP) rather than simple math, finding the optimal packet grouping is an NP-hard combinatorial problem. Evaluating every possible combination requires running a heavy text encoder an exponential number of times, which is computationally infeasible for real-time systems.
Methodology: The SemPA-Look Framework
To bypass the exponential complexity of exhaustive searches or Genetic Algorithms (GA), the authors introduce SemPA-Look (Semantic Packet Aggregation with Lookahead Search), built on two core innovations:
1. Residual Semantic Score (RSS)
Instead of evaluating the semantic value of the tokens inside a packet, RSS measures the semantic similarity of the remaining message to the original if that specific packet is lost. This acts as a highly efficient, single-step surrogate metric for the overall ATS, ensuring that the most critical semantic information is not concentrated in a single vulnerable packet.
2. Lookahead Search
A simple greedy algorithm might group all the most important tokens into a single packet, which is catastrophic if that specific packet is dropped. To avoid this, SemPA-Look uses a step-by-step lookahead approach. When evaluating a candidate packet, it "looks ahead" by randomly sampling future packets from the leftover tokens. It scores the current packet based on how well the entire predicted sequence will survive potential losses, ensuring risk is distributed evenly across the transmission.
Experimental Results and Insights
The performance of SemPA-Look was evaluated using the MS-COCO dataset for image captions and the Wiki-how dataset for longer text summaries.
Key Performance Metrics
- Linear Complexity: SemPA-Look scales linearly with message length, completely avoiding the exponential explosion of Full Search or Genetic Algorithms.
- Massive Speedups: The proposed method achieves up to 40x lower computational complexity than Full Search and 10x lower than GA. For example, at a specific population size, GA required 2,600 text encoding steps, while SemPA-Look required only 260.
- Near-Optimal Fidelity: Despite the massive reduction in compute, SemPA-Look attains ATS scores nearly identical to the optimal Full Search across various packet erasure probabilities.
Qualitative Impact on AIGC
In a Stable Diffusion text-to-image task under a 30% packet loss rate, SemPA-Look successfully preserved core semantics. For the prompt "dog that quickly runs beyond the tall fence", SemPA-Look's reconstruction generated an image of a dog jumping an obstacle. In contrast, random packetization often lost the subject entirely, significantly degrading the generated content's relevance. SemPA-Look also achieved highly competitive LPIPS (perceptual similarity) scores, confirming its effectiveness for downstream AI tasks.
Conclusion
SemPA-Look addresses the critical need for robust token communication in the era of Generative AI. By leveraging the Residual Semantic Score and lookahead search, it provides a computationally efficient way to protect message semantics against network outages. While challenges remain—particularly the inherent vulnerability of subword tokenization—this work paves the way for efficient, multi-modal semantic communication in future wireless systems.
Summary updated