IMGNet: A Multi-Scale Relational Sliding Window Backbone with Novel Loss Function and Similarity Metrics for Embedding Learning
Authors/Creators
Description
This paper presents IMGNet, a lightweight face verification backbone that encodes visual identity through relational patterns rather than absolute feature values — a paradigm inspired by the observation that two Indonesian phrases, "matur suwun" (Javanese) and "hatur nuhun" (Sundanese), convey identical meaning through internally consistent relational structures despite different surface forms.
IMGNet introduces three contributions:
- SW Block — a novel Multi-Scale Sliding Window layer that replaces the first convolutional layer with a relational operation computing pixel difference patterns at prime window scales {3, 5, 7}. Unlike standard convolutions that operate on absolute pixel values, SW Block explicitly captures neighborhood relationships, making it inherently robust to illumination variation.
- IMG Sign MSE Loss — a novel training objective defined purely over sign-pattern agreement, without operating on absolute embedding magnitudes. This produces more stable training than amplitude-based contrastive losses (±0.40% variance vs ±2.25% for AMP MSE), and eliminates conflicting gradient pressures between sign and amplitude optimization.
- Three complementary similarity metrics — IMG Sign Score, AMP IMG Score, and Chain Score — all operating in [0, 1] and sharing a single threshold derived from IMG Sign Score sweep. A voting framework (1/3 and 2/3 majority rules) combines all three metrics for robust verification decisions.
Results — IMGNet (SW357+Conv10, 10.58 MB FP32, trained on CASIA-WebFace 490k):
- LFW: 96.27% (IMG Sign) vs 95.53% (Cosine)
- AgeDB-30: 78.80% vs 77.22%
- CALFW: 78.73% vs 78.32%
- CPLFW: 76.85% vs 74.62%
- Combined: 81.02% vs 79.49%
IMG Sign applied to ArcFace (buffalo_l) embeddings — without retraining:
- LFW: 99.58% (IMG Sign) vs 99.82% (ArcFace Cosine)
- AgeDB-30: 96.85% vs 98.07%
The near-equivalence of IMG Sign and Cosine on ArcFace embeddings establishes IMG as a model-agnostic metric framework. The Metric-Loss Alignment hypothesis proposed in this work suggests that similarity metrics should be co-designed with training objectives: embeddings trained with angular margin loss favor cosine similarity, while embeddings trained with IMG Sign MSE favor IMG Sign Score.
Companion paper: Ghozali, I. (2026). IMG: Index-Based Match Scoring with Grade. DOI: 10.5281/zenodo.20748457
Code & models: https://github.com/imamgh11/imgnet
Files
paper2_imgnet.pdf
Files
(11.4 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:fc6e6850aa67112270758e92cdbc1f28
|
11.1 MB | Download |
|
md5:8db309b7fcb9a4a719d230c486ce6a45
|
290.5 kB | Preview Download |