cs.CRSep 19, 2026

Dual-Locking Learned AI Models: A PIN-Based Sparse QIM Watermarking and Adaptive Index Permutation Approach

Authors: Iva Vasic, Jesús Muñoz-Cádiz, Bata Vasic

Organizations: Faculty of Science and Medicine, University of Fribourg, 1700 Fribourg, Switzerland · Faculty of Electronic Engineering, University of Nis, 18000 Nis, Serbia · Information Technology Department, University MB, 11040 Belgrade, Serbia

Abstract

We present a dual-locking method for securing trained neural networks that combines key-driven index permutation with PIN-based watermarking based on Sparse Quantization Index Modulation (QIM). Cryptographic randomness is introduced by independently applying a uniform random permutation to each row of adaptively selected index vectors. A robust blind binary watermark is then embedded into the bias coefficients by modulating their quantized values, binding the network to a user-defined Personal Identification Number (PIN). Without the correct key, the network retains its architecture but becomes functionally impaired due to disrupted internal representations. Inverse permutation fully restores the original model accuracy, while the embedded watermark remains imperceptible and enables blind verification of key association and model authorship. To improve both locking effectiveness and recoverability, an adaptive key selection strategy redistributes high-magnitude weights to low-sensitivity positions and vice versa, increasing degradation in the locked state while preserving full recovery. Experiments on MNIST, CIFAR-10/100, and ImageNet-1K using fully connected networks, ResNet CNNs, and transformer architectures show that locking reduces accuracy below 10%, and even below 0.5% for CNNs, while the correct key fully restores performance. The watermark introduces no measurable accuracy degradation and reliably authenticates ownership. Analysis of embedding distributions across CNNs and transformers further indicates potential diagnostic value for identifying undertrained or suboptimally designed models. The proposed approach therefore provides simultaneous model protection, recovery, and ownership verification.

Figures & tables

Explore similar work

CardsList
  1. Locking Pretrained Weights via Deep Low-Rank Residual Distillation

    May 11, 2026Keitaro Sakamoto, Pierre Ablin, Federico Danieli +1Open-Weight Language ModelsLLM Security

  2. Intellectual Property Protection of Hyperdimensional Computing Classifiers: Black-Box Ownership Verification via Model Watermarking

    Oct 26, 2026Hamed Poursiami, Farshad Soleiman, Ahmad Tahmasivand +5Robust WatermarkingHyperdimensional Computing

  3. Language Model Fingerprinting Requires Rethinking Watermark Teachers

    Oct 3, 2026Jeongyeon Hwang, Anshul Nasery, Sewoong Oh +1Language Model FingerprintingFingerprint Identification