Giter Club home page Giter Club logo

Comments (5)

youben11 avatar youben11 commented on May 18, 2024 1

This is a good start to the right idea, but I also feel it would add an effort to ensure this doesn’t break in future versions of SEAL implementation or even this library.

I would propose a separate helper tool to help define the appropriate encryption parameters and scale based off of the desired algorithmic depth. This could be thought of as the equivalent to theCoeffModulus::BFVDefault function used to generate the coeff moduli for the BFV scheme.

This tool should not be coupled strongly to the native SEAL API nor this library any way, therefore posing no risk to either.

In TenSEAL, we assume that the user doesn't have enough experience in HE to deal with relin and rescaling, it would certainly be difficult on our side to deal with all these details while assuming general usage, but I think motivation(2) is a good assumption that simplify this solution. And of course we will need to give experienced user the ability to use different scale, for instance, users can still create CKKSVector with a different scale, but if they don't provide then we just use our context's scale. They should also be able to disable all these operations done after every multiplication if they want to deal with rescaling differently, but a rescaling strategy is really important for TenSEAL to be really simple to use.

from tenseal.

youben11 avatar youben11 commented on May 18, 2024 1

Good idea to simplify the API.
But since the scale is related to CKKS tensor, why don't we make it a CKKS tensor attribute, and generate or set it during tensor creation?

Mainly because of motivation(2), we don't need to set the scale for every tensor, all tensors should be having the same scale. The scale isn't a big field, using it in the TenSEALContext for CKKS and wasting that space for BFV isn't a big deal.

from tenseal.

s0l0ist avatar s0l0ist commented on May 18, 2024 1

In TenSEAL, we assume that the user doesn't have enough experience in HE to deal with relin and rescaling, it would certainly be difficult on our side to deal with all these details while assuming general usage, but I think motivation(2) is a good assumption that simplify this solution. And of course we will need to give experienced user the ability to use different scale, for instance, users can still create CKKSVector with a different scale, but if they don't provide then we just use our context's scale. They should also be able to disable all these operations done after every multiplication if they want to deal with rescaling differently, but a rescaling strategy is really important for TenSEAL to be really simple to use.

Okay, if you're already building a lot of helper logic then this makes sense to encapsulate as long as it is overridable.

from tenseal.

s0l0ist avatar s0l0ist commented on May 18, 2024

This is a good start to the right idea, but I also feel it would add an effort to ensure this doesn’t break in future versions of SEAL implementation or even this library.

I would propose a separate helper tool to help define the appropriate encryption parameters and scale based off of the desired algorithmic depth. This could be thought of as the equivalent to theCoeffModulus::BFVDefault function used to generate the coeff moduli for the BFV scheme.

This tool should not be coupled strongly to the native SEAL API nor this library any way, therefore posing no risk to either.

from tenseal.

philomath213 avatar philomath213 commented on May 18, 2024

Good idea to simplify the API.
But since the scale is related to CKKS tensor, why don't we make it a CKKS tensor attribute, and generate or set it during tensor creation?

from tenseal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.