Counterfeiting affects diverse industries, including pharmaceuticals, electronics, and food, posing serious health and economic risks. Printable unclonable codes, such as Copy Detection Patterns (CDPs), are widely used as an anti-counterfeiting measure and are applied to products and packaging. However, the increasing availability of high-resolution printing and scanning devices, along with advances in generative deep learning, undermines traditional authentication systems, which often fail to distinguish high-quality counterfeits from genuine prints. In this work, we propose a diffusion-based authentication framework that jointly leverages the original binary template, the printed CDP, and a representation of printer identity that captures relevant semantic information. Formulating authentication as multi-class printer classification over printer signatures lets our model capture fine-grained, device-specific features via spatial and textual conditioning. We extend ControlNet by repurposing the denoising process for class-conditioned noise prediction, enabling effective printer classification. On the Indigo 1 x 1 Base dataset, our method outperforms traditional similarity metrics and prior deep learning approaches. Results show the framework generalises to counterfeit types unseen during training.
Figures & tables
Figure 1: Examples of a binary template, authentic printed CDP, and counterfeit printed CDPs from traditional image processing and deep learning methods. Normalised cross-correlation reliably detects traditional counterfeits but is unreliable against deep learning-based ones.
Figure 2: Authentication pipeline leveraging printer signature reconstruction. The reverse diffusion process takes a noised template as input and is conditioned on the printed CDP and printer identity text. ControlNet is modified to predict noise per class and includes a classification module selecting the class with minimal prediction error.
Perr
Pmiss
Pfa
HP55
HP76
Mean
HP55_55
HP55_76
HP76_76
HP76_55
Mean
Traditional
NCC
0.286
0.292
0.310
0.301
0.300
0.361
0.264
0.201
0.273
SSIM
0.275
0.264
0.300
0.281
0.292
0.285
0.292
0.210
0.269
Deep Learning
[ 6 ]
0.091
0.125
0.111
0.118
0.097
0.16
0.000
0.000
0.064
Ours
0.023
0.049
0.035
0.005
0.000
0.014
0.007
0.000
0.042
Table 1: Authentication error rate for method comparison with baselines. Lower is better.
Predicted class (%)
HP55
HP76
HP55_55
HP55_76
HP76_76
HP76_55
Actual class (%)
HP55
95
5
0
0
0
0
HP76
3
97
0
0
0
0
HP55_55
0
0
83
15
1
1
HP55_76
1
0
14
83
1
1
HP76_76
0
1
1
1
89
8
Table 2: Confusion matrix of classification results. Values are in percentages.
Counterfeit Type
Perr
Pmiss
Pfa
Known counterfeit
0.012
0.024
0.000
Unknown counterfeit
0.012
0.024
0.000
Table 3: Authentication performance on known and unseen counterfeit types. Lower is better.
Configuration
Avg. MSE (↓)
Pretrained VAE
0.581
Fine-tuned VAE
0.075
Table 4: Mean squared reconstruction error between original and reconstructed binary templates under different configurations.
Input Configuration
Perr
Pmiss
Pfa
No Template Input
0.660
0.430
0.200
With Template Input
0.023
0.042
0.005
Table 5: Authentication error with and without template input. Lower values indicate better performance.