awslabs / awslabs/homomorphic-implementors-toolkit
Give options for simpler evaluation API
- Dominant language
- C++
- Stars
- 72
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
Currently, operations require inputs to be at specific levels, and outputs must sometimes be relinearized and or rescaled depending on the operation. Keeping track of all this is difficult, and it results in messy circuit implementations. It would be pretty easy to fix this situation for the LinearAlgebra API: we could add two boolean flags to the class constructor `auto_level` and `auto_maintenance`. The first flag would allow you to pass in CTs of arbitrary levels to all API functions, and the API would reduce the inputs to the appropriate level prior to doing the operation. The second flag would automatically apply relinearization and rescaling if needed. It's less clear how we could achieve the same features in the base evaluator class in a clean way.
It's worth keeping these as *options* rather than always automatically handling these two tasks: for HE levels, managing it yourself forces you to understand what's happening in the circuit. I've found several bugs by being forced to manage this myself. For maintenance operations, it's not always optimal from a performance or noise perspective to automatically apply these operations. Even though it can be a pain to track what needs to be done, it can increase performance or reduce noise to do it manually.
Contributor guide
Research direction
Start by locating the LinearAlgebra API and base evaluator classes, then inspect their constructors and existing level, relinearization, and rescaling paths. Determine whether optional auto_level and auto_maintenance behavior can be specified cleanly for LinearAlgebra. Done requires a settled API design and tests for arbitrary input levels and automatic maintenance, but the issue names no files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cryptography
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100