README – Replication Scripts for “EarlyStopping: Implicit Regularization for Iterative Learning Procedures in Python”, https://arxiv.org/abs/2503.16753
The full code is found here: https://github.com/EarlyStop/EarlyStopping/tree/main
This folder contains one script per figure (and one for Table 1) from the paper.
Running the main_replication.py script will reproduce all figures exactly as they appear in the manuscript except for the figures associated with the regression tree results, which take longer to run and are therefore separated out into their own scripts.
-
general_error_decomposition_plots.py• Recreates the decompositions for two different signals shown in Figure 1 (a) & (b). -
visualise_error_decomposition.py• Recreates the weak and strong error decompositions shown in Figure 2 (a) & (b). -
signals.py• Generates the true signals plotted in Figure 2 (c). -
TruncatedSVD_Replication.py• Computes the relative efficiencies in Figure 2 (d) (Truncated SVD). -
Landweber_Replication.py• Produces the efficiency curves in Figure 3 (a) & (b) (Landweber iteration). -
ConjugateGradients_Replication.py• Recreates Figure 4 (a) & (b) using Conjugate Gradient regularisation. -
L2Boost_signals.py• Generates the signal examples in Figure 5 (a) & (b) (L2 Boosting). -
L2Boost_Replication.py• Computes the replication study in Figure 6 (L2 Boosting). -
signal_estimation_comparison.py• Recreates the signal estimation plots in Figure 9 (a) & (b). -
phillips_data.py• Generates the estimation results for Phillips data in Figure 10 (a) & (b). -
ComparisonStudy.py• Produces the stopping time and error curves in Figure 11 (a) & (b). -
timing_es.py• Computes the numbers reported in Table 1 (stopping times & errors). -
Simulation_counterexample_landweber.py• Recreates Figure 12 (b) & (d) (error decomposition – Landweber). -
Simulation_counterexample_tSVD.py• Recreates Figure 12 (a) & (c) (error decomposition – Truncated SVD).
RegressionTree_additive_plots.py
• Produces the additive‑model signals in Figure 7 (Regression trees).
RegressionTree_Replication.py
• Replicates the efficiency results in Figure 8 (Regression trees).
Create a virtual environment and install the required packages from the repository root:
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txtThe dependency EarlyStoppingPy==0.0.4 provides the imported EarlyStopping package used by the replication scripts.
From the repository root:
python simulations/main_replication.py --dry-run
python simulations/{insert_script_name}.py # e.g. python simulations/RegressionTree_additive_plots.pyEach script saves its output figure(s) and prints any key numerical values to the console.