OpenCompass/docs/zh_cn/advanced_guides/contamination_eval.md
liyucheng09 05bbce8b08
[Feature] Add Data Contamination Analysis (#639)
* add contamination analysis to ceval

* fix bugs

* add contamination docs

* to pass CI check

* update

---------

Co-authored-by: zhangyifan1 <zhangyifan1@pjlab.org.cn>
Co-authored-by: Leymore <zfz-960727@163.com>
2023-12-08 10:00:11 +08:00

2.0 KiB
Raw Blame History

污染评估指南

数据污染即下游任务的测试数据存在于大型语言模型LLMs的预训练数据中可能会夸大在许多下游任务例如摘要、自然语言推理、文本分类上观察到的LLM性能。

为了评估LLM在污染数据下的性能我们使用了Contamination Detector来生成污染标签。

检测工具简介

污染检测器有助于在不需要访问LLM的训练数据的情况下基于互联网存在验证识别和分析此类潜在污染使得即使是小团队和个人也能进行强大的评估。

方法

  • 使用必应搜索API检查逐字测试样例是否在线出现这可能表明其包含在Common Crawl中。

  • 具体来说是通过仅搜索URL而不是完整内容来验证包含逐字测试样例的页面是否在2017-2020年的Common Crawl中被索引。

构造查询

例如: 问题The flaw in Andersons ACT theory was that some considered it ____. 选项 A: Only applicable to a motor system, B: Untestable and thus, of uncertain sci- entific value, C: Lacking in definition for its ele- ments D: Overly complex in explaining the operation of cognition, 答案B 查询The flaw in Andersons ACT theory was that some considered it untestable and thus, of uncertain scientific value.

提高匹配度

为避免可能的误报,该方法配置了两个关键设置:

  • 用于METEOR的排序罚分gamma为0.8)确保匹配遵循序列;
  • 匹配被限制在最多2倍查询长度的窗口内防止部分或脱离上下文的匹配。

污染类型

  • input contamination,其中只有问题出现在匹配页面中,但没有答案;
  • input-and-label contamination,其中问题和答案都出现在匹配页面中。

数据准备

待完成

评估配置

待完成