An implementation of the Aerial neurosymbolic association rule mining algorithm from tabular datasets.
Project description
pyaerial: scalable association rule mining
📥 Install | 🚀 Quick Start | ✨ Features | 📚 Documentation | 📄 Cite | 🤝 Contribute | 🔑 License
PyAerial is a Python implementation of the Aerial scalable neurosymbolic association rule miner for tabular data. It utilizes an under-complete denoising Autoencoder to learn a compact representation of tabular data, and extracts a concise set of high-quality association rules with full data coverage.
Unlike traditional exhaustive methods (e.g., Apriori, FP-Growth), Aerial addresses the rule explosion problem by learning neural representations and extracting only the most relevant patterns, making it suitable for large-scale datasets. PyAerial supports GPU acceleration, numerical data discretization, item constraints, and * classification rule extraction* and rule visualization via NiaARM library (see Features for complete list).
Learn more about the architecture, training, and rule extraction in our paper: Neurosymbolic Association Rule Mining from Tabular Data
Installation
Install PyAerial using pip:
pip install pyaerial
Quick Start
from aerial import model, rule_extraction, rule_quality
from ucimlrepo import fetch_ucirepo
# Load a categorical tabular dataset
breast_cancer = fetch_ucirepo(id=14).data.features
# Train an autoencoder on the loaded table
trained_autoencoder = model.train(breast_cancer)
# Extract association rules from the autoencoder
association_rules = rule_extraction.generate_rules(trained_autoencoder)
# Calculate rule quality statistics
if len(association_rules) > 0:
stats, association_rules = rule_quality.calculate_rule_stats(
association_rules,
trained_autoencoder.input_vectors
)
print(f"Extracted {stats['rule_count']} rules\n")
# Display a sample rule
sample_rule = association_rules[0]
print(f"Sample Rule: {sample_rule}")
Output:
Extracted
15
rules
Sample
Rule: {
"antecedents": ["inv-nodes__0-2"],
"consequent": "node-caps__no",
"support": 0.702,
"confidence": 0.943,
"zhangs_metric": 0.69
}
Interpretation:
This rule indicates that when the inv-nodes feature has a value between 0-2, there is a strong likelihood (94.3%
confidence) that node-caps equals no. The rule covers 70.2% of the dataset.
Quality metrics explained:
- Support: Frequency of the rule in the dataset (how often the pattern occurs)
- Confidence: How often the consequent is true when antecedent is true (rule reliability)
- Zhang's Metric: Correlation measure between antecedent and consequent (-1 to 1; positive values indicate positive correlation)
Overall statistics across all 15 rules:
{
"rule_count": 15,
"average_support": 0.448,
"average_confidence": 0.881,
"average_coverage": 0.860,
"average_zhangs_metric": 0.318
}
Can't get results you looked for? See Debugging in our documentation.
Features
PyAerial provides a comprehensive toolkit for association rule mining with advanced capabilities:
- Scalable Rule Mining - Efficiently mine association rules from large tabular datasets without rule explosion
- Frequent Itemset Mining - Generate frequent itemsets using the same neural approach
- ARM with Item Constraints - Focus rule mining on specific features of interest
- Classification Rules - Extract rules with target class labels for interpretable inference
- Numerical Data Support - Built-in discretization methods (equal-frequency, equal-width)
- Customizable Architectures - Fine-tune autoencoder layers and dimensions for optimal performance
- GPU Acceleration - Leverage CUDA for faster training on large datasets
- Quality Metrics - Comprehensive rule evaluation (support, confidence, coverage, Zhang's metric)
- Rule Visualization - Integrate with NiaARM for scatter plots and visual analysis
- Flexible Training - Adjust epochs, learning rate, batch size, and noise factors
How Aerial Works?
Aerial employs a three-stage neurosymbolic pipeline to extract high-quality association rules from tabular data:
1. Data Preparation
Categorical data is one-hot encoded while tracking feature relationships. Numerical columns require pre-discretization ( equal-frequency or equal-width methods available). The encoded values are transformed into vector format for neural processing.
2. Autoencoder Training
An under-complete denoising autoencoder learns a compact representation of the data:
- Architecture: Logarithmic reduction (base 16) automatically configures layers, or use custom dimensions
- Bottleneck design: The encoder compresses input to the original feature count, forcing the network to learn meaningful associations
- Denoising mechanism: Random noise during training improves robustness and generalization
Example: Rule extraction process using weather and beverage features
3. Rule Extraction
Rules emerge from analyzing the trained autoencoder using test vectors:
- Test vectors are created with equal probabilities across categories
- Specific features are set to 1 (antecedents) while others remain at baseline
- Forward passes through the network produce output probabilities
- Rules are extracted when probabilities exceed similarity thresholds
- Quality metrics (support, confidence, coverage, Zhang's metric) are calculated
Complete three-stage pipeline: data preparation → training → rule extraction
Learn more: For detailed explanations of the architecture, theoretical foundations, and experimental results, see our paper: Neurosymbolic Association Rule Mining from Tabular Data
Documentation
For detailed usage examples, API reference, and advanced topics, visit our comprehensive documentation:
📚 Read the full documentation on ReadTheDocs
Documentation includes:
- Getting Started - Installation and basic usage
- User Guide - Detailed examples for all features
- API Reference - Complete function and class documentation
- Advanced Topics - GPU usage, debugging, visualization
- How It Works - Understanding Aerial's architecture and algorithm
Citation
If you use PyAerial in your work, please cite our research and software papers:
@InProceedings{pmlr-v284-karabulut25a,
title = {Neurosymbolic Association Rule Mining from Tabular Data},
author = {Karabulut, Erkan and Groth, Paul and Degeler, Victoria},
booktitle = {Proceedings of The 19th International Conference on Neurosymbolic Learning and Reasoning},
pages = {565--588},
year = {2025},
editor = {H. Gilpin, Leilani and Giunchiglia, Eleonora and Hitzler, Pascal and van Krieken, Emile},
volume = {284},
series = {Proceedings of Machine Learning Research},
month = {08--10 Sep},
publisher = {PMLR},
url = {https://proceedings.mlr.press/v284/karabulut25a.html}
}
@article{pyaerial,
title = {PyAerial: Scalable association rule mining from tabular data},
journal = {SoftwareX},
volume = {31},
pages = {102341},
year = {2025},
issn = {2352-7110},
doi = {https://doi.org/10.1016/j.softx.2025.102341},
author = {Erkan Karabulut and Paul Groth and Victoria Degeler},
}
Contact
For questions, suggestions, or collaborations, please contact:
Erkan Karabulut 📧 e.karabulut@uva.nl 📧 erkankkarabulut@gmail.com
Contribute
We welcome contributions from the community! Whether you're fixing bugs, adding new features, improving documentation, or sharing feedback, your help is appreciated.
How to contribute:
- 🐛 Report bugs - Open an issue describing the problem
- 💡 Suggest features - Share your ideas for improvements
- 📝 Improve docs - Help us make the documentation clearer
- 🔧 Submit PRs - Fork the repo and create a pull request
- 💬 Share feedback - Contact us with your experience using PyAerial
Feel free to open an issue or pull request on GitHub, or reach out directly!
Contributors
All contributors to this project are recognized and appreciated! The profiles of contributors will be listed here:
Made with contrib.rocks.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyaerial-1.0.6.tar.gz.
File metadata
- Download URL: pyaerial-1.0.6.tar.gz
- Upload date:
- Size: 15.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e80300905b30be1eecdfa7b5f24d180d1cad217a118020a09f991df1d000bda
|
|
| MD5 |
300dce8a9b7613fd67c23cf8cbcd348b
|
|
| BLAKE2b-256 |
e7263fed0adccc702bc4359a8e46423e42194a4edae7c15e7e093082d1ebb462
|
Provenance
The following attestation bundles were made for pyaerial-1.0.6.tar.gz:
Publisher:
release.yml on DiTEC-project/pyaerial
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyaerial-1.0.6.tar.gz -
Subject digest:
0e80300905b30be1eecdfa7b5f24d180d1cad217a118020a09f991df1d000bda - Sigstore transparency entry: 652192939
- Sigstore integration time:
-
Permalink:
DiTEC-project/pyaerial@e835c667967b1607bfe0210b09c13d3738ea69be -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/DiTEC-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e835c667967b1607bfe0210b09c13d3738ea69be -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyaerial-1.0.6-py3-none-any.whl.
File metadata
- Download URL: pyaerial-1.0.6-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
185e15258dd98056eb295abbb46f00c7bd47bc07cdd232b6e827f653a2165c31
|
|
| MD5 |
9f3c7211a9d901d9941db1a55afd4736
|
|
| BLAKE2b-256 |
74d44a5f23e2bfa0528592e054e3c4e5fce63589ea79cf2f16a92cc6f3b4b965
|
Provenance
The following attestation bundles were made for pyaerial-1.0.6-py3-none-any.whl:
Publisher:
release.yml on DiTEC-project/pyaerial
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyaerial-1.0.6-py3-none-any.whl -
Subject digest:
185e15258dd98056eb295abbb46f00c7bd47bc07cdd232b6e827f653a2165c31 - Sigstore transparency entry: 652192955
- Sigstore integration time:
-
Permalink:
DiTEC-project/pyaerial@e835c667967b1607bfe0210b09c13d3738ea69be -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/DiTEC-project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e835c667967b1607bfe0210b09c13d3738ea69be -
Trigger Event:
push
-
Statement type: