Skip to main content

gemseo-box-subdivision

PyPI PyPI - Python Version PyPI - License CI Documentation

A laboratory for exploring optimization algorithms built on GEMSEO.

Installation

pip install gemseo-box-subdivision

Python 3.10 to 3.13. This also installs GEMSEO and gemseo-bilevel-outer-approximation.

Documentation

https://simoneconiglio.github.io/gemseo-box-subdivision/

Page Contents
Methodology the bi-level problem, the cuts, the trust region, the constructions
Implementation the layers, the building blocks and their pitfalls
Usage setting up each construction, and applying them to a new problem
Results what is measured, against enumeration and four baselines
Conclusion what is established, what is not, and where it can go

What it does

The package is a GEMSEO plugin implementing the box-subdivision outer approximation, a bi-level method for multimodal non-linear problems. The design space is cut into a Cartesian grid of boxes, which turns the choice of a region into a categorical variable: a mixed-integer master decides which box to look into from the cuts of the boxes already solved, and a local solver does the rest inside it. Exploration and local exploitation stay in two distinct levels.

from gemseo_box_subdivision import BoxSubdivisionScenario

scenario = BoxSubdivisionScenario(
    [objective_discipline], "f", design_space, n_subdivisions=10
)
scenario.execute()

The scenario owns the assembly, which is a set of invariants rather than a set of choices: chaining the mapping before the objective, building the design space from the same subdivision, naming the variables the master optimizes over, selecting the formulation, and sizing the trust region. What it leaves to you is what the measurements say decides a run.

What is measured

On Rastrigin in two dimensions over $100$ boxes it reaches the optimum after solving twenty to thirty-six of them, about three times cheaper than solving all of them. In five dimensions, with ten subdivisions per variable, it reaches the optimum from every starting point for $1920$ evaluations, which no baseline here does at any budget tried.

The subdivision has to resolve the basins of the landscape, and it can afford to: the master grows with the one-hot binaries, not with the boxes, so five variables subdivided ten times each is a hundred thousand boxes and only fifty binaries. That is the ceiling; the floor is the spacing of the basins, and refining past them degrades the result rather than merely costing more.

Where the subdivision does not resolve the basins, other methods do better. At a small budget, the regime this method targets, Bayesian optimization explores the hard multimodal cases better than it does, at a hundred times its cost in its own time. The results report both sides.

Two settings decide a run

Neither has a default that transfers between problems.

from gemseo_box_subdivision import BoxSubdivisionSettings

BoxSubdivisionSettings(
    convexity_margin=80.0,  # absolute, in the units of *your* objective
    trust_region_radius=2,  # in components changed, and small
)

convexity_margin guards the outer-approximation cuts against the non-convexity of a multimodal problem. Left unguarded, as GEMSEO's master is by default, the cuts are invalid: the master converges after two or three sub-problems and reports success far from the optimum. The settings pick one of the two mechanisms and switch the other off, since measuring both at once measures neither.

trust_region_radius counts the components a candidate box may change, every subdivision being weighed alike. Keep it small: widening it to the diameter of the design space loses Rastrigin at five variables, and removing the region is worse still.

Or let the margin sweep itself

The margin is absolute, so calibrating it is the standing criticism of the method. The master already probes a ladder of trust-region radii per iteration, one per parallel point; the same probes can sweep a ladder of convexity values, the low rungs proposing the box next door and the high rungs the box across the design space, with every probe that proposes nothing new redeployed a rung higher. That is a separate entry point rather than a setting: a run that sweeps has no convexity to calibrate, and its rungs are the parallel points the master already probes. The user supplies an upper bound, or nothing at all:

from gemseo_box_subdivision import SweptBoxSubdivisionSettings

SweptBoxSubdivisionSettings()

Given nothing, the bound is computed from the objective as the run observes it: the spread over the boxes already solved, lifted by a decade of headroom, so no number in the units of the objective is ever asked for.

On Rastrigin and Ackley, whose objectives differ by a factor of four in scale, that reaches the optimum from every starting point on both, which no single margin does. The sweep itself belongs to the master, under its settings convexity_sweep_points and convexity_sweep_max; against a master predating them the settings fall back to the conservative end of the ladder, and the benchmarks drive it from outside instead. See annex C.

Beyond a flat subdivision

The same entry point covers the constructions, each answering one reason for a flat subdivision to be out of reach:

# Subdivide the variables the objective is multimodal in, at a density each.
BoxSubdivisionScenario([d], "f", space, n_subdivisions={"x_1": 10, "x_2": 4})

# A resolution of 4 ** 2 per component, on 4 * 2 binaries per variable.
BoxSubdivisionScenario([d], "f", space, n_subdivisions=4, levels=2)

and refine_deep, refine_two_levels and refine_frontier build hierarchies that refine a box rather than subdividing finely.

Development

git clone https://github.com/SimoneConiglio/gemseo-box-subdivision.git
cd gemseo-box-subdivision
python -m pip install tox tox-uv
tox -e py3.12       # tests
tox -e check        # pre-commit hooks
tox -e doc          # documentation, into docs/_build/html
tox -e benchmark    # algorithm benchmarks

See CONTRIBUTING.md.

Bugs and questions

Please use the GitHub issue tracker.

Contributors

  • Simone Coniglio

Metadata

Release files for gemseo-box-subdivision 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gemseo-box-subdivision 0.2.0
File Size Uploaded
gemseo_box_subdivision-0.2.0.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for gemseo-box-subdivision 0.2.0
File Interpreter ABI Platform
gemseo_box_subdivision-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / gemseo_box_subdivision-0.2.0.tar.gz

Download URL gemseo_box_subdivision-0.2.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
a40e66d85d8fd482a8c696cda5d394f3f9181bcc68b08c7b46e952096d4098c4
BLAKE2b-256 checksum
How to use checksums
dfffc47fed73aff32ef47a9b4bcc32650f1d557dd5ee23e8e9a53feedde94e90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release files / gemseo_box_subdivision-0.2.0-py3-none-any.whl

Download URL gemseo_box_subdivision-0.2.0-py3-none-any.whl
Size 63.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
43ddd33b5a441c16fe0ccb2664152e765880f3fd2118abde90381e95e2e72178
BLAKE2b-256 checksum
How to use checksums
607186e2dd4be649149d7a52999f9d95ebcca12341d7c4f5f74dd1fc48c364c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page