Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Error Bounds for Multi-Task Gaussian Processes with Uncertain Task Correlations

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.

Repository layout

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

Requirements

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.txt

The laser-synchronization benchmark uses slycot. Building it from source may require BLAS/LAPACK libraries and a Fortran compiler.

Quick start

Run the visual example from the repository root:

python example.py

Reproducing the optimization experiments

Robust multi-task method

python run_samsbo.py LbSync <disturbance>

For example:

python run_samsbo.py LbSync 0.10

Results are written below data/Final_runs_<disturbance>/.

Comparison methods

python run_comparison.py LbSync <algorithm>

The algorithm choices are:

  • st_constraints — constrained single-task Bayesian optimization
  • st_no_constraints — unconstrained single-task Bayesian optimization
  • mt_no_constraints — multi-task Bayesian optimization baseline

Example:

python run_comparison.py LbSync st_constraints

The 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.

Conservatism study

Run one seed at a time; this is suitable for job arrays or other batch schedulers:

python conservatism_est.py --seed 0 --failure-mode sample

Valid 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 sample

The 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 rate

The plotting script writes PDF and PNG files to plots/. Use --help on either script to see the available output and filtering options.

Main paper figures

Open the notebook from the repository root and run all cells:

python -m pip install jupyterlab
python -m jupyter lab plot_scripts/generate_plots.ipynb

Citation

If 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}
}

License

This project is released under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages