[论文解读] Deep Learning Based Named Entity Recognition Models for Recipes
本论文构建并评估用于配方文本的命名实体识别(NER)模型,使用人工标注、扩充和机器标注的数据集,发现 spaCy-transformer 的 macro-F1 约为 96% 是最佳表现,而少样本提示的大语言模型表现较差。
Food touches our lives through various endeavors, including flavor, nourishment, health, and sustainability. Recipes are cultural capsules transmitted across generations via unstructured text. Automated protocols for recognizing named entities, the building blocks of recipe text, are of immense value for various applications ranging from information extraction to novel recipe generation. Named entity recognition is a technique for extracting information from unstructured or semi-structured data with known labels. Starting with manually-annotated data of 6,611 ingredient phrases, we created an augmented dataset of 26,445 phrases cumulatively. Simultaneously, we systematically cleaned and analyzed ingredient phrases from RecipeDB, the gold-standard recipe data repository, and annotated them using the Stanford NER. Based on the analysis, we sampled a subset of 88,526 phrases using a clustering-based approach while preserving the diversity to create the machine-annotated dataset. A thorough investigation of NER approaches on these three datasets involving statistical, fine-tuning of deep learning-based language models and few-shot prompting on large language models (LLMs) provides deep insights. We conclude that few-shot prompting on LLMs has abysmal performance, whereas the fine-tuned spaCy-transformer emerges as the best model with macro-F1 scores of 95.9%, 96.04%, and 95.71% for the manually-annotated, augmented, and machine-annotated datasets, respectively.
研究动机与目标
- 创建大规模、多样化的配方成分短语数据集(手动、扩充、机器标注)以实现稳健的 NER 训练。
- 在配方数据上基准传统与深度学习 NER 方法,以确立最先进的性能。
- 评估数据扩充与采样策略以最大化多样性与模型泛化。
- 评估在大语言模型上的少样本提示在配方 NER 的可行性。
- 分析标签层面的可学习性,以理解配方文本中哪些实体类型更具挑战性。
提出的方法
- 数据集构建:对 6,611 条成分短语进行手动标注,扩充至 26,445 条短语,并从 RecipeDB 得到的机器标注语料库总计 349,762 条短语,通过 SEFS 聚类进行协调。
- 数据预处理:通过词形还原和由烹饪专家进行的错误模式校正。
- 模型配置:对 Stanford NER(CRF)的再实现,以及对编码器为基础的模型(BERT、DistilBERT、RoBERTa、DistilRoBERTa)和 NLP 框架(spaCy、flair)的微调。
- 训练设置:基础模型采用 SGD 微调,学习率 0.01,在 NVIDIA A100 上,批量大小 44,最多训练 12 个 epoch。
- 评估:在三个数据集(手动标注、扩充、机器标注)上使用 macro-F1、精确度和召回率。
- 在 LLM 上进行少样本提示实验(如 LLaMA、Mistral、Vicuna),以与有监督微调进行比较。
实验结果
研究问题
- RQ1大型且多样化的配方成分短语数据集是否可以提升配方文本的 NER 性能?
- RQ2哪种 NER 建模方法(CRF 基线 vs 基于编码器的变换器模型)在配方数据上能获得最佳 macro-F1?
- RQ3数据扩充和机器标注数据是否有助于或削弱 NER 性能?
- RQ4当前 LLM 的少样本提示在不进行微调的情况下对配方 NER 是否有效?
- RQ5配方 NER 的标签层学习模式是什么(例如哪些实体类型更容易或更难)?
主要发现
- spaCy-transformer 在所有三个数据集上都取得了最佳的 macro-F1:95.9%(手动标注)、96.04%(扩充)、95.71%(机器标注)。
- 扩充数据为某些模型带来适度提升,而机器标注数据可能引入噪声并略微降低性能。
- Distil 变体通常可以与基线 BERT 模型旗鼓相当甚至超越,可能原因是减少了过拟合和对噪声的敏感性。
- 在最先进的 LLM 上进行少样本提示的 macro-F1 得分较差(例如取决于模型,范围为 5.88–32.90%),表明在不微调的情况下领域适应有限。
- 数量(Quantity)标签学习得较快,而 Temperature 标签滞后,表明数据频率影响可学习性及模型对记忆的依赖。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。