Skip to main content

BACON: Binary Aggregation Classifier for interpretable decision-making using graded logic.

Project description

BACON

⚠️ Visit HTML-based documentation here, or clone this repository and open docs/index.html ⚠️

BACON is a structural reinforcement mechanism that constrains autonomous agents to reason through coherent, human-aligned logical aggregation patterns. By regulating how information can be combined, BACON ensures that learned decision processes remain structurally transparent, semantically stable, and diagnostically interpretable.

This structural discipline is applicable to high-stakes decision domains where interpretability and logical coherence are essential. For instance, in medical diagnosis, BACON can discover cost-efficient and transparent diagnostic pathways by explicitly modeling mandatory and compensatory clinical features. In AI code generation systems, BACON can regulate architectural impact patterns, ensuring that generated changes respect established structural constraints. In human–robot interaction scenarios, BACON can constrain how social cues, contextual factors, and normative rules are integrated, promoting humanoid decisions that follow coherent commonsense reasoning patterns rather than arbitrary latent correlations.

By enforcing a shared structural reasoning framework, BACON establishes common ground between humans and autonomous agents. Such structural transparency forms a foundation for trust, reliability, and effective human–AI collaboration.

Demonstrated Results

  • Identified a minimal sufficient subset of 8 out of 30 clinical features while preserving diagnostic accuracy in breast cancer prediction (see Paper I).
  • Reduced projected gallstone screening costs by over 62% through structurally optimized diagnostic pathways (see Paper II).
  • Discovered stable and interpretable aggregation patterns across 10 heterogeneous disease datasets (see Paper III).

How BACON Works


TTT

Getting Started

To begin, try the Hello, World sample, which uses BACON to approximate a randomly generated classic Boolean expression (e.g., A and B or C) from synthetic data.

To use BACON in your own program, note that it is implemented as a Python module built on top of PyTorch. Before the package is officially published, you can clone this repository and reference the module via a local path:

import sys
sys.path.append('<path to the bacon folder under this repo>')

from bacon.baconNet import baconNet
from bacon.visualization import print_tree_structure
from bacon.utils import generate_classic_boolean_data

Samples

  • Hello, World!

    Discover classic Boolean expression from synthetic data.

Testing

This repository now uses a structured pytest layout for maintainable growth:

  • tests/unit/ for fast, isolated tests
  • tests/integration/ for multi-component or end-to-end tests

Install test dependencies:

pip install -e .[test]

Run unit tests only:

pytest -m "unit"

Run integration tests only:

pytest -m "integration"

Run all structured tests:

pytest

GitHub Actions runs both unit and integration suites on pull requests to main.

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

bacon_net-0.3.2.tar.gz (136.4 kB view details)

Uploaded Source

Built Distribution

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

bacon_net-0.3.2-py3-none-any.whl (134.3 kB view details)

Uploaded Python 3

File details

Details for the file bacon_net-0.3.2.tar.gz.

File metadata

  • Download URL: bacon_net-0.3.2.tar.gz
  • Upload date:
  • Size: 136.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for bacon_net-0.3.2.tar.gz
Algorithm Hash digest
SHA256 e333e8ed6d56cc17e39cb2cbc262c8be183b69fd144f8a9774bc098664c4b7a3
MD5 e9a199e21b2c9d1388076dd8ce529d0d
BLAKE2b-256 ada5b073f2a1fde490670a423128106a6723e8c3b3564704d4af19703a6f4d9c

See more details on using hashes here.

File details

Details for the file bacon_net-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: bacon_net-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 134.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for bacon_net-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb0928fbeba6af905a3674ad0aded0addd549bd5de66f31ffc533a6cdf3526dc
MD5 b81640177426700991afdac4ddaecaff
BLAKE2b-256 7e0e4d5a5fde95511058b93494767072d498cd5665a98c343dab7bb9efc68ff6

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