Re51:读论文 Language Models as Knowledge Bases?

2019年论文《LanguageModelsasKnowledgeBases?》研究了大型预训练语言模型是否能存储事实知识。实验发现BERT表现出色,但对某些类型的知识如N-to-M关系掌握较差。研究使用了多种数据集和指标,强调模板选择对结果的影响。
部署运行你感兴趣的模型镜像

诸神缄默不语-个人优快云博文目录
诸神缄默不语的论文阅读笔记和分类

论文名称:Language Models as Knowledge Bases?

ArXiv网址:https://arxiv.org/abs/1909.01066

官方GitHub项目:https://github.com/facebookresearch/LAMA

本文是2019年EMNLP论文,作者来自脸书和伦敦大学学院。

本文关注LM中蕴含的知识,想要探索的问题是,通过在大型的文本语料上进行预训练,语言模型是否已经(或是有潜力)学习到并存储下了一些事实知识(主体-关系-客体形式的三元组 (subject, relation, object) 或是问题-答案对)?
本文通过将事实三元组转换为自然语言形式,让LM(未经过微调的)用完形填空的形式来预测其中的object(把relation反过来也能预测subject),来进行这一探查:LAMA (LAnguage Model Analysis)
评估正确结果的排序

在这里插入图片描述

实验结论:1. BERT表现很好,可以匹敌传统的有监督学习方法 2. LM对有些知识比其他知识学得更好(N-to-M 关系表现较差)
(什么1984经典句式)

实验用的LM:
单向LM & 双向LM
在这里插入图片描述

baseline包括纯统计学习的、预训练的关系抽取模型、DrQA(先检索相似文档,再做阅读理解)

实验用的事实数据集来自关系数据集Google-RE、T-REx、ConceptNet,将每一种关系手工转换为填空题。原数据集中就有三元组对应的文本。
再加上QA数据集SQuAD
仅选择只有一个token的场景。

↑注意这里,模版的选择会影响结果。所以本文认为手工制作模版只能说是给出了一个LM知识的下限水平。

指标:P@k

P@1:
在这里插入图片描述

P@k:
在这里插入图片描述

出现频率越高、实体越相似、subject越长,指标越高
在这里插入图片描述

案例分析:
在这里插入图片描述

在这里插入图片描述

您可能感兴趣的与本文相关的镜像

Qwen3-VL-8B

Qwen3-VL-8B

图文对话
Qwen3-VL

Qwen3-VL是迄今为止 Qwen 系列中最强大的视觉-语言模型,这一代在各个方面都进行了全面升级:更优秀的文本理解和生成、更深入的视觉感知和推理、扩展的上下文长度、增强的空间和视频动态理解能力,以及更强的代理交互能力

### Chatbot Model Implementation and Information #### Overview of Chatbot Models Chatbots can be categorized based on their functionality and application scenarios into task-oriented, conversational, and hybrid types[^1]. For implementing a chatbot model, especially one that is both efficient and effective in handling specific tasks while maintaining engaging conversations, several key components must be considered. #### Core Components of a Chatbot System A typical chatbot system architecture includes natural language understanding (NLU), dialogue management, and natural language generation (NLG). These components work together to interpret user input, manage conversation flow, and generate appropriate responses. Advanced systems may also incorporate machine learning algorithms for continuous improvement through interaction data analysis. #### Example Code Implementation Using Python Below demonstrates an elementary version of how such a bot might look implemented with Python: ```python from chatterbot import ChatBot from chatterbot.trainers import ChatterBotCorpusTrainer # Create a new instance of a ChatBot chatbot = ChatBot( 'Example Bot', storage_adapter='chatterbot.storage.SQLStorageAdapter' ) trainer = ChatterBotCorpusTrainer(chatbot) # Train the chatbot based on English greetings corpus trainer.train("chatterbot.corpus.english.greetings") def get_response(user_input): response = chatbot.get_response(user_input) return str(response) # Test function call print(get_response('Hello')) ``` This code snippet initializes a simple chatbot trained specifically on greeting patterns within the English language. The `ChatterBot` library simplifies this process by providing pre-built training datasets as well as adapters for storing learned data efficiently. #### Scaling Up With Large Language Models For applications requiring deeper linguistic comprehension or broader knowledge bases, leveraging large-scale pretrained models like those described in Megatron-LM could offer significant advantages over traditional methods[^4]. Such architectures utilize sophisticated techniques including but not limited to transformer networks which have proven highly effective at capturing complex syntactic structures present across vast corpora during fine-tuning phases tailored towards specialized domains. --related questions-- 1. What are some popular platforms available today where developers can experiment with different LLMs? 2. How does incorporating elements from NLP research impact the performance of modern-day chatbots? 3. Can you provide examples of industries benefiting most significantly from adopting advanced chatbot technologies? 4. In what ways do task-specific versus general-purpose chatbots differ regarding design considerations? 5. Are there any notable challenges faced when scaling up small experimental chatbot projects into production-ready solutions?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

诸神缄默不语

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值