Manuscript Offprint
arXiv:2610.08414Image Bitstream Fine-grained Understanding for Privacy-Friendly AIoT
Zhen Yu, Wenyang Liu, Kejun Wu, Senior Member, IEEE, Chengwang Xiao, Renjie Qiao, and Chengtao Cai, Senior Member, IEEE
Abstract—Image Bitstream Fine-grained Understanding (IBFU) aims to directly perform fine-grained classification and semantic description generation from encoded image byte sequences. In contrast to conventional pixel-domain visual understanding, IBFU conducts semantic analysis without fully decoding images into the pixel domain. Since pixel-level visual content is not explicitly reconstructed during inference, this paradigm reduces visual exposure within the processing pipeline and suits for privacy-friendly Artificial Intelligence of Things (AIoT) applications. In this paper, we propose Bitstream Fine-grained Generator (BFG), a novel foundation model tailored for IBFU. BFG consists of two main components: a Bitstream Semantic Encoder (BSeE) and a Fine-grained Semantic Generator (FSeG). BSeE directly models semantic representations from encoded image bitstream without explicit pixel reconstruction, while FSeG transforms the extracted bitstream semantics into detailed natural-language descriptions through autoregressive generation. To train BFG and comprehensively evaluate IBFU in practical AIoT scenarios, where image bitstreams may suffer corruption during transmission and storage, we construct a large-scale Corrupted-bitstream Fine-grained Understanding dataset (CFU-D), containing both intact bitstreams and corrupted variants across multiple corruption types and severity levels. Experiments show that BFG maintains stable fine-grained caption generation under bitstream corruption. For example, the performance only has slight change from 0.6339 to 0.6077 in terms of average CIDEr score on Stanford Dogs Caption dataset, while vision-language models, such as Qwen-VL-Chat, BLIP-2, GLM, Gemini, and GPT suffer severe performance decrease. This paper provides a practical paradigm for privacy-friendly fine-grained understanding in AIoT.
Index Terms—Fine-grained visual semantic understanding; Bitstream domain; Robustness; Privacy-friendly processing
I. INTRODUCTION
Fine-grained visual understanding task aims to distinguish subcategories that differ in subtle visual details. It supports applications in biological analysis [1], human-behavior monitoring [2], and medical image analysis [3]. For this task, convolutional neural networks and vision Transformers have achieved strong performance by learning discriminative visual representations [4], while image captioning further expresses

