Skip to main content
QUICK REVIEW

[Paper Review] Reverse-Engineering Deep ReLU Networks

David Rolnick, Konrad P. Körding|arXiv (Cornell University)|Oct 2, 2019
Advanced Memory and Neural ComputingEngineering16 references15 citations
TL;DR

This paper demonstrates that deep ReLU networks can be reverse-engineered from their output by analyzing the boundaries between linear regions in the input space. By querying the network and identifying where ReLU units switch states, the method recovers the architecture, weights, and biases up to isomorphism, achieving high-accuracy reconstruction of both first and second-layer parameters in fully connected networks.

ABSTRACT

It has been widely assumed that a neural network cannot be recovered from its outputs, as the network depends on its parameters in a highly nonlinear way. Here, we prove that in fact it is often possible to identify the architecture, weights, and biases of an unknown deep ReLU network by observing only its output. Every ReLU network defines a piecewise linear function, where the boundaries between linear regions correspond to inputs for which some neuron in the network switches between inactive and active ReLU states. By dissecting the set of region boundaries into components associated with particular neurons, we show both theoretically and empirically that it is possible to recover the weights of neurons and their arrangement within the network, up to isomorphism.

Motivation & Objective

  • To investigate whether the architecture, weights, and biases of a deep ReLU network can be recovered from its output alone.
  • To develop a query-based method that identifies the structure of a ReLU network by analyzing transitions between linear regions.
  • To demonstrate that the network's internal components can be reconstructed even when the parameters are unknown and the network is not publicly accessible.
  • To explore the implications for both deep learning security and neuroscience, particularly in inferring synaptic weights from functional outputs.

Proposed method

  • The method exploits the piecewise linear nature of ReLU networks, where each ReLU unit creates a hyperplane boundary in input space when it switches between inactive and active states.
  • By issuing targeted queries around these boundaries, the algorithm identifies the location and orientation of each ReLU boundary, corresponding to a neuron's weight and bias.
  • For deeper layers, the method detects intersections between bent hyperplanes—formed by cascaded ReLU transitions—to infer the weights of higher-layer neurons.
  • The algorithm reconstructs the network by approximating the arrangement of linear regions and mapping them to individual neurons, accounting for isomorphisms such as weight scaling and neuron permutation.
  • The approach uses a combination of geometric probing and linear algebra to estimate the weight matrices and bias vectors of each layer from output responses.
  • The method is robust to network depth and works on both trained and untrained networks, with performance evaluated on MNIST, memorization tasks, and synthetic architectures.

Experimental results

Research questions

  • RQ1Can the weights and biases of a deep ReLU network be recovered solely from its output on queried inputs?
  • RQ2To what extent can the internal architecture of a ReLU network be reconstructed from the arrangement of its linear regions?
  • RQ3How does the method perform across different network depths and widths, particularly for second and higher layers?
  • RQ4What are the fundamental isomorphisms in network recovery, and how can they be handled without loss of function?
  • RQ5Can the method be applied to real-world networks, such as those trained on MNIST, with high accuracy?

Key findings

  • The algorithm successfully reconstructed the first-layer weights and biases of 2-, 3-, and 4-layer fully connected ReLU networks with high accuracy, achieving log normalized error below -5 on average.
  • For second-layer recovery in 2-hidden-layer networks, the method correctly identified a majority of neurons, with log normalized error in weights and biases consistently below -4.
  • The number of queries required to recover the first layer scaled linearly with the number of neurons, indicating efficient query complexity.
  • The method is robust to network depth and works on both untrained and trained networks, including those trained on MNIST and memorization tasks.
  • Despite unavoidable isomorphisms such as weight scaling and neuron permutation, the algorithm recovered a significant fraction of the true parameters with minimal error.
  • The approach is ineffective against defensive measures such as output noise, indicating that network designers can mitigate reconstruction by adding perturbations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.