Model Extraction
An API that returns logits returns more than it means to. What is extractable ranges from a distilled approximation to, for the final layer, exact parameters up to symmetry.
Functional extraction is distillation with the victim as teacher: query, collect outputs, fit a student. Query efficiency is the whole game, and active selection near the decision boundary beats uniform sampling by orders of magnitude.
Exact extraction is stronger and narrower. Because the logit layer is a linear map from a -dimensional hidden space to outputs, its image is a -dimensional subspace of . Collecting more than linearly independent logit vectors and taking an SVD recovers that subspace — and hence , the hidden width — from the singular value spectrum alone.
The defences follow directly from the mechanism: return top- rather than full logits, add calibrated noise, or bind an unrecoverable per-account transform to the head. Rate limiting alone does not help against an attacker whose query budget is measured in dollars.