Fig. 1: Bitstream-domain fine-grained understanding framework for privacy-friendly AIoT.
these visual cues through natural language. Most fine-grained vision methods are conducted on fully decoded images [5]. However, images are often stored and transmitted as compressed bitstream in real-world scenarios [6], which may be affected by communication or storage faults [7]. Such corruption may cause visual artifacts or prevent successful decoding [8]. Methods that use partially decoded DCT features remain dependent on a valid JPEG structure and may become unreliable when the bitstream is structurally damaged [9].
ByteFormer [10] and bGPT [11] show that raw byte sequences can be modeled without conventional image decoding. More recent studies directly target corrupted image bitstreams. CBSU-ALLM treats damaged byte fragments as a specialized language for semantic classification [12], while Cibic generates captions from corrupted image bitstreams without pixel reconstruction [13]. These advances establish privacy-friendly feasible bitstream understanding.
Aiming at fine-grained bitstream understanding for privacy-friendly Artificial Intelligence of Things (AIoT), we propose BFG. In Bitstream Fine-grained Generator(BFG), Bitstream Semantic Encoder (BSeE) extracts compact local and global semantics from the byte sequence, and its Fine-grained Semantic Generator (FSeG) aligns these semantics with language tokens to produce detailed descriptions. This design supports both classification and description within a unified bitstream framework. BFG also provides a privacy-friendly processing path for AIoT. As illustrated in Fig. 1, smart cameras and edge nodes may capture faces, identities, and private environments that become directly visible to downstream components after RGB reconstruction [14]. BFG performs semantic inference on encoded bytes and does not explicitly materialize an RGB image within its inference pipeline. It therefore reduces pixel-domain visual exposure while preserving the fine-grained semantics required for classification and description, making
Zhen Yu and Kejun Wu are with the School of Electronic Information and Communications, Huazhong University of Science and Technology, Wuhan 430074, China.
Wenyang Liu is with the School of Electrical and Electronics Engineering, Nanyang Technological University, Singapore.
Chengwang Xiao is with School of Electronic Information, Central South University, Changsha 410083, China.
Renjie Qiao and Chengtao Cai are with College of Intelligent Systems Science and Engineering, Harbin Engineering University, Harbin 150001, China.
Corresponding author: Kejun Wu (email: kjwu@hust.edu.cn).
BFG suitable for privacy-friendly AIoT applications. This property concerns the processing pipeline and does not constitute a cryptographic privacy guarantee. The contributions of this paper are as follows:
• We construct the Corrupted-bitstream Fine-grained Understanding dataset (CFU-D). It augments the Stanford Dogs dataset with image-level natural language descriptions and adds bitstream corruption annotations to both Stanford Dogs and Flickr30k. This dataset transforms traditional image understanding tasks into a corrupted-bitstream vision-language benchmark, enabling systematic evaluation of fine-grained classification, description quality, and robustness under bitstream corruption.
• We propose BFG with two coordinated modules for IBFU. BSeE extracts compact semantic representations directly from image byte sequences without pixel reconstruction, enabling bitstream-native fine-grained understanding. FSeG further combines local byte evidence with global context to generate fine-grained descriptions autoregressively. These modules allow BFG to jointly perform fine-grained classification and description on the same bitstream representation.
• Experimental results show that BFG maintains stable fine-grained classification and caption, while pixel-domain models suffer significant performance decrease caused by bitstream corruption. This study provides a privacy-friendly paradigm for fine-grained understanding by reducing pixel-domain visual exposure.
A. Fine-grained Classification
In fine-grained classification, the core difficulty lies in small inter-class differences and large intra-class variations. This requires strong local detail perception. Early research focused on part detection and local alignment, explicitly or implicitly extracting key regions of the target to capture subtle differences [15]. With the development of deep learning, weakly supervised and self-supervised methods have been widely adopted. Weakly supervised methods learn discriminative local regions using only image-level labels. Self-supervised methods such as SimCLR and MAE learn robust representations via pretext tasks, improving performance in complex scenarios [16]. In recent years, with the development of vision-language pretraining, fine-grained research has gradually shifted toward higher-level semantic understanding and cross-modal fusion.
Models such as CLIP achieve strong cross-modal representation ability through image-text contrastive learning [17]. Generative models such as BLIP unify visual understanding and natural language generation [18]. Meanwhile, parameter-efficient fine-tuning methods such as prompt learning and LoRA enable large models to adapt efficiently to fine-grained tasks [19]. Recently, foundation models have attracted increasing attention. They are large-scale pre-trained general-purpose models that can adapt to various downstream tasks through fine-tuning or architectural adaptation [20]. They have shown strong generality and effectiveness in fields such as natural language processing, computer vision, and remote sensing [21]. However, existing foundation models are mainly built on pixel or text modalities. Few works explore models operating directly on byte-level bitstreams. In particular, there is no foundation model that supports unified byte-sequence input while jointly handling classification and description tasks under a privacy-preserving design.
B. Bitstream Understanding
In the area of bitstream understanding, traditional visual understanding methods usually take fully decoded images as input. This leads to high computational overhead and storage requirements and makes the methods vulnerable to distortions. To reduce decoding dependency, researchers have turned to compressed-domain visual understanding. These methods directly model intermediate information generated during compression, such as DCT coefficients, quantization parameters, and JPEG block structures, to construct visual representations. This approach reduces computational complexity while preserving essential semantic information. It has been applied to tasks such as action recognition and video analysis [22]. Building on this, researchers have further explored end-to-end modeling directly on raw bitstreams. Wu et al. [11] proposed bGPT, which represents multimodal data uniformly as byte sequences, demonstrating the feasibility of byte-level unified representation. Horton et al. [10] proposed ByteFormer, which takes binary byte streams directly as input and bypasses the traditional decoding pipeline through byte embedding. To address the computational overhead caused by long byte sequences, Pagnoni et al. [23] adopted a hierarchical chunking strategy to reduce complexity. Kallini et al. [24] reduced sequence length by dynamically merging similar tokens. These methods reduce reliance on full decoding and show strong unified representation capability and computational efficiency. However, most of them assume a complete and stable bitstream. When the bitstream is corrupted or structurally abnormal, the feature representations become sensitive to noise, leading to performance degradation. Improving robustness under corrupted bitstream conditions remains an open problem.
C. Privacy Preservation in AIoT Systems
Privacy has become a central concern in AIoT systems, where smart cameras and edge sensors routinely capture images containing faces, identities, and other sensitive information. The heterogeneity of these devices and their frequent communication create a broad attack surface, making unauthorized access and data leakage persistent risks [14]. Various protective mechanisms have therefore been proposed. Authentication protocols and encryption techniques help secure data during transmission, while edge computing reduces the amount of sensitive information sent to the cloud by processing data locally [25]. In smart-home environments, multi-layer security frameworks that combine device-level identity verification, link encryption, and edge-side anomaly detection have also been explored [26]. These measures improve the protection of data in transit and storage, but they do not fully address the exposure that may occur when visual data is analyzed.
In conventional vision pipelines, compressed images must be decoded into pixels before semantic analysis can be performed. This reconstruction creates a human-perceptible scene in system memory and makes visual details such as faces, home interiors, and personal belongings available to downstream processing components [27]. Data-minimization principles, including those emphasized by regulations such as the GDPR, therefore motivate approaches that limit unnecessary pixel-level exposure. Anonymization and obfuscation can hide sensitive regions, but may also remove fine-grained visual cues required for accurate recognition. Encryption protects data during storage and transmission, yet the image must generally be decrypted before pixel-based inference. Similarly, edge computing reduces transmission risks but still performs inference on decoded pixels at the local device [28]. These limitations have motivated research into compressed-domain and byte-level visual processing, which seeks to perform semantic analysis without explicitly reconstructing the full image. Such approaches are consistent with data-minimization and edge-processing principles, while their use for joint fine-grained classification and detailed description remains relatively underexplored.
III. METHOD
A. Problem Definition
Image Bitstream Fine-grained Understanding (IBFU) aims to recover fine-grained semantics directly from an encoded image bitstream rather than from a decoded pixel array. Let denote an image and let be its encoded byte sequence, where and varies across files. Conventional visual understanding first applies an image decoder to obtain a pixel tensor and then performs semantic inference on . In contrast, an IBFU model takes as its only visual input and does not explicitly reconstruct during inference.
We consider two complementary IBFU outputs. Fine-grained classification estimates a category distribution over visually similar subcategories. Semantic description generation predicts a token sequence according to
where the description expresses fine-grained attributes such as breed, appearance, pose, background, and atmosphere. IBFU must preserve these semantics not only for an intact bitstream , but also for an observed bitstream affected by corruption operator , fault type , and severity . The task therefore jointly concerns semantic discriminability, description fidelity, and tolerance to byte-level faults.
B. BFG Architecture
Fig. 2 shows the complete forward process of BFG. Given an image file, BFG reads the file as an ordered byte sequence instead of decoding it into RGB pixels. The byte sequence first passes through BSeE to produce a sequence of 192-dimensional bitstream features. The bitstream–language projector then converts these features into 512-dimensional features compatible with the language decoder. Finally, FSeG takes the projected bitstream features and the previously generated words as its two inputs and predicts the description one token at a time. The generated description covers the breed, appearance, pose, background, and atmosphere of the image.
- Bitstream Semantic Encoder (BSeE): The input to BSeE is a JPEG bitstream , in which each is an integer byte value between 0 and 255. Because different JPEG files contain different numbers of bytes, the sequences in a batch are padded to a common length, and a binary mask marks the valid positions. The byte-embedding layer first looks up a learnable vector for every byte value, converting the discrete sequence into a continuous feature sequence. The token-reduction layer then applies one-dimensional convolution along the sequence. Each convolutional output summarizes a group of neighboring byte embeddings, so the number of tokens is reduced before the more expensive attention calculation. Positional encoding is added after token reduction to retain the order of the compressed data. This first stage is written as
where denotes byte embedding, denotes Conv1D token reduction, and P denotes positional encoding. The validity mask is reduced by the same stride, ensuring that padded positions are excluded from subsequent attention and pooling.
The position-aware sequence next enters 12 encoder blocks. In each block, windowed self-attention divides the long sequence into local windows and computes the relationships among tokens within each window. The resulting features pass through a feed-forward network, with residual connections and normalization applied around the attention and feed-forward operations. Successive blocks use shifted windows so that tokens located in neighboring windows can exchange information. At selected blocks, a token-merging operation combines adjacent tokens and shortens the sequence again. Consequently, the early blocks model short byte patterns, whereas the later blocks receive progressively larger bitstream contexts.
After the final encoder block, a linear layer maps every remaining token to a 192-dimensional representation. BSeE therefore outputs the bitstream feature sequence and its reduced validity mask , where is the remaining number of valid and padded tokens after reduction and merging. These features still belong to the bitstream representation space. Before sending them to the language decoder, the bitstream–language projector applies a linear transformation, CELU activation, LayerNorm, and Dropout in sequence:
This produces the projected feature sequence , which has the same feature dimension as the word representations used by FSeG. For the direct-classification pathway,

