Abstract
Remote identity verification is increasingly vulnerable to sophisticated digital and physical forgeries. This paper introduces a novel framework for document forgery detection that combines recurrent neural networks (RNNs) with few-shot learning (FSL). By processing document images as sequences of patches and utilizing Prototypical Networks, the model achieves high accuracy in identifying fakes even for document types unseen during training. The approach demonstrates exceptional robustness to resolution variability and cross-domain generalization, outperforming several complex modern architectures.
Introduction
Remote identity verification—typically involving a selfie and an ID photo—is now a standard protocol for banking and administrative services. However, this shift has opened the door to advanced forgery techniques. Automated verification systems currently face three primary challenges: the scarcity of high-quality forged training data, a significant generalization gap when moving between different document types (e.g., from a Spanish ID to a French passport), and extreme variability in image resolution from mobile devices.
To address these hurdles, this research proposes a system that avoids learning specific document structures in favor of learning the underlying nature of forgeries. By employing a few-shot learning paradigm, the system can generalize to new document classes using only a handful of examples.
Proposed Architecture
The authors propose a "Recurrent many-to-one" architecture designed to handle varying resolutions and maintain spatial context. The process is divided into three distinct stages:
- Patch Extraction & Feature Encoding: The document is partitioned into overlapping square patches. Each patch is processed by a pre-trained CNN backbone (such as ResNet50 or EfficientNet) to extract dense feature vectors.
- Recurrent Processing: These vectors are fed sequentially into a Recurrent Unit (RU), such as an LSTM or GRU. This allows the model to "scan" the document. Because it processes a sequence, higher-resolution images simply result in longer sequences, making the model inherently flexible to input size.
- Few-Shot Learning: The model utilizes Prototypical Networks to learn a metric space where "genuine" and "fake" examples cluster together.
Few-Shot Learning Framework
To handle unseen documents, the system employs two types of Few-Shot Learning (FSL):
- Conditional FSL (C-FSL): The system is provided with the document type and compares the query against known genuine and fake examples of that specific class.
- Unconditional FSL (U-FSL): The system operates without prior knowledge of the document type, determining authenticity based on a broader pool of support data.
The model focuses on the distance between a query embedding and the "prototype" of a genuine document. This approach bypasses the need for massive datasets for every new document version issued by various authorities.
Experimental Results
The study utilized three datasets: SIDTD (Synthetic ID and Travel Documents), the UAB Dataset (real Spanish IDs with synthetic forgeries), and the Findit Dataset (French receipts with altered prices) for cross-domain testing.
Key findings include:
- Near-Perfect Detection: On the SIDTD dataset, the ResNet-based model achieved an Area Under the Curve (AUC) of 1.0 in multiple scenarios.
- Resolution Robustness: When tested on images with varying resolutions (ranging from 211 to over 4,000 pixels), the C-FSL model maintained an AUC of 99.99%.
- Cross-Domain Generalization: In a significant test of generalization, a model trained exclusively on ID documents was applied to the Findit receipt dataset. It achieved an AUC of 99.93%, proving the model learns a representation of "forgery-ness" that transcends specific document templates.
Discussion and Insights
One of the most surprising insights from the research was that traditional architectures, specifically ResNet50 and LSTMs, often outperformed more modern and complex models like Vision Transformers (ViT). This suggests that for the specific textures and artifacts associated with document forgery, traditional convolutional features remain highly effective.
While the results are promising, the authors acknowledge that the model still depends on small support sets for optimal performance. Future work aims to achieve Zero-Shot Learning, where the model can detect forgeries in entirely new document types without any prior examples. Additionally, while synthetic forgeries are sophisticated, further validation against the unpredictable nature of real-world criminal forgeries remains a priority.
Summary updated