Manuscript Offprint
arXiv:2611.00697Spatial Token Interleaving and Two-Pass BP Decoding for Semantic Image Transmission
Yifan Feng, Chentao Yue, Haiyao Yu, Gaoyang Pang, Xinyu Chen, Hao Chang, Branka Vucetic, and Yonghui Li
School of Electrical and Computer Engineering, The University of Sydney, Australia
Abstract—Semantic error control coding (SECC) can correct the residual errors of a standard channel code with a foundation model that supplies a prior on the source content, but existing SECC schemes are designed for text. In this paper, we develop SECC for image transmission with spatial token interleaving and a two-pass belief propagation (BP) schedule. At the transmitter, a vector-quantized (VQ) tokenizer converts an image into tokens, which are transmitted in multiple low-density parity-check (LDPC) code blocks of fifth-generation New Radio (5G NR). In raster order, a block that BP fails to decode corrupts consecutive token rows, so the interleaver reorders the tokens such that adjacent tokens are carried by different blocks, without additional transmitted bits. At the receiver, after the first BP pass, token recovery fuses the token probabilities given by BP with the predictions of the autoregressive model Emu3-Gen, and the second BP pass decodes each block again with the fused distributions as priors on the information bits. On Kodak24 at 0.5 channel uses per pixel and a signal-to-noise ratio (SNR) of 0.15 dB, the second pass removes 92% of the token errors left by token recovery, and interleaving reduces the final token error rate by 88%. At medium to high SNR, the proposed receiver exceeds deep joint source-channel coding baselines with the same channel uses by at least 1.2 dB in peak signal-to-noise ratio.
Index Terms—Semantic error control coding, token interleaving, LDPC codes, belief propagation, autoregressive models.
I. INTRODUCTION
Token communications [1] represent an image by discrete tokens and transmit them over a wireless link [2]. A vector-quantized (VQ) tokenizer [3] divides the image into a grid of patches and represents each patch by the index of the nearest entry of a learned codebook. Unlike deep joint source-channel coding (JSCC) [4], [5], which maps an image directly to channel symbols, token communications can protect the tokens with the channel codes of existing standards [6]. The data channels of fifth-generation New Radio (5G NR) use low-density parity-check (LDPC) codes and segment a transport block longer than 8448 bits into code blocks, which are encoded and decoded separately [7]. An image usually needs more bits than one code block. With the Emu3 tokenizer [8], which represents each patch by one index, any image larger than about pixels needs more than 8448 bits.
Belief propagation (BP) decodes the code blocks separately, and near the BP threshold, it leaves residual errors in some blocks while decoding the others correctly. Semantic error control coding (SECC) [9] can correct such errors with a foundation model that supplies a prior on the source content, i.e., the probability of each source symbol given its context, while the channel code keeps its algebraic structure. Hao et al. [10] showed for text that multiple short codes with semantic correction outperform a single long code, because a decoding failure is confined to one block and the other blocks provide the context for its correction. For images, DiffCom [11] guides diffusion posterior sampling with the received signal, and text-guided token prediction reconstructs images whose tokens are protected by 5G NR polar codes [6]. Autoregressive (AR) models such as Emu3 [8] provide the prior for image tokens as the probability of each codebook index given the preceding tokens.
The SECC schemes in [10], [12]–[14] are designed for text. For images, two problems remain, which concern the context of an erroneous token and the decoding of the model output. An image prior corrects an erroneous token from the tokens around it on the grid. In raster order, i.e., row by row, a code block carries consecutive token rows, e.g., about nine for a image with the Emu3 tokenizer. A failed block then corrupts a band of the image, and the correctly decoded blocks provide context only for the token rows at the two edges of the band. Bit-interleaved coded modulation [15] permutes coded bits rather than tokens, and character interleaving for text [14] separates neighbors along one dimension only. Moreover, the model output is not decoded again in [6], [12], [13], where the model selects among the candidate paths of a list Viterbi decoder [12] or corrects the decoded symbols [6], [13], so the parity constraints of the code cannot correct the errors that the model leaves.
In this paper, we propose spatial token interleaving and a two-pass BP schedule for semantic image transmission. At the transmitter, the Emu3 tokenizer converts an image into tokens. The interleaver reorders the tokens by a fixed permutation known to the receiver, without additional transmitted bits, such that adjacent tokens are carried by different blocks and thus have independent errors. The interleaved tokens are then transmitted in multiple 5G NR LDPC code blocks. At the receiver, after the first pass of BP decoding, token recovery fuses the token probabilities given by BP with the predictions of the Emu3-Gen model [8]. The second BP pass decodes each block again with the fused distributions as prior log-likelihood ratios (LLRs) of the information bits, so that the parity constraints correct the errors left by token recovery. On Kodak24 at 0.5 channel uses per pixel (CPP) and a signal-to-noise ratio (SNR) of 0.15 dB, the second pass removes 92% of these errors, and interleaving reduces the final token error rate (TER) by 88%. At medium to high SNR, the peak signal-to-noise ratio (PSNR) of the proposed receiver exceeds those of SwinJSCC [5] and FAJSCC [16] by at least 1.2 dB at the same CPP.
The code is available at https://github.com/Yifan-Usyd/STI-SemCom.

