TLDR: This research introduces FakeIDet2, a new method and public database (FakeIDet2-db) for detecting fake identity documents while protecting user privacy. It uses small, anonymized “patches” of ID images for training AI models, making it safer for organizations to share data with researchers. The method effectively identifies various physical fake IDs, including print, screen, and composite attacks, and performs well even with limited or unseen data.
In today’s increasingly digital world, verifying a user’s identity remotely has become crucial for many online services, from banking to social media. A common method involves users submitting a picture of their identity document (ID) for verification. However, with the rapid advancements in Artificial Intelligence (AI), creating highly realistic fake IDs, both physical and digital, has become easier for malicious actors. This poses a significant challenge to security measures.
Researchers are actively working to develop sophisticated methods to detect these AI-generated fakes, which are often nearly indistinguishable from genuine IDs. A major hurdle in this effort is the scarcity of real ID data for training these detection systems. Identity documents contain highly sensitive personal information, making it difficult for ID holders (like governments, police, and banks) to share this data with AI researchers due to privacy concerns and regulations like GDPR.
A Privacy-Aware Solution: FakeIDet2
A new study proposes an innovative privacy-aware methodology to bridge this gap, fostering collaboration between ID holders and AI researchers. The core idea is to use small “patches” of ID images, rather than the entire document, to train fake ID detectors. This approach significantly reduces the amount of sensitive information shared, thereby preserving privacy.
The study introduces several key contributions. First, it presents a patch-based methodology designed to protect privacy in fake ID detection research. Second, it provides a new public database called FakeIDet2-db, which contains over 900,000 real and fake ID patches. These patches are extracted from 2,000 ID images, acquired under various conditions using different smartphone sensors, illumination, and height settings. The database also includes three common physical attacks: print, screen, and composite attacks.
Third, the researchers unveil a new privacy-aware fake ID detection method, also named FakeIDet2. This method incorporates two novel learnable modules: the Patch Embedding Extractor and the Patch Embedding Fusion. The Patch Embedding Extractor uses a powerful AI model (DINOv2) to learn unique representations from individual patches, while the Patch Embedding Fusion module intelligently combines these patch representations to make a final decision on whether an ID is real or fake.
Finally, the study releases a standard, reproducible benchmark that evaluates FakeIDet2 against both physical and synthetic attacks from popular existing databases. The results are promising, with FakeIDet2 achieving impressive accuracy in detecting highly realistic fake IDs, even those with attack types it hasn’t encountered before. For instance, it achieved an Equal Error Rate (EER) of 8.90% on the challenging DLC-2021 dataset and 13.84% on KID34K.
How FakeIDet2 Works
The FakeIDet2 system operates in three main stages. First, a Privacy-Aware Patch Extractor takes a complete ID image, applies anonymization if needed (blacking out sensitive areas), and then divides it into fixed-size patches (e.g., 64×64 or 128×128 pixels). These patches are then fed into the Patch Embedding Extractor, which uses a pre-trained AI model to generate a unique “embedding” or numerical representation for each patch. These embeddings capture the discriminative features of whether a patch comes from a real or fake ID.
A crucial aspect of the Patch Embedding Extractor is its use of an optimized loss function (AdaFace with dynamic class weights). This helps the model learn effectively, especially when dealing with imbalanced datasets where some types of fake IDs are less common than others. The dynamic weights ensure that the model pays enough attention to under-represented fake ID types, preventing them from being overlooked during training.
In the final stage, the Patch Embedding Fusion module takes all the patch embeddings from a single ID and processes them using a technique called Multi-Head Self-Attention (MHSA). This allows the system to understand the relationships between different patches within the ID, identifying subtle anomalies that might indicate tampering. For example, in a composite attack where only a small part of the ID is fake, this module can pinpoint the altered section. The fused information then goes through a final prediction layer to determine if the ID is real or fake.
Also Read:
- Beyond Pixels: A Semantic Approach to Image Forgery Detection
- Boosting Accuracy in Historical Handwritten Text Recognition
Impact and Future Directions
The research highlights the effectiveness of using anonymized patches for training, demonstrating that even with partial information, the system can achieve competitive results. This is a significant step towards enabling safer data sharing and collaboration between organizations holding sensitive ID data and AI researchers developing detection technologies. The public availability of the FakeIDet2-db database and benchmark (available at https://github.com/BiDAlab/FakeIDet2-db) is expected to accelerate further research in this critical field.
While FakeIDet2 shows strong performance against physical attacks, the study notes that its generalization to synthetic attacks (IDs generated purely by AI) is an area for future improvement, as the current model is primarily trained on physical acquisitions. Nevertheless, this work represents a substantial advancement in securing remote identity verification systems while upholding user privacy.


