Knowledge Base Regulation Tracker Standards & Frameworks OSS Directory AI Incident Database Research Paper Library Case Studies Society Articles News Jobs About Charter Sign inBecome a Member

PySyft

Privacy-preserving computation

Framework for performing data science on data that stays on a data owner's server, combining remote execution, differential privacy and secure computation so results can be shared without moving raw data.

privacy-preserving computationopenminedremote data science

Framework for Privacy-Preserving Data Science

PySyft is an open-source framework developed by OpenMined that enables data science and machine learning workflows to operate directly on data stored on a user’s local server or device. Unlike traditional approaches that require data to be centralized for analysis, PySyft facilitates secure computation by combining remote execution, differential privacy, and cryptographic techniques. This ensures that raw data never leaves its original location, addressing critical privacy and security concerns in collaborative research and analytics.

The framework is designed to function within a broader ecosystem of privacy-preserving technologies (PETs), aligning with OpenMined’s mission to create a decentralized network for secure, governed data collaboration. This approach allows organizations and researchers to derive insights from siloed datasets without compromising data ownership or exposing sensitive information.

PySyft’s architecture is built on the principle of data never leaves home, meaning computations are executed where the data resides.

  • Remote Execution: Tasks are offloaded to remote servers or devices while keeping data localized. This is particularly useful in scenarios where computational resources are limited on the data owner’s end.
  • Differential Privacy: Statistical noise is added to query results to prevent the reconstruction of individual data points, ensuring that insights are derived without revealing private information.
  • Secure Computation: Cryptographic protocols such as homomorphic encryption and secure multi-party computation (SMPC) enable computations on encrypted data, ensuring that intermediate results remain confidential throughout the process.

These mechanisms collectively allow PySyft to support collaborative analytics, model training, and inference without requiring data aggregation or centralization. The framework is particularly valuable in domains where data sensitivity is paramount, such as healthcare, genomics, and finance.

How It Works

PySyft operates by abstracting the complexities of secure computation into a Python-based API that integrates seamlessly with existing data science workflows. At its core, the framework provides a set of tools and protocols that enable developers to define, execute, and manage computations on remote data sources securely.

When a user initiates a computation, PySyft generates a pointer to the data, allowing operations to be performed remotely without transferring the underlying dataset.

  • PySyft Pointers: These are references to data that can be manipulated as if the data were local, even when it resides on a remote server. Pointers support operations such as arithmetic, aggregation, and model inference, all executed securely on the data’s original location.
  • Secure Multi-Party Computation (SMPC): PySyft employs SMPC protocols to enable multiple parties to jointly compute a function over their private inputs without revealing those inputs to each other. This is particularly useful in collaborative research settings where multiple institutions wish to contribute data to a shared analysis without disclosing raw information.
  • Federated Learning: The framework supports federated learning paradigms, where a global model is trained across decentralized datasets. Each participant’s data remains on their local device, and only model updates (e.g., gradients) are shared with a central server or among peers. This approach preserves privacy while enabling large-scale model training.
  • Differential Privacy Integration: PySyft incorporates differential privacy techniques to ensure that the results of queries or computations do not leak sensitive information about individual data points.

The execution of computations in PySyft follows a client-server model, where the client (e.g., a researcher or analyst) sends a computation task to a remote server or device hosting the data. The server processes the task using the data in place and returns only the results, which may be further processed or analyzed by the client. This workflow ensures that no raw data is exposed during the computation process.

For example, in a federated setting, a central coordinator might aggregate results from multiple participants, each of whom processes their local data independently. This flexibility allows PySyft to adapt to various use cases, from single-institution analytics to large-scale collaborative research.

Use Cases

PySyft’s ability to perform computations on data without exposing raw information makes it particularly well-suited for applications in domains where privacy, security, and regulatory compliance are critical.

One of the most impactful applications of PySyft is in genomic and biomedical research, where datasets often contain highly sensitive patient information. Traditional approaches to collaborative genomics require centralizing raw genetic data, which raises significant privacy and ethical concerns. PySyft enables researchers to perform joint analyses on distributed genomic datasets without sharing individual-level data. For instance, the BioVault subnetwork, developed by OpenMined, allows participants to contribute genomic data to a shared research network while retaining full control over their data. Computations such as disease association studies or polygenic risk scoring can be performed across the network, with results aggregated securely and privately.

In healthcare analytics, PySyft facilitates secure collaboration among hospitals, research institutions, and pharmaceutical companies. The framework’s support for differential privacy ensures that even aggregated statistics cannot be traced back to individual patients, addressing concerns under regulations such as HIPAA or GDPR. Additionally, PySyft can enable real-time analytics on electronic health records (EHRs) for predictive modeling, where models are trained on decentralized data sources.