Fig. 2: Overall framework of BFG. BFG takes byte sequences as input and extracts bitstream features through ByteFormer, which consists of byte embedding, windowed Transformer encoding, and hierarchical sequence compression. The extracted features are then fed into a Transformer decoder with self-attention and cross-attention to autoregressively generate fine-grained semantic descriptions.
BFG-Direct instead pools the valid BSeE features in Z and passes the pooled vector to a 120-class linear head.
- Fine-grained Semantic Generator (FSeG): FSeG receives two input streams. The first is the projected bitstream feature sequence from the image file. The second is the sequence of previously available text tokens. During training, the text input is the ground-truth description shifted to the right and beginning with . During inference, it consists of followed by the words that FSeG has already generated.
On the bitstream branch, masked mean pooling averages only the valid projected tokens and produces one 512-dimensional global feature:
The local sequence is retained because different positions may contain evidence for different visual details, while summarizes the complete image bitstream. Both are reused in every FSeG decoder layer.
On the text branch, each previous token is mapped to a 512-dimensional word embedding, and positional encoding is added to indicate its position in the sentence. Causal self-attention then processes this text sequence. Its causal mask allows the representation at position t to attend only to tokens at positions up to t, preventing access to future words. The resulting language feature is combined with the global bitstream feature by global-context fusion. Specifically, is broadcast to all text positions, concatenated with each language feature, and mapped back to the decoder dimension through a fusion layer with a residual connection and normalization.
The fused language feature supplies the query Q for cross-attention. On the bitstream side, the 192-dimensional BSeE output Z is first converted into the 512-dimensional memory by the bitstream–language projector. Learned projections of this memory form the keys K and values V used by the decoder; thus, the dashed paths in Fig. 2 indicate that both originate from the BSeE features, while the projector performs the required dimensional alignment before attention. Cross-
Replace
B0 F1 69 BA 8E A1 85 8C 84 6F D7 69 ED F7 42 7E 4A 87 E0 72 31 87 EE 00 AF 5D F8 C7 70 DE E0 82 C7 04 4B CB 81 3A 1E BB 54 70 3D 3B 8E 95 64 AA A0 86 F7 CD 70 46 5D 0E 5A 5C DD CF 1F 1B 2B CD 41 74 04 6C 46 A4 72 79 C8 3D E2 4D 56 83 6F D6 8A 8D 3C 54 E5 91 5C 40 98 F3 4A 27 00 83 C6 14 3C 0F 73 5D D6 8B 03 98 97 F7 79 0A 3A EE 1C F6 AD F1 F6 7D 1C 18 58 4B 46 6A C5 0A 8B 0A 01 64 EC D8 C1 1F E3 61 EE D6 ED 23 08 9F E9 24 AE EF 07 39 DF FE E9 EC 27 AA 8D BD 23 83 10 D6 3B 0F 19 3D BE B5 AA 88 48 48 9F E6 0D D3 1C FC 1E B5 FA 1C 7D E5 A1 F9 E4 BD D7 F0 4F C3 73 40 01 FB 3B 6E B7 95 C4 E8 A4 60 AE EE 1D 48 ED CE 19 3D 49 AD CB CD 14 58 EA 51 43 70 B8 B4 E6 C0 DF FD D6 3D 60 F3 EB 5C 95 9A FF 00 66 78 C1 2D 5D 9C A6 A0 51 D5 BA 29 62 DB 18 8F AE 5F 48 F5 15 EE 28 24 F0 F2 EB 1E 15 94 79 C8 8B AF B1 24 C1 F6 CE 36 8D FF 00 E3 5C 51 10 A0 54 BD E9 E9 D8 F4 A8 E0 DD 68 CE B4 75 62 BE BD D1 BE 58 F8 62 7B C8 29 1D 22 F2 22 1E 83 37 10 91 79 F5 CE 1B 06 AE 47 E0 B8 65 D5 B6 F2 1F 53 76 04 72 2B BA F0 BC E4 5A E6 95 31 C9 7A AB 23 E5 ED 1E 5E F1 4A 31 90 7D 90 70 7E A0 D7 A0 78 7B 48 F6 56 F2 DE 6A D9 4A 64 8E CA D6 49 15 97 F8 9F EE C6 BF 5D
Drop
B0 F1 69 BA … 85 8C 84 6F 2F 69 ED F7 10 … 19 35 E0 72 64 87 EE 00 … 5D F8 C7 70 6C … 82 C7 04 4B 34 81 9C 1E BB 54 70 3D 3B 8E 95 … AA A0 86 F7 CD 70 66 5D 0E 5A 5C DD CF … 1B 2B CD 41 … 04 6C 46 A4 72 … C8 3D 31 5D 56 83 6F 2C 91 8D … 54 7A 91 5C BD … F3 4A 27 00 B1 C6 E6 … 0F 73 5D D6 … 03 98 … F7 79 … 3A EE … F6 AD F1 32 E5 89 … 58 7B … 6A 5C 0A 8B 19 01 … EC D8 C1 1F E3 56 EE D6 ED 23 08 9F E9 … AE EF 23 39 DF FE E9 EC 7D AA 8D … C2 83 10 76 3B 0F 19 … 85 AA 88 48 48 9F E6 0D D3 1C 30 1E B5 FA 1C 7D E5 … E4 BD D7 A9 4F C3 73 40 01 FB 3B … B7 95 C4 E8 A4 … AE EE 1D 48 ED CE 0E 3D 49 AD CB CD 14 58 EA 51 43 70 B8 B4 BC C0 DF FD D6 … 1B F3 EB 5C 95 9A FF 00 66 78 … 2D 5D 82 A6 A0 51 D5 BA 29 62 DB 18 8F … E0 48 F5 15 EE 9E 24 F0 F2 EB … 15 94 79 63 ED 56 B1 24 C1 31 CE 36 … FF 00 E3 5C 8F 10 A0 … 37 E9 E9 D8 F4 A8 E0 DD 68 CE … 75 B6 BE BD D1 … F8 62 7B 38 F5 1D 22 F2 22 1E 24 37 10 91 … F5 CE 1B 06 AE 47 E0 B8 65 D5 B6 … 1F … 76 04 72 2B BA F0 1D … 5A E6 … A6 … 7A … 23 E5 … 1E 5F 1 4A 31 90 7D 90 70 7E A0 D7 A0 78 7B C2 F6 56 F2 DE 6A 57 4A 64 … CA D6 49 15 97 F8 9F … C6 BF 5D
Repeat
B0 F1 69 BA 8E A1 85 85 85 8C 84 84 6F 2F 69 ED F7 10 7E 19 19 35 E0 72 64 87 EE 00 00 AF 5D F8 C7 70 6C E0 82 C7 04 4B 48 34 81 9C 1E BB 54 54 70 70 3D 3B 8E 95 E4 AA A0 86 F7 F7 F7 CD CD CD 70 66 5D 0E 5A 5C DD DD DD CF 1F 1B 2B CD 41 74 04 6C 46 A4 72 79 C8 3D 31 5D 56 56 83 6F 2C 91 8D A1 54 7A 91 5C BD 98 F3 4A 27 00 B1 B1 C6 E6 3C 0F 73 5D 5D D6 8B 03 98 97 F7 79 0A 3A EE 1C F6 AD F1 32 E5 89 18 58 7B 78 46 46 46 6A C5 0A 0A 0A B8 19 01 64 64 64 EC D8 C1 1F E3 56 EE EE E0 D6 ED 23 08 9F 9F 9F E9 24 AE EF 23 39 DF FE E9 E9 E9 EC 7D 70 7D AA 8D BD C2 83 10 76 3B 6F 19 3D BE B5 AA 88 48 48 9F E6 0D D3 1C 30 30 1E B5 FA 1C 7D E5 A1 F9 E4 BD D7 A9 4F C3 73 40 01 FB 3B 3B 3B 6E B7 95 C4 E8 A4 60 60 60 AE EE 1D 48 ED CE 0E 3D 49 AD CB CD 14 58 EA 51 43 70 B8 B8 B4 BC C0 DF FD D6 3D 1B 1B F3 EB EB EB 5C 95 9A FF 00 66 78 78 C1 2D 5D 82 82 A6 A0 51 D5 BA BA BA 29 62 DB 18 8F AE E9 48 F5 F5 F5 15 EE 9E 24 24 F0 F2 EB EB EB 1E 15 94 79 63 ED 56 B1 24 C1 31 CE 36 8D FF 00 E3 E3 5C 8F 10 A0 D5 37 E9 E9 D8 D8 D8 F4 A8 E0 E0 DD 68 CE B4 75 B6 BE BD D1 C6 58 F8 62 7B 38 F5 1D 22 22 22 F2 22 1E 24 37 10 91 CE F5 CE 1B 06 AE 47 E0 B8 65 D5
Replaced byte
Dropped byte
Repeated byte
Fig. 3: Illustration of corruptions on bitstream.
attention is then computed as
This operation assigns a weight to every valid bitstream token for each text position and returns the corresponding weighted sum of the projected values. The cross-attended representation then passes through a feed-forward network, residual connection, and normalization to produce the updated language feature. This decoder process is repeated for three stacked layers.
After the third layer, a vocabulary projection and softmax convert the language feature at the last position into probabilities for the next token. The selected token is appended to the existing text sequence and fed back into FSeG for the next decoding step. This autoregressive loop continues until is generated or the maximum length is reached. The final output is a natural-language description rather than five independent classification scores; its sentences describe the breed, appearance, pose, background, and atmosphere.
C. Construction of CFU-D
We construct the Corrupted-bitstream Fine-grained Understanding dataset (CFU-D) to support both outputs of IBFU under intact and corrupted conditions. The construction pipeline contains three stages, Dataset Composition and Description Generation, bitstream serialization, and corruption generation. Each derived sample remains linked to its source identifier and original data split so that different bitstream versions of the same image cannot cross the training and test partitions.
The source layer combines two complementary forms of supervision. Stanford Dogs provides fine-grained breed labels and is used to build the dog image classification and description subset. Its semantic target is organized as a structured natural-language description covering the breed, visual appearance, pose or activity, scene background, and overall atmosphere. To generate this target, we query the Qwen-VL-Max API with each source image and include the ground-truth breed name in the prompt. The API returns five to six sentences that begin with “The dog is a [breed].”, where the breed name is inserted from the ground-truth folder label. We then check the returned text for the required descriptive fields, including appearance, pose or activity, scene background, and overall atmosphere, and retain the generated description as the semantic target. We manually inspected a random subset of the generated descriptions and found them to be reasonable and consistent with the source images. Breed mentions are thus anchored to the ground-truth category, while the remaining visual content is generated from the source image and verified against the required fields. Flickr30k contributes diverse scenes and human-written references, providing description supervision beyond dog images without additional API generation. Together, these sources allow CFU-D to evaluate both category-sensitive descriptions and more general semantic generation.
Bitstream serialization encodes every source image into a byte sequence and pairs it with its semantic targets. The dataset retains the intact stream as the reference input and records the valid sequence length, category label when available, textual references, source split, and encoding information. This organization separates the visual carrier (the byte sequence) from the task supervision (the class and text), enabling the same bitstream representation to support classification and generation.
Corruption generation derives corrupted variants from each intact stream using replacement, deletion, and repetition. Replacement changes selected byte values while preserving stream length, modeling value errors. Deletion removes selected bytes and shifts the following sequence, modeling information loss or incomplete transfer. Repetition duplicates selected bytes or short spans, modeling redundant insertion, retransmission, or stream-reassembly faults. Each operator is applied independently at multiple severity levels. Fig. 3 illustrates these corruption patterns on the bitstream.
IV. EXPERIMENTS
A. Experimental Setup
- Datasets: We construct CFU-D as the evaluation resource for IBFU. CFU-D organizes intact image bitstreams and controlled corrupted variants across replacement, deletion, and repetition faults at multiple severity levels. It contains two complementary settings. Stanford Dogs supports fine-grained recognition and description, while Flickr30k evaluates general

