# BACON
⚠️ To browse HTML-based documentation, clone this repository and open `docs/build/html/index.html` ⚠️
BACON is an end-to-end explainable AI framework designed to produce transparent, logically grounded decision models. Unlike black-box systems, BACON explicitly constructs interpretable aggregation trees using [Graded Logic]((https://link.springer.com/book/9783031885570)), a formalism that captures nuanced reasoning with degrees of truth. These trees reveal how individual inputs contribute to the final output, offering step-by-step insight into the decision-making process. BACON has been applied to diverse, high-stakes domains such as housing decisions, vendor evaluation, clinical diagnosis, and robotic control, where clarity, trust, and human-alignment are critical.
The goal of BACON is to uncover how AI models and autonomous agents—such as humanoid robots—make decisions, particularly in mission-critical, life-threatening contexts. Gaining this understanding is essential for the safe and responsible deployment of AI, and forms the foundation for building trust in AI systems as they become integrated into everyday life.
BACON takes as input the degrees of truth associated with various feature-based statements, and uses graded logic to systematically aggregate them into a single global truth value, which then guides the final decision. The BACON architecture is built from the ground up to support explainability. It includes a permutation layer that explores possible input orderings (since commutativity is not assumed), and an aggregation layer that merges inputs based on a logical model such as the [Logic Scoring of Preference (LSP) method](https://books.google.com/books/about/Soft_Computing_Evaluation_Logic.html?id=PgtuDwAAQBAJ). The resulting model is fully explainable, highly precise, and efficient for inference.

## Benefits
BACON is designed for decision-making problems where multiple factors must be logically integrated to reach a final outcome. In modern AI-integrated environments, such decisions are often the result of human-AI collaboration. BACON emphasizes alignment with human reasoning to ensure that experts can examine, review, and refine the model in detail, allowing them to infuse their expertise into the decision process and provide essential guidance and governance. Its key benefits include:
* **End-to-End Explainability**
BACON delivers full transparency across the decision-making pipeline. It not only identifies which features influenced the outcome (feature attribution) but also how they were logically combined using graded logic. With tunable parameters, practitioners can adapt the model’s behavior to align with human judgment, ethical constraints, or policy requirements.
* **Human-AI Collaboration**
Designed for interpretability at every stage, BACON allows human experts to inspect internal logic, validate reasoning, and inject domain expertise during training. This fosters trust, enables precise refinements, and is especially valuable in domains requiring human oversight, such as healthcare, law, and mission-critical operations.
* **Lightweight and Deployable**
BACON can be trimmed and distilled into compact, interpretable functions that require no deep learning frameworks. This makes it ideal for resource-constrained applications, including edge devices, real-time systems, drones, and robotics, where speed, cost, and reliability are paramount.
## Getting Started
To begin, try the [Hello, World sample](./samples/hello-world/README.md), which uses BACON to discover 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:
```python
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!**](./samples/hello-world/README.md)
Discover classic Boolean expression from synthetic data.
* [**Iris flower classification**](./samples/iris-flowers/README.md)
Classify Iris flower types by training one-vs-rest models to distinguish each species—Setosa, Versicolor, and Virginica—from the others based on measured petal and sepal features.
* [**House purchasing decisions**](./samples/house-purchase/README.md)
Making house purchasing decisions based on different conditions.
## Resources
* [BACON Documentation](./docs/build/html/index.html)
Raw data
{
"_id": null,
"home_page": null,
"name": "bacon-net",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "classifier, explainability, interpretable-ml, logic, pytorch",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/fc/42/0f3adeb4bbd188189c01e2efcc90fc02a3e5fdfa73ba878cf411ae082359/bacon_net-0.3.0.tar.gz",
"platform": null,
"description": "# BACON\n\n\u26a0\ufe0f To browse HTML-based documentation, clone this repository and open `docs/build/html/index.html` \u26a0\ufe0f\n\nBACON is an end-to-end explainable AI framework designed to produce transparent, logically grounded decision models. Unlike black-box systems, BACON explicitly constructs interpretable aggregation trees using [Graded Logic]((https://link.springer.com/book/9783031885570)), a formalism that captures nuanced reasoning with degrees of truth. These trees reveal how individual inputs contribute to the final output, offering step-by-step insight into the decision-making process. BACON has been applied to diverse, high-stakes domains such as housing decisions, vendor evaluation, clinical diagnosis, and robotic control, where clarity, trust, and human-alignment are critical.\n\nThe goal of BACON is to uncover how AI models and autonomous agents\u2014such as humanoid robots\u2014make decisions, particularly in mission-critical, life-threatening contexts. Gaining this understanding is essential for the safe and responsible deployment of AI, and forms the foundation for building trust in AI systems as they become integrated into everyday life.\n\nBACON takes as input the degrees of truth associated with various feature-based statements, and uses graded logic to systematically aggregate them into a single global truth value, which then guides the final decision. The BACON architecture is built from the ground up to support explainability. It includes a permutation layer that explores possible input orderings (since commutativity is not assumed), and an aggregation layer that merges inputs based on a logical model such as the [Logic Scoring of Preference (LSP) method](https://books.google.com/books/about/Soft_Computing_Evaluation_Logic.html?id=PgtuDwAAQBAJ). The resulting model is fully explainable, highly precise, and efficient for inference.\n\n\n\n## Benefits\n\nBACON is designed for decision-making problems where multiple factors must be logically integrated to reach a final outcome. In modern AI-integrated environments, such decisions are often the result of human-AI collaboration. BACON emphasizes alignment with human reasoning to ensure that experts can examine, review, and refine the model in detail, allowing them to infuse their expertise into the decision process and provide essential guidance and governance. Its key benefits include:\n\n* **End-to-End Explainability**\n\n BACON delivers full transparency across the decision-making pipeline. It not only identifies which features influenced the outcome (feature attribution) but also how they were logically combined using graded logic. With tunable parameters, practitioners can adapt the model\u2019s behavior to align with human judgment, ethical constraints, or policy requirements.\n\n* **Human-AI Collaboration**\n\n Designed for interpretability at every stage, BACON allows human experts to inspect internal logic, validate reasoning, and inject domain expertise during training. This fosters trust, enables precise refinements, and is especially valuable in domains requiring human oversight, such as healthcare, law, and mission-critical operations.\n\n* **Lightweight and Deployable** \n \n BACON can be trimmed and distilled into compact, interpretable functions that require no deep learning frameworks. This makes it ideal for resource-constrained applications, including edge devices, real-time systems, drones, and robotics, where speed, cost, and reliability are paramount.\n\n## Getting Started\nTo begin, try the [Hello, World sample](./samples/hello-world/README.md), which uses BACON to discover a randomly generated classic Boolean expression (e.g., A and B or C) from synthetic data.\n\nTo 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:\n\n```python\nimport sys\nsys.path.append('<path to the bacon folder under this repo>')\n\nfrom bacon.baconNet import baconNet\nfrom bacon.visualization import print_tree_structure\nfrom bacon.utils import generate_classic_boolean_data\n```\n\n## Samples\n\n* [**Hello, World!**](./samples/hello-world/README.md)\n\n Discover classic Boolean expression from synthetic data. \n\n* [**Iris flower classification**](./samples/iris-flowers/README.md)\n\n Classify Iris flower types by training one-vs-rest models to distinguish each species\u2014Setosa, Versicolor, and Virginica\u2014from the others based on measured petal and sepal features.\n\n* [**House purchasing decisions**](./samples/house-purchase/README.md)\n\n Making house purchasing decisions based on different conditions. \n\n## Resources\n\n* [BACON Documentation](./docs/build/html/index.html)",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "BACON: Binary Aggregation Classifier for interpretable decision-making using graded logic.",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://example.com/bacon-net"
},
"split_keywords": [
"classifier",
" explainability",
" interpretable-ml",
" logic",
" pytorch"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "7c251f236c47155892df0821e055a2ae3cd3778f435219de61caae334a3af366",
"md5": "146211ec7d1fd73b8d7cbcf87106f3b1",
"sha256": "32613df79c5e8d10a63d6383e9db9e200210bc2b50ac3b2fbcedb40a7a240d00"
},
"downloads": -1,
"filename": "bacon_net-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "146211ec7d1fd73b8d7cbcf87106f3b1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 40095,
"upload_time": "2025-10-14T20:37:01",
"upload_time_iso_8601": "2025-10-14T20:37:01.194195Z",
"url": "https://files.pythonhosted.org/packages/7c/25/1f236c47155892df0821e055a2ae3cd3778f435219de61caae334a3af366/bacon_net-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fc420f3adeb4bbd188189c01e2efcc90fc02a3e5fdfa73ba878cf411ae082359",
"md5": "45bdac153c7c7baa64c4dd8e452fbc4f",
"sha256": "c81847765393e53a1c70b70a59448f6f0e4f4d63c6e4b367e056d4ced7c90269"
},
"downloads": -1,
"filename": "bacon_net-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "45bdac153c7c7baa64c4dd8e452fbc4f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 36097,
"upload_time": "2025-10-14T20:37:02",
"upload_time_iso_8601": "2025-10-14T20:37:02.376328Z",
"url": "https://files.pythonhosted.org/packages/fc/42/0f3adeb4bbd188189c01e2efcc90fc02a3e5fdfa73ba878cf411ae082359/bacon_net-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-14 20:37:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "bacon-net"
}