arXiv:2610.33671cs.LGOct 2026

Manuscript Offprint

arXiv:2610.33671

Extraction meets Distillation - cryptanalytic techniques to recover parameters from a Deep Neural Network

Biprarshi Biswas, Arya Anshuman Ojha, Yubaraj Das, Devansh Khosla, Kamran Rais, Saankhya Samanta, Subhamoy Maitra, Pantelimon Stanica

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study fully connected neural-network reconstruction by combining cryptanalytic weight-direction extraction with learning from predicted labels. We adapt a ReLU extraction implementation to Leaky ReLU, compare sign-search methods, and estimate biases and output layers. We prove conditional bounds for direction recovery with approximate prefixes, preservation of local distance votes, prediction changes from aligned parameter errors, and sign selection with independent

∗^{*}This paper significantly expands the conference paper accepted for CSCML 2026. The last-named author joined the collaboration after the conference version’s acceptance, contributing to the mathematical analysis and theoretical development of the current version. This is presently a working draft towards a possible journal submission.

scoring data. We also specify exact row restoration and distinguish its guarantee from that of gradient masking. The experiments evaluate assisted extraction, with privileged access to gradients, hidden activations, and victim parameters, followed by label-based reconstruction. Across eight search seeds on the largest synthetic architecture, Leaky ReLU recovers 51–57 neurons in the deepest hidden layer, while ReLU recovers none. This advantage does not hold uniformly across architectures and layers. Removing victim-weight access from the sign walk gives less accurate signs, despite high final prediction agreement. Across 40 seeded runs on the two smallest synthetic victims, agreement on 5,000 inputs excluded from fitting and selection ranges from 0.9890 to 0.9992. On two CIFAR-10 victims, the reconstructed models achieve 56.40% and 58.29% agreement and exceed the distillation baseline on three functional metrics. We report label requests separately from privileged access and explain why prediction agreement does not identify network parameters.

Keywords: Cryptanalysis, Machine Learning, Deep Neural Networks (DNNs), Parameter Extraction, Rectified Linear Unit (ReLU), Leaky ReLU.

MSC Classification: 94A60, 68T10

1 Introduction

A model extraction attack uses access to a trained model to construct another model with similar predictions or parameters. These objectives differ. A model can agree with a classifier on a test set without recovering its weights, and a collection of accurate weight directions need not produce a useful classifier. We study how to assemble partially recovered directions into a complete network while retaining those directions during subsequent training.

Cryptanalytic extraction uses the piecewise-affine structure of networks with rectified linear activations. Carlini et al. [5] developed an extraction method using numerical network outputs. Canales-Martínez et al. [3] improved the recovery procedures, including sign recovery. Chen et al. [9] and Carlini et al. [6] studied extraction from predicted labels. RayS and HopSkipJumpAttack [7, 8] are related decision-based adversarial attacks. They find inputs that change a prediction, rather than recover the model parameters. Liu et al. [17] studied end-to-end extraction with numerical outputs. Qi et al. [20] considered several activation functions, including Leaky ReLU. We do not claim that extending extraction beyond ReLU is new by itself.

We distinguish five output interfaces, namely the predicted label, the label and its probability, the top-k probabilities, the full probability vector, and the raw logits. A label from K classes carries at most log⁡2K\log_2 K bits. This is an upper bound on the information in one response, not a parameter-recovery lower bound. Numerical outputs provide additional constraints, but they do not make exact recovery of a deep network an ordinary linear regression problem. Our intended oracle returns only a predicted label.

Our implementation builds on the code of Carlini et al. [6]. Several extraction stages read information unavailable through that oracle, including gradients, hidden activations, and true prefix weights. We disclose these accesses in Section 3.4. We therefore report the experiments as assisted extraction and reconstruction. The later learning stages use cached victim labels, but this does not remove the privileged information used to construct their initial parameters.

In this paper, we combine three procedures. First, we adapt the local slope calculations to Leaky ReLU. We evaluate accepted directions across recorded search seeds, subject to the ground-truth acceptance procedure described below. The advantage depends on architecture and layer. Second, we compare simulated annealing and parallel tempering for sign search using cached labels and the reconstructed model's logits. Third, we estimate biases from dual points, fit an output layer, and refine the network with recovered-row gradient masks. We state separately how row restoration enforces exact equality. We also batch the dual-point search and stream the clustering data. Our implementation and experimental scripts are listed in [1].

Section 2 defines the notation and the relevant identification ambiguities. Section 3 describes the extraction stages and their privileged accesses. Sections 4, 5, and 6 describe the Leaky ReLU adaptation, sign search, and reconstruction. Section 7 reports the experiments. We compare functional agreement separately from the reported direction coverage, because agreement alone does not establish parameter recovery.