Research code and experiment data for “Error Bounds for Multi-Task Gaussian Processes with Uncertain Task Correlations” by Jannis O. Lübsen and Annika Eichler. The repository evaluates robust error bounds for multi-task Gaussian processes and applies them to safe Bayesian optimization of a laser-synchronization benchmark.
| Path | Purpose |
|---|---|
example.py |
Visual one-dimensional demonstration |
run_samsbo.py |
Robust multi-task Bayesian optimization experiment |
run_comparison.py |
Single- and multi-task baseline experiments |
conservatism_est.py |
Monte Carlo study of bound violations and conservatism |
plot_scripts/conservatism_plot.py |
Violin plots for aggregated conservatism studies |
plot_scripts/generate_plots.ipynb |
Recreates the main paper figures |
bo/, model/, cov/ |
Optimization loop and multi-task GP implementation |
utils/ |
Objectives, robust bounds, MCMC, and optimization helpers |
data/ |
Initial conditions and serialized experiment results |
The code was developed with Python 3.12.8 on Ubuntu 24.04.2 LTS.
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -r requirements.txtThe laser-synchronization benchmark uses slycot. Building it from source may require BLAS/LAPACK libraries and a Fortran compiler.
Run the visual example from the repository root:
python example.pypython run_samsbo.py LbSync <disturbance>For example:
python run_samsbo.py LbSync 0.10Results are written below data/Final_runs_<disturbance>/.
python run_comparison.py LbSync <algorithm>The algorithm choices are:
st_constraints— constrained single-task Bayesian optimizationst_no_constraints— unconstrained single-task Bayesian optimizationmt_no_constraints— multi-task Bayesian optimization baseline
Example:
python run_comparison.py LbSync st_constraintsThe full runners evaluate many predefined seeds and are computationally expensive. The number of iterations and other experiment constants are defined near the top of each script.
Run one seed at a time; this is suitable for job arrays or other batch schedulers:
python conservatism_est.py --seed 0 --failure-mode sampleValid failure modes are mean, sample, and stochastic. If --seed is omitted, the script also reads SLURM_ARRAY_TASK_ID. Per-seed files are written to data/conservatism_rho_sweep_<mode>_seed_<seed>.pt.
After all requested seeds have completed, aggregate them with the same failure mode:
python conservatism_est.py --aggregate --num-seeds 1000 --failure-mode sampleThe summary is written to data/summary/<mode>_all.pt. Repeat this for the three modes, then create the violin plots:
python plot_scripts/conservatism_plot.py --metric rateThe plotting script writes PDF and PNG files to plots/. Use --help on either script to see the available output and filtering options.
Open the notebook from the repository root and run all cells:
python -m pip install jupyterlab
python -m jupyter lab plot_scripts/generate_plots.ipynbIf you use this code, please cite the accompanying paper:
@misc{lubsen2026errorbounds,
title = {Error Bounds for Multi-Task Gaussian Processes with Uncertain Task Correlations},
author = {L\"{u}bsen, Jannis O. and Eichler, Annika},
year = {2026}
}This project is released under the MIT License.