Frontiers of Data and Computing ›› 2025, Vol. 7 ›› Issue (6): 1-12.

CSTR: 32002.14.jfdc.CN10-1649/TP.2025.06.001

doi: 10.11871/jfdc.issn.2096-742X.2025.06.001

• Special Issue: Call for Papers for the 40th National Conference on Computer Security • Previous Articles     Next Articles

JPEG File Fragment Recognition Based on Transformer and Depth-Wise Convolution

ZHU Nan1,2,*(),HUANG Zhiyuan2   

  1. 1. Xi’an Technological University, Xi’an, Shaanxi 710021, China
    2. Shaanxi Yushu Weian Technology Co., Ltd., Xianyang, Shaanxi 712034, China
  • Received:2025-08-02 Online:2025-12-20 Published:2025-12-17
  • Contact: ZHU Nan E-mail:nanzhu.xatu@foxmail.com

Abstract:

[Objective] This paper aims to design a highly effective JPEG file fragment recognition method. [Methods] This work constructs a deep network for file fragment recognition based on the Transformer and depthwise convolution. The network uses original bytes as input. First, the embedding layer is utilized to reduce data dimensions and learn the relationships between bytes. The output of the embedding layer is respectively fed into a global feature extraction branch network composed of Transformer encoders and a local feature extraction branch network consisting of inception modules. Finally, the extracted global features and local features are concatenated and fed into the decision module for classification. [Results] On the FFT-75 dataset, for identifying 75 different types of file fragments, an overall classification accuracy of 70.7% (512 bytes) and 83.3% (4096 bytes) and a JPEG file fragment classification accuracy of 91.8% (512 bytes) and 94.2% (4096 bytes) can be achieved. [Conclusions] Both in terms of the overall classification accuracy and the JPEG file fragment classification accuracy, moderate improvement can be achieved when compared with reference methods, which verifies the effectiveness of the proposed fusion strategy of global features and local features.

Key words: electronic data forensics, file fragment type identification, JPEG file, Transformer, CNN