Fast Implicit Constrained Optimization of Non-decomposable Objectives for Deep Networks

Yatong Chen, Abhishek Kumar, Yang Liu, Ehsan AmidHITY @ NeurIPS 2022

TL;DR

This paper tackles the challenge of optimizing deep learning models for non-decomposable metrics (like fairness or precision) under constraints. They propose a novel approach that significantly speeds up training by only optimizing the last layer's weights for the constrained objective, while the rest of the network is trained separately. This method achieves comparable performance to existing, more computationally expensive techniques.

What Problem Does This Paper Address?

Many real-world machine learning applications require optimizing for metrics that are "non-decomposable." This means the overall metric cannot be calculated by simply summing up individual data point losses. Examples include fairness metrics like "equal opportunity" or performance metrics like precision and recall. Often, these non-decomposable metrics are used in conjunction with constraints, for instance, minimizing false negatives while ensuring a specific false positive rate.

Traditional methods for handling such constrained optimization problems can be computationally expensive. A common approach, Implicit Constrained Optimization (ICO), reformulates the problem to be unconstrained by expressing the prediction thresholds as a function of all model parameters. While effective, this requires complex gradient calculations involving backward passes through the entire network, making it slow, especially with multiple constraints. The paper aims to find a more computationally efficient way to achieve similar or better performance.

Methods

The core innovation lies in decoupling the optimization process. Instead of treating all model parameters as a single unit for the constrained optimization, the authors propose to:

  1. Focus on the Last Layer: They hypothesize that the prediction thresholds, which are crucial for satisfying constraints, can be effectively controlled by optimizing only the weights of the last layer of the neural network. The rest of the network (the "bottom layers") can then be trained independently.
  2. Separate Training Objectives: They introduce a new training procedure where the bottom layers and the last layer are trained with different objectives.
  3. The bottom layers can be trained using a standard, unconstrained surrogate loss (like cross-entropy) to learn good feature representations.
  4. The last layer is trained to optimize the non-decomposable objective while satisfying the constraints.
  5. Implicit Function Theorem Adaptation: They leverage an adaptation of the Implicit Function Theorem. This theorem allows them to express the thresholds as a function of the last layer's weights ($ \lambda = h_1(\theta_L) $). This avoids the need to explicitly solve for thresholds at each step and simplifies the gradient computation.
  6. Two Proposed Methods:
    • Method 1: Trains the bottom layers with Cross-Entropy (CE) and the last layer with a constrained False Negative Rate (FNR) objective, subject to a False Positive Rate (FPR) constraint.
  7. Method 2: Minimizes FNR for the whole network but imposes FPR constraints only on the last layer. It also adds a regularization term to the bottom layer's objective to prevent trivial solutions. This method is shown to be most effective.
  8. Ablation Study: They also test a baseline where the constraint regularizer is applied to all layers, not just the last, to demonstrate the benefit of their focused approach.

Datasets

The experiments were conducted on the CelebA dataset. This dataset is commonly used for image classification tasks, and in this paper, it's used for binary classification on attributes like "High-cheekbones," "Smiling," and "Wearing-lipstick." The authors use it to evaluate their method's ability to minimize the False Negative Rate (FNR) at a given False Positive Rate (FPR).

Key Insights and Ideas

  • Last Layer Dominance: The most significant insight is that optimizing the last layer's weights is often sufficient to satisfy complex, non-decomposable rate constraints. This challenges the assumption that all model parameters must be jointly optimized for such tasks.
  • Computational Efficiency: By decoupling the optimization and focusing constraints on the last layer, the proposed methods are significantly faster than existing ICO approaches, which require backward passes through the entire network for gradient computation.
  • Role Specialization: The paper suggests that different layers play distinct roles. The bottom layers are primarily for feature extraction, while the last layer is more critical for fine-tuning predictions to meet specific rate constraints.
  • Regularization's Importance: Adding a regularization term to the bottom layer's objective (as in Method 2) is crucial to prevent the model from learning trivial solutions (e.g., always predicting positive) when optimizing for metrics like FNR.

Key Results

  • Comparable Performance: Method 2 (FPR Regularizer on $\theta_L$ + Constrained FNR on $\theta_L$) achieved performance comparable to the existing ICO method.
  • Improved Efficiency: The proposed methods are computationally more efficient than ICO, as they avoid the expensive backward passes through the entire network.
  • Method 2 Outperforms: Among the three proposed methods (Method 1, Method 2, and Ablation), Method 2 demonstrated the best performance.
  • Ablation Insight: The ablation study showed that applying the constraint regularizer to all weights (instead of just the last layer) resulted in worse performance than Method 2, reinforcing the idea that the last layer is key for constraint satisfaction.

Limitations and Future Work

  • Generalizability of Last Layer Focus: While the paper shows promise, it's worth investigating if this "last layer only" constraint optimization holds for a wider range of non-decomposable metrics and network architectures.
  • Hyperparameter Tuning: The performance of Method 2 relies on the regularization parameter $\eta$. Further exploration into optimal hyperparameter tuning strategies could be beneficial.
  • Theoretical Guarantees: While the paper uses the Implicit Function Theorem, further theoretical analysis on the conditions under which the proposed method guarantees convergence and optimality for various non-decomposable metrics would be valuable.
  • More Complex Constraints: The paper focuses on a single constraint (FPR). Extending the approach to handle multiple, potentially interacting, constraints could be a fruitful direction.

Summary updated

BibTeX
@inproceedings{chen2022fast,
  author = {Yatong Chen and Abhishek Kumar and Yang Liu and Ehsan Amid},
  title = {{Fast Implicit Constrained Optimization of Non-decomposable Objectives for Deep Networks}},
  booktitle = {HITY @ NeurIPS},
  year = {2022},
  url = {https://openreview.net/forum?id=u8kFmPafOc},
}
Figure