Tensorizing Generative Adversarial Nets

Xingwei Cao, Qibin Zhao

Abstract

Generative Adversarial Network (GAN) and its variants exhibit state-of-the-art performance in the class of generative models. To capture higher-dimensional distributions, the common learning procedure requires high computational complexity and a large number of parameters. The problem of employing such massive framework arises when deploying it on a platform with limited computational power such as mobile phones. In this paper, we present a new generative adversarial framework by representing each layer as a tensor structure connected by multilinear operations, aiming to reduce the number of model parameters by a large factor while preserving the generative performance and sample quality. To learn the model, we employ an efficient algorithm which alternatively optimizes both discriminator and generator. Experimental outcomes demonstrate that our model can achieve high compression rate for model parameters up to 35 times when compared to the original GAN for MNIST dataset.

Introduction

State-of-the-art Generative Adversarial Networks (GANs) are incredibly powerful at modeling complex, high-dimensional distributions, such as high-resolution images. However, this success relies heavily on massive computational resources and models with millions of parameters. A major culprit for this bloat is the use of standard Multilayer Perceptrons (MLPs). To process an image through an MLP, the multi-dimensional data must first be flattened into a 1D vector. This flattening destroys rich spatial relationships and requires massive, densely connected weight matrices. This architecture makes deploying high-quality generative models on platforms with limited memory and compute power, like smartphones, practically impossible.

Methods: Tensor Layers and FT-Nets

To address parameter bloat, this research proposes replacing traditional affine transformations (standard dense layers) with Tensor layers.

In a standard neural network layer, an input vector $x$ is multiplied by a large weight matrix $W$ ($y = \sigma(Wx + b)$). In contrast, the Tensor approach keeps the input as an $N$-way tensor (e.g., a 3D tensor for an image). The Tensor layer applies multilinear operations—specifically, $n$-mode products—using smaller weight matrices for each dimension, plus a bias tensor.

The architecture of a tensor layer, where an input tensor undergoes multilinear products with factor matrices and addition of a bias tensor to produce an output tensor.

Mathematically, this is closely related to Tucker Decomposition. Instead of a single massive weight matrix whose size is the product of the input and output dimensions, the tensor layer uses multiple smaller matrices whose sizes scale with the sum of the dimensions. The authors define networks built with these layers as FT-Nets. These networks can be trained using standard gradient-based backpropagation within adversarial setups.

Experimental Results

The proposed Tensorized GAN (TGAN) was evaluated on the MNIST dataset and synthetic 2D data to benchmark parameter compression and multi-modal distribution capture.

35x Compression on MNIST

The TGAN achieved comparable visual quality to a standard GAN while using roughly 35 times fewer parameters (12k parameters vs. 429k parameters). Crucially, when a standard GAN was artificially constrained to the same 12k parameter budget, it completely failed to generate recognizable digits, outputting only noise.

Comparison of generated MNIST samples across different iterations and parameter counts. TGAN (12k) maintains quality while the equivalent-sized GAN(2) fails.

Efficiency and Spatial Preservation

By avoiding the flattening step, tensor layers inherently preserve the multi-dimensional structure of input data, allowing the network to learn spatial relationships more naturally. On a 6-cluster synthetic dataset, TGAN successfully learned the true multi-modal distribution and exhibited faster convergence than standard GANs with similar parameter counts.

Conclusion

TGANs provide a scalable solution for deploying generative models on resource-constrained devices. By enforcing a structured, low-rank prior on weights through tensorization, the model achieves massive parameter savings without sacrificing generative performance. Future work may explore even more advanced decompositions, such as Tensor-Train or Tensor Ring, to further push the boundaries of model compression.

Summary updated

BibTeX
@misc{cao2017tensorizing,
  author = {Xingwei Cao and Qibin Zhao},
  title = {{Tensorizing Generative Adversarial Nets}},
  year = {2017},
  eprint = {1710.10772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1710.10772},
}
Figure