arXiv:2610.07846cs.MSOct 2026

Manuscript Offprint

arXiv:2610.07846

Scen-Opt: A Scenario Optimization Toolbox for Data-Driven Convex Programming

Ben Wooding, Simone Garatti, Marco C. Campi, Abolfazl Lavaei

Abstract

The scenario approach is a well-established statistical framework for data-driven decision-making. In particular, in data-driven optimization, the scenario approach unveils how the problem structure governs out-of-sample generalization, and offers a principled basis for assessing and certifying the reliability of the optimal solution as per constraint satisfaction. Despite its strong theoretical development and wide applicability, no software toolbox has been available to date that enables user-friendly, data-driven convex optimization within the scenario-approach framework. In this paper, we introduce Scen-Opt, an open-source software tool that integrates convex programming with data samples while providing statistical guarantees grounded in scenario theory. Scen-Opt is implemented in Python, supporting data-driven linear, quadratic, and semidefinite programming, and offers a Python-based web application with an intuitive and reactive graphical user interface (GUI) built using modern web technologies. Scen-Opt can be used directly through its online interface or installed locally, accommodating both manual input and data-file uploads (CSV, JSON, TXT, TSV, MAT, Excel, NPY, NPZ, Parquet). Built on a Python backend with a modern JavaScript frontend, Scen-Opt offers a highly user-friendly experience and efficient usability across desktops, laptops, tablets, and mobile devices. In this paper, Scen-Opt is applied to a set of representative benchmarks, demonstrating its practical effectiveness for data-driven convex optimization with guaranteed performance.

1^{1} Institute for Convergent Software Integrated Systems, Vanderbilt University, USA E-mail: ben.wooding@vanderbilt.edu

2^{2} Department of Electronics, Information and Bioengineering, Politecnico di Milano, Italy E-mail: simone.garatti@polimi.it

3^{3} Department of Information Engineering, University of Brescia, Italy E-mail: marco.campi@unibs.it

4^{4} School of Computing, Newcastle University, UK E-mail: abolfazl.lavaei@newcastle.ac.uk

Wooding et al.

1 Introduction

The increasing availability of data across scientific and engineering domains has fundamentally reshaped decision-making workflows: rather than depending solely on analytical models, which may be inaccurate, overly conservative, or impractical to obtain, there is growing interest in methods that leverage sampled observations directly to inform decision-making [27]. Data can reveal structure, expose model limitations, and support more adaptive strategies. Yet, most data-driven decision procedures offer limited assurances about how the resulting decisions will perform when confronted with new, unseen situations. In many cases, solutions are derived from data but their reliability is assessed only through ad-hoc or post-hoc testing, leaving open the fundamental question of whether such solutions generalize with some robustness beyond the observed sample.

The scenario approach [8,15,12] provides a principled answer to this challenge. Originating in convex optimization and now encompassing a broad class of data-driven decision-making schemes, scenario theory establishes rigorous probabilistic guarantees for decisions obtained from independent and identically distributed (i.i.d.) data. By characterizing the intersection between the decision and the observed data through the notion of complexity, scenario theory offers explicit bounds on the probability that a newly observed uncertainty instance will render the decision inappropriate. This risk quantification is entirely data-driven and does not rely on assumptions about the underlying probability distribution, making it suitable for a wide spectrum of applications [9,22].

When applied to convex optimization, scenario theory attains a particularly elegant form. Each data point is treated as a constraint, the complexity is the number of constraints strictly needed to reconstruct the solution (the so called support list), and the risk corresponds to the probability that a new constraint, unseen at design time, is violated by the computed solution. The structural properties of convex optimization ensure that solutions are globally optimal and unique (when the problem is strictly convex), so the connection between complexity, sample size, and generalization becomes especially transparent. These features have driven the widespread adoption of convex optimization techniques across control theory, robotics, machine learning, data science, signal processing, and many other fields.

Original contributions. Motivated by the central challenge of making reliable decisions when only sampled data are available but robust performance guarantees are still required, this paper introduces Scen-Opt a first-of-its-kind tool that leverages scenario theory to deliver user-friendly, data-driven convex optimization with rigorous probabilistic guarantees, even when only limited sampled data are available.

The main features of the proposed tool are the following:

(i) Scen-Opt leverages a Python backend with a modern JavaScript frontend, powered by a suite of state-of-the-art solvers (27 solvers supported at the time of writing) including CVX toolbox [24] and MOSEK 1^{1}, and supports three classes of scenario optimization programs (i) linear programs (LP), (ii) quadratic programs (QP) and (iii) semidefinite programs (SDP).

(ii) For each of the mentioned scenario programs, Scen-Opt supports four problem configurations: (i) the robust problem, (ii) the relaxed problem, (iii) the regularized problem, and (iv) the general formulation combining relaxation, and regularization.

