Skip to main content
QUICK REVIEW

[Paper Review] Equivalent and Approximate Transformations of Deep Neural Networks

Abhinav Kumar, Thiago Serra|arXiv (Cornell University)|May 27, 2019
Adversarial Robustness in Machine LearningComputer Science55 references11 citations
TL;DR

This paper proposes equivalent and approximate transformations for deep ReLU networks by identifying and removing stable units (always active or inactive) and collapsing layers, enabling lossless compression. It proves that any ReLU network can be globally approximated by a 2-layer shallow network, with significant reductions in linear regions via $l_1$-regularization and adversarial training, enabling efficient model compression and approximation.

ABSTRACT

Two networks are equivalent if they produce the same output for any given input. In this paper, we study the possibility of transforming a deep neural network to another network with a different number of units or layers, which can be either equivalent, a local exact approximation, or a global linear approximation of the original network. On the practical side, we show that certain rectified linear units (ReLUs) can be safely removed from a network if they are always active or inactive for any valid input. If we only need an equivalent network for a smaller domain, then more units can be removed and some layers collapsed. On the theoretical side, we constructively show that for any feed-forward ReLU network, there exists a global linear approximation to a 2-hidden-layer shallow network with a fixed number of units. This result is a balance between the increasing number of units for arbitrary approximation with a single layer and the known upper bound of $\lceil log(n_0+1) ceil +1$ layers for exact representation, where $n_0$ is the input dimension. While the transformed network may require an exponential number of units to capture the activation patterns of the original network, we show that it can be made substantially smaller by only accounting for the patterns that define linear regions. Based on experiments with ReLU networks on the MNIST dataset, we found that $l_1$-regularization and adversarial training reduces the number of linear regions significantly as the number of stable units increases due to weight sparsity. Therefore, we can also intentionally train ReLU networks to allow for effective loss-less compression and approximation.

Motivation & Objective

  • To investigate whether deep ReLU networks can be transformed into equivalent or approximated networks with fewer units or layers.
  • To identify conditions under which ReLU units can be safely removed or merged without altering network output.
  • To develop a theoretical foundation for global linear approximation of deep networks using only two hidden layers.
  • To evaluate how regularization and adversarial training affect the number of linear regions and activation patterns.
  • To enable lossless compression and efficient approximation of deep networks through structural simplification.

Proposed method

  • Identify stable ReLU units (always active or inactive) across the input domain to enable safe removal.
  • Use local equivalence to collapse layers and remove units when only a restricted input domain is required.
  • Construct a global linear approximation of any ReLU network using a 2-hidden-layer shallow network based on activation patterns.
  • Define linear regions via activation patterns and reduce network size by focusing only on relevant patterns.
  • Apply $l_1$-regularization and adversarial training to induce weight sparsity and stabilize units, reducing activation patterns.
  • Use empirical evaluation on MNIST with varying architectures and regularization schemes to measure activation patterns and convergence.

Experimental results

Research questions

  • RQ1Can ReLU networks be transformed into equivalent networks with fewer units or layers by removing stable units?
  • RQ2To what extent can local equivalence allow for layer collapse and further network simplification?
  • RQ3Is there a theoretical guarantee that any deep ReLU network can be globally approximated by a shallow 2-layer network?
  • RQ4How do $l_1$-regularization and adversarial training affect the number of linear regions and activation patterns?
  • RQ5Can structural simplification based on activation patterns lead to effective, lossless compression of deep networks?

Key findings

  • The number of activation patterns dropped from 105,480 (vanilla) to 1,121 (with $l_2$) and 1,121 (with $l_1$) in a 5,5,5,5 architecture, indicating significant reduction via regularization.
  • Adversarial training with $l_1$ regularization reduced activation patterns to 354 in a 5,5,5,5 network, achieving the lowest count among tested methods.
  • In deeper architectures (e.g., 8,8,8,8,8,8), adversarial training with $l_1$ reduced activation patterns from over 200,000 to 8,157, showing strong compression potential.
  • Models trained with $l_1$ and adversarial training achieved higher validation accuracy (up to 93.92%) while drastically reducing linear regions.
  • Theoretical analysis confirms that any ReLU network can be globally approximated by a 2-hidden-layer shallow network, balancing depth and width.
  • Stable units (always active/inactive) can be removed without affecting output, enabling lossless compression when input domain is restricted.

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.