# Tesserae and MoDiCo: A Billion-Fragment Dataset and Multi-Branch Architecture for File Fragment Classification

*James Ghawaly*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/149205) · [OpenReview](https://openreview.net/forum?id=s9PfARYJiH) · [Open on the map](../papers.html#p149205)

Category: [Graphs, OOD Detection & Medical Imaging](../pcat/7.md) › [Domain Adaptive Vision](../pgroup/472.md) · Type: benchmark or dataset · Keywords: file fragment classification, large-scale dataset, multi-branch architecture, parallel encoders, attentive fusion, class imbalance handling

## Summary
Tesserae provides a billion-fragment dataset covering 619 file types, and MoDiCo introduces a multi-branch architecture with parallel convolutional, statistical, and transformer encoders and attentive fusion to classify fragments, achieving state-of-the-art accuracy.

## Explained to a 5-year-old
We made a big library of tiny pieces from many kinds of computer files. We built a smart robot that looks at these pieces in three ways: it checks for little patterns, it checks how often each byte appears, and it reads the order of many pieces. The robot then puts all these looks together to guess what the original file was. It learned to be good at guessing even the rarest file types.

## Explained to a 5-year-old, longer
Imagine you have a huge box of LEGO bricks from many different sets, maybe thousands of sets. Most sets have only a few bricks, and some have lots. You want to know which set each brick belongs to, but there are so many kinds that it’s hard. So you make a super-big collection of bricks from all those sets, called Tesserae. Then you build a robot that can look at a handful of bricks and learn three things: it spots little patterns like colors next to each other, it counts how often each color appears, and it reads the order of many bricks to see the big picture. The robot has three separate eyes for each of these things, and then it talks to each other using a special chat called cross-attention. After learning from the big box, the robot can guess the original set of a new handful of bricks. It also learns to be fair, so it doesn’t forget the rare sets. The robot works well on both small and big pieces of data, and you can use the same robot for different sizes without having to teach it again.

## For a technical reader
The paper introduces a large-scale dataset of file fragments and a compact multi-branch model. The model uses three parallel encoders-CNN for local byte motifs, statistical feature extractors for distribution, and a hierarchical transformer for long-range context-combined via an attentive fusion module. It addresses class imbalance with decoupled representation learning and balanced classifier retraining, achieving high balanced accuracy on 619 file types and generalizing across fragment sizes.

## Problem
Classifying file fragments into their original file types is challenging due to the vast diversity of formats and the scarcity of large, balanced datasets covering many types.

## Method
The approach processes byte fragments through three parallel encoders-convolutional networks for local motifs, statistical feature extractors for distribution, and a hierarchical transformer for long-range context-and fuses them with an attentive cross-attention module. Decoupled representation learning handles class imbalance, followed by class-balanced classifier retraining.

## Results
The approach achieves 89.12% balanced top-1 accuracy on 8KB fragments and improves over the strongest baseline by up to 17 percentage points on balanced accuracy at 4KB, with most gains on rare classes. A single model trained on 512B and 4KB fragments generalizes to 8KB inputs without retraining.

## Contributions
A massive 1.9-billion-fragment dataset covering 619 file types and a compact multi-branch architecture with parallel encoders and attentive fusion for fragment classification, along with techniques for handling severe class imbalance.

## Practical relevance
Enables forensic tools to recover a broader range of file types from limited data using a compact model.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/149205)
