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

Implementation of Random Rotation Matrix and Query Scaling Matrix with 1-bit Binary Quantization #2524

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Vikasht34
Copy link
Collaborator

Description

This change enhances the One-Bit Scalar Quantization process in by refining the Below and Above Threshold Means computation and introducing Random Gaussian Rotation. These improvements optimize both quantization accuracy during indexing and query scaling during retrieval, ensuring better recall and efficiency in k-NN search.

Below and Above Threshold Means for Query Scaling
These means help in query-time scaling, enabling better similarity approximation.

  • During training, each vector dimension is analyzed, and a threshold (mean value) is computed.
  • Each dimension’s values are classified as:
    • Below threshold: Values lower than the computed mean.
    • Above threshold: Values higher than the computed mean.

Random Gaussian Rotation for Robustness
Applies a Gaussian orthonormal rotation matrix to input vectors before quantization.
Used only when the L2/L1 ratio exceeds 0.6, ensuring that rotation is applied selectively for improved data distribution.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…above and below thresholds for 1 bit Binary Quantization

Signed-off-by: Vikasht34 <[email protected]>
Signed-off-by: Vikasht34 <[email protected]>
@Vikasht34 Vikasht34 force-pushed the main branch 3 times, most recently from f5e801f to dad6872 Compare February 13, 2025 22:42
Signed-off-by: Vikasht34 <[email protected]>
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.

1 participant