Tesserae and MoDiCo: A Billion-Fragment Dataset and Multi-Branch Architecture for File Fragment Classification
Abstract
Most deep-learning approaches to file fragment classification have been evaluated on datasets with fewer than 100 file types, a small fraction of the format diversity seen in real-world forensic recovery. We introduce Tesserae, a 1.9 billion-fragment dataset covering 619 file types collected from permissively licensed public sources, and MoDiCo, a compact 9.7M-parameter architecture that processes byte fragments through three parallel encoders with distinct inductive biases: convolutional networks for local byte motifs, statistical features for position-agnostic distributional signals, and a hierarchical transformer for long-range sequential context. An attentive fusion module combines these representations via cross-attention with learned, input-dependent weights. We address Tesserae's severe class imbalance through decoupled representation learning followed by class-balanced classifier retraining. On the 619-class evaluation, MoDiCo achieves 89.12% balanced top-1 accuracy at 8KB and outperforms the strongest baseline by up to 17 percentage points on balanced accuracy at 4KB, with most of the improvement concentrated on rare classes. A single MoDiCo model trained jointly on 512B and 4KB fragments generalizes without retraining to 8KB inputs, where it exceeds its 4KB performance. We release Tesserae, model weights, and training and evaluation code under permissive open-source licenses.