Toward Sub-1 kB Identity-Preserving Face Compression: A Benchmark of Codecs, a Custom Learned Codec, and Studies of Resolution, Demographic Fairness, Recompression, and Adversarial Robustness
Organizations: Innovatrics
Abstract
Storing face images under a hard sub-kilobyte budget, as required for identity documents, smart-card biometrics and bandwidth-constrained verification, forces a codec to discard most of the signal while keeping what a face matcher actually reads: identity. Generic codecs optimize pixel fidelity, not the embedding distances that drive verification, so which codec, resolution and setting best preserve identity at 1024 bytes or less, and how that degrades at 512, is unclear. We benchmark ten general and face-specific codecs across resolutions, byte budgets, two datasets (controlled Color FERET, in-the-wild AI-Solutions-KK) and four anchor face matchers, with a fourteen-model ViT and CNN roster confirming the ranking is backbone-invariant. We then train a custom identity-preserving codec that hits the byte budget exactly via binary search over a frozen gain table, and run four studies: resolution, demographic fairness, recompression, and no-box adversarial robustness. Sub-kilobyte identity preservation is feasible, but which codec to deploy depends entirely on the budget. At 1024 bytes and the 112 px working resolution the problem is close to solved: modern codecs hold Color FERET equal-error rate under 0.35 percent on the ArcFace anchor. At 512 bytes the field re-sorts: AVIF, HEIF, JPEG XL and legacy JPEG collapse to 28 to 98 percent false-non-match rate at FMR 1e-4, while WebP, JPEG-AI and our byte-budgeted learned codecs stay out of that band, with 24.3 percent for WebP against 6.9 percent for our accurate variant in the wild. That re-sort, not the 1024-byte ranking, is the operational result: a codec chosen at 1 kB is not the codec to deploy at half that.
Figures & tables
| Color FERET | AI-Solutions-KK | |
|---|---|---|
| Capture conditions | controlled studio portraits | in-the-wild photographs |
| Aligned images | ||
| Identities | ||
| Verification pairs | M (all ) | M (all ) |
| Landmark source | shipped 23-pt annotation | detector + landmarker |
| Attribute provenance | dataset-supplied ground truth | model-estimated |
| Attribute | Images | % of corpus |
|---|---|---|
| Gender | ||
| male | 7,323 | 64.6 |
| female | 4,015 | 35.4 |
| Race | ||
| White | 7,079 | 62.4 |
| Asian | 2,646 | 23.3 |
| Component | Detail |
|---|---|
| OS | Ubuntu 24.04.1 LTS (Linux) |
| CPU | 2 Intel Xeon E5-2683 v4 @ 2.10 GHz (16C/32T each; 64 threads) |
| RAM | 503 GB |
| GPU | NVIDIA RTX 2080 Ti (11 GB) — latency reference; Quadro RTX 6000 (24 GB) in fleet |
| Python / PyTorch | 3.11 / 2.10.0 (CUDA 12.8), torchvision 0.25.0 |
| Codec libs | Pillow 12.2.0, pillow-heif 1.4.0 (libheif/x265 + libaom), pillow-jxl-plugin 1.3.7 (libjxl) |
| Dataset | Codec | id-cos | PSNR | SSIM | LPIPS |
|---|---|---|---|---|---|
| Budget B | |||||
| Color FERET | JPEG-AI | 0.958 | 33.2 | 0.898 | 0.205 |
| Color FERET | Ours-ACCURATE | 0.947 | 28.6 | 0.781 | 0.062 |
| Color FERET | Ours-FAST | 0.942 | 29.6 | 0.821 | 0.072 |
| Color FERET | AVIF | 0.899 | 32.2 | 0.866 | 0.247 |
| Color FERET | WebP | 0.893 | 31.8 | 0.858 | 0.225 |
| Dataset | Codec | id-cos | PSNR | SSIM | LPIPS |
|---|---|---|---|---|---|
| Budget B | |||||
| Color FERET | Ours-ACCURATE | 0.948 | 28.6 | 0.834 | 0.012 |
| Color FERET | JPEG-AI | 0.930 | 33.3 | 0.920 | 0.060 |
| Color FERET | WebP | 0.921 | 33.5 | 0.912 | 0.045 |
| Color FERET | AVIF | 0.913 | 33.0 | 0.904 | 0.088 |
| Color FERET | HEIF | 0.875 | 32.4 | 0.901 | 0.099 |
| Dataset | Codec | Budget | PSNR | SSIM | LPIPS | |
|---|---|---|---|---|---|---|
| AI-Solutions-KK | WebP | 1024 | 30.46 | 0.909 | 0.032 | 17,534 |
| AI-Solutions-KK | WebP | 512 | 26.78 | 0.830 | 0.092 | 17,534 |
| AI-Solutions-KK | Ours-ACCURATE | 1024 | 27.26 | 0.845 | 0.014 | 17,534 |
| AI-Solutions-KK | Ours-ACCURATE | 512 | 25.78 | 0.799 | 0.022 | 17,534 |
| Color FERET | WebP | 1024 | 33.45 | 0.912 | 0.045 | 11,335 |
| Color FERET | WebP | 512 | 30.07 | 0.856 | 0.133 | 11,335 |
| Op. point | Synth. | Decode (ms) | Encode (ms) | PSNR | SSIM | id-cos | Bytes | |
|---|---|---|---|---|---|---|---|---|
| transf. | CPU | GPU | GPU | (dB) | (ArcFace) | |||
| SOP | 1 | 572 | 655 | 1956 | 34.99 | 0.912 | 0.945 | 1108 |
| BOP | 2 | 599 | 632 | 1819 | 35.36 | 0.915 | 0.945 | 1108 |
| HOP | 3 | 1192 | 656 | 1945 | 35.93 | 0.919 | 0.949 | 1109 |
| Op. point | Synth. | EER % | EER % | id-cos | PSNR | Bytes |
|---|---|---|---|---|---|---|
| transf. | (ArcFace) | (EdgeFace) | (recon) | (dB) | ||
| aligned | – | 0.077 | 0.908 | – | – | – |
| SOP | 1 | 0.140 | 1.254 | 0.9347 | 31.08 | 1111 |
| BOP | 2 | 0.147 | 1.193 | 0.9350 | 31.34 | 1111 |
| HOP | 3 | 0.140 | 1.264 | 0.9407 | 31.95 | 1113 |
| Bytes | Field | Meaning |
|---|---|---|
| 1 | flags | |
| 1 | res_bucket | resolution code; raw geometry |
| 1 | sc_len | identity side-channel length (0 if none) |
| sc_len | side-channel | identity payload (ACCURATE only) |
| 2 | len( ) | length of the rANS string |
| len( ) | string | spatial latent |
| B | B | ||||
|---|---|---|---|---|---|
| Dataset | Codec | id-cos | PSNR | id-cos | PSNR |
| Color FERET | JPEG-AI | 0.958 | 33.2 | 0.865 | 30.9 |
| Color FERET | Ours-ACCURATE | 0.947 | 28.6 | 0.797 | 26.6 |
| Color FERET | Ours-FAST | 0.942 | 29.6 | 0.823 | 27.7 |
| Color FERET | AVIF | 0.899 | 32.2 | 0.748 | 29.9 |
| Color FERET | WebP | 0.893 | 31.8 | 0.840 | 30.6 |
| B | B | ||||
|---|---|---|---|---|---|
| Dataset | Codec | id-cos | PSNR | id-cos | PSNR |
| Color FERET | Ours-ACCURATE | 0.948 | 28.6 | 0.910 | 27.6 |
| Color FERET | JPEG-AI | 0.930 | 33.3 | 0.859 | 31.2 |
| Color FERET | WebP | 0.921 | 33.5 | 0.762 | 30.1 |
| Color FERET | AVIF | 0.913 | 33.0 | 0.551 | 27.7 |
| Color FERET | HEIF | 0.875 | 32.4 | 0.309 | 25.5 |
| Color FERET | AI-Solutions-KK | |||
|---|---|---|---|---|
| Codec | p5 (worst) | median | p5 (worst) | median |
| JPEG-AI | 0.742 | 0.833 | 0.680 | 0.813 |
| Ours-ACCURATE | 0.802 | 0.874 | 0.763 | 0.844 |
| Ours-FAST | 0.636 | 0.763 | 0.591 | 0.727 |
| WebP | 0.597 | 0.739 | 0.581 | 0.725 |
| AVIF | 0.333 | 0.543 | 0.313 | 0.507 |
| Resolution (px) | |||||
| Quantity | 64 | 96 | 112 | 168 | 224 |
| AC spectral energy retained vs. 224 | 0.9990 | 0.9996 | 0.9997 | 0.9999 | 1.0000 |
| Identity cosine vs. 112 (per matcher) | |||||
| ArcFace (antelopev2) | 0.938 | 0.984 | 1.000 | 0.994 | 0.994 |
| TopoFR (r100) | 0.947 | 0.985 | 1.000 | 0.995 | 0.994 |
| EdgeFace-XS | 0.968 | 0.995 | 1.000 | 0.998 | 0.997 |
| Attack | |||
|---|---|---|---|
| Li-AE (trained proxy AE + ILA) | 0.803 | 0.628 | 0.401 |
| HFC (training-free, frequency) | 0.817 | 0.632 | 0.408 |
| CLIP-surrogate (foundation) | 0.860 | 0.761 | 0.636 |
| HFC, | CLIP, | Li-AE, | ||||
|---|---|---|---|---|---|---|
| Codec | 512 B | 1024 B | 512 B | 1024 B | 512 B | 1024 B |
| JPEG 2000 | 0.005 | 0.069 | 0.021 | 0.014 | 0.116 | |
| WebP | 0.261 | 0.305 | 0.085 | 0.151 | 0.243 | 0.327 |
| Ours-FAST | 0.266 | 0.267 | 0.111 | 0.106 | 0.251 | 0.257 |
| Ours-ACCURATE | 0.350 | 0.333 | 0.144 | 0.137 | 0.310 | 0.299 |
| Study | Color FERET | AI-Solutions-KK |
|---|---|---|
| Codec benchmark | done | done |
| Reconstruction quality | done | done |
| Custom codec (Ours) | done | done |
| Resolution/preprocessing | done | done |
| Demographic fairness | done | done |
| Recompression | done | done |
| File | Contents |
|---|---|
| Verification accuracy (Sections 5 , 7 ) | |
| accuracy/metrics.csv | Master grid: EER, FNMR@FMR (bootstrap CIs on the anchor matchers), realised FMR, pair counts, EER vs. the aligned reference |
| accuracy/preproc_through_codec_kk.csv | Pre-processing operators pushed through each codec (Section 9.2 ) |
| embeddings/manifest.csv (one per dataset, on the dataset store rather than under the output root) | Provenance of every embedding array: how many crops were embedded per (matcher, source) and how many were missing, so the support behind any cell in the grid above can be checked directly |
| Image quality (Section 6 ) | |
| quality/quality_summary.csv | Median PSNR/SSIM/MS-SSIM/LPIPS/DISTS and per (dataset, codec, res, budget) |
Learned Image Compression
Learned image compression uses neural encoders, quantization, and entropy models to reduce image bitrates while balancing fidelity, perceptual quality, and task utility.
See all 120 papers