openmined / pysyft Goto Github PK
View Code? Open in Web Editor NEWPerform data science on data that remains in someone else's server
Home Page: https://www.openmined.org/
License: Apache License 2.0
Perform data science on data that remains in someone else's server
Home Page: https://www.openmined.org/
License: Apache License 2.0
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, clamp() should return a new tensor and clamp_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, fill_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, histc() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, mean() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
Description: In the Proof-of-Concept Syft implementation, the basic type was a Float object contained within the Paillier.py class. This class contains overridden functions for various mathematical operators, so that the class can then be used inside of numpy arrays, as in our basic linear network linear.py. However, this approach, while simple, has several issues:
In this work, we want to remedy these issues by building a generic tensor type, allowing us to handle encrypted values in the optimal way under the hood without requiring advanced knowledge by the user. The API for this tensor type will take direct inspiration from the unencrypted tensor classes done in the PyTorch framework, as it is a long term desire to eventually integrate with PyTorch if it becomes feasible to do so.
Acceptance Criteria:
The generic tensor type must support the following operations inline with PyTorch:
a. abs(), abs_(), add(value), add_(value), addbmm(), addbmm_(), addcdiv(), addcdiv_(), addcmul(), addcmul_(), addmm(), admm_(), addmv(), addmv_(), addr(), addr_(), baddbmm(), baddbmm_(), bernoulli(), bernoulli_(), bmm(), cauchy_(), ceil(), ceil_(), char(), chunk(), clamp(), clamp_(), clone(), contiguous(), copy_(), cpu(), cuda() - returns "not yet supported", cross(), cumprod(), cumsum(), diag(), dim(), dist(), div(), div_(), dot(), double(), eq(), eq_(), equal(), exp(), exp_(), expand(), expand_as(), exponential(), fill_(), float(), floor(), floor_(), fmod(), fmod_(), frac(), frac_(), gather(), ge(), ge_(), geometric_(), gt(), gt_(), half(), histc(), index(), index_add_(), index_copy_(), index_fill_(), index_select(), int(), inverse(), is_contiguous(), is_cuda(), is_signed(), le(), le_(), lerp(), lerp_(), log(), log1p(), log1p_(), log_(), log_normal_(), long(), lt(), lt_(), masked_scatter_(), masked_fill_(), masked_select(), matmul(), max(), mean(), median(), min(), mm(), mode(), mul(), mul_(), multinomial(), mv(), narrow(), ndimension(), ne(), ne_(), neg(), neg_(), nelement(), new(), nonzero(), norm(), normal_(), numel(), numpy(), permute(), pow(), pow_(), prod(), random_(), reciprocal(), reciprocal_(), remainder(), remainder_(), renorm(), renodm_(), repeat(), resize_(), resize_as_(), round(), round_(), rsqrt(), rsqrt_(), scatter_(), select(), set_(), short(), sigmoid(), sigmoid_(), sign(), sign_(), size(), split(), sqrt(), sqrt_(), squeeze(), squeeze_(), stride(), sub(), sub_(), sum(), t(), t_(), tolist(), topk(), trace(), transpose(), transpose_(), type(), unfold(), uniform_(), unsqueeze(), unsqueeze_(), view(), view_as(), zero_()
b. For all functions above that pull from a distribution, optionally use a lookup table (abstract this?)
c. For all functions above that use a function, optionally use an interpolation (abstract this?)
The generic tensor type must be able to support an arbitrary number of dimensions for all operations.
The generic tensor type must overload +-*/ and apply the appropriate operator (based on the dimensions of the tensors involved.
The generic tensor type must prefer to use vector storage (under the hood) when encrypted to maximize the usefulness of packing in homomorphic encryption
Any operations that are unsupported in the encrypted domain should include error messages
str and repr should follow the conventions set in PyTorch.
Additionally, there should be "encrypt(publickey)" and "decrypt(prikey)" functions which accept any key of the abstract type public or private key.
All functionality within this base class should be of abstract type regardless of encryption type (specialized functionality for any encryption scheme should live within that scheme).
Before this ticket is closed, this functionality should be shown to work with at least one homomorphic encryption strategy
Ticket Creator: @iamtrask
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, bernoulli() should return a new tensor and bernoulli_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, gt() should return a new tensor and gt_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, cauchy_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, eq() should return a new tensor and eq_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, diag() should return a list of the dimensions of the tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, ge() should return a new tensor and ge_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, addcmul() should return a new tensor and addcmul_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, exponential(). For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
Description: We are currently wrapping a Python implementation of the Paillier cryptosystem. While it is a great implementation, we want to be able to integrate one into our project a bit more closely. Furthermore, we would like to leverage lower level libraries for C, BLAS, and/or GPU integration when available. As such, this project endeavors to rebuild Paillier from scratch in a way that is more performant than the current (while also leaning on (ISSUE 12) for fixed point precision instead of having it deeply coupled to the encryption algorithm (as in python-paillier).
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, le() should return a new tensor and le_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, cumsum() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, addmv() should return a new tensor and addmv_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, clone() should return a new tensor that's an exact copy. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, diag() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, inverse should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, bmm() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing the batch matrix multiply + add of a Tensor of arbitrary type. addcdiv() should return a new tensor and addcdiv_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, max() should return functionality based on what is passed into the method. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, ceil() should return a new tensor and ceil_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, lerp() should return a new tensor and lerp_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, expand_as() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing each operation on a Tensor of arbitrary type. addmm_() should return a new tensor and addmm_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, matmul() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, addbmm() should return a new tensor and addbmm_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, log(), log1p(), and log_normal() should return a new tensor and log_(), log1p_(), and log_normal_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, exp() should return a new tensor and exp_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
Background: It has been alleged that vanilla Learning with Errors can be extremely performant for additive homomorphic encryption. In this work, we seek to verify that this is indeed true and achieve similar performance gains.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, baddbmm() should return a new tensor and baddbmm_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing the elementwise absolute value of a Tensor of arbitrary type. abs() should return a new tensor and abs_ should perform the operation inline. For a great reference on how
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, half() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, geometric_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, lt() should return a new tensor and lt_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, floor() should return a new tensor and floor_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, dot() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, cumprod() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, fmod() should return a new tensor and fmod_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, index() and index_select() should return a new tensor and index_add_(), index_copy_(), and index_fill_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, frac() should return a new tensor and frac_() should perform the operation inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
NOTE: This ticket requires minimal work on ISSUE 10 to have been already started. Specifically, all work on this ticket should be over the generic Tensor type, the specs of which are described within that issue.
Description: Homomorphic Encryption has a fundamental limitation in that after a certain number of additions and multiplications, noise builds up in the cyphertext and endangers the decrypt-ability of the cyphertext. In order to make our tensors easy to use, we need to provide tracking around noise growth by tracking the number of additions and multiplications involved in creating each particular value in any given tensor. This tracking needs to either automatically bootstrap (remove noise) or flag a warning (error) if the noise is about to render the cyphertext undecryptable. Furthermore, as each encryption technique has slightly different needs in this area, our tensor object needs to implement this functionality in a way that is agnostic to the encryption technique.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, chunk() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
Description: All of our Homomorphic Encryption algorithms operate on Integers under the hood. However, we want to be able to perform math on numbers of varying precision (most popularly, Floats). Thus, we need someone to put together a generic Fixed Point Precision wrapper that can provide this functionality around encryption algorithms that are Integers such that the following types are supported:
Byte (8-bit float)
Half (16-bit float)
Float (32-bit float)
Double (64-bit float)
Arbitrary (n-bit float)
Char (8-bit int)
Short (16-bit int)
Int (32-bit int)
Long (64-bit int)
Arbitrary (n-bit int)
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, equal() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, masked_select() should return a new tensor and masked_scatter_(), masked_fill_() should perform their operations inline. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
In this ticket, we want to create a new basic type called a "Tensor". A Tensor is a nested list of numbers with an arbitrary number of dimensions. With one dimension, it's a list of numbers known as a "vector". With two dimensions, it's a list of lists of numbers known as a "matrix". In this ticket, we want to build our implementation of Tensor with inspiration from PyTorch's Tensor object (Tensor Docs).
So, in this ticket, you should build a basic tensor class. You should be able to pass in as an argument an arbitrary shape (number of rows, columns, etc.) when you create it. Furthermore, we want this basic class to support elementwise addition, subtraction, multiplication, and division.
Acceptance Criteria:
User Story A: As a Data Scientist using Syft's Base Tensor type, we want to implement a default method for computing operations on a Tensor of arbitrary type. For this ticket to be complete, gather() should return a new tensor. For a reference on the operation this performs check out PyTorch's documentation.
Acceptance Criteria:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.