Fig. 1. System overview.
A. Encoding and Channel
As illustrated in Fig. 1, we consider point-to-point image transmission over an additive white Gaussian noise (AWGN) channel. At the transmitter, the visual encoder uses a tokenizer to map a red–green–blue (RGB) image to a sequence of indices in a fixed codebook . These indices are interleaved, mapped to binary labels of bits and partitioned into consecutive information blocks, each containing bits. The process can be expressed as
where is the -th information block, for . These information blocks are then LDPC-encoded by
where is the generator matrix, with multiplication over , and is the -th codeword. Hence, the code rate is . As for the 5G NR LDPC codes [7], is systematic, i.e., the first coded bits of are the information bits . Binary phase-shift keying (BPSK) maps each coded bit to the transmitted symbol , for . An image thus occupies real channel dimensions, i.e., .
At the receiver, the received symbol is , where is independent Gaussian noise. With unit symbol energy , the SNR per real channel dimension is , where is the noise power spectral density. The received symbols are then soft-demodulated to obtain channel LLRs for the coded bits. Specifically, with a bit-1 over bit-0 LLR convention, the channel LLR for the th received symbol in block is .
B. BP Decoding
The receiver decodes each block separately with BP [17], and we omit the block index in (3)–(5). For the parity checks of the code, let be the set of coded bits in check and the set of checks on coded bit . BP takes input LLRs of the coded bits, which are the channel LLRs in the first pass, i.e., . It initializes for
and, in each of a fixed number of iterations, computes the messages
where the signs in (3) follow from the bit-1 over bit-0 convention. After the last iteration, BP outputs the approximate a posteriori probability (APP) LLRs
and the hard decisions . The APP LLRs of the information bits of block in the first pass form . The APP LLRs from all blocks are collected in and processed by the visual decoder , which also uses the channel LLRs in a second BP pass (Section IV-C), to reconstruct the image as .
Let and be the fractions of erroneous bits and of erroneous tokens among the labels that lie in block after the first pass. We say that BP fails on block if . Since the binary-input AWGN channel and BP are symmetric, the distribution of the error pattern after BP does not depend on the transmitted codeword [17]. As BP decodes block from its own received symbols and the noise is independent across blocks, the error patterns of the blocks, and hence , are independent, and the erroneous bits of an image lie in its failed blocks. A token is erroneous if and only if at least one bit of its label is in error. For a label of bits with erroneous bits, , and averaging over the labels in block gives
In the waterfall region of the code, even at an SNR at which BP decodes most blocks correctly, its failures are large errors [17], i.e., the fraction of a failed block does not vanish as K grows. By (6), a failed block then corrupts a fraction of at least of its tokens. Without interleaving, these tokens form consecutive token rows, i.e., a band of the image, and an erroneous token inside the band has no neighbor in a correctly decoded block, leaving no reliable context for its recovery. The token interleaver of Section III-C assigns adjacent tokens to different blocks.
III. VISUAL ENCODER DESIGN
As illustrated in Fig. 2, the visual encoder converts an image into information blocks through Emu3 VQ tokenization, interleaving, and binary mapping.
A. Emu3 VQ Tokenization
For an image , the pretrained Emu3 VQ tokenizer [8] extracts a spatial latent grid with rows and columns, giving token positions.
At each position , vector quantization selects the nearest embedding of the Emu3 codebook and returns its index . For images, the Emu3 tokenizer uses only the first of its codebook entries [18], and we

