Intersection of Parallels as an Early Stopping Criterion

Ali Vardasbi, Maarten de Rijke, Mostafa Dehghani

Abstract

Early stopping is a fundamental technique for preventing overfitting in deep learning, yet its reliance on held-out validation sets introduces significant data inefficiency and susceptibility to label noise. This paper introduces the Cosine-Distance Criterion (CDC), a novel early stopping method that identifies the optimal stopping point by monitoring the directional alignment of weights between two parallel models initialized with different random seeds. By leveraging the geometric properties of weight space, CDC provides a robust stopping signal that requires no validation data and maintains high performance even in the presence of significant label noise.

Introduction

In the current era of deep learning, models are frequently overparameterized, containing far more parameters than training samples. While this capacity allows for the learning of complex patterns, it also renders models prone to overfitting—a state where the network begins to memorize specific noise and outliers rather than generalizable features. The standard defense against this is early stopping, which halts training when performance on a validation set begins to degrade.

However, the validation-set approach suffers from two primary limitations. First, in low-data regimes, the requirement to set aside 10-20% of labeled data for validation is a costly "data tax." Second, in datasets with noisy labels, the validation set itself becomes an unreliable proxy for true generalization. This research proposes a "validation-set-independent" criterion that detects the transition from generalization to memorization by observing the "intersection" of two parallel training trajectories.

Methodology

The Cosine-Distance Criterion (CDC)

The core of the CDC method lies in the observation that two identical models ($M_1$ and $M_2$), when initialized with different random seeds, will initially converge toward the same general solution in weight space. The authors monitor the cosine distance between the weight vectors of these parallel models throughout the training process.

This monitoring reveals a characteristic "L-curve" behavior:

  1. Phase 1 (Generalization): The cosine distance drops sharply as both models align toward a shared, generalizable understanding of the data.
  2. Phase 2 (Memorization): The curve flattens or begins to diverge as the models slow down to fit specific noise and outliers unique to the training set.

The "corner" of this L-curve represents the point of maximum generalization. The authors identify this point using either a maximum curvature calculation or a fixed threshold (e.g., stopping when cosine distance < 0.2).

Counterfactual Weights for Deep Networks

While weight alignment is straightforward in linear models, deep neural networks present a challenge: internal representations (activations) differ between parallel models, making direct weight comparison difficult. To address this, the authors introduce counterfactual weights.

By asking, "What would the weights of Model 2 look like if it shared the activation space of Model 1?", the authors use the Moore-Penrose pseudoinverse to project weights into a shared space. This allows the cosine-distance logic to be applied effectively to the final layer of deep architectures, which serves as a proxy for the model's overall state.

Experimental Evaluation

Datasets and Setup

The CDC method was evaluated across two distinct domains to test its versatility:

  • Image Classification: MNIST and CIFAR-10, with the latter corrupted by 50% random label noise to simulate difficult real-world conditions.
  • Learning to Rank (LTR): Yahoo! Webscope and MSLR-WEB30k, standard benchmarks for information retrieval tasks.

Key Results

The experiments compared CDC against standard Cross-Validation (CV) and an "Oracle" (the theoretical best-case stopping point determined by the test set).

  • Near-Oracle Performance: Across multiple benchmarks, CDC's stopping point resulted in performance nearly identical to the Oracle.
  • Robustness to Noise: On CIFAR-10 with 50% noise, CDC significantly outperformed Cross-Validation. While the noisy validation set failed to signal overfitting in the CV baseline, CDC correctly identified the point where the models began memorizing noise.
  • Consistency: In a meta-analysis of six experimental setups, CDC achieved the highest mean accuracy (or NDCG for ranking tasks) and the lowest variance, demonstrating its reliability across different tasks.

Discussion and Insights

Direction over Magnitude

A critical insight of this work is that the direction of weights (cosine distance) is a far more sensitive indicator of the transition to memorization than the magnitude of weights (Euclidean distance). The "intersection" of the parallel models' directions provides a clear signal that the "clean" portion of the data has been learned.

Stability and Efficiency

Unlike gradient-based stopping criteria, CDC is remarkably stable across various learning rates. This reduces the need for extensive hyperparameter tuning. Furthermore, while it requires training two models, it eliminates the need for a validation set, allowing the model to utilize 100% of available data for training—a significant advantage in data-scarce environments.

Limitations and Future Work

Currently, the counterfactual weight extension focuses primarily on the final layer of the network. In extremely deep or complex architectures, the activation matrix may become rank-deficient, potentially complicating the pseudoinverse calculation. Future research aims to extend this "intersection of parallels" logic to the entire model architecture, potentially establishing it as a universal law for training deep neural networks without the need for external validation data.

Summary updated

BibTeX
@inproceedings{vardasbi2022intersection,
  author = {Ali Vardasbi and Maarten de Rijke and Mostafa Dehghani},
  title = {{Intersection of Parallels as an Early Stopping Criterion}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2022},
  url = {https://openreview.net/forum?id=7v8WZ3KYcP},
}
Figure