KAVP
Knowledge-based Aware Verifiable Policy framework for federated AI research and orchestration.
KAVP is an open-source framework for policy-aware, governance-aware, and context-aware federated AI research and orchestration. It provides typed policy graphs, constraint propagation, defeasible conflict resolution, and audit-ready evidence logging.
Status: Research framework (v0.1.0). APIs may change before 1.0.
What is KAVP?
KAVP enables researchers and developers to:
- Represent policies as typed, attributed, directed graphs
- Propagate constraints across federated node profiles
- Resolve conflicts between regulatory and organizational policies
- Generate auditable evidence with chained-hash integrity
- Orchestrate federated tasks while maintaining compliance
KAVP research spans policy-aware and governance-aware federated AI across multiple domains (healthcare, food safety, finance, etc.) without coupling the core to any single application.
Core Capabilities
- Policy Ingestion & Parsing — Load and semantically parse natural-language policies into structured representations
- Graph Construction — Build typed policy graphs with entities, constraints, actions, and jurisdictions
- Constraint Propagation — Evaluate federated node profiles against active policies with compliance scoring
- Defeasible Reasoning — Resolve conflicts between competing rules using explicit superiority and precedence
- Audit Logging — Track all decisions with timestamps, severity levels, and exportable logs
- GDPR Extension — Ready-to-use GDPR Art.5–49 typed policy graph with transfer admissibility and evidence integrity
Installation
pip install kavp
Optional Dependencies
pip install "kavp[ml]" # ML metrics, inference, unlearning
pip install "kavp[viz]" # Dashboard and graph visualization
pip install "kavp[dev]" # Build, test, and publish tools
pip install "kavp[all]" # All optional dependencies
Quick Start
import kavp
print(kavp.__version__)
# Load a sample policy scenario
ingestion = kavp.PolicyIngestion()
policies = ingestion.load_scenario("healthcare")
# Parse policies
parser = kavp.PolicyParser()
parsed_policies = [parser.parse(p.source_id, p.text) for p in policies]
# Build policy graph
builder = kavp.GraphBuilder()
graph = builder.build_graph(parsed_policies, graph_id="demo")
# Evaluate a node
profile = kavp.NodeProfile(
node_id="HOSP_A",
name="Hospital A (Berlin)",
region="EU",
domain="healthcare",
compliance_tags=["HIPAA", "GDPR"],
epsilon=1.8
)
engine = kavp.ConstraintPropagation(builder)
result = engine.evaluate_node(profile, parsed_policies)
print(f"Eligible: {result.eligible}, Score: {result.compliance_score}")
Architecture
kavp/
├── core/ # Policy ingestion, parsing, graph, constraints, orchestration
├── gdpr/ # GDPR typed policy graph and defeasible resolution
├── metrics/ # Classification, inference, MIA, and unlearning metrics [ml]
├── utils/ # Shared utilities
└── cli/ # Command-line interface
Federated AI Integration
KAVP is designed to complement existing FL runtimes (Flower, FATE, PySyft, etc.) through adapters. The core package remains domain-neutral and dependency-light. Optional adapters can be installed separately.
Policy and Governance
KAVP enforces:
- Data localization and cross-border transfer rules
- Differential privacy budget constraints
- Consent and lawful-basis validation
- Compliance framework requirements (HIPAA, GDPR, PCI-DSS, FSSAI)
- Human-review escalation for conditional or exception cases
Examples
See the examples/ directory for runnable notebooks and scripts.
Research Background
KAVP builds on peer-reviewed research in policy-aware federated learning, including:
- KAVP-PGC: Knowledge-Based Policy Graph Construction
- KAVP-GDPR: GDPR-aware federated orchestration with typed policy graphs and chained-hash evidence
Citation
If you use KAVP in academic work, please cite the associated papers. See CITATION.cff for metadata.
Documentation
Full documentation is available at https://kavp.github.io.
Contributing
See CONTRIBUTING.md for development setup and guidelines.
License
MIT License. See LICENSE for details.
Disclaimer
KAVP is a research framework. It does not provide legal advice or compliance certification.
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 kavp-0.1.0.tar.gz.
File metadata
- Download URL: kavp-0.1.0.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ac3c4aca14a9ca8705b7db4b5da4bedf13bc803fada8ff6c36a88b48598f8bb
|
|
| MD5 |
cafa713954e21454d2cdb07edc2b2392
|
|
| BLAKE2b-256 |
886bc868eb4e7e3bded7deec7f18d98e519a4dddbf129e38a734c47aaacbd670
|
File details
Details for the file kavp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: kavp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6019ac3ffd3083dbd7bccc6a26006120322c780c5468f88102ae123b564003d0
|
|
| MD5 |
1f52c8ffc2c1ff8faa149643c9fcf19f
|
|
| BLAKE2b-256 |
c901a1965647246b63410a7feb98b114206ff28345f6db693fa5a35982edeb1a
|