Fig. 2. Visual encoder and the LDPC encoding of each block.
take these entries as the codebook , so that and each index has a 14-bit label. Collecting these indices in raster order yields the token sequence , expressed as
B. Interleaving and Binary Mapping
We apply token-level interleaving to distribute neighboring positions across different information blocks. The neighbors of an erroneous token then lie in other blocks, which are mostly decoded correctly, and give the autoregressive model at the receiver context to recover the token despite transmission errors (Section II-B). Let be a fixed permutation of , independent of image content and shared by the transmitter and receiver. The interleaver produces , where denotes the original spatial position of the token carried in transmission slot .
Binary mapping then converts each index into its -bit label , where . Concatenating the labels in transmission order yields a -bit information stream. We partition this stream into consecutive blocks , for , with , so that a label can straddle two blocks, and obtain
C. Interleaver Design
By (8), the label in slot i occupies bits to of the information stream, and its bits lie in the blocks
i.e., in one block, or in two if the label straddles a block boundary. Token is carried in slot , and we write . Let be the event that the label of token has an erroneous bit after the first pass. Since the error patterns of different blocks are independent (Section II-B), for any two tokens and ,

Fig. 3. First BP pass and visual decoder with the second BP pass.
Let be the set of the pairs of horizontally or vertically adjacent tokens. We require
i.e., no two adjacent tokens have bits in a common block, so that by (10), the errors of any two adjacent tokens are independent. To also spread the labels of larger neighborhoods evenly over the blocks, let be the set of the windows of tokens, let be the number of tokens in window with , and let be the mean of . We measure the spread by the normalized variance
which is small if the labels of each window are spread evenly over the blocks.
We construct by a local search over the grid positions and the block structure. Starting from the affine permutation , which satisfies , the search proposes to exchange the slots of two randomly chosen tokens and accepts the exchange only if it decreases in lexicographic order. With a fixed random seed, 807 of 6,000 proposed exchanges are accepted. The resulting has , and decreases from 0.147 for to 0.078, from 0.247 to 0.077, and from 0.276 to 0.071.
IV. VISUAL DECODER DESIGN
As shown in Fig. 3, the receiver first decodes each block in the first BP pass. The visual decoder then restores the spatial token order of the resulting APP LLRs (Section IV-A), recovers the token indices from these LLRs and the predictions of Emu3-Gen (Section IV-B), decodes each block again in the second BP pass with the fused token distributions as priors (Section IV-C), and maps the decoded tokens to pixels (Section IV-D).
A. First BP Pass and Deinterleaving
The first BP pass applies (3)–(5) to each block with and yields . Following the grouping relation in (8), we concatenate the information-bit APP LLR vectors and regroup the resulting sequence into token-wise vectors
where , , contains the APP LLRs for the bits of the token transmitted in slot .
The token deinterleaver then restores the original spatial order. Since transmission slot carries the token from spatial position , the slot associated with position is . The deinterleaver therefore produces
After deinterleaving all token-wise vectors, we form the spatially aligned LLR matrix as , where its th entry is the LLR for bit of the token at spatial position .
B. Token Recovery
Given L, token recovery combines BP token scores with Emu3-Gen predictions to recover the token indices in raster order. The recovered sequence is denoted by .
- BP token scoring: At position , the BP branch scores each candidate index by the probability of its label under the LLRs . Since BP provides only bit marginals, the bits are treated as independent, i.e.,
where is the th bit of and is the probability that bit of the token at position equals one.
- Emu3 token scoring: The Emu3 token scoring branch scores the candidates from visual context. Its input is the hard token sequence, obtained from the hard bit decisions as
where maps a binary label to its codebook index. Collecting these indices yields the hard token sequence .
We use the Emu3-Gen causal Transformer [8], which generates an image token by token in raster order over a vocabulary that includes the V codebook indices. As shown in Fig. 3, its input consists of the complete hard token sequence followed by the recovered prefix , with image-boundary and row-separator tokens marking the grid structure. Since precedes the prefix, the prediction at position t attends to the observations of the whole image, including those to the right of and below position t. With interleaving, the four neighbors of position t are carried by blocks other than its own (Section III-C). At each position, a softmax over the V visual-token logits defines , the probability assigned to codebook index v. Both branches thus score the same V codebook entries, and the LLR magnitudes enter only through the BP branch.
- Score fusion and token selection: At position t, the fused distribution of the two branches is
normalized over the V candidates, and the recovered index is ,
(18)
where is an empirically selected weight of the Emu3 prediction.
After selecting , we append it to the recovered prefix, i.e., , which is used by Emu3-Gen to predict the next token. Starting with an empty prefix at , this process follows raster order until all tokens are recovered, yielding . The hard token sequence and the LLRs remain fixed throughout recovery.
C. Second BP Pass
Token recovery corrects erroneous tokens from their context but does not use the parity constraints of the code. The second BP pass returns the fused distributions to the LDPC decoder as priors. For bit m of the token at position t, marginalizing (17) over the codebook gives the prior LLR
in the bit-1 over bit-0 convention of Section II. Interleaving these LLRs with and grouping them into blocks, i.e., inverting (14) and (13), yields the prior LLRs of the information bits of block . The second pass decodes each block anew by (3)–(5) with the input LLRs
The prior LLRs replace the channel LLRs of the information bits instead of being added to them, because is computed from the APP LLRs in (15), which already contain these channel LLRs. The hard decisions of the second pass are regrouped by (13), deinterleaved by (14) and mapped to indices by , which yields the decoded token sequence . The two passes form the two-pass BP schedule, which requires no additional transmission.
D. Image Reconstruction
We reshape the sequence row by row into an token grid. The grid is then passed to the fine-tuned Emu3 VQ detokenizer . Within the detokenizer, each index selects an embedding from the fixed codebook , and the resulting

