Skip to main content

A package for bounding properties of random variables with high confidence.

Project description

ConBo: Bounding properties of random variables with high confidence

ConBo (Confidence Bounds) is the ultimate toolkit for computing distribution-free, non-parametric bounds on properties of random variables with high confidence. It is particularly useful in scenarios where no assumptions can be made about the underlying distribution, for example when working with complex models such as large language models (LLMs) or flow-based generative models.

Installation

To install the required dependencies, run:

pip install conbo

Usage

To use the confidence bounds, import functionality from the conbo module and call the desired functions. Here is an example:

from conbo import *

# Example usage
cdf, cdf_lower, cdf_upper = cdf_bounds(samples, x=[0.5])
sample_mean, exp_lower, exp_upper = expectation_bounds(samples)
sample_variance, var_lower, var_upper = variance_bounds(samples)
sample_std, std_lower, std_upper = std_bounds(samples)

Examples

You can find usage examples in the demo notebook demonstrating how to compute the confidence bounds.

Cite

This repository implements confidence bounds discussed in the paper A Probabilistic Perspective on Unlearning and Alignment for Large Language Models by Yan Scholten, Stephan Günnemann, and Leo Schwinn. Please cite our paper if you use this code in your own work:

@misc{scholten2024probabilistic,
      title={A Probabilistic Perspective on Unlearning and Alignment for Large Language Models},
      author={Yan Scholten and Stephan Günnemann and Leo Schwinn},
      year={2024},
      eprint={2410.03523},
      archivePrefix={arXiv},
      url={https://arxiv.org/abs/2410.03523},
}

Contact

For questions and feedback please contact:

Yan Scholten, Technical University of Munich
Stephan Günnemann, Technical University of Munich
Leo Schwinn, Technical University of Munich

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

conbo-0.1.1.tar.gz (5.5 kB view details)

Uploaded Source

File details

Details for the file conbo-0.1.1.tar.gz.

File metadata

  • Download URL: conbo-0.1.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for conbo-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ddff8932eadf866e43f5a719904f6e30c506e57b47417d1654101e17689ebe58
MD5 d0da0cf6dd6b21b84699d8ea9148b7a7
BLAKE2b-256 f6eabe48b49b2eaa0364cc6fec942e660241ee253135b40cac66ce2b294b322e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page