Skip to main content

Behavior Learning (BL): Learning Hierarchical Optimization Structures from Data

Project description

Behavior Learning (BL)

Behavior Learning (BL) is a general-purpose machine learning framework grounded in behavioral science. It unifies predictive performance and intrinsic interpretability within a single modeling paradigm. BL learns explicit optimization structures from data by parameterizing a compositional utility function built from interpretable modular blocks. Each block represents a Utility Maximization Problem (UMP), a foundational framework of decision-making and optimization. BL supports architectures ranging from a single UMP to hierarchical compositions, enabling expressive yet structurally transparent models. Unlike post-hoc explanation methods, BL provides interpretability by design while maintaining strong empirical performance on high-dimensional tasks.

Installation

blnetwork can be installed via PyPI or directly from GitHub.

Pre-requisites:

Python 3.10.9 or higher
pip

For developers

git clone https://github.com/YueLiang-hye/Behavior-Learning.git
cd blnetwork
pip install -e .

Installation via github

pip install git+https://github.com/YueLiang-hye/Behavior-Learning.git

Installation via PyPI:

pip install blnetwork

Requirements

# python==3.10.9
torch>=2.2
numpy>=1.26
pandas>=2.0
scikit-learn>=1.3

After activating the virtual environment, you can install specific package requirements as follows:

pip install -r requirements.txt

Optional: Conda Environment Setup For those who prefer using Conda:

conda create --name blnetwork-env python=3.10.9
conda activate blnetwork-env
pip install git+https://github.com/YueLiang-hye/Behavior-Learning.git  # For GitHub installation
# or
pip install blnetwork  # For PyPI installation

Computation Requirements

BL is implemented in PyTorch and supports both CPU and GPU training.

  • Small-scale tabular examples run on a single CPU within a few minutes.
  • High-dimensional settings may benefit from GPU acceleration (e.g., NVIDIA L40).

For most tabular tasks, CPU training is sufficient.

Examples

Start with the notebooks in examples/:

Advice on hyperparameter tuning

In many cases, BL can achieve comparable (or slightly better) performance than an MLP baseline using roughly one third of the hidden width.

Other hyperparameters can be initialized based on standard MLP tuning, and then refined for the specific task.

Contact

If you have any questions, please contact yue.liang@student.uni-tuebingen.de

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

blnetwork-0.1.0.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blnetwork-0.1.0-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

Details for the file blnetwork-0.1.0.tar.gz.

File metadata

  • Download URL: blnetwork-0.1.0.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for blnetwork-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d3e4833ed0db56de920b1b154bf698ebd95c35cc3835f4bb84e14fb084919cdf
MD5 5b333f6d3641734a8ad350db527e4283
BLAKE2b-256 78e03055902b836004490d1803ed1f034de3c50eb3b97355d74dcba38e1d3e12

See more details on using hashes here.

File details

Details for the file blnetwork-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: blnetwork-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.9

File hashes

Hashes for blnetwork-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fb0ed86b75461df180f16ca8ca0354e62b203eb2d391a40eef9cf2c4251b880
MD5 6212df3916ba9aa8a611598bc3d5b712
BLAKE2b-256 66bf76b2fe3ed4d71b23b87928b816b0ba605c599d5fff8a54b5ff3496d6ec37

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