Fig. 4. TER on Kodak24 after the first BP pass (BP), token recovery (BP + Emu3) and the second BP pass (BP + Emu3 + BP) at CPP = 0.5.
spatial features are processed by the image decoding network, which outputs
E. Training of the Visual Decoder
The visual decoder contains two neural models, namely Emu3-Gen and the VQ detokenizer. We fine-tune them separately. The pretrained VQ tokenizer and the codebook remain fixed.
- Training of the Emu3-Gen model: We adapt Emu3-Gen using low-rank adaptation (LoRA) [19], which updates the inserted low-rank parameters while keeping the backbone weights frozen. The hard token sequences for training are obtained by passing the training images through the encoder of Section III, the coded channel and the first BP pass.
During fine-tuning, we use the hard token sequence and the clean prefix to predict the clean token at each position . The training loss is the per-token cross-entropy (CE)
where is the vocabulary identifier of codebook index , and is normalized over the full text-visual vocabulary of Emu3-Gen, whereas at inference is normalized over the V visual identifiers. Training uses clean prefixes, whereas inference uses the recovered prefix.
- Training of the VQ detokenizer: Even with correct token indices, image quality depends on how the fixed codebook representation is mapped to pixels. We therefore fine-tune the parameters of the image decoding network and the post-quantization convolution within the detokenizer using clean token-image pairs , where , with the loss
where MSE and LPIPS denote the mean squared error and the learned perceptual image patch similarity [20].
V. EXPERIMENTAL RESULTS
A. Experimental Setup
We evaluate on Kodak24, with the images resized to pixels. The Emu3 tokenizer represents each image by indices on a grid with , i.e., M = 14, and the 57,344 information bits are partitioned into B = 7

