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.2.0.tar.gz (25.5 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.2.0-py3-none-any.whl (36.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coreason_enclave-0.2.0.tar.gz
  • Upload date:
  • Size: 25.5 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.2.0.tar.gz
Algorithm Hash digest
SHA256 b37092977e00f5e063642e7eb443c42fec54540aa8a0e4930a36adc3faf19c6e
MD5 009649103619eeb6c7f58767e1a7bee4
BLAKE2b-256 16cefb920a3763d6189fc4f5306395747f96a0cf11d8b15f4e91d1623b643643

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_enclave-0.2.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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for coreason_enclave-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aed68a0519e439424898267cb442e8df18a887ebfdd7ed8115155a5a7400a372
MD5 9d066b10e7e0604fdd9a3e331ff99ee2
BLAKE2b-256 6c1be6540bc061251a83184d00dfc66c0c066f8365d1f56e074238ee7d5d1934

See more details on using hashes here.

Provenance

The following attestation bundles were made for coreason_enclave-0.2.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