(iii) Implemented as a responsive and reactive Python Flask 2^{2} web application, Scen-Opt provides an intuitive, user-friendly interface that enables efficient interaction with all scenario-optimization functionalities. Users can access and use the application directly through the web across desktops, laptops, tablets, and mobile devices without any download or installation 3^{3}.

(iv) In addition, Scen-Opt provides a Docker-based version 4^{4} that can be downloaded and executed locally, enabling users to achieve higher performance when leveraging their own computing resources.

(v) The tool supports both manual data entry and data-file uploads for sampled trajectories, providing a user-friendly interface for specifying all required inputs across the different scenario optimization programs. The full program can be uploaded in one-shot via .mat or .json, and results downloaded in the same formats. Scenario-dependent constraints can be provided either symbolically, as expressions in the uncertainty, or numerically, as pre-evaluated per-sample matrices.

Besides describing Scen-Opt, this paper demonstrates its effectiveness through a series of physical benchmarks, spanning all three supported classes of scenario optimization programs and showcasing their corresponding four sub-classes for each program type.

The web-based version of Scen-Opt is accessible at:

https://scen-opt.woodingben.com

The Scen-Opt source code, accompanied by comprehensive installation and usage instructions for the Docker-based version, can be accessed at 5^{5}:

https://github.com/Kiguli/Scen-Opt

Organization. The remainder of the paper is structured as follows. Section 2 reviews the theoretical foundations of the scenario approach in a convex optimization setting that underpin the methods and guarantees used throughout this paper. Section 3 presents the convex optimization programs supported by

1^{1} https://www.mosek.com/documentation/

2^{2} https://flask.palletsprojects.com/en/stable/

3^{3} The server has 24GB RAM and 4 vCPUs, enabling a predicted 20+ simultaneous users with a 50MB maximum uploaded file size and 2 hour timeout for any single program. Heavier computations can be run by installing Scen-Opt to their local machine.

4^{4} docker pull ghcr.io/kiguli/scen-opt:latest

docker run -p 5000:5000 ghcr.io/kiguli/scen-opt:latest

5^{5} The version described in this paper (v1.0) is permanently archived at: https://doi.org/10.5281/zenodo.23177690

Wooding et al.

Scen-Opt, outlining the three program classes and their four scenario-based variants implemented for each. Implementation details of the toolbox, including the underlying algorithms, are provided in Section 4, while the web-based graphical interface is described in Section 5. Comprehensive benchmarking results across all supported problem classes are reported in Section 6, and the paper concludes, together with directions for future development, in Section 7.

Related studies on scenario approach. Over the past two decades, the scenario approach has played a central role in advancing data-driven methods for decision-making under uncertainty. The seminal work in [8] introduced scenario-based convex programming for robust control, showing that semi-infinite constraints can be handled through randomized sampling. This line of work was further strengthened in [10, 11], which established explicit probabilistic bounds on violation and extended the framework to settings with discarded or a-posteriori-violated constraints. These developments form the foundation for a broad class of randomized and scenario-based optimization techniques that have since been generalized and applied across numerous domains.

Numerous contributions to the field have been made by many authors. Methods for convex scenario programs with multiple chance constraints are investigated in [40]. The sample complexity of random convex programs with structured uncertainty is characterized in [43], leading to less conservative bounds when exploiting problem structure. A probabilistic connection between the optimal value of scenario convex programs and that of robust and chance-constrained formulations is established in [33], with extensions to certain mixed-integer nonconvex settings; the results are further applied to infinite-dimensional linear programs in [32]. The relationship between compression learning and the original results in scenario optimization is analyzed in [31], while [30] proposes an intermediate approach to chance-constrained optimization that sits between robust optimization and fully randomized scenario methods. Distributed scenario optimization in uncertain multi-agent framework is studied in [29]. Probabilistic guarantees for convex scenario programs where validation tests are exploited to derive tighter confidence bounds on the violation probability are developed in [41]. Finally, [39,38] study exact feasibility properties of convex scenario programs with discarded constraints, providing conditions under which the tightest feasibility guarantees remain valid despite constraint removal.

A major turning point in the theory of the scenario approach is given by the works [16,22,13,21] which introduce the wait-and-judge philosophy and permit assessing generalization after a solution is obtained, using the size of a suitably defined support subsample as a measure of complexity. This enables tight, instance-specific guarantees for a quite general class of decision problems, broadening the applicability of scenario methods far beyond traditional convex optimization settings.

A further shift to enhance the broadest applicability is the new compression-based theory in [14] establishes rigorous control over the probability that newly observed data, which alter a compressed representation, providing tight finite-sample bounds under minimal assumptions. By showing that the compressed-set cardinality consistently estimates this probability in a fully agnostic setting, this abstract framework offers strong support for general observation-driven decision-making and constitutes a foundational tool for modern learning tasks involving uncertainty quantification.

References (42)