Banks and financial institutions often hold vast amounts of sensitive customer data that cannot be shared due to legal or competitive constraints. Secure multi-party computation (SMPC) protocols enable multiple banks to compute joint statistics or train models on their combined datasets while keeping individual contributions confidential.

Another critical application is in privacy-preserving audits of machine learning models. Organizations often need to verify the fairness, robustness, or compliance of AI models without revealing proprietary training data or model architectures. PySyft enables third-party auditors to perform computations on encrypted or distributed data, obtaining verified insights without accessing sensitive assets. For example, an auditor might assess a model’s bias or performance metrics by querying encrypted data samples or model gradients, ensuring that no proprietary information is exposed during the process. This capability is particularly valuable in high-stakes domains such as autonomous systems, healthcare diagnostics, and financial lending, where model transparency and accountability are paramount.

Beyond these sectors, PySyft is increasingly being adopted in climate science, public policy, and social research, where datasets are often fragmented across institutions or jurisdictions.

PySyft’s versatility extends to educational and research collaborations, where students, academics, and industry partners may need to share data for joint projects.

Key Features and Capabilities

Below are the key features that distinguish PySyft from traditional data science frameworks:

This integration allows researchers and practitioners to extend PyTorch’s capabilities to support secure, distributed computations. For example, PySyft enables federated learning workflows where PyTorch models are trained across decentralized datasets, with only model updates (e.g., gradients or weights) being shared among participants.

PySyft provides a unified API for secure computation, abstracting the complexities of cryptographic protocols and distributed execution. Developers can use familiar Python constructs to define computations on remote data, with the framework handling the underlying security and privacy guarantees.

  • syft.Tensor: A secure tensor class that supports operations on data stored remotely. syft.Tensor objects can be manipulated as if the data were local, with all computations executed securely on the data’s original location.
  • syft.Pointer: A reference to data that enables secure access and manipulation without transferring the underlying dataset. Pointers support operations such as arithmetic, aggregation, and model inference, all executed in a privacy-preserving manner.

The framework also includes built-in support for differential privacy, allowing users to add noise to query results to prevent re-identification of individual data points. Differential privacy is particularly useful in statistical analyses, where aggregated results must comply with privacy regulations or ethical standards.

PySyft’s secure multi-party computation (SMPC) capabilities enable collaborative analyses where multiple parties contribute private inputs to a joint computation. For example, two hospitals could jointly compute the average treatment outcome for a cohort of patients without sharing individual patient records.

This enables use cases where data must remain encrypted throughout the entire computation pipeline, such as in highly regulated industries or adversarial settings.

PySyft is designed with interoperability and extensibility in mind. Additionally, PySyft’s modular architecture allows developers to extend its functionality by adding custom cryptographic protocols or execution backends.

The framework also includes governance and access control mechanisms, enabling data owners to define policies for data usage, attribution, and compensation. This capability is particularly valuable in collaborative networks, where multiple stakeholders may have conflicting privacy or commercial interests.

Finally, PySyft is open-source and community-driven, with contributions from researchers, developers, and organizations worldwide. The project is maintained under the Apache 2.0 license, which ensures permissive use and modification rights. OpenMined, the non-profit foundation behind PySyft, fosters a global community of practitioners and researchers, providing resources such as documentation, tutorials, and fellowship programs to support adoption and innovation in privacy-preserving technologies.

Integration with OpenMined’s Ecosystem

PySyft is part of a broader ecosystem of tools and initiatives developed by OpenMined to enable secure, governed collaboration across siloed data.

  • BioVault: A free, open-source subnetwork for collaborative genomic research. BioVault allows participants to contribute genomic datasets to joint analyses while retaining custody of their data. Computations are executed using PySyft’s secure computation protocols, ensuring that sensitive genetic information remains private throughout the research process.
  • Federated AI Network: A decentralized infrastructure for privacy-preserving analytics and model training. The network enables organizations to define custom privacy and governance policies for their data, with PySyft serving as the underlying engine for secure computations. This infrastructure supports use cases such as cross-institutional research, third-party audits, and collaborative AI development.
  • Privacy-Preserving Audits: Tools and protocols for verifying the fairness, robustness, and compliance of AI models without exposing proprietary data. PySyft’s SMPC and homomorphic encryption capabilities enable auditors to perform computations on encrypted or distributed data, obtaining insights without accessing sensitive assets.
  • Partnerships and Standards: OpenMined collaborates with organizations such as Google, the National Science Foundation (NSF), and the UK-US PETs Prize Challenges to advance the adoption of privacy-preserving technologies.

By integrating PySyft into this ecosystem, OpenMined provides a comprehensive solution for organizations seeking to collaborate on data-intensive projects while preserving privacy and control. The framework’s compatibility with existing tools and standards ensures that it can be adopted incrementally, aligning with the evolving needs of the AI and data science communities.

Sources

Contribute

Spot an error, or know a record we should add? Members can propose additions and submit corrections.