Fig. 5. PSNR on Kodak24 at CPP = 0.5. The proposed receiver is BP + Emu3 + BP with interleaving.
blocks of bits. Each block is encoded by the 5G NR LDPC code with base graph 1 in Sionna [21] with a coded length such that , i.e., , and each BP pass runs 20 iterations. Emu3-Gen is fine-tuned on 25,600 pairs of hard and clean token sequences from 5,929 crops of the DIV2K training set and Flickr2K, for 30 epochs of 3,200 pairs each, and the detokenizer on 4,480 clean token-image pairs. Both models are validated on the DIV2K validation set, and no Kodak image is used in training. We set . All experiments run on an NVIDIA RTX 5090 GPU.
The receivers are named after their stages. BP reconstructs the image from , BP + Emu3 from , and the proposed receiver BP + Emu3 + BP from . All three use interleaving and the fine-tuned detokenizer, and the non-interleaved variant of the proposed receiver uses the identity permutation and the same Emu3-Gen. SwinJSCC [5] and FAJSCC [16] are fine-tuned at CPP = 0.5 as in [16] and evaluated at the same SNR per real channel dimension. We report the PSNR, the LPIPS with AlexNet features [20] and the TER, i.e., the fraction of erroneous token indices.
B. Two-Pass BP Schedule and Interleaving
Fig. 4 shows the TER after each stage of the receiver. At 0.1 dB, token recovery reduces the TER from 0.065 to 0.020, and the second pass reduces it to . At 0.15 dB, the corresponding values are 0.021, and . Token recovery thus removes 70% and 68% of the token errors, and the second pass removes 91% and 92% of the remaining ones, since the prior LLRs of a failed block are wrong only at these remaining errors, which BP corrects with the parity constraints. At -0.2 dB and below, more than 40% of the tokens remain erroneous after token recovery, and the second pass increases the TER, e.g., from 0.53 to 0.58 at -0.3 dB.
Interleaving reduces the final TER from to at 0.1 dB and from to at 0.15 dB, i.e., by 80% and 88%, although the first pass leaves the same expected number of erroneous tokens for both orders (Section II-B). By (10), the neighbors of an erroneous token are then mostly correct, and token recovery predicts the token from them. At -0.2 dB and below, where most blocks fail, the raster order gives a lower final TER, e.g., 0.35 versus 0.42 at -0.2 dB.

