logo

你了解 batch 内负样本(in-batch negatives)吗?为什么有时不使用?

Do you understand in-batch negatives? Why might you avoid using them?

题目类型: 技术面试题

这是一道技术面试题,常见于澳洲IT公司面试中。

难度: hard

分类: Machine Learning, NLP, Recommendation

标签: in-batch negatives, false negatives, dual encoder, all-gather

参考答案摘要

答案 batch 内负样本指的是:把同一个 mini-batch 里别人的正样本当作我的负样本,用一次前向就能得到大量 negatives,计算效率很高(尤其适合双塔/对比学习)。 优点 负样本数量大、成本低,训练收敛快。 实现简单,和分布式训练天然契合(可跨卡扩大 batch negatives)。 为什么有时不用 False negatives :同 batch 里的“别人正样本”可能也是我的...

本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。

← 返回面试题库

你了解 batch 内负样本(in-batch negatives)吗?为什么有时不使用?

Hardcontrastive-learningnegative-samplingdistributed-training

想查看完整答案?

登录匠人学院学习中心,获取 STAR 格式回答和详细技术解析

前往学习中心查看答案