Exploring and Exploiting the Asymmetric Valley of Deep Neural Networks

Xin-Chun Li, Jin-Lin Tang, Bo Zhang, Lan Li, De-Chuan Zhan · DOI

TL;DR

This paper reveals that the "valley shape" in deep neural network loss landscapes isn't always symmetric. They discover that the sign consistency between the noise used for visualization and the network's learned parameters is a key driver of this asymmetry. This insight has practical implications for model fusion and federated learning, suggesting new ways to improve model aggregation.

What Problem Does This Paper Address?

Deep neural networks (DNNs) are notoriously complex, and understanding their inner workings is crucial. Visualizing their "loss landscape" – the surface representing how the network's error changes with its parameters – offers valuable insights. While previous work has categorized these landscapes into "flat" or "sharp" valleys, this paper addresses a less understood phenomenon: asymmetric valleys. These are valleys that are steeper on one side than the other. The authors aim to systematically explore why these asymmetric valleys occur and how this asymmetry can be exploited for practical applications.

Methods

The core of the paper involves visualizing 1D slices of the DNN loss landscape. They use a technique called "Norm-Scaled (NS) visualization" which normalizes noise vectors to match the magnitude of the converged model's parameters, allowing for a fair comparison across different noise directions. The key innovation here is exploring not just the magnitude but also the direction of the noise used for visualization. They systematically vary factors like dataset, network architecture, initialization, and hyperparameters, and crucially, they investigate how changing the sign of the noise relative to the converged model's parameters affects the valley's symmetry. Theoretical analysis involving ReLU activation and softmax function properties is used to explain the observed phenomena.

Datasets

The authors utilize a variety of standard datasets for their experiments:

  • sklearn.digits: A small dataset for demonstration purposes.
  • SVHN: Street View House Numbers dataset.
  • CIFAR10/100: Image classification datasets.
  • CINIC10: Another image classification dataset.
  • Flowers: A dataset of flower images.
  • Food101: A dataset of food images.
  • ImageNet: A large-scale image classification dataset, used for pre-training models.

No new benchmarks were introduced; existing datasets were used to validate the findings.

Key Insights and Ideas

  • Sign Consistency is Key: The most significant finding is that the degree of sign consistency between the noise vector and the converged model's parameters is a critical indicator of valley asymmetry. When the noise and model parameters have similar signs, the valley tends to be asymmetric.
  • Noise Direction Matters: Previous studies often used symmetric noise (like Gaussian noise centered at zero). This paper shows that the direction of the noise, especially when it aligns with the sign of the model parameters, can induce asymmetry.
  • BN Initialization's Role: Batch Normalization (BN) layers, particularly their initialization, play a role. Traditional BN initialization can lead to converged weights with predominantly positive signs, contributing to asymmetry when perturbed by sign-consistent noise.
  • ReLU and Softmax Influence: Theoretical analysis suggests that the inherent properties of ReLU activation (keeping neurons active) and softmax classification (influencing gradient and Hessian properties) can explain why sign-consistent noise leads to flatter regions in the positive direction.
  • Model Fusion Implications: The degree of sign consistency between models directly correlates with the success of linear interpolation for model fusion. Models with higher sign consistency are easier to merge.
  • Federated Learning Opportunity: Imposing sign alignment during federated learning can be an effective strategy for better model parameter aggregation.

Key Results

The paper presents extensive experimental results across various network architectures (VGG, ResNet, AlexNet, ViT) and datasets. While specific quantitative results like accuracy improvements are discussed in the context of model fusion and federated learning applications, the primary "results" are qualitative observations of valley shapes. For instance, they demonstrate that:

  • Replacing the sign of noise with that of the converged model's parameters consistently leads to asymmetric valleys across many architectures and datasets (e.g., Figures 3, 12, 13, 14, 15, 16, 17, 18, 19).
  • The sign consistency ratio between models is a strong predictor of the interpolation gap in model fusion (Figure 11).
  • Their proposed FedSign method for federated learning shows competitive performance compared to existing methods in Table 1, with specific accuracy gains noted for certain configurations.

Limitations and Future Work

  • Lack of Formal Proofs: The authors acknowledge that their theoretical insights explaining the phenomenon are not formal proofs. They suggest providing formal theoretical foundations as future work.
  • Image Classification Focus: The phenomenon has primarily been investigated in image classification tasks. Future research should verify its applicability to other domains.
  • ReLU and Softmax Dependence: The theoretical analysis suggests the phenomenon is tied to ReLU and softmax. Further investigation into DNNs with different activation functions or architectures might be needed.
  • Generalization of Findings: While the paper shows broad applicability across common architectures and datasets, exploring more diverse and complex scenarios could be beneficial.

Summary updated

BibTeX
@inproceedings{li2024exploring,
  author = {Xin-Chun Li and Jin-Lin Tang and Bo Zhang and Lan Li and De-Chuan Zhan},
  title = {{Exploring and Exploiting the Asymmetric Valley of Deep Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=CW0OVWEKKu},
}
Figure