Skip to main content

coreason-enclave

Project description

coreason-enclave

License: Prosperity 3.0 CI Status Code Style: Ruff Documentation

Privacy-Preserving Compute Layer for Federated Learning

coreason-enclave is the "Embassy" / Secure Compute Wrapper of the CoReason AI ecosystem. It acts as the privacy-preserving compute layer, allowing orchestration of training jobs across distributed nodes (e.g., multiple hospitals or partner pharma companies) without accessing their raw data. It combines Federated Learning, Confidential Computing (TEEs), and Differential Privacy to ensure a mathematical guarantee of privacy.

Core Philosophy: "Move the Model to the Data. Never move the Data. Encrypt the RAM."


🚀 Features

  • Federated Learning (FL): Orchestrate training across distributed nodes using NVIDIA FLARE. Only weight updates (gradients) are shared, never raw data. Supports FedAvg, FedProx, and SCAFFOLD strategies.
  • Confidential Computing: Designed to run inside hardware-encrypted Trusted Execution Environments (TEEs) (e.g., NVIDIA H100 Confidential Compute, Intel SGX). This ensures memory is encrypted at the CPU level, protecting against cloud provider inspection. Includes Remote Attestation to cryptographically prove code integrity.
  • Differential Privacy (DP): Integrated with Opacus to inject Gaussian noise into gradients, strictly enforcing a privacy budget ($\epsilon$).
  • The "Sightless" Surgeon: The AI learns from data it never "sees."
  • Data Sentry: An "Airlock" mechanism that validates input data and strictly sanitizes output, ensuring no sensitive information leaks via logs or return payloads.

🛠️ Installation

pip install coreason-enclave

💻 Usage

The coreason-enclave agent typically runs as a service managed by an orchestrator, but can be invoked directly or integrated into custom workflows.

Basic Initialization

from coreason_enclave.federation.executor import CoreasonExecutor
from coreason_enclave.schemas import FederationJob

# Initialize the Executor
executor = CoreasonExecutor(
    training_task_name="train",
    aggregation_task_name="aggregate"
)

# Note: In production, this is handled automatically by the NVFlare runtime.
# The executor listens for tasks from the Federation Overseer.

Running the Agent (CLI)

To start the agent as a standalone client connecting to a federation:

# Secure Mode (Requires TEE Hardware)
python -m coreason_enclave.main \
    --workspace /tmp/workspace \
    --conf config/client_config.json

# Simulation Mode (For Development/Testing)
python -m coreason_enclave.main \
    --workspace /tmp/workspace \
    --conf config/client_config.json \
    --simulation

For more detailed requirements and architecture, please refer to the Product Requirements Document.

📜 License

This project is licensed under the Prosperity Public License 3.0. See the LICENSE file for details.

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

coreason_enclave-0.1.0.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coreason_enclave-0.1.0-py3-none-any.whl (35.4 kB view details)

Uploaded Python 3

File details

Details for the file coreason_enclave-0.1.0.tar.gz.

File metadata

  • Download URL: coreason_enclave-0.1.0.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for coreason_enclave-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9ac97324a61045b8e96b3186c48fb0a6a0d8ebd964e825ea956e42b8f7079301
MD5 7d1a20ce5999d1fa2f61573aded018e0
BLAKE2b-256 61273a1c13704f46cb63b1a93b2dd9a4f8d663d4635132a97a3c26ea132fd03a

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_enclave-0.1.0.tar.gz:

Publisher: publish.yml on CoReason-AI/coreason-enclave

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coreason_enclave-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for coreason_enclave-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c48ebd42212460a9164a91c1fde719bb1ab59eb7035a3349df62909b78293ad2
MD5 c52031ff660f894f98c467452620de1f
BLAKE2b-256 0fc030b13e53a501be6b938c445d3cfae06f955d409ce941371ee55bbddbe991

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_enclave-0.1.0-py3-none-any.whl:

Publisher: publish.yml on CoReason-AI/coreason-enclave

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page