Fig. 6. Reconstructions of Kodak16 at an SNR of 0.1 dB and CPP = 0.5, with their PSNR.
TABLE I AVERAGE PSNR AND LPIPS ON KODAK24 AT CPP = 0.5 OVER THE SNRs FROM 0 TO 2.5 dB.
| Receiver | PSNR (dB) ↑ | LPIPS ↓ |
|---|---|---|
| SwinJSCC [5] | 25.38 | 0.36 |
| FAJSCC [16] | 25.73 | 0.43 |
| BP | 25.24 | 0.13 |
| BP + Emu3 + BP, non-interleaved | 27.03 | 0.093 |
| BP + Emu3 + BP (proposed) | 27.17 | 0.067 |
C. Comparison with JSCC Baselines
In Fig. 5, the PSNR of the proposed receiver rises from 14.3 dB at -0.5 dB, where BP fails on most blocks, to 27.5 dB at 0.3 dB, and stays at 27.5 dB, the PSNR with error-free tokens, up to 2.5 dB. The PSNR of the JSCC baselines lies between 25.0 and 26.3 dB over the whole range. From 0.25 dB to 2.5 dB, i.e., at medium to high SNR, the proposed receiver exceeds SwinJSCC by at least 1.63 dB and FAJSCC by at least 1.22 dB. Table I averages the PSNR and the LPIPS over the SNRs from 0 to 2.5 dB at which the baselines are evaluated. The proposed receiver attains the highest PSNR, 1.79 dB above SwinJSCC and 1.44 dB above FAJSCC, and the lowest LPIPS, 0.067, whereas the blurred JSCC reconstructions have LPIPS of 0.36 and 0.43. Interleaving increases the PSNR by 0.14 dB and reduces the LPIPS from 0.093 to 0.067.
In Fig. 6, at 0.1 dB, BP leaves scattered artifacts, and the JSCC reconstructions blur the clouds and the vegetation. The proposed receiver removes the artifacts, keeps the clouds and the palm trees sharp, and exceeds the PSNR of SwinJSCC by 0.99 dB and that of FAJSCC by 0.87 dB.
VI. CONCLUSION
We proposed spatial token interleaving and a two-pass BP schedule for images transmitted as VQ tokens in multiple 5G NR LDPC blocks. The interleaver makes the errors of adjacent tokens independent without additional transmitted bits, and the second BP pass decodes each block again with the fused token distributions as priors. On Kodak24 at CPP = 0.5 and 0.15 dB, the second pass removes 92% of the token errors left by token recovery, and interleaving reduces the final TER by 88%. At medium to high SNR, the proposed receiver exceeds both JSCC baselines by at least 1.2 dB in PSNR.
REFERENCES
[1] L. Qiao et al., "Token communications: A large model-driven framework for cross-modal context-aware semantic communications," IEEE Wireless Commun., vol. 32, no. 5, pp. 80–88, Oct. 2025.
[2] Q. Fu, H. Xie, Z. Qin, G. Slabaugh, and X. Tao, "Vector quantized semantic communication system," IEEE Wireless Commun. Lett., vol. 12, no. 6, pp. 982–986, 2023.
[3] A. van den Oord, O. Vinyals, and K. Kavukcuoglu, "Neural discrete representation learning," in Proc. Adv. Neural Inf. Process. Syst. (NeurIPS), 2017.
[4] E. Bourtsoulatze, D. B. Kurka, and D. Gündüz, "Deep joint source-channel coding for wireless image transmission," IEEE Trans. Cogn. Commun. Netw., vol. 5, no. 3, pp. 567–579, 2019.
[5] K. Yang et al., "SwinJSCC: Taming swin transformer for deep joint source-channel coding," IEEE Trans. Cogn. Commun. Netw., vol. 11, no. 1, pp. 90–104, 2025.
[6] B. Liu et al., "Text-guided token communication for wireless image transmission," in Proc. IEEE/CIC Int. Conf. Commun. China (ICCC), 2025, pp. 1–6.
[7] 3GPP, "NR; multiplexing and channel coding," 3GPP TS 38.212, V18.6.0, Mar. 2025.
[8] X. Wang et al., "Multimodal learning with next-token prediction for large multimodal models," Nature, vol. 650, no. 8101, pp. 327–333, 2026.
[9] C. Yue, G. Pang, B. Vucetic, and Y. Li, "Semantic error control coding with foundation models for future communications," arXiv preprint arXiv:2608.11551v1, 2026.
[10] J. Hao, C. Yue, H. Chang, B. Vucetic, and Y. Li, "Short wins long: Short codes with language model semantic correction outperform long codes," in Proc. IEEE Global Commun. Conf. (GLOBECOM), 2025, pp. 1226–1231.
[11] S. Wang et al., "DiffCom: Channel received signal is a natural condition to guide diffusion posterior sampling," IEEE J. Sel. Areas Commun., vol. 43, no. 7, pp. 2651–2666, 2025.
[12] Z. Li, C. Yue, J. Hao, B. Vucetic, and Y. Li, "LLM-Viterbi: Semantic-aware decoding for convolutional codes," arXiv preprint arXiv:2604.19035v1, 2026.
[13] Y. Wang et al., "CL-SEC: Cross-layer semantic error correction empowered by language models," arXiv preprint arXiv:2603.26125v1, 2026.
[14] J. Hao, C. Yue, M. Nie, B. Vucetic, and Y. Li, "Iterative semantic decoding for short block codes," arXiv preprint arXiv:2609.03256v1, 2026.
[15] G. Caire, G. Taricco, and E. Biglieri, "Bit-interleaved coded modulation," IEEE Trans. Inf. Theory, vol. 44, no. 3, pp. 927–946, 1998.
[16] H. Choi and D. Seo, "Feature importance-aware deep joint source-channel coding for computationally efficient and adjustable image transmission," IEEE Internet Things J., vol. 13, no. 12, pp. 27 893–27 911, 2026.
[17] T. Richardson and R. Urbanke, Modern Coding Theory. Cambridge University Press, 2008.
[18] "My question about Emu3 VisionTokenizer codebook distribution," GitHub issue #59, baaivision/Emu3, Feb. 2025. [Online]. Available: https://github.com/baaivision/Emu3/issues/59
[19] E. J. Hu et al., "LoRA: Low-rank adaptation of large language models," in Proc. Conf. Learn. Represent. (ICLR), 2022.
[20] R. Zhang, P. Isola, A. A. Efros, E. Shechtman, and O. Wang, "The unreasonable effectiveness of deep features as a perceptual metric," in Proc. IEEE/CVF Conf. Comput. Vis. Pattern Recognit. (CVPR), 2018, pp. 586–595.
[21] J. Hoydis et al., "Sionna: An open-source library for next-generation physical layer research," arXiv preprint arXiv:2203.11854v2, 2023.