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

Training by dot product and evaluation via inverted index? #11

Closed
jordane95 opened this issue Feb 21, 2022 · 2 comments
Closed

Training by dot product and evaluation via inverted index? #11

jordane95 opened this issue Feb 21, 2022 · 2 comments

Comments

@jordane95
Copy link

jordane95 commented Feb 21, 2022

Hey,
I recently read your SPLADEv2 paper. That's so insightful! But I still have a few questions about it.

  1. Is the model trained with dot product similarity function included in the contrastive loss?
  2. Evaluation on MS MARCO is performed via inverted index backed by anserine?
  3. Evaluation on BEIR is implemented with sentencetransformer hence also via dot product?
  4. How much can you gurantee the sparsity of learned representation since it's softly regularized by L1 and FLOPS loss? Did you use a tuned threshold to ''zerofy'' ~0 value?
@thibault-formal
Copy link
Contributor

Hey,
Thanks for your interest in SPLADE !

  1. The model is indeed trained with dot product
  2. We have some internal code which relies on custom inverted index with numba for indexing and retrieval; we should release it soon. But as you said, you can also use Anserini, following the guidelines here. Note that the two arguments -impact -pretokenized tell anserini to use dot product.
  3. Yes; we should also refactor this part too
  4. Note that the model relies on a ReLU activation; thus, training with L1/FLOPS directly makes the representations sparse (hence, no need for a threshold) => one forward with the model outputs sparse representations

Best,
Thibault

@jordane95
Copy link
Author

That's clear. Thank you for your reply.

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

No branches or pull requests

2 participants