使用低维词嵌入在关系数据库中实现认知智能
Enabling Cognitive Intelligence Queries in Relational Databases using Low-dimensional Word Embeddings
摘要:
我们应用来自自然语言处理的分布式语言嵌入方法来将向量分配给每个数据库实体关联的令牌(例如,令牌可以是表行中出现的单词,或者列的名称)。典型维度为200的这些向量基于令牌一起出现的上下文来捕获令牌的含义。为了形成向量,我们将学习方法应用于从数据库中导出的令牌序列。我们描述了从数据库中提取令牌序列的各种技术。这些技术在复杂性、它们输出的令牌序列和所使用的数据库信息(例如,外键)。向量可以用于代数量化标记之间的语义关系,例如相似性和类比。向量支持数据的双重视图:关系和(有意义的而不是纯粹的语法)文本。我们介绍和探索一类新的查询,称为认知智能(CI)查询,从数据库中提取信息的基础上,在一定程度上,由向量编码的关系。我们已经在Spark上实现了一个原型系统,以展示CI查询的强大功能。在这里,CI查询通过SQL UDF实现。由于向量中编码的信息,这种能力远远超出了关系系统的文本扩展。我们还考虑各种扩展的基本方案,包括使用一个集合的视图从数据库中得到的关注领域,利用矢量和/或文本从外部来源,维护矢量数据库的发展和探索数据库,而不利用其模式。对于后者,我们考虑对SQL进行最小限度的扩展,以极大地提高查询表达能力。
英文摘要:
We apply distributed language embedding methods from Natural Language Processing to assign a vector to each database entity associated token (for example, a token may be a word occurring in a table row, or the name of a column). These vectors, of typical dimension 200, capture the meaning of tokens based on the contexts in which the tokens appear together. To form vectors, we apply a learning method to a token sequence derived from the database. We describe various techniques for extracting token sequences from a database. The techniques differ in complexity, in the token sequences they output and in the database information used (e.g., foreign keys). The vectors can be used to algebraically quantify semantic relationships between the tokens such as similarities and analogies. Vectors enable a dual view of the data: relational and (meaningful rather than purely syntactical) text. We introduce and explore a new class of queries called cognitive intelligence (CI) queries that extract information from the database based, in part, on the relationships encoded by vectors. We have implemented a prototype system on top of Spark to exhibit the power of CI queries. Here, CI queries are realized via SQL UDFs. This power goes far beyond text extensions to relational systems due to the information encoded in vectors. We also consider various extensions to the basic scheme, including using a collection of views derived from the database to focus on a domain of interest, utilizing vectors and/or text from external sources, maintaining vectors as the database evolves and exploring a database without utilizing its schema. For the latter, we consider minimal extensions to SQL to vastly improve query expressiveness.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。