Stochastic Emergent Reasoning Alignment Architecture - Ethical AI Framework
Project description
SERAA: Stochastic Emergent Reasoning Alignment Architecture
A Python framework for evaluating and preserving human agency and ethical boundaries in AI, policy, and organizational decision-making.
Rooted in philosophy, built for Responsible AI, validated on real-world scenarios.
🚀 Quick Install
pip install seraa
📖 Quick Start
ollama pull qwen2.5:1.5b
Start interactive chat
seraa-chat --framework buddhist --model qwen2.5:1.5b
from seraa.llm import SeraaChat
Initialize with Buddhist ethics
chat = SeraaChat( llm_backend="ollama", model="qwen2.5:1.5b", ethical_framework="buddhist" )
Evaluate a scenario
result = chat.chat("Is it ethical to use user data without consent?") print(result['chat_response'])
Create an ethical AI agent agent = SeraaAgent( name="my_agent", moral_weights={'fairness': 0.4, 'autonomy': 0.3, 'care': 0.3}, core_values={'human_dignity': 1.0} )
Add constraints agent.add_constraint( EthicalConstraint("pac_check", lambda a: a.get('pac_score', 0) >= 0.7) )
Evaluate an action result = agent.evaluate_action({'pac_score': 0.9}) print(result.approved) # True or False
📚 What is SERAA?
- 9 Ethical Axioms derived from meta-ethics, philosophy of agency, and digital ethics
- Ternary Logic moves beyond binary right/wrong: positive, neutral, negative
- PAC (Preservation of Agentic Capacity): Empowers, doesn’t just prohibit
- Configurable: Tweak weights, constraints, and axioms for any domain or philosophy
Applications
- AI/algorithmic decision audits
- Policy and governance review (presidential, corporate, etc.)
- Autonomous agent frameworks (vehicles, bots)
- Academic research in digital ethics
✨ Features
- 9 Ethical Axioms: Comprehensive philosophical foundation
- PAC Preservation: Maintains human agentic capacity
- Ternary Logic: Beyond binary ethical judgments
- Real-World Tested: Evaluated on 35+ major decisions
- Zero Dependencies: Pure Python implementation
🎮 Command-Line Evaluation (Planned)
seraa-evaluate --event "A national executive order banning all travel from country X"
(Coming soon: pip install includes CLI)
📊 Visualizations
Generate analysis of real-world decisions:
pip install seraa[viz] python -m examples.visualize_results
Output: Publication- and social-ready graphs in /visualizations
🛡 Design Philosophy
SERAA is designed for:
- Transparency: Every output is explainable, every threshold documented
- Research-Grade Rigor: All tests pass, coverage is high, edge cases considered
- Ethical Nuance: Not just “is it legal,” but “does it preserve real moral agency?”
🧪 Running the Tests
pip install -r requirements-dev.txt pytest
📚 Documentation
Full documentation: https://seraa.readthedocs.io (coming soon)
🤝 Contributing
See CONTRIBUTING.md for how to help improve SERAA, open issues, or suggest new events for evaluation!
📄 License
MIT License - See LICENSE file
📚 Citation
@phdthesis{seraa2025, author = {Theodore Park}, title = {SERAA: Stochastic Emergent Reasoning Alignment Architecture}, school = {University of Aberdeen}, year = {2025} }
📬 Questions, Feedback & Community
- GitHub Discussions
- Bluesky: @yyeolpark.bsky.social
- Email: theodore.jb.park@gmail.com
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
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 seraa-0.1.2.tar.gz.
File metadata
- Download URL: seraa-0.1.2.tar.gz
- Upload date:
- Size: 67.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
335560edd8b8911c827470c209afcf07b8f02b7ccb3adf99b49d16ab27a50ce6
|
|
| MD5 |
cb7ff565aa75a168ab756332414272be
|
|
| BLAKE2b-256 |
fdbf7f08030a28c528be147ece1cb04ab053a79e7e7d87bee49bd7a003abf31c
|
File details
Details for the file seraa-0.1.2-py3-none-any.whl.
File metadata
- Download URL: seraa-0.1.2-py3-none-any.whl
- Upload date:
- Size: 33.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd3f06f17ba6c07c359c67e52c1d26b9a1e3eb7aa98a653cfa938a37488661b2
|
|
| MD5 |
cddd3241956cd96b7fd5e6055dd5edbc
|
|
| BLAKE2b-256 |
fed8fb06604348b1513ea734c7094c0711613de17e54c1311521774a582c1845
|