0%

PLATO DIALOGUE SYSTEM: A FLEXIBLE CONVERSATIONAL AI RESEARCH PLATFORM

论文地址,论文作者 Alexandros Papangelis 等,发表于 2020 年。 注:由于该论文的重点是提出一个工具包,故以下将只翻译我认为比较重要的部分。

本文主要内容

本论文中,我们提出了 Plato,一个用 Python 编写的灵活的对话 AI 平台,支持任何类型的会话代理架构。包括从标准架构到具有联合训练组件的架构、单方或多方交互,以及任何会话代理组件的离线或在线训练。Plato 被设计成易于理解和调试的形式,并且对训练每个组件的底层学习框架是不可知的(我直接机翻了,我推测大致意思应该是 Plato 支持任意的深度学习框架)。

引言

传统上,对话式 AI 系统(Conversational AI systems)由语音识别(Automatic Speech Recognition, ASR),自然语言理解(Natural Language Understanding, NLU),对话状态追踪(Dialogue State Tracking, DST),对话管理(Dialogue Management, DM),自然语言生成(Natural Language Generation, LG),Text To Speech(TTS) 组成。 随着某些技术的发展,一系列的平台和工具包被提出,以构建对话式 AI 系统。每个工具包很大程度上都是被设计在某个特定的例子中,它们由于某些原因,似乎使得尖端研究与其在生产系统中的应用两部分失去关联。无论如何,对话式 AI 系统变得越来越有用,需要有一个工具包能够在研究与生产之间搭起一个桥梁,并且能够提供一个完整会话体验的快速原型,其需要拥有 ASR、NLU、DST/DM、NLG 和 TTS 功能。目前仅有几个工具包可以完成以上的需要,例如 RASA。

现存开源对话式 AI 系统

一些工具包以及对话式 AI 平台在近期被提出。以下是一些一流、被广泛采用的平台: - PyDial

Plato 架构

Plato 可以被用于创建、训练以及评估对话式 AI agents。它主要有四部分组件,即:1)dialogue:定义以及实现 dialogue acts 和 dialogue states;2)domain:包含对话的本体以及对话系统所需的数据库;3)controller:安排对话;4)agent:实现每个对话式 agent 的不同组件。四大组件如图 2 所示。在 Plato 中,每个组件都是使用 YAML 文件中的配置来实例化的

Dialogue

Plato 通过对话理论中定义明确的概念,如 dialogue states 和 dialogue acts,使 agents 之间的对话更便利。然而,一个 Plato agent 可能需要执行与对话没有直接关系的动作(例如调用一个 API)或使用言语以外的方式传递信息的动作(例如显示一个图像)。因此,Plato 把 Actions 和 States 建模成抽象的容器,以此从中产生 Dialogue Acts 和 Dialogue States。所以如果需要特定的应用(例如 multi-modal conversational agent),就可以有特定于任务的 Dialogue Acts and States。

Domain

为了在 Plato 实现一个任务驱动的 slot-filling 对话系统,我们需要规定两种元素,即构成对话系统的 domain: 1. Ontology:在任务驱动的应用中,对于一次会话,ontology 决定了 informable slots(用户提供的信息),requestable slots(用户请求的信息),system requestable slots(系统请求的信息)。 2. Database:虽然 database 可能已经存在,但是 Plato 提供工具从数据中构建对话系统的 domain 和 database。

在酒店预订的对话 agent 例子中,“口味”被认为是一个 informable slot,database 包含了关于酒店不同口味、价格范围、地址等信息。对于非 slot-fliing 的应用,Plato ontologies 和 database 可以扩展以满足特定任务或领域的需求。

Domain creation

Plato provides a utility that makes it easy to generate an ontology (a .json file) and a database (SQLite) from a .csv file, with columns representing item attributes and rows representing items (for an example, see plato/example/data/flowershop.csv). The main purpose of this utility is to help quick prototyping of conversational agents. The command plato domain –config <PATH/TO/CONFIG.YAML> calls the utility and generates the appropriate .db and .json files that define the domain. In the YAML configuration file, the user specifies details such as the path to the input .csv file, the columns that represent informable slots, etc.

Controller

Agent

Plato 中每个对话应用都有一个或多个 agent。每个 agent 都有一个 role(助手、用户、旅客、导师等)以及一组组件,例如 NLU,DM,DST,dialogue policy,NLG。 每一个组件可以是 rule-based ,也可以是 trained 的。

Rule-based modules

Plato 提供 slot-filiing 对话 agent 的所有组件(rule-based):slot_filling_nluslot_filling_dstslot_filling_policyslot_filling_nlg,以及一个 Agenda-Based User Simulator 的默认版本 agenda_based_us。这些可以用于 quick prototyping, baselines, or sanity checks。具体来说,所有这些组件都遵循基于给定本体的 rules or patterns,有时也遵循给定数据库的 rules or patterns,并且应该被视为每个组件的最基本版本

Trained modules

Plato 支持以 online(交互期间)或者 offline(从数据中)的形式训练 agent 的组件,可以使用任意的机器学习框架。实际上,只要尊重 Plato 的输入/输出接口,任何模型都可以加载到 Plato 中。例如,如果是一个自定义 NLU 模型,仅需要继承 Plato 的 NLU 抽象类(plato.agent.component.nlu)并且实现必要的方法以及将数据打包/解包到自定义模型中并从中取出的功能即可。 - Plato internal experience:为了促进在线学习、调试和评估的能力, - Parsing data with Plato:Plato 为 DSTC2、MetaLWOZ 和 Taskmaster 数据集提供解析器。……。对于其他数据集,用户应该实现自定义解析器,将数据转换为 Plato 可读格式。……。 - Training components of conversational agents: - Model Training with Plato:除了监督模型,Plato 还提供了一些强化学习算法的实现 - Training with Ludwig:实际上,在 Plato 中,尽管任何框架都可以为对话式 agent 的不同组件构建和训练深度学习模型,但当目标是 quick prototyping 或出于教育目的时,Ludwig 是一个不错的选择,因为 Ludwig 允许用户在不编写任何代码的情况下训练模型。用户只需要将其数据解析为 .csv 文件,创建描述体系结构的 Ludwig YAML配置文件,然后在终端中运行命令。这允许 Plato 与 Ludwig 模型集成,即加载或保存模型,训练和查询它们。经过训练的模型可以通过配置文件加载到模块中。在 Plato 教程中,我们提供了使用 Ludwig 为 Plato 建立和训练 language understanding, generation, dialogue policy, and dialogue state tracking 模型的示例。 - Training with other frameworks

Plato Settings