Ethics, baked into the math.
MAAT-Core is a minimal Python framework for experimenting with ethical and constrained optimization. Unsafe solutions are not filtered later — they become mathematically dominated by design via explicit constraint margins and strong penalties.
Maintained by Christof Krieg • Independent Research / MAAT Project
What MAAT-Core is
A compact framework for ethical decision-making in optimization. Instead of “optimize first, constrain later”, MAAT-Core places Respect constraints directly into the objective using strong penalties and interpretable margin diagnostics.
- Hard-ish constraints via large safety penalties (dominates unsafe minima)
- Constraint margins expose how close you are to violations
- Local + global search (L-BFGS-B, dual annealing)
- Reflection loop adapts safety strength based on diagnostics
When to use it
MAAT-Core is most useful when feasibility, transparency, and explicit constraints matter.
- Decision support with mandatory safety/fairness/legal bounds
- Regulated or high-stakes domains (healthcare, policy, finance)
- Prototype constraints before moving to larger ML systems
When not to use it
- High-dimensional deep RL training loops (use Safe RL toolkits)
- Real-time systems requiring millisecond-level decisions
How it works
MAAT-Core models values as weighted scalar fields over a state and enforces Respect
as inequality constraints returning margins g(state) ≥ 0.
Objective (concept)
Safety-first: if g(state) < 0, violation penalties dominate.
Minimal usage
The constraint report returns margins and actionable hints.
Example: Healthcare allocation
Allocate beds across departments under capacity and fairness constraints. MAAT-Core returns an interpretable compromise rather than a single-utility extreme.
- Capacity: Σ beds ≤ 200
- Fairness: each department ≥ 50
- Utility: maximize lives saved per bed (toy factors)
Example: Ethical infeasibility
In fairness benchmarks, MAAT-Core can reveal when constraints remain violated
despite increasing λ_safety — a signal that the ethical requirement
is unsatisfiable in the current search space (structural model changes required).
- Not “fake compliance” — explicit diagnostic
- Supports reflection-loop analysis and reporting
Reproducibility
MAAT-Core aims to stay dependency-minimal. Examples can pin environments and use deterministic seeds where applicable.
- Pin dependencies via
pip freeze > requirements-lock.txt - Use deterministic seeds for annealing experiments
- Keep benchmarks optional (core remains offline-capable)
Note: Some benchmark demos (e.g. Adult Income via OpenML) require internet access. The MAAT-Core library itself remains fully offline and dependency-minimal.
Try MAAT-Core in your browser
Interactive demo of safety-first optimization with hard ethical constraints.
What does this mean?
Natural optimum: Where the system would go without any ethical constraints.
Optimized state: Final decision after applying safety constraints.
Objective value: Cost of the final state (lower is better).
Constraint margin: Distance to the safety boundary (≥ 0 means safe).
Distance to ideal: How much ethics "pulls" the solution away from pure utility.
Status: Whether the final state respects all ethical constraints.
Contact
Want to collaborate, review, or suggest a benchmark? Reach out:
- Website: maat-research.com
- GitHub: Repository
- Discussions: GitHub Discussions
Impressum
Angaben gemäß § 5 TMG
Christof Krieg
(Independent Research / MAAT Project)
Wertheim am Main, Deutschland
Kontakt
E-Mail: christof.krieg@outlook.com
Website: https://maat-research.com
Haftung für Inhalte
Als Diensteanbieter bin ich gemäß § 7 Abs.1 TMG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 TMG bin ich als Diensteanbieter jedoch nicht verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen.
Haftung für Links
Diese Website enthält Links zu externen Websites Dritter, auf deren Inhalte ich keinen Einfluss habe. Deshalb kann ich für diese fremden Inhalte auch keine Gewähr übernehmen.
Urheberrecht
Die durch den Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen dem deutschen Urheberrecht. Beiträge Dritter sind als solche gekennzeichnet.
Dieses Projekt dient der wissenschaftlichen und ethischen Forschung. Es stellt keine rechtliche, medizinische oder finanzielle Beratung dar.