One Trap to Block Them All: Defending Encoder Stealing via Isotropic Uniformity
Abstract
High-performance Self-Supervised Learning (SSL) encodersdeployed as Encoder-as-a-Service (EaaS) are highly vulnerable to ad-vanced contrastive model stealing attacks, such as RDA and ContSteal.Traditional defenses often stack complex modules or rely on heuristicnoise, struggling to balance privacy and utility. To address this, we pi-oneer the use of active perturbations for EaaS protection by proposingUniTrap, a simple yet effective single-module defense specifically tai-lored against contrastive-based stealing paradigms. Instead of mere dis-tance maximization, UniTrap explicitly optimizes global feature entropyvia a Gaussian potential function. This generates a stealthy perturba-tion that strictly enforces an isotropic, uniform distribution on the unithypersphere—acting as “one trap” to fundamentally block contrastivealignment. We theoretically demonstrate that this perfect uniformitycauses the attacker’s informative gradients to cancel out in the tangentspace, inducing gradient vanishing and permanently stalling surrogateoptimization. Extensive experiments confirm that our method achievesa state-of-the-art privacy-utility Pareto frontier across various bench-marks.