[论文解读] Exploring New Frontiers in Agricultural NLP: Investigating the Potential of Large Language Models for Food Applications
本文提出 AgriBERT,一种从头开始在农业文本语料上预训练的基于 BERT 的语言模型,在食品相关自然语言处理任务中表现出色,例如食品与营养数据库之间的语义匹配以及菜系预测。AgriBERT 在性能上优于通用模型和特定领域模型,在菜系预测任务中取得了 79.63% 的 F1 分数,凸显了其在结合 FoodOn 本体论外部知识的农业 NLP 应用中的有效性。
This paper explores new frontiers in agricultural natural language processing by investigating the effectiveness of using food-related text corpora for pretraining transformer-based language models. In particular, we focus on the task of semantic matching, which involves establishing mappings between food descriptions and nutrition data. To accomplish this, we fine-tune a pre-trained transformer-based language model, AgriBERT, on this task, utilizing an external source of knowledge, such as the FoodOn ontology. To advance the field of agricultural NLP, we propose two new avenues of exploration: (1) utilizing GPT-based models as a baseline and (2) leveraging ChatGPT as an external source of knowledge. ChatGPT has shown to be a strong baseline in many NLP tasks, and we believe it has the potential to improve our model in the task of semantic matching and enhance our model's understanding of food-related concepts and relationships. Additionally, we experiment with other applications, such as cuisine prediction based on food ingredients, and expand the scope of our research to include other NLP tasks beyond semantic matching. Overall, this paper provides promising avenues for future research in this field, with potential implications for improving the performance of agricultural NLP applications.
研究动机与目标
- 开发一种专用于农业和食品相关自然语言处理任务的领域特定语言模型。
- 利用预训练语言模型提升食品描述与营养数据之间语义匹配的性能。
- 评估从 FoodOn 本体论中引入外部知识对模型性能的增强效果。
- 探索基于 GPT 的模型和 ChatGPT 作为农业 NLP 任务基线和知识源的潜力。
- 将 AgriBERT 的应用范围从语义匹配扩展至菜系预测和基于成分的分类等任务。
提出的方法
- 在大型农业文献语料上从头开始预训练基于 BERT 的模型 AgriBERT,包括来自美国国家农业图书馆的 120 万段落和来自农业书籍及通用文献的 530 万段落。
- 通过将语义匹配任务重新表述为答案选择问题,使用食品描述与营养数据配对对 AgriBERT 进行微调。
- 通过注入来自 FoodOn 知识图谱的实体来增强输入文本,以提升上下文理解的领域特定知识。
- 在多个分类器上对比 AgriBERT 与通用模型(如 all-mpnet-base-v2)和其他领域特定模型(如 agri-sentence-transformer)的性能。
- 使用零样本和少样本提示技术,通过 ChatGPT 探索其在食品相关 NLP 任务中作为基线和外部知识源的实用性。
- 通过在食谱文本分类任务上微调,将 AgriBERT 应用于菜系预测,并在多个分类器之间比较性能。

实验结果
研究问题
- RQ1在农业文本上预训练的基于 BERT 的语言模型是否能在食品与营养数据库之间的语义匹配任务中优于通用模型和现有领域特定模型?
- RQ2从 FoodOn 本体论中注入外部知识对 AgriBERT 在语义匹配任务中的性能有何影响?
- RQ3基于 GPT 的模型(如 ChatGPT)在多大程度上可作为农业 NLP 任务的有效基线或知识源?
- RQ4AgriBERT 是否在语义匹配之外也具备良好的泛化能力,特别是在菜系预测等任务中?
- RQ5不同预训练语言模型对下游食品相关 NLP 应用性能有何影响?
主要发现
- AgriBERT 在所有测试分类器中均取得了 79.63% 的最高 F1 分数,用于菜系预测,优于通用模型和领域特定模型。
- 在语义匹配任务中,引入 FoodOn 知识图谱中的外部实体提升了 P@1 指标,但降低了平均精度(mean average precision),表明评估指标之间存在权衡。
- AgriBERT 在菜系预测任务中始终优于所有其他模型,包括最先进的 all-mpnet-base-v2 模型,在所有分类器中表现稳健,凸显其领域特定的有效性。
- TF-IDF 基线在使用 MLP 时取得了 70.76% 的 F1 分数,但在其他分类器上表现较差,表明其在不同模型间泛化能力有限。
- agri-sentence-transformer 在使用 SVM 时取得了 65.87% 的 F1 分数,表明领域特定微调有助于性能提升,但仍不及 AgriBERT 的表现。
- ChatGPT 展现出强大的基线性能,表明其在未来农业 NLP 应用中作为知识源具有潜力。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。