Fig. 4: Confusion matrices of six bitstream-domain models on the 10 most frequently predicted Stanford Dogs breeds.
TABLE I: Comparison of classification performance of bitstream-domain models.
| Model | Breed Acc | Precision | Recall | F1-score | Balanced Acc |
|---|---|---|---|---|---|
| BFG-Direct | 58.51% | 57.96% | 58.06% | 57.35% | 58.06% |
| DCT-CNN | 7.16% | 5.49% | 6.72% | 4.35% | 6.72% |
| BLOCK-CNN | 19.02% | 17.71% | 18.51% | 17.59% | 18.51% |
| bGPT | 1.38% | 0.01% | 0.83% | 0.02% | 0.83% |
| MBLM | 4.08% | 3.21% | 4.06% | 2.93% | 4.06% |
| MegaByte | 1.39% | 0.01% | 0.83% | 0.02% | 0.83% |
| MambaByte | 1.20% | 0.24% | 1.36% | 0.35% | 1.36% |
semantic description with human-written references. We use the official Stanford Dogs split with 12,000 training images and 8,580 test images while Flickr30k evaluates general semantic description and contains 31,783 images, each with five human-written captions. Together, these two settings support a comprehensive evaluation of IBFU under both intact and corrupted bitstreams.
- Implementation Details: All experiments are implemented in PyTorch with CUDA on a single NVIDIA GPU. Images are resized to , center-cropped to , and encoded as JPEG with quality 90. Byte sequences are truncated or padded to 16,384 positions. The captioning model contains 35.257M parameters, including a frozen 15.580M-parameter ImageNet-pretrained ByteFormer and 19.677M trainable parameters; the stored weights require approximately 141 MB.
We use ByteFormer-Tiny with a 192-dimensional embedding, 12 Transformer layers, and three attention heads. The caption decoder contains three Transformer layers with a hidden dimension of 512, eight attention heads, a 2,048-dimensional feed-forward network, and dropout of 0.1. The maximum output length is 150 tokens. The model is trained for 20 epochs using Adam with a learning rate of , weight decay of , batch size 16, label smoothing of 0.1, gradient clipping at 1.0, linear warm-up, and cosine decay. Caption generation uses greedy autoregressive decoding.
With batch size 1 and 16,384-byte inputs on an NVIDIA GeForce RTX 4090, the complete caption-generation pipeline requires 236.6 ms per sample on average, achieves 4.2 samples/s, and uses 223.1 MiB of peak CUDA memory. ByteFormer uses local-window attention and hierarchical sequence reduction, while decoder cost grows with the generated length.
- Comparison Methods and Evaluation Metrics: For fine-grained classification, we compare BFG-Direct with DCT-
TABLE II: Performance comparison on Stanford Dogs Caption under different corruption strategies.
| Model | Strategy | CIDEr | BLEU-4 | ROUGE-L | METEOR | BERTScore-F1 | Breed Acc | Dec. Rate |
|---|---|---|---|---|---|---|---|---|
| BFG(ours) | No corrupt | 0.6339 | 0.0996 | 0.3651 | 0.3408 | 0.3058 | 57.63% | - |
| Replace | 0.6240 | 0.0966 | 0.3623 | 0.3375 | 0.3012 | 51.24% | - | |
| Drop | 0.6248 | 0.0970 | 0.3621 | 0.3376 | 0.3015 | 52.50% | - | |
| Repeat | 0.5479 | 0.0748 | 0.3310 | 0.3073 | 0.2645 | 20.59% | - | |
| Average | 0.6077 | 0.0920 | 0.3551 | 0.3308 | 0.2933 | 45.49% | - | |
| Qwen-VL-Chat | No corrupt | 0.4389 | 0.0806 | 0.2562 | 0.0000 | 0.2118 | 38.90% | 100.00% |
| Replace | 0.0015 | 0.0146 | 0.0698 | 0.0000 | 0.0007 | 0.00% | 34.47% | |
| Drop | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.0000 | 0.00% | 8.77% | |
| Repeat | 0.0089 | 0.0480 | 0.2040 | 0.0000 | 0.0043 | 0.00% | 13.20% | |
| Average | 0.1123 | 0.0358 | 0.1325 | 0.0000 | 0.0542 | 9.73% | 39.11% | |
| BLIP-2 | No corrupt | 1.5478 | 0.1904 | 0.3565 | 0.3830 | 0.7468 | 42.61% | 100.00% |
| Replace | 0.3940 | 0.0175 | 0.0995 | 0.0892 | 0.1901 | 1.11% | 34.47% | |
| Drop | 0.1089 | 0.0000 | 0.0378 | 0.0227 | 0.0525 | 0.46% | 8.77% | |
| Repeat | 0.1525 | 0.0010 | 0.0483 | 0.0341 | 0.0736 | 0.47% | 13.20% | |
| Average | 0.5508 | 0.0522 | 0.1355 | 0.1323 | 0.2658 | 11.16% | 39.11% | |
| GLM-4.6V-Flash | No corrupt | 0.2785 | 0.2284 | 0.4162 | 0.4894 | 0.1344 | 81.71% | 100.00% |
| Replace | 0.0248 | 0.0141 | 0.0824 | 0.0924 | 0.0120 | 1.30% | 34.47% | |
| Drop | 0.0035 | 0.0001 | 0.0333 | 0.0230 | 0.0017 | 0.32% | 8.77% | |
| Repeat | 0.0075 | 0.0014 | 0.0425 | 0.0358 | 0.0036 | 0.47% | 13.20% | |
| Average | 0.0786 | 0.0610 | 0.1436 | 0.1602 | 0.0379 | 20.95% | 39.11% | |
| Gemini-2.5-Flash | No corrupt | 0.7060 | 0.0492 | 0.2174 | 0.2157 | 0.8746 | 80.00% | 100.00% |
| Replace | 0.0000 | 0.0000 | 0.0362 | 0.0240 | 0.2836 | 0.00% | 34.47% | |
| Drop | 0.0000 | 0.0000 | 0.0092 | 0.0061 | 0.0721 | 0.00% | 8.77% | |
| Repeat | 0.0000 | 0.0000 | 0.0138 | 0.0092 | 0.1086 | 0.00% | 13.20% | |
| Average | 0.1765 | 0.0123 | 0.0691 | 0.0637 | 0.3347 | 20.00% | 39.11% | |
| GPT-5.1 | No corrupt | 0.5654 | 0.0495 | 0.2083 | 0.2113 | 0.8709 | 61.11% | 100.00% |
| Replace | 0.0030 | 0.0110 | 0.0502 | 0.0433 | 0.2918 | 0.00% | 34.47% | |
| Drop | 0.0008 | 0.0028 | 0.0128 | 0.0110 | 0.0742 | 0.00% | 8.77% | |
| Repeat | 0.0012 | 0.0042 | 0.0192 | 0.0166 | 0.1117 | 0.00% | 13.20% | |
| Average | 0.1426 | 0.0169 | 0.0726 | 0.0705 | 0.3372 | 15.28% | 39.11% |
CNN, BLOCK-CNN [29], bGPT, MBLM, MegaByte, and MambaByte. BFG-Direct uses the ByteFormer encoder with a 120-class linear head and is trained only with JPEG bytes and breed labels. All methods use the official Stanford Dogs split. We report accuracy, macro precision, macro recall, macro F1-score, and balanced accuracy. We initialize BFG-Direct with ImageNet-pretrained weights, as detailed in the experimental setup.
For caption generation, BFG is compared with Qwen-VL-Chat, BLIP-2, GLM-4.6V-Flash, Gemini-2.5-Flash, and GPT-5.1. BFG processes JPEG bytes directly, whereas the pixel-domain models require JPEG decoding before inference. Qwen-VL-Chat, BLIP-2, and GLM are evaluated locally and contain 7B, 3.8B, and 9B parameters, respectively. Gemini-2.5-Flash and GPT-5.1 are proprietary API-based models with undisclosed parameter counts. Due to API cost, Gemini and GPT are evaluated on fixed subsets rather than the full test sets. We evaluate caption quality and decoding availability under the same corrupted-file conditions.
Robustness is evaluated with three reproducible byte-level fault models. Replace substitutes 2%, 5%, or 10% of eligible byte values with randomly sampled values. Drop removes the same proportions of byte positions. Repeat selects 10% or 20% of positions and repeats each selected byte two to four times. These operations represent value corruption, information loss, and redundant insertion that may arise from transmission errors, packet loss, incomplete transfer, interrupted writes, storage damage, retransmission, or stream-reassembly faults.
Fault positions are sampled without replacement using random seed 42, while the first four JPEG signature bytes are preserved. The reported percentages indicate controlled application-level corruption severity rather than physical-layer bit-error rates. For pixel-domain models, undecodable files receive zero semantic scores, and decoding rate is reported separately. Caption quality is measured using BLEU-4, ROUGE-L, METEOR, CIDEr, and BERTScore-F1.
B. Evaluations on Bitstream-Domain Fine-Grained Classification Task
Table I reports a controlled direct-classification comparison. BFG-Direct achieves 58.51% breed accuracy on the official test split of 8,580 images. It uses a standard 120-way classification head. Compared with the other bitstream-domain models, BFG-Direct demonstrates markedly stronger fine-grained category recognition under the same evaluation setting.
To more intuitively illustrate the differences in fine-grained classification performance across models, we select the 10 most frequently predicted breeds and present the confusion matrices of all models in Fig. 4. BFG's confusion matrix exhibits a strong diagonal structure, with the vast majority
TABLE III: Performance comparison on Flickr30k under different corruption strategies.
| Model | Strategy | CIDEr | BLEU-4 | ROUGE-L | METEOR | BERTScore-F1 | Dec. Rate |
|---|---|---|---|---|---|---|---|
| BFG(ours) | No corrupt | 0.0521 | 0.1063 | 0.3005 | 0.3055 | 0.8914 | - |
| Replace | 0.0516 | 0.1051 | 0.2993 | 0.3021 | 0.8915 | - | |
| Drop | 0.0636 | 0.1064 | 0.3023 | 0.3046 | 0.8926 | - | |
| Repeat | 0.0528 | 0.1062 | 0.2977 | 0.3053 | 0.8918 | - | |
| Average | 0.0550 | 0.1060 | 0.2999 | 0.3044 | 0.8918 | - | |
| Qwen-VL-Chat | No corrupt | 0.0043 | 0.0196 | 0.1812 | 0.2011 | 0.8634 | 100.00% |
| Replace | 0.0015 | 0.0002 | 0.0720 | 0.0415 | 0.3431 | 60.60% | |
| Drop | 0.0002 | 0.0000 | 0.0151 | 0.0087 | 0.0720 | 12.10% | |
| Repeat | 0.0003 | 0.0000 | 0.0266 | 0.0148 | 0.1267 | 21.70% | |
| Average | 0.0016 | 0.0049 | 0.0737 | 0.0665 | 0.3513 | 48.60% | |
| BLIP-2 | No corrupt | 0.0547 | 0.0873 | 0.2856 | 0.2946 | 0.8939 | 100.00% |
| Replace | 0.0304 | 0.0657 | 0.1756 | 0.1781 | 0.5495 | 60.60% | |
| Drop | 0.0055 | 0.0002 | 0.0358 | 0.0367 | 0.1121 | 12.10% | |
| Repeat | 0.0132 | 0.0050 | 0.0653 | 0.0660 | 0.2044 | 21.70% | |
| Average | 0.0259 | 0.0396 | 0.1406 | 0.1439 | 0.4400 | 48.60% | |
| GLM-4.6V-Flash | No corrupt | 0.0271 | 0.0099 | 0.1464 | 0.1856 | 0.8461 | 100.00% |
| Replace | 0.0202 | 0.0123 | 0.0857 | 0.0978 | 0.4953 | 60.60% | |
| Drop | 0.0022 | 0.0002 | 0.0175 | 0.0208 | 0.1012 | 12.10% | |
| Repeat | 0.0061 | 0.0022 | 0.0314 | 0.0363 | 0.1815 | 21.70% | |
| Average | 0.0139 | 0.0062 | 0.0703 | 0.0851 | 0.4060 | 48.60% | |
| Gemini-2.5-Flash | No corrupt | 0.0178 | 0.1010 | 0.2509 | 0.2572 | 0.8858 | 100.00% |
| Replace | 0.0081 | 0.0593 | 0.1265 | 0.1293 | 0.5305 | 60.60% | |
| Drop | 0.0016 | 0.0118 | 0.0252 | 0.0258 | 0.1059 | 12.10% | |
| Repeat | 0.0029 | 0.0212 | 0.0453 | 0.0463 | 0.1900 | 21.70% | |
| Average | 0.0076 | 0.0483 | 0.1120 | 0.1147 | 0.4281 | 48.60% | |
| GPT-5.1 | No corrupt | 0.0310 | 0.1061 | 0.2649 | 0.2809 | 0.8902 | 100.00% |
| Replace | 0.0084 | 0.0579 | 0.1299 | 0.0926 | 0.5335 | 60.60% | |
| Drop | 0.0017 | 0.0116 | 0.0259 | 0.0185 | 0.1065 | 12.10% | |
| Repeat | 0.0030 | 0.0207 | 0.0465 | 0.0332 | 0.1910 | 21.70% | |
| Average | 0.0110 | 0.0491 | 0.1168 | 0.1063 | 0.4303 | 48.60% |
of samples correctly classified into their corresponding breeds and only minor inter-breed confusion. The confusion matrices of BLOCK-CNN and DCT-CNN show that a large proportion of predictions fall outside the 10 target classes, with diagonal values of only , indicating that compression-domain methods have limited capability in fine-grained breed discrimination. bGPT's confusion matrix reveals mode collapse, with all samples predicted as afghan hound. The confusion matrices of MBLM, MegaByte, and MambaByte are extremely sparse, with nearly all predictions falling outside the 10 target breeds. These results further confirm that these models exhibit near-random discriminative ability on the 120-class fine-grained task.
C. Evaluations on Robustness of Bitstream-Domain Caption Task
We evaluate description robustness on Stanford Dogs Caption and Flickr30k in Tables II and III, respectively. Stanford Dogs Caption tests label-informed fine-grained descriptions, whereas Flickr30k tests general descriptions written by humans. On clean inputs, BLIP-2 obtains the highest Stanford Dogs CIDEr and BERTScore-F1 among the locally evaluated models, while GLM obtains the highest breed accuracy and METEOR. On Flickr30k, BFG obtains BLEU-4 of 0.1063 and ROUGE-L of 0.3005. These results show that the compact BFG model retains competitive semantic-generation capability on intact inputs.
However, once bitstream corruption is introduced, a clear performance gap emerges between the two groups of models. This is illustrated in Fig. 5 and Fig. 6 through CIDEr comparisons and retention rate heatmaps on the two datasets. On both datasets, under replacement and dropping strategies, BFG's CIDEr decreases by only approximately to , and the retention rates of most metrics remain above , indicating strong robustness. In contrast, vision-language models suffer severe degradation two aspects. First, corrupted bitstreams may fail to be decoded by standard decoders, leaving pixel-domain models without valid inputs. On both datasets, the decoding rates of locally deployed models (Qwen-VL-Chat, BLIP-2, GLM) decrease to approximately under byte replacement, around under byte dropping, and approach under byte dropping. API-based models (Gemini-2.5-Flash, GPT-5.1) fail entirely under any corruption. In contrast, BFG operates directly in the bitstream domain, thereby avoiding the decoding stage and maintaining complete inputs under all conditions. Second, even when decoding succeeds, the description quality of vision-language models degrades drastically. On Stanford Dogs Caption, under byte replacement, BLIP-2's CIDEr drops from 1.5478 to 0.3666 ( decrease) and breed accuracy drops from to ; GLM's CIDEr drops from 0.2785 to 0.0207

