Add function to find optimal chunk length #755
Merged
+87
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a function to find the optimal chunk length for either Prio3Histogram or Prio3SumVec, given its measurement length. I came up with a search algorithm with runtime logarithmic in the measurement size. It checks a small number of candidate parameter choices, while still getting an optimal result.
My plan is for this to be used primarily in our UI, to hide some complexity from users. We may also want to use this internally in some codepaths in Janus, i.e. for Taskprov, until it is updated for VDAF-07. This will support divviup/janus#1900.
Future work: If we want to change Prio3FixedPointBoundedL2VecSum to either expose chunk lengths as VDAF parameters, or always use optimal chunk lengths, note that the one of the two chunk lengths would need to be determined by a different search, because one of the gadgets has a different arity, and thus different proof length.