返回列表

Private 9th (Public 7th) Place Solution

632. Eedi - Mining Misconceptions in Mathematics | eedi-mining-misconceptions-in-mathematics

开始: 2024-09-12 结束: 2024-12-12 学习效果预测 数据算法赛
私有榜第 9 名(公开榜第 7 名)解决方案

私有榜第 9 名(公开榜第 7 名)解决方案

作者:Okinawa (及团队成员:hinsay, O.o, gjp2master, lulum)

发布时间:2024-12-13

竞赛:EEDI Mining Misconceptions in Mathematics

我必须向 eedi 组织和 Kaggle 团队表示赞赏,感谢他们举办了如此精彩的比赛。这是我第一次参加 Kaggle 比赛,很高兴能获得金牌。

概述

  1. 合成数据生成 (GPT-4o)
  2. 理由生成 (Qwen 2.5 32B Instruct AWQ with vllm)
  3. 检索器 (Qwen 2.5 14B Instruct)
  4. 重排序器 (Qwen 2.5 14B Instruct 和 Qwen 2.5 32B Instruct with vllm)

合成数据生成

我们通过向 GPT-4o 提供误解(misconceptions)生成了 SubjectName, ConstructName, QuestionText, Correct Answer, Incorrect Answer。
接下来,开始过滤:

  • 对于 train.csv 中存在的误解,我们使用基础模型过滤生成的数据(在没有合成数据的情况下训练 Qwen 2.5 14B Instruct 在 LB 上得分为 0.447)。
  • 对于 train.csv 中不存在的误解,不做任何操作。

理由生成

将 SubjectName, ConstructName, QuestionText, Correct Answer 和 Incorrect Answer 输入到 Qwen 2.5 32B Instruct AWQ 中,生成简短的理由(最多 50 字)。
Prompt:

Prompt = """Here is a question about {ConstructName} ({SubjectName}).
Question: {Question}
Correct Answer: {CorrectAnswer}
Incorrect Answer: {IncorrectAnswer}

Generate a brief rationale for the Incorrect Answer in a sentences, within 50 tokens. Describe the reasoning process that might lead to this choice, including any logical errors or misconceptions.

Keep the explanation concise and focused on the key points, and ensure it does not exceed 50 tokens
***Important***
1.There is no need to analyze the relationship between the wrong answer and the correct answer. Simply describe the rationale of the incorrect answer in a few words.
2.There is no need to have fields such as "Incorrect Answer:" and "Incorrect Answer is". Just give the rationale directly.
3.Output results in English.
"""

检索器

遵循 @sayoulala 和他的讨论 https://www.kaggle.com/competitions/eedi-mining-misconceptions-in-mathematics/discussion/543519

  • 对于误解出现少于 3 次的原始训练集问题,进行一次上采样用于训练。
  • 通过对比学习训练检索器,并使用 sfr 进行硬负样本挖掘。

重排序器

  • 二元分类重排序器 (14B),预测错误答案和误解是否匹配。(最终未使用,因为效率不高)
  • 因果语言模型重排序器 (32B),使用 lm head 获取 yes token logits 作为排名分数。训练完成后,执行 AWQ 量化。

32B 推理参考 https://www.kaggle.com/code/cdeotte/infer-34b-with-vllm

模型 公开榜 (Public LB) 私有榜 (Private LB)
Retriever (检索器) 0.547 0.491
Binary classification reranker (二元分类重排序器) 0.606 0.542
Causal LM reranker (因果 LM 重排序器) 0.641 0.571

顺便说一下,我们只在比赛截止前一周开始训练重排序器,没有太多时间尝试😭

同比赛其他方案