NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Fast(er) Reconstruction of Shredded Text Documents via Self-Supervised Deep Asymmetric Metric Learning

Thiago M. Paixão, Rodrigo Ferreira Berriel, Maria C. S. Boeres, Alessandro L. Koerich, Claudine Badue, Alberto F. De Souza, Thiago Oliveira-Santos

Introduction

Reconstructing shredded documents is a critical task in forensic investigations. When documents are destroyed using mechanical strip-shredders, the resulting fragments often contain only partial strokes of text, making manual reconstruction a painstaking process. While automated methods using deep learning have shown promise, they frequently suffer from extreme computational overhead, limiting their practical use in large-scale investigations.

The document reconstruction pipeline, from input shreds to final reconstruction.

The Scalability Bottleneck

State-of-the-art automated reconstruction typically involves training a Convolutional Neural Network (CNN) to act as a "compatibility evaluator." This network takes a pair of shreds and outputs a score indicating how well they fit together. However, to reconstruct a document with $N$ shreds, an algorithm must evaluate every possible pair, leading to $O(N^2)$ neural network inferences. For a multi-page document with hundreds of shreds, this quadratic scaling becomes a massive bottleneck, often requiring hours of computation for a single reconstruction.

Deep Asymmetric Metric Learning

To address this bottleneck, this research introduces a Deep Asymmetric Metric Learning approach. The core innovation lies in decoupling the feature extraction from the compatibility scoring.

Decoupled Projection

Instead of a single network evaluating pairs, the system uses two distinct CNNs: $f_{left}$ for the right edge of a left-hand shred and $f_{right}$ for the left edge of a right-hand shred. These models project raw pixel data into a low-dimensional embedding space. Because each shred edge is processed only once to generate its embedding, the heavy CNN computation scales linearly ($O(N)$) with the number of shreds.

Visualization of the asymmetric projection models and the resulting embedding space.

Asymmetric and Self-Supervised

The models are "asymmetric" because the visual features of a character's left side differ significantly from its right side; thus, the two networks do not share weights. Training is performed in a self-supervised manner: intact digital documents are "virtually shredded" to create a massive dataset of ground-truth positive and negative pairs. A contrastive loss function is then used to ensure that matching edges are mapped to nearby points in the embedding space, while non-matching edges are pushed apart.

Furthermore, the system handles vertical misalignment—a common issue in physical shredding—by extracting sequences of embeddings along the shred edge. Finding the best fit then becomes a simple 1D shift-and-compare operation in the embedding space, which is computationally negligible compared to re-running a CNN.

Experimental Results

The proposed method was evaluated against two primary datasets: D1 (uniform academic documents) and D2 (realistic mechanically shredded documents with misalignments and damage).

  • Efficiency: The most striking result is the speedup. For a collection of 505 shreds, the proposed method completed reconstruction in under 4 minutes, compared to approximately 80 minutes for previous state-of-the-art deep learning methods—a 22x speedup.
  • Accuracy: On the challenging D2 dataset, the method achieved 97.22% accuracy, surpassing previous benchmarks. While accuracy on the D1 dataset was slightly lower (93.14%), this was attributed to the presence of non-textual graphic elements that were not included in the text-focused training data.

Conclusion

By shifting the computational burden from $O(N^2)$ neural network inferences to simple $O(N^2)$ distance calculations in a low-dimensional embedding space, this approach makes large-scale document reconstruction feasible. Future work will focus on extending this metric learning framework to more complex destruction patterns, such as cross-cut shredding and hand-torn fragments.

Summary updated

BibTeX
@inproceedings{paixao2020fast,
  author = {Thiago M. Paixão and Rodrigo Ferreira Berriel and Maria C. S. Boeres and Alessandro L. Koerich and Claudine Badue and Alberto F. De Souza and Thiago Oliveira-Santos},
  title = {{Fast(er) Reconstruction of Shredded Text Documents via Self-Supervised Deep Asymmetric Metric Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.01435},
}
Figure