(a) CIDEr Score Comparison
(b) CIDEr Retention Rate Heatmap
Fig. 5: CIDEr score comparison and retention rate heatmap on the Stanford Dogs Caption dataset under different corruption strategies: (a) CIDEr score comparison across models and corruption strategies; (b) CIDEr retention rate heatmap showing the percentage of baseline performance maintained.

(a) CIDEr Score Comparison
(b) CIDEr Retention Rate Heatmap
Fig. 6: CIDEr score comparison and retention rate heatmap on the Flickr30k dataset under different corruption strategies: (a) CIDEr score comparison across models and corruption strategies; (b) CIDEr retention rate heatmap showing the percentage of baseline performance maintained.
BERTScore-F1
METEOR

Fig. 7: Robustness comparison of BFG and vision-language models on Flickr30k. Each axis represents one corruption condition. Top row is BERTScore-F1 and bottom row is METEOR. BFG covers the largest area across all conditions.

GT: The dog is a Siberian husky. It has a thick, fluffy coat with a mix of black, gray, and white fur, and striking blue eyes that stand out against its dark facial markings. The husky is lying on a tiled floor in front of a fireplace, stretching out comfortably with its front paws extended forward. A white circular chew toy rests near its head on the carpeted area. Behind the dog, there are decorative elements including pink flowers and a framed photo on the mantle. The setting appears to be a cozy, well-decorated living room.
BFG: The dog is a siberian husky. It has a thick, fluffy coat with a mix of gray, black, and white fur, and striking blue eyes. The husky is lying down on a beige carpeted floor, appearing relaxed and comfortable. It is holding a bright green tennis ball in its mouth, suggesting it's engaged in play. Behind the dog, there is a wooden cabinet and a white cabinet, indicating an indoor home setting. The overall scene conveys a cozy and playful atmosphere.
Qwen: The dog is a German Shepherd, with a black and tan coat. It is standing on a grass-covered field, with its ears perked forward and tail wagging. The dog's posture is alert and curious, with its eyes focused on something in the distance. The surrounding environment is a lush green field, with trees and bushes in the background. The sky is clear and blue, indicating a sunny day.
BLP: The dog is a husky. It has a thick, black and white coat with a distinctive black mask around its face and pointed ears that stand upright. The dog is lying down on a light-colored carpet, appearing relaxed and playful with its front paws stretched out. Its eyes are partially closed, suggesting it is enjoying the moment. In the background, there is a pink fireplace with a white mantle, adding a cozy domestic feel to the scene. The lighting is warm, highlighting the dog soft fur and the texture of the carpet beneath it. The overall atmosphere is peaceful and homey.
GLM: The dog in the image appears to be a mixed-breed or possibly a small terrier-type dog. It has a short, smooth coat that is predominantly black with some white markings on its chest and paws. The dog's ears are floppy and slightly rounded at the tips. Its posture suggests it might be sitting or lying down, though only part of its body is visible. The background consists of a dark, textured surface, likely a carpet or fabric, which contrasts with the dog's lighter-colored fur. The overall scene gives an impression of a cozy indoor.
Gemini: The dog is a husky lying flat on its stomach, though the scene is heavily fragmented by colorful digital artifacts. It has a thick grey and white coat and pointed, upright ears, with its front legs stretched forward on a light grey carpet. Its eyes are masked by a pixelated block of neon green and blue, giving it a sci-fi appearance, while a large patch of magenta and green digital noise covers its hindquarters. The overall atmosphere is surreal and cybernetic, blending a cozy household pet scene with striking computer glitches.
GPT: The image shows a small dog sitting on a gray concrete floor in an outdoor or garage-like area. It has a light-colored coat with darker markings around its ears and face, and its body is positioned low to the ground in a relaxed posture. The dog appears calm and curious, looking slightly toward the camera with its ears naturally raised. Around the dog, there are scattered objects and household items, creating a casual everyday environment. the background, there is a rough wall and a few colorful objects, adding a lived-in outdoor atmosphere.
Fig. 8: Visual comparison of model-generated descriptions under 2% byte replacement.
(92.6% decrease). On Flickr30k, under 5% byte dropping, BLIP-2's CIDEr drops to 0.0055 (90% decrease), GLM's to 0.0022 (92% decrease), and Qwen-VL-Chat's CIDEr is near zero. Decoding distortion causes models to generate descriptions unrelated to the actual content, resulting in severe hallucinations.
Fig. 7 compares the robustness of BFG and vision-language models under different corruption conditions using BERTScore-F1 and METEOR. Each radar chart has five axes corresponding to the intact bitstream condition, 2% byte replacement, 5% byte replacement, 2% byte dropping, and 5% byte dropping. On BERTScore-F1, BFG remains stable across all corruption levels. The radar area is almost unchanged. In contrast, vision-language models shrink sharply from the intact bitstream condition. METEOR shows a similar trend. These radar plots clearly reveal the performance gap between models. They also highlight the robustness advantage of bitstream-domain modeling under corruption.
Fig. 8 shows a comparison of generated captions on the Stanford Dogs Caption dataset under intact and corrupted conditions with 2% byte replacement. Under intact conditions, all models correctly identify the breed and generate reasonable descriptions. Under corruption, the baseline vision-language models still produce outputs, but their descriptions become less accurate, often exhibiting breed misclassification and scene hallucination. In contrast, BFG remains robust and continues to produce correct breed-level descriptions with only minor attribute changes. Fig. 9 presents results on the Flickr30k dataset under intact, replacement, dropping, and repetition conditions. Baseline vision-language models show noticeable degradation even under mild corruption and produce severely erroneous outputs under stronger corruption conditions due to decoding errors. BFG avoids these decoding failures and continues to generate descriptions from the corrupted bitstreams. Under the severe 20% repetition condition, however, its output becomes less precise: the main subject remains recognizable, but the person-to-person interaction is described incorrectly. This example shows that BFG preserves input availability under severe corruption, while fine-grained semantic accuracy can still degrade when repetition disrupts the byte sequence. Overall,
TABLE IV: Ablation on byte-level corruption augmentation for Stanford Dogs Caption. Bold values indicate the smaller relative drop for each metric and corruption condition.
| Metric | With byte masking | Without byte masking | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Clean | Replace | Drop | Repeat | All corrupt | Clean | Replace | Drop | Repeat | All corrupt | |
| CIDEr | 0.6339 | 0.6240 | 0.6248 | 0.5479 | 0.5989 | 0.6473 | 0.6336 | 0.6347 | 0.5637 | 0.6107 |
| BLEU-4 | 0.0996 | 0.0966 | 0.0970 | 0.0748 | 0.0895 | 0.1086 | 0.1028 | 0.1046 | 0.0720 | 0.0931 |
| ROUGE-L | 0.3651 | 0.3623 | 0.3621 | 0.3310 | 0.3518 | 0.3755 | 0.3680 | 0.3702 | 0.3262 | 0.3548 |
| METEOR | 0.3408 | 0.3375 | 0.3376 | 0.3073 | 0.3275 | 0.3506 | 0.3427 | 0.3453 | 0.3020 | 0.3300 |
| Breed Acc. | 57.63% | 51.24% | 52.50% | 20.59% | 41.44% | 62.94% | 55.02% | 57.44% | 20.18% | 44.21% |
| BERTScore-F1 | 0.3058 | 0.3012 | 0.3015 | 0.2645 | 0.2891 | 0.3250 | 0.3148 | 0.3176 | 0.2538 | 0.2954 |
TABLE V: Ablation on byte-level corruption augmentation for Flickr30k. Bold values indicate the smaller relative drop for each metric and corruption condition.
| Metric | With byte masking | Without byte masking | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Clean | Replace | Drop | Repeat | All corrupt | Clean | Replace | Drop | Repeat | All corrupt | |
| CIDEr | 0.0521 | 0.0537 | 0.0560 | 0.0548 | 0.0549 | 0.0498 | 0.0544 | 0.0543 | 0.0465 | 0.0517 |
| BLEU-4 | 0.1063 | 0.1060 | 0.1056 | 0.1070 | 0.1062 | 0.1046 | 0.1030 | 0.1042 | 0.0924 | 0.0999 |
| ROUGE-L | 0.3005 | 0.3004 | 0.3021 | 0.2975 | 0.3000 | 0.2956 | 0.2950 | 0.2963 | 0.2860 | 0.2925 |
| METEOR | 0.3055 | 0.3034 | 0.3031 | 0.3078 | 0.3048 | 0.3019 | 0.3003 | 0.3007 | 0.2983 | 0.2998 |
| BERTScore-F1 | 0.8914 | 0.8915 | 0.8926 | 0.8918 | 0.8920 | 0.8900 | 0.8897 | 0.8899 | 0.8868 | 0.8888 |
TABLE VI: Zero-shot evaluation on additional image formats.
| Format | CIDEr | BLEU-4 | ROUGE-L | METEOR | BERTScore-F1 | Breed Acc. |
|---|---|---|---|---|---|---|
| JPEG | 0.6339 | 0.0996 | 0.3651 | 0.3408 | 0.3058 | 57.63% |
| WebP | 0.4077 | 0.0488 | 0.2913 | 0.2748 | 0.1944 | 0.44% |
| PNG | 0.3381 | 0.0526 | 0.2934 | 0.2787 | 0.1964 | 0.44% |
GT : Two people in the photo are playing the guitar and the other is poking at him.
no corruption

