Your Network May Need to Be Rewritten: Network Adversarial Based on High-Dimensional Function Graph Decomposition

Xiaoyan Su, Yinghao Zhu, Run LiarXiv 2024 · DOI

Introduction

Deep learning architectures rely heavily on non-linear activation functions like ReLU, Sigmoid, or GeLU to model complex data relationships. However, the uniform application of these functions across all layers introduces two significant challenges: Internal Covariate Shift (ICS) and Gradient Deviation. As data propagates through deep networks, input distributions shift, forcing layers to constantly adapt, while gradients often vanish or explode due to the cumulative effect of activation derivatives.

This paper proposes a "network adversarial" approach that moves away from seeking a single perfect activation function. Instead, it introduces a mathematical "tug-of-war" using alternating pairs of adversarial functions to maintain internal balance and stabilize gradient flow.

Methodology: Network Adversarial Methods

The core of the proposed approach is the creation of adversarial functions with opposite derivative properties. The authors define two primary strategies:

Global Adversarial (GA)

For relatively simple functions like Sigmoid, the authors derive an adversarial function $\xi(x)$ such that its derivative is the reciprocal of the original function's derivative. By alternating these functions between layers, a small gradient in one layer is mathematically compensated by a large gradient in the next, ensuring a smooth and consistent gradient signal throughout the network.

Split Adversarial (SA) and HD-FGD

Complex functions like Tanh or GeLU are more difficult to invert directly. To address this, the authors introduce High-Dimensional Function Graph Decomposition (HD-FGD). This technique breaks complex functions into simpler components, maps them into a higher-dimensional space via parallel linear layers, solves for their adversarial counterparts, and reassembles them.

Overview of the Network Adversarial Method, illustrating Global Adversarial (GA) and Split Adversarial (SA) strategies using HD-FGD.

Key Insights

  • Gradient Balancing: Treating stability as a balancing act prevents exponential decay or growth of signals during backpropagation.
  • Symmetry and Power: Functions with derivatives symmetric about the y-axis were found to handle extreme inputs more effectively.
  • Parallel Efficiency: Decomposing complex activations into parallel "split" terms via HD-FGD allows for faster training by distributing math across parallel matrices, reducing computational bottlenecks.

Experimental Results

The researchers evaluated the adversarial method across Computer Vision (CIFAR-10/100) and Natural Language Processing (German-to-English translation) benchmarks. The results demonstrate dramatic improvements in both stability and accuracy.

Comparison of standard Sigmoid vs. Sigmoid Adversarial across gradient distribution, data distribution, and predictive performance (MSE).

In Computer Vision tasks, applying the Sigmoid GA method to ResNet34 on CIFAR-10 improved accuracy from 37.48% to 75.53%. For Vision Transformers (ViT), accuracy rose from 29.66% to 39.41%, while training time per epoch dropped from 104.55s to 89.38s. In NLP, the adversarial Sigmoid achieved a BLEU score of 21.88, outperforming the modern standard GeLU (21.30).

Conclusion and Future Work

The network adversarial method offers a powerful alternative to standard activation layers, effectively mitigating gradient issues and improving convergence. While the current implementation requires manual derivation of adversarial functions and careful hyperparameter tuning for HD-FGD splits, it paves the way for "smooth adversarialization" in even deeper and more complex architectures. Future research will likely focus on automating these derivations to integrate the method seamlessly into standard deep learning pipelines.

Summary updated

BibTeX
@misc{su2024your,
  author = {Xiaoyan Su and Yinghao Zhu and Run Li},
  title = {{Your Network May Need to Be Rewritten: Network Adversarial Based on High-Dimensional Function Graph Decomposition}},
  year = {2024},
  eprint = {2405.03712},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.03712},
}
Figure