Skip to main content
QUICK REVIEW

[论文解读] Contrastive Learning and Mixture of Experts Enables Precise Vector Embeddings

Logan Hallee, R. Kapur|arXiv (Cornell University)|Jan 28, 2024
Educational Technology and AssessmentComputer Science被引用 3
一句话总结

该论文提出了一种对比学习与专家混合模型(Mixture of Experts, MoE)框架,用于生成科学文本的精确、领域特定的向量嵌入表示。该方法利用共引用网络构建训练数据,并采用多负样本排序(Multiple Negative Ranking, MNR)损失进行对比微调。MoE方法在仅使用单一、可扩展的通用架构的情况下,实现了与N个独立模型相当的性能,显著提升了心血管疾病和COPD等生物医学领域中的句子相似度指标。

ABSTRACT

The advancement of transformer neural networks has significantly elevated the capabilities of sentence similarity models, but they still struggle with highly discriminative tasks and may produce sub-optimal representations of important documents like scientific literature. With the increased reliance on retrieval augmentation and search, representing diverse documents as concise and descriptive vectors is crucial. This paper improves upon the vectors embeddings of scientific text by assembling niche datasets using co-citations as a similarity metric, focusing on biomedical domains. We apply a novel Mixture of Experts (MoE) extension pipeline to pretrained BERT models, where every multi-layer perceptron section is enlarged and copied into multiple distinct experts. Our MoE variants perform well over $N$ scientific domains with $N$ dedicated experts, whereas standard BERT models excel in only one domain at a time. Notably, extending just a single transformer block to MoE captures 85% of the benefit seen from full MoE extension at every layer. This holds promise for versatile and efficient One-Size-Fits-All transformer networks for numerically representing diverse inputs. Our methodology marks advancements in representation learning and holds promise for enhancing vector database search and compilation.

研究动机与目标

  • 解决通用大语言模型在专业科学领域中因过度泛化或对微小差异过度敏感而导致的性能不佳问题。
  • 提升心血管疾病(CVD)和COPD等专业生物医学子领域中的句子相似度与文本分类准确率。
  • 开发一种可扩展的通用模型架构,能够在多个科学领域中实现高精度推理。
  • 利用共引用网络作为弱监督信号,实现高效的大规模数据集构建。
  • 证明通过强制路由机制的MoE微调可达到与N个独立模型相当的性能,同时保持计算效率。

提出的方法

  • 利用来自PubMed Central的共引用网络构建训练数据集,其中被共同引用的论文被标记为相似。
  • 使用受MNR启发的对比损失对基于BERT的模型进行微调,以优化语义相似度。
  • 引入领域特定的特殊标记,并在推理过程中强制路由,以指导MoE架构中的专家选择。
  • 实现N个专家和N个对应特殊标记的MoE种子机制,使模型能够可扩展地适配N个不同领域。
  • 仅使用摘要进行训练以加快速度,同时在下游相似度任务中保持高性能。
  • 采用路由器机制,为每个输入在每个Transformer块中选择一个专家,实现高效且动态的路由。
Figure 1: Determination of abstract pair similarity for model evaluation
Figure 1: Determination of abstract pair similarity for model evaluation

实验结果

研究问题

  • RQ1共引用网络能否被有效用于构建大规模、领域特定的句子相似度模型训练数据?
  • RQ2使用MNR损失的对比微调是否能提升专业科学领域中向量嵌入的精度?
  • RQ3专家混合(MoE)架构能否在保持计算效率的同时,实现与N个独立微调模型相当的性能?
  • RQ4通过领域特定特殊标记实施的强制路由是否能改善专家选择并提升模型在不同领域间的泛化能力?
  • RQ5在科学文本表征中,实现有效MoE性能所需的最小模型规模是多少?

主要发现

  • SciBERT MoE与SciBERT SE模型在CVD验证集上达到F1_max为0.97,准确率为0.97,平均距离为0.48,优于基础模型。
  • 在CVD测试集上,SciBERT变体实现1.00的准确率和0.01的平均距离,表明向量聚类高度精确。
  • Mini SE模型在CVD上准确率为0.97,在COPD上为0.56,平均距离分别为0.23和0.33,表明在低数据领域中存在泛化局限性。
  • MoE方法在性能上匹配了独立专家模型,证明单一通用模型可有效处理多个领域。
  • BiomedBERT基础模型在CVD和COPD的测试集上平均距离均为0.01,表明基线性能强劲,可能源于数据重叠。
  • Mini MoE变体表现欠佳,表明有效MoE训练需要最小模型规模,可能由于共享注意力层容量不足。
Figure 2: Typical ChatGPT Response to a Set of Similar Papers, qualitatively classifying all similar papers as dissimilar.
Figure 2: Typical ChatGPT Response to a Set of Similar Papers, qualitatively classifying all similar papers as dissimilar.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。