BFG(Ours): Two people, one playing guitar and the other poking at him.
Qwen: Two people in a room, one playing guitar and the other standing nearby.
BLP: A person playing a guitar in a room.
GLM: Two people indoors, one playing a guitar while the other watches.
Gemini: Two men in a workshop with blue digital glitch distortion.
GPT: Two people stand indoors under lights with a distorted glitch effect.
replace 2%
BFG(Ours): Two people, one playing guitar and the other poking at him.
Qwen: A person holding a long object in a dimly lit room.
BLP: A man sitting on a bench indoors.
GLM: Someone near a table in a dark room.
Gemini: Heavily glitched image with colorful horizontal stripes.
GPT: A crowded scene appears with colorful digital glitches.
drop 10%
BFG(Ours): Two people, one playing guitar and the other poking at him.
Qwen: Decode Failed
BLP: Decode Failed
GLM: Decode Failed
Gemini: Decode Failed
GPT: Decode Failed
repeat 20%
BFG(Ours): Two people, one standing and the other talking to him.
Qwen: Decode Failed
BLP: Decode Failed
GLM: Decode Failed
Gemini: Decode Failed
GPT: Decode Failed
Fig. 9: Visual comparison of model-generated descriptions on Flickr30k different bitstream corruption.
the results demonstrate that bitstream corruption causes both decoding failures and semantic distortion in vision-language models, whereas BFG avoids the decoding stage and remains functional under corruption.
It is worth noting that the byte repetition strategy has a larger impact on BFG compared to replacement and dropping strategies. Under repetition, BFG's breed accuracy drops more noticeably than under the other two strategies. This is because byte repetition changes the overall length and structure of the bitstream, affecting ByteFormer's sequence compression and windowed attention mechanisms. Nevertheless, BFG still maintains full input availability under all conditions, whereas the decoding rates of vision-language models under repetition do not exceed 21.7%, and their breed accuracy is virtually 0%.
D. Ablation on byte-level corruption augmentation
We conduct an ablation on byte-level corruption augmentation using Stanford Dogs Caption and Flickr30k, training BFG with and without this augmentation while keeping the architecture, initialization, data split, optimizer, and checkpoint-selection rule fixed. Tables IV and V report the average results across corruption severities for each strategy, together with the overall average across corrupted inputs. Parenthesized values indicate relative changes from the corresponding clean-input score.
On Stanford Dogs Caption, byte masking reduces the average degradation for most metrics; for example, the overall BERTScore-F1 drop decreases from 9.10% to 5.47%. On Flickr30k, its clearest benefit appears in the average results under repetition. Overall, the ablation shows that byte masking improves caption stability under corrupted inputs.
E. Zero-shot Generalization to Other Image Formats
We use the cross-format experiment in Table VI to assess whether BFG's bitstream understanding extends beyond JPEG. The results show substantially lower caption scores on WebP and PNG, with breed accuracy of 0.44% on both formats.
Thus, BFG's current generalization is limited to JPEG bitstreams.
V. CONCLUSION
This paper introduces IBFU and presents BFG for fine-grained classification and semantic description directly from encoded image bitstreams. BSeE extracts compact semantic representations from JPEG bytes, while FSeG combines local evidence with global context to generate detailed descriptions. We also construct CFU-D, which contains intact bitstreams and corrupted variants across multiple corruption types and severity levels for evaluating fine-grained classification, description quality, and robustness. Experiments show that BFG maintains stable fine-grained caption generation under bitstream corruption, whereas pixel-domain vision-language models suffer severe performance degradation or decoding failure. In addition, BFG reduces pixel-domain visual exposure within the inference pipeline, offering a practical pathway for privacy-friendly fine-grained understanding in AIoT.
REFERENCES
[1] Q. Lu, G. Xia, M. Cai, X. Li, J. Cao, and W.-H. Liao, “An ultralow frequency energy harvester with an asymmetric-stiffness pendulum inspired by biological grooming behavior,” IEEE Internet of Things Journal, vol. 11, no. 13, pp. 24222–24233, 2024.
[2] A. Singh and R. Thakur, “A cognitive-intelligence-based personalized federated approach for monitoring driver behavior,” IEEE Internet of Things Journal, vol. 12, no. 14, pp. 26116–26127, 2025.
[3] J. Liu, F. Yu, R. Li, X. Lyu, and S. Zheng, “Enhancement and segmentation of high definition ct images in everything 6g medical iot environment,” IEEE Internet of Things Journal, vol. 13, no. 5, pp. 7862–7873, 2026.
[4] S. Ma, Z. Sun, B. Shen, Y. Wu, H. Li, G. Shi, S. Li, and N. Al-Dhahir, "Semantic feature division multiple access for digital semantic broadcast channels," IEEE Internet of Things Journal, vol. 12, no. 11, pp. 17123–17136, 2025.
[5] K. Wu, Y. Yang, M. Yu, and Q. Liu, “Block-wise focal stack image representation for end-to-end applications,” Optics Express, vol. 28, no. 26, pp. 40024–40043, 2020.
[6] K. Wu, Q. Liu, Y. Wang, and Y. Yang, “End-to-end varifocal multiview images coding framework from data acquisition end to vision application end,” Optics Express, vol. 31, no. 7, pp. 11659–11679, 2023.
[7] K. Wu, Z. Li, Y. Yang, and Q. Liu, “Deep video compression based on long-range temporal context learning,” Computer Vision and Image Understanding, vol. 248, p. 104127, 2024.
[8] T. Liu, K. Wu, C. Cai, Y. Wang, K.-H. Yap, and L.-P. Chau, “Towards blind bitstream-corrupted video recovery: A visual foundation model-driven framework,” in Proceedings of the 33rd ACM International Conference on Multimedia, 2025, pp. 7949–7958.
[9] Y. Dong and W. D. Pan, “A survey on compression domain image and video data processing and analysis techniques,” Information, vol. 14, no. 3, p. 184, 2023.
[10] M. Horton, S. Mehta, A. Farhadi, and M. Rastegari, “Bytes are all you need: Transformers operating directly on file bytes,” arXiv preprint arXiv:2306.00238, 2023.
[11] S. Wu, X. Tan, Z. Wang, R. Wang, X. Li, and M. Sun, “Beyond language models: Byte models are digital world simulators,” arXiv preprint arXiv:2402.19155, 2024.
[12] K. Wu, F. Li, W. Liu, Q. Liu, and Y. Yang, “Corrupted bitstream semantic understanding by adaptive-modal large language models,” Pattern Recognition, vol. 180, p. 114151, 2026.
[13] J. Liang, K. Wu, X. Hu, and T. Liu, “Cibic: Pixel-free foundation model for robust corrupted image bitstream captioning,” Pattern Recognition, p. 114238, 2026.
[14] A. Stanko, O. Duda, A. Mykytyshyn, O. Totosko, and R. Koroliuk, “Artificial intelligence of things (aiot): Integration challenges, and security issues.” in BAIT, 2024, pp. 92–105.
[15] M. Al Amin and H. Y. Jung, “Fine-grained visual classification: A survey of methods, architectures, and emerging trends,” IEEE Access, 2026.
[16] T. Chen, S. Kornblith, M. Norouzi, and G. Hinton, “A simple framework for contrastive learning of visual representations,” in International conference on machine learning. PmLR, 2020, pp. 1597–1607.
[17] A. Radford, J. W. Kim, C. Hallacy, A. Ramesh, G. Goh, S. Agarwal, G. Sastry, A. Askell, P. Mishkin, J. Clark et al., “Learning transferable visual models from natural language supervision,” in International conference on machine learning. PmLR, 2021, pp. 8748–8763.
[18] J. Li, D. Li, C. Xiong, and S. Hoi, “Blip: Bootstrapping language-image pre-training for unified vision-language understanding and generation,” in International conference on machine learning. PMLR, 2022, pp. 12888–12900.
[19] E. J. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, L. Wang, W. Chen et al., “Lora: Low-rank adaptation of large language models.” ICLR, vol. 1, no. 2, p. 3, 2022.
[20] J. Sun, C. Zheng, E. Xie, Z. Liu, R. Chu, J. Qiu, J. Xu, M. Ding, H. Li, M. Geng et al., “A survey of reasoning with foundation models: Concepts, methodologies, and outlook,” ACM Computing Surveys, vol. 57, no. 11, pp. 1–43, 2025.
[21] M. Awais, M. Naseer, S. Khan, R. M. Anwer, H. Cholakkal, M. Shah, M.-H. Yang, and F. S. Khan, “Foundation models defining a new era in vision: a survey and outlook,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 47, no. 4, pp. 2245–2264, 2025.
[22] A. Jamil, M. Majid, and S. M. Anwar, “An optimal codebook for content-based image retrieval in jpeg compressed domain,” Arabian Journal for Science and Engineering, vol. 44, no. 11, pp. 9755–9767, 2019.
[23] A. Pagnoni, R. Pasunuru, P. Rodriguez, J. Nguyen, B. Muller, M. Li, C. Zhou, L. Yu, J. E. Weston, L. Zettlemoyer et al., “Byte latent transformer: Patches scale better than tokens,” in Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2025, pp. 9238–9258.
[24] J. Kallini, S. Murty, C. Manning, C. Potts, and R. Csordás, “Mrt5: Dynamic token merging for efficient byte-level language models,” in International Conference on Learning Representations, vol. 2025, 2025, pp. 56646–56669.
[25] K. M. Hou, X. Diao, H. Shi, H. Ding, H. Zhou, and C. De Vaulx, “Trends and challenges in aiot/iiot/iot implementation,” Sensors, vol. 23, no. 11, p. 5074, 2023.
[26] D. P. Sharma, X. Sun, L. Xue, X. Lin, and P. Xiong, “Privacy-preserving explainable aiot application via shap entropy regularization,” in 2025 IEEE Annual Congress on Artificial Intelligence of Things (AIoT), 2025, pp. 253–261.
[27] C. Zhang, “Dpda: Decentralized identity-based privacy-preserving data aggregation for aiot,” in 2025 IEEE 24th International Conference on Trust, Security and Privacy in Computing and Communications (TrustCom), 2025, pp. 3243–3249.
[28] H. Fu, J. Rao, F. Deng, Y. Wang, B. Zhao, Z. Liu, H. Guan, P. H. Malinowski, and L. Xu, “Aiot: Artificial intelligence and the internet of things for monitoring and prognosis of systems and structures,” IEEE Transactions on Instrumentation and Measurement, 2025.