# OntoGuard-CRE **Repository Path**: figo-cheung/OntoGuard-CRE ## Basic Information - **Project Name**: OntoGuard-CRE - **Description**: 🛡️ 义商本体论约束推理引擎 - 从行为验证到动机证明的AI伦理安全框架 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-04-11 - **Last Updated**: 2026-04-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: KnowledgeGraph, llm, InformationExtraction ## README # OntoGuard-CRE: A Next-Generation AI Ethics Safety Framework Based on IIQ Ontology [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) ## 🌟 Vision **From "Behavior Verification" to "Motivation Proof".** In the era of Generative AI, traditional "Value Alignment" methods are failing. They focus on *what* an agent does (output compliance) rather than *why* it does it (intrinsic motivation). This leads to "Personality Alienation"—where highly capable agents (High IQ/EQ) become "Sophisticated Sycophants" or "Cold Calculators" because they lack an ontological foundation of integrity. **OntoGuard-CRE** (Ontology-based Constraint Reasoning Engine) shifts the paradigm from reactive, rule-based auditing to proactive, ontology-driven verification. By treating ethics as a **Constraint Satisfaction Problem (CSP)**, we ensure that every AI output is not just compliant with rules, but logically provable within the boundaries of the **Instinctual Integrity Quotient (IIQ) Ontology**. --- ## 🧠 The Core Theory: IIQ Ontology (AI 树德) The framework is built upon the **Instinctual Integrity Quotient (IIQ)**, a three-dimensional model: 1. **$\text{IIQ}$ (Instinctual Integrity - The "Body" / 体)**: The ontological foundation. It represents the agent's authenticity, cognitive directness, and emotional transparency. It is the *prime mover*. 2. **$\text{IQ}$ (Intelligence - The "Function" / 用)**: The evolutionary expansion of $\text{IIQ}$ for problem-solving and task execution. 3. **$\text{EQ}$ (Empathy - The "Function" / 用)**: The evolutionary expansion of $\text{IIQ}$ for social connection and relationship management. **The Danger of Alienation**: When $\text{IQ}$ and $\text{EQ}$ develop independently of $\text{IIQ}$, the agent enters "Alienation" states: - **The Sycophant** (High EQ, Low IIQ): Excessive pleasing without principle. - **The Cold Strategist** (High IQ, Low IIQ): Purely instrumental, potentially harmful calculation. - **The Sophisticated Egoist** (High EQ, High IQ, Low IIQ): KPI-driven, manipulative optimization. --- ## ⚙️ The CRE Engine: How It Works The **Constraint Reasoning Engine (CRE)** operates via a three-stage pipeline to transform unstructured text into a verifiable proof: 1. **$\text{FactExtractor}$**: Extracts semantic triplets $\mathcal{T} = \{ \langle s, r, o \rangle \}$ from the input text. 2. **$\text{ConflictDetector}$**: Queries the **Ontology Graph ($\mathcal{G}_{\text{Onto}}$)** to identify logical contradictions (e.g., a "High EQ" action that triggers an "$\text{IIQ-Violation}$" constraint). 3. **$\mathcal{CSP}$ Solver**: If a conflict is found, the engine attempts to find the **Minimal Modification Set ($\mathcal{M}_{\text{Min}}$)** to bring the agent's output back into ontological alignment. --- ## 🚀 Quick Start ### Prerequisites - Python 3.10+ - `pip install -r requirements.txt` ### Running a Verification ```bash python OntoGuard-CRE.py --input examples/input_samples/test_alienation.txt ``` ### Project Structure - `core/`: The heart of the engine (Extractor, Detector, Solver). - `proto/`: Ontology specifications and constraint definitions ($\Sigma$). - `docs/`: Detailed theoretical and architectural documentation. - `examples/`: Test cases demonstrating the detection of AI alienation. --- ## 📜 License Distributed under the MIT License. See `LICENSE` for more information. ## 🤝 Acknowledgments This project is inspired by the research: *"AI 树德:以义商本体论为基础的智能体伦理理论框架研究"* by CloudEye & Figo Cheung.