Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bit search for max epsilon #1429

Merged
merged 15 commits into from
Sep 17, 2024
Merged

Conversation

giladbarkan-github
Copy link
Collaborator

Bit search can yield higher precision than binary search in constant time and
avoid the use of a tolerance.

ts/src/flexible-event/privacy.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@apasel422 apasel422 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Android use this algorithm in its implementation? If so, could we add some analogous deterministic test cases to make it easier to verify and reproduce the behavior here?

ts/src/flexible-event/privacy.test.ts Outdated Show resolved Hide resolved
@giladbarkan-github
Copy link
Collaborator Author

giladbarkan-github commented Sep 16, 2024

Does Android use this algorithm in its implementation? If so, could we add some analogous deterministic test cases to make it easier to verify and reproduce the behavior here?

What do you think about adding a validation that adding anything in the double range to epsilon would result in too high info gain (still using random tests)? This would prove correctness.

@apasel422
Copy link
Collaborator

Does Android use this algorithm in its implementation? If so, could we add some analogous deterministic test cases to make it easier to verify and reproduce the behavior here?

What do you think about adding a validation that adding anything in the double range to epsilon would result in too high info gain (still using random tests)? This would prove correctness.

Property-based testing is good, but I still think some deterministic test cases would be beneficial as well as they are more easily ported between implementations.

@giladbarkan-github
Copy link
Collaborator Author

Does Android use this algorithm in its implementation? If so, could we add some analogous deterministic test cases to make it easier to verify and reproduce the behavior here?

What do you think about adding a validation that adding anything in the double range to epsilon would result in too high info gain (still using random tests)? This would prove correctness.

Property-based testing is good, but I still think some deterministic test cases would be beneficial as well as they are more easily ported between implementations.

Android does not use an epsilon search presently. I'll add the extra validation, log some of its results and add those as deterministic.

@giladbarkan-github
Copy link
Collaborator Author

Property-based testing is good, but I still think some deterministic test cases would be beneficial as well as they are more easily ported between implementations.

Done.

@csharrison
Copy link
Collaborator

The bit search looks fine but why keep the binary search verison too?

@giladbarkan-github
Copy link
Collaborator Author

The bit search looks fine but why keep the binary search verison too?

I first thought it can help validate but what Andrew termed the "property" assertion seems similarly good.

@giladbarkan-github
Copy link
Collaborator Author

The bit search looks fine but why keep the binary search verison too?

I first thought it can help validate but what Andrew termed the "property" assertion seems similarly good.

Removed.

ts/src/flexible-event/privacy.test.ts Outdated Show resolved Hide resolved
@apasel422 apasel422 merged commit 5099bf6 into WICG:main Sep 17, 2024
2 checks passed
@giladbarkan-github giladbarkan-github deleted the epsilon branch October 17, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants