I-106Patch Similarity Matrix
Computes self-similarity matrix of image patches
Algorithm / Model
Patch Similarity Matrix — Pixel-Level Spatial Analysis
How it works
This method analyzes patch similarity patterns for image forensic analysis:1. Patch Extraction: The image is divided into overlapping patches (typically 8×8 to 32×32 pixels). Each patch is characterized by its feature vector — pixel values, DCT coefficients, or learned features.2. Similarity Matrix Computation: A similarity matrix is computed measuring the similarity (e.g., cosine similarity, normalized cross-correlation) between all patch pairs. This matrix reveals the self-similarity structure of the image — which regions look alike.3. Self-Similarity Pattern Analysis: Natural images show specific self-similarity patterns: similar patches cluster near repeated textures and objects, and similarity falls off with spatial distance. AI-generated images may show: (a) excessive self-similarity (repetitive generation patterns), (b) similarity patterns inconsistent with scene geometry, (c) patch similarity at non-physically-motivated spatial distances (from the generator repeating learned patterns).4. Copy-Move Forensics: High patch similarity between distant image regions can indicate copy-move manipulation. The method distinguishes between natural recurrence (repeated textures, symmetric objects) and artificial duplication. Geometric matching checks for affine transformations between similar patches.5. Similarity Distribution Scoring: The overall similarity distribution is scored against expected distributions for natural images vs. AI-generated content. Features include: maximum similarity values, similarity decay with distance, number of near-duplicate patches, and spatial distribution of high-similarity regions.
Technical Parameters
Analysis type: pixel
Media: image
Input: Raw pixel data / image file
Output: Confidence score (0-100)
Processing: Client-side Canvas API
Color spaces: RGB, Grayscale as applicable
Media: image
Input: Raw pixel data / image file
Output: Confidence score (0-100)
Processing: Client-side Canvas API
Color spaces: RGB, Grayscale as applicable
Accuracy & Reliability
Moderate to High — 70-90% standalone accuracy. Performance is highest on uncompressed images and may decrease with heavy JPEG compression or social media re-encoding.
Strengths
• Fast client-side processing using Canvas API
• Effective at detecting specific AI generation artifacts
• Works with common image formats (JPEG, PNG, WebP)
• Can be combined with complementary analysis methods
• Based on established image forensics research
• Effective at detecting specific AI generation artifacts
• Works with common image formats (JPEG, PNG, WebP)
• Can be combined with complementary analysis methods
• Based on established image forensics research
Limitations
• Performance may vary with image compression level
• Social media re-encoding can affect accuracy
• Best used in combination with other forensic methods
• May produce false positives on heavily processed authentic images
• Effectiveness depends on the AI generation model used
• Social media re-encoding can affect accuracy
• Best used in combination with other forensic methods
• May produce false positives on heavily processed authentic images
• Effectiveness depends on the AI generation model used
Use Case
Detection of AI-generated or manipulated images through patch similarity matrix analysis. This method identifies patterns and artifacts that are characteristic of AI generation, contributing to a comprehensive image forensic analysis.