{"id":13631915,"url":"https://github.com/google/autobound","last_synced_at":"2026-03-12T00:33:46.598Z","repository":{"id":65981046,"uuid":"569558428","full_name":"google/autobound","owner":"google","description":"AutoBound automatically computes upper and lower bounds on functions.","archived":false,"fork":false,"pushed_at":"2025-10-24T17:41:52.000Z","size":233,"stargazers_count":364,"open_issues_count":6,"forks_count":19,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-03-04T20:41:36.574Z","etag":null,"topics":["autodiff","interval-arithmetic","jax"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-11-23T05:09:04.000Z","updated_at":"2026-02-25T16:09:35.000Z","dependencies_parsed_at":"2024-01-14T06:53:45.389Z","dependency_job_id":"0994a162-c1ec-426d-a04c-5ee2488200bf","html_url":"https://github.com/google/autobound","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/google/autobound","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fautobound","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fautobound/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fautobound/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fautobound/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/autobound/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fautobound/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30206070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autodiff","interval-arithmetic","jax"],"created_at":"2024-08-01T22:02:43.938Z","updated_at":"2026-03-12T00:33:46.583Z","avatar_url":"https://github.com/google.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# AutoBound: Automatically Bounding Functions\n\n![Continuous integration](https://github.com/google/autobound/actions/workflows/ci-build.yaml/badge.svg)\n![PyPI version](https://img.shields.io/pypi/v/autobound)\n\nAutoBound is a generalization of automatic differentiation.  In addition to\ncomputing a Taylor polynomial approximation of a function, it computes upper\nand lower bounds that are guaranteed to hold over a user-specified\n_trust region_.\n\nAs an example, here are the quadratic upper and lower bounds AutoBound computes\nfor the function `f(x) = 1.5*exp(3*x) - 25*(x**2)`, centered at `0.5`, and\nvalid over the trust region `[0, 1]`.\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"http://raw.githubusercontent.com/google/autobound/main/autobound/example_bounds.png\" alt=\"Example quadratic upper and lower bounds\"\u003e\u003c/img\u003e\n\u003c/div\u003e\n\nThe code to compute the bounds shown in this plot looks like this (see [quickstart](https://colab.research.google.com/github/google/autobound/blob/main/autobound/notebooks/quickstart.ipynb)):\n\n```python\nimport autobound.jax as ab\nimport jax.numpy as jnp\n\nf = lambda x: 1.5*jnp.exp(3*x) - 25*x**2\nx0 = .5\ntrust_region = (0, 1)\n# Compute quadratic upper and lower bounds on f.\nbounds = ab.taylor_bounds(f, max_degree=2)(x0, trust_region)\n# bounds.upper(1) == 5.1283045 == f(1)\n# bounds.lower(0) == 1.5 == f(0)\n# bounds.coefficients == (0.47253323, -4.8324013, (-5.5549355, 28.287888))\n```\n\nThese bounds can be used for:\n\n*   [Computing learning rates that are guaranteed to reduce a loss function](https://colab.research.google.com/github/google/autobound/blob/main/autobound/notebooks/safe_learning_rates.ipynb)\n*   [Upper and lower bounding integrals](https://colab.research.google.com/github/google/autobound/blob/main/autobound/notebooks/bounding_integrals.ipynb)\n*   Proving optimality guarantees in global optimization\n\nand more!\n\nUnder the hood, AutoBound computes these bounds using an interval arithmetic\nvariant of Taylor-mode automatic differentiation.  Accordingly, the memory\nrequirements are linear in the input dimension, and the method is only\npractical for functions with low-dimensional inputs.  A reverse-mode algorithm\nthat efficiently handles high-dimensional inputs is under development.\n\nA detailed description of the AutoBound algorithm can be found in\n[this paper](https://arxiv.org/abs/2212.11429).\n\n## Installation\n\nAssuming you have [installed pip](https://pip.pypa.io/en/stable/installation/), you can install this package directly from GitHub with\n\n```bash\npip install git+https://github.com/google/autobound.git\n```\n\nor from PyPI with\n\n```bash\npip install autobound\n```\n\nYou may need to [upgrade pip](https://pip.pypa.io/en/stable/installation/#upgrading-pip) before running these commands.\n\n## Testing\n\nTo run unit tests, first install the packages the unit tests depend on with\n\n```bash\npip install autobound[dev]\n```\n\nAs above, you may need to [install](https://pip.pypa.io/en/stable/installation/) or [upgrade](https://pip.pypa.io/en/stable/installation/#upgrading-pip) `pip` before running this command.\n\nThen, download the source code and run the tests using\n\n```bash\ngit clone https://github.com/google/autobound.git\npython3 -m pytest autobound\n```\n\nor\n\n```bash\npip install -e git+https://github.com/google/autobound.git#egg=autobound\npython3 -m pytest src/autobound\n```\n\n## Limitations\n\nThe current code has a few limitations:\n\n*   Only JAX-traceable functions can be automatically bounded.\n*   Many JAX library functions are not yet supported.  What _is_\n    supported is bounding the squared error loss of a multi-layer perceptron or convolutional neural network that uses the `jax.nn.sigmoid`, `jax.nn.softplus`, or `jax.nn.swish` activation functions.\n*   To compute accurate bounds for deeper neural networks, you may need to use\n    `float64` rather than `float32`.\n\n## Citing AutoBound\n\nTo cite this repository:\n\n```\n@article{autobound2022,\n  title={Automatically Bounding the Taylor Remainder Series: Tighter Bounds and New Applications},\n  author={Streeter, Matthew and Dillon, Joshua V},\n  journal={arXiv preprint arXiv:2212.11429},\n  url = {http://github.com/google/autobound},\n  year={2022}\n}\n```\n\n*This is not an officially supported Google product.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fautobound","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fautobound","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fautobound/lists"}