multiple positive sampels per query
YiJun-Yang opened this issue · 4 comments
Hi,
Thanks very much for your work.
I wonder how should I modify your loss to adapting to the case of multiple positive samples per query.
For example, query.shape = (1,128), positive_keys.shape = (5, 128), negative_keys.shape = (5, 128).
Hope your reply
You can look into this paper: Improving Event Representation via Simultaneous Weakly Supervised Contrastive Learning and Clustering
They have used multiple positives, in short, what they have done is to call infoNCE for each positive with the same negative samples and got the average of them.
@YiJun-Yang I just got similar questions. I post my implementations and understandings in the open issue. If you still have a question about it, you can discuss it with me in the open issue!
@YiJun-Yang I just got similar questions. I post my implementations and understandings in the open issue. If you still have a question about it, you can discuss it with me in the open issue!
Have you achieved multiple positive sampels per query?
@YiJun-Yang I just got similar questions. I post my implementations and understandings in the open issue. If you still have a question about it, you can discuss it with me in the open issue!
Have you achieved multiple positive sampels per query?
my approach is to let one query calculate similarities with each positive sample and then calculate the average value. I think the meaning of this is to make the query similar to the entire positive sample set.