AdamTechLouis's talk: Deep Learning with Knowledge Graphs

2023-05-16

Last week I gave a talk at Connected Data London on the approach that we have developed at Octavian to use neural networks to perform tasks on knowledge graphs.

Here’s the recording of the talk, from Connected Data London:

video

In this post I will summarize that talk (including most of the slides) and provide links to the papers that have most significantly influenced us.

To find out more about our vision for a new approach to building the next generation of database query engine see our recent article.

What is a graph?

在这里插入图片描述
Two functionally identical graph models

We are using a property graph or attributed graph model. Nodes (vertices) and relations (edges) can have properties. In addition our Neural Network has a global state that is external to the graph. The slide shows two representations of this model one from Neo4j and the other from DeepMind (n.b. these are effectively identical).

Why are we interested in graphs?

在这里插入图片描述

Graphs have a rich history, starting with Leohnard Euler in the 18th century to a whole range of graphs today. Within the field of computer science there are many applications of graphs: graph databases, knowledge graphs, semantic graphs, computation graphs, social networks, transport graphs and many more.

Graphs have played a key role in the rise of Google (their first breakthrough was using PageRank to power searches, today their Knowledge Graph has grown in importance) and Facebook. From politics to low cost international air travel, graph algorithms have had a major impact on our world.

What is Deep Learning?

在这里插入图片描述
Deep learning is a branch of machine learning centered around training multi layer (“deep”) neural networks using gradient descent. The basic building block of these neural networks is the dense (or fully connected) network.

在这里插入图片描述

A deep neural network using dense layers

Using deep learning has allowed us to train computers to tackle a range of previously challenging tasks from playing Go to image recognition with superhuman performance.

在这里插入图片描述
MacNets and other examples of superhuman image processing neural networks

Machine Learning

In general machine learning is a simple concept. We create a model of how we think things work e.g. y = mx + c this could be:

house_price = m • number_of_bedrooms + c

在这里插入图片描述

We train (fit) the parameters of our model (m and c in the example) using the data that we have. Once our training is done we have some learned parameter values and we have a model that we can use to make predictions.

Sometimes the parameters are useful by themselves (e.g. when we use a neural network to train a word embedding such as word2vec).
在这里插入图片描述

Deep Learning on Graphs

At Octavian one of the questions we asked ourselves is: how would we like machine learning on graphs to look from 20,000ft?

To help answer this question, we compared traditional forms of deep learning to the world of graph learning:

在这里插入图片描述
Comparing graph machine learning with other setups

We identified three graph-data tasks which we believe require graph-native implementations: Regression, Classification and Embedding.

Aside: there are other graph-specific tasks such as link prediction that don’t easily fit into the three tasks above.
We observed that many existing techniques for machine learning on graphs have some fundamental limitations:

Some do not work on unseen graphs (because they require first training a graph embedding)
Some require converting the graph into a table and discarding its structure (e.g. sampling from a graph using random walks)

Existing Work

在这里插入图片描述
Performance of DL models on graph problems is not superhuman

Much of the existing work using Deep Learning on graphs focuses on two areas.

  • Making predictions about molecules (including proteins), their properties and reactions.
  • Node classification/categorisation in large, static graphs.

Graphs, Neural Networks and Structural Priors

It’s often said that Deep Learning works well with unstructured data — images, free text, reinforcement learning etc.

But our superhuman neural networks are actually dealing with very specifically structured information and the neural network architectures are engineered to match the structure of the information they work well with.
在这里插入图片描述
Data structures that work with neural networks

Images are in a sense structured: they have a rigid 2D (or 3D) structure where pixels that are close to each-other are more relevant to each-other than pixels that are far apart. Sequences (e.g. over time) have a 1D structure where items that are adjacent are more relevance to one another than items that are far apart.

在这里插入图片描述
Dense layers make sense for Go where locations that are far apart on the board can have equal influence one another

When working with images and sequences, dense layers (e.g. where every input is connected to every output) doesn’t work well. Neural network layers that reflect and exploit the structure of the input medium achieve the best results.

For sequences Recurrent Neural Networks (RNNs) are used and for images Convolutional Neural Networks (CNNs) are used.

在这里插入图片描述
Convolutional Networks structurally encode that pixels which are close to one another are more significant that pixels which are far apart

In a convolutional neural network each pixel in the hidden layer only depends on a group of nearby pixels in the input (compare this to a dense layer where every hidden layer pixel depends on every input pixel).

在这里插入图片描述

Neither dense nor convolutional networks make sense for a transit graph

Nodes in graphs do not have fixed relations like nearby pixels in an image or adjacent items in a sequence. To make deep learning successful with graphs it’s not enough to convert graphs to matrix representation and put that input into existing Neural Network models. We have to figure out how to create Neural Network models that work well for graphs.

在这里插入图片描述
This paper makes the same argument more effectively than I do — check it out!
We aren’t the only people thinking about this. Some very clever people at DeepMind, Google Brain, MIT and University of Edinburgh lay out a similar position in their paper on Relational Inductive Biases. I recommend this paper to anyone interested in deep learning on graphs.

The paper introduces a general algorithm for propagating information through a graph and argues that by using neural networks to learn six functions to perform aggregations and transforms within the structure of the graph they can achieve state of the art performance on a selection of graph tasks.
在这里插入图片描述
One algorithm to rule them all?

By propagating information between nodes principally using the graph edges the authors argue they are maintaining the relational inductive biases present in the graph structure.

The MacGraph neural network architecture that we have been developing at Octavian has similarities to the relational inductive biases approach. It employes a global state that exists outside the graph and also propagates information between the graph nodes

Octavian’s experimental results

Before I can tell you about our results at Octavian I have to mention the task that we used to test our neural graph architecture.

在这里插入图片描述
our synthetic benchmark dataset

You can read more about CLEVR-Graph here. It’s a synthetic (procedurally generated) dataset which consists of 10,000 fictional transit networks loosely modelled on the London underground. For each randomly generated transit network graph we have a single question and correct answer.

在这里插入图片描述

Some example questions from the CLEVR-Ggraph question bank and an example graph

The crucial thing about this task is that each graph used to test the network is one the network has never seen before. Therefore it cannot memorise the answers to the questions but must learn how to extract the answer from new graphs.

At time of writing MacGraph is achieving almost-perfect results on tasks requiring 6 different skills:
在这里插入图片描述
MacGraph’s latest results on CLEVR-graph

I think that one of the most exciting skills is MacGraph’s ability to answer “How many stations are between{station} and {station}” because to solve that question it’s necessary to determine the shortest path between the stations (Dijkstra’s algorithm) which is a complex and graph-specific algorithm.

How does MacGraph work?

It’s not sufficient to just propagate information between nodes in the graph using transformation and aggregation functions. To answer natural language questions about a graph with natural language answers it’s necessary to transform the input question into a graph state that results in the correct answer being reached and it’s necessary to extract the answer information from the graph state and transform it into the desired answer.
在这里插入图片描述
Our solution for transforming between natural language and graph state is to use attention. You can read more about how this works here.

在这里插入图片描述

an alternative to dense layers

Attention cells are radically different to dense layers. Attention cells work with lists of information, extracting individual elements depending on their content or location.

These properties make attention cells great for selecting from the lists of nodes and edges that make up a graph.

In MacGraph write attention is used to input a signal to the nodes in the graph based on the query and the properties of the nodes. This signal should then prime the graph message passing to interact with the nodes most relevant to the question.

在这里插入图片描述

Prime the graph with the query using write attention

After information has propagated through the graph’s nodes, attention is used to extract the answer from the graph:
在这里插入图片描述

Read from the graph using attention

Combining write and read attention with propagation between nodes in the graph using the graph structure we are get the core of MacGraph.

在这里插入图片描述

Mac Graph architecture

Conclusion

There is a strong case that achieving superhuman results on graph-based tasks requires graph-specific neural network architectures.

We have shown with MacGraph that a neural network can learn to extract properties from nodes within a graph in response to questions and that a neural network can learn to perform graph algorithms (such as finding the shortest path) on graphs that it has never encountered before.
在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

AdamTechLouis's talk: Deep Learning with Knowledge Graphs 的相关文章

随机推荐

  • ozone调试

    对于keil编译的工程没法用gdb调试 xff08 我没发现方法 xff09 xff0c 那就用Ozone调试 xff0c 官网 https www segger com products development tools ozone j
  • pat1068

    对于计算机而言 xff0c 颜色不过是像素点对应的一个 24 位的数值 现给定一幅分辨率为 M N 的画 xff0c 要求你找出万绿丛中的一点红 xff0c 即有独一无二颜色的那个像素点 xff0c 并且该点的颜色与其周围 8 个相邻像素的
  • windows7系统下如何升级powershell(2.0升级到3.0版本)

    最近在使用vagrant命令时提示2 0的版本不支持需要升级powershell操作如下 查看本机powershell版本号 开始 运行 xff0c 输入powershell进入命令行窗口 在命令行中输入 PSVersionTable PS
  • python+pytesseract 中文识别

    继写了第一篇 包含验证码识别的自动化登录脚本后在一次与朋友聊天中谈到中文识别 想起Tesseract OCR是有这个包的 xff0c 然后我就搞了搞 coding 61 utf 8 from PIL import Image import
  • Codeforces1153A-Serval and Bus(数学)

    原题链接 xff1a http codeforces com contest 1153 problem A 题目原文 xff1a A Serval and Bus time limit per test 1 second memory li
  • tinode登录流程

    登录 交互消息 out是客户端发出 in是客户端接收 客户端发出hi消息 里面主要包括了版本 ua lang消息out span class token punctuation span span class token punctuati
  • While(true)无限循环

    while true 作为无限循环 xff0c 经常在不知道循环次数的时候使用 xff0c 并且需要在循环内使用break才会停止 run 方法中基本都会写while true 的循环 xff0c 如下 xff1a public class
  • python 判断两个字符串的相似度

    import difflib import Levenshtein def get equal rate 1 str1 str2 return difflib SequenceMatcher None str1 str2 quick rat
  • 关于wujian100 SDK中GPIO的调试问题

    学习笔记 问题一 xff1a 引脚电平不稳定问题二 xff1a 进入GPIO中断后出不来 第一次在CSDN写博客 xff0c 用来记录一些学习笔记 xff0c 小白一只 xff0c 如有不足之处望大家多多理解和指导 xff01 分享一下关于
  • 嵌入式C语言-关于if条件判断为真但不执行if块语句的问题

    关于if条件判断为真但不执行if块语句的问题 xff0c 我一直也还不是很清楚是什么原因造成的 在网上查看了一些网友的评论但回答也不是非常的准确 xff0c 或者说每个人遇到的情况都略有不同 我是在调试开发板的时候遇到两类这样的bug xf
  • UEFI模式下双系统安装并引导启动注意事项(RHLE7.9&WIN10)

    UEFI模式下双系统安装并引导启动注意事项 xff08 RHLE7 9 amp WIN10 xff09 引言新的改变资源链接注意事项 引言 就如同大佬说的一样 xff0c 知识也是需要与时俱进的 xff0c 在技术高速革新的时代 xff0c
  • WAV音频文件格式分析

    用notepad 43 43 gt gt plugins gt gt HexEditor notepad 43 43 的一个二进制编辑器插件 可以以16进制查看文件内容 打开一个波形文件如下 xff1a 所有WAV波形文件都可以套用一下一下
  • 使用 Petalinux 定制 Linux 系统

    离线编译petalinux 本文是基于Alinx FPGA开发板 xff08 AXU2CGA xff09 学习过程中踩过的坑 xff0c 以做记录 1 创建工程目录 xff1a 路径中 表示用户 home 路径 mkdir span cla
  • docker安装TensorFlow2.0 + jupyter lab。

    docker加虚拟机 xff0c 简直就是坑中埋雷 让我抱怨一下 我们开始进入主题 我的系统是ubuntu20 安装在虚拟机里 这个我就不再阐述过多了 大家都会 docker安装过程我也不多说了 xff0c 这个资料很多 那么我们直接进入主
  • Python 利用 curve_fit 进行 e 指数函数拟合

    可能对大家有参考价值的信息是 xff1a 如何用 curve fit 进行 e 指数函数拟合 xff1b 如何将拟合后的结果输出到画布上 xff1b 坐标轴 标签 图例样式的设计 xff1b 文本框内容和格式 话不多说 xff0c 直接上代
  • 简单搜索--马的走法

    描述 在一个4 5的棋盘上 xff0c 输入马的起始位置坐标 xff08 纵 横 xff09 xff0c 求马能返回初始位置的所有不同走法的总数 xff08 马走过的位置不能重复 马走 日 字 xff09 输入 多个测试数据 每组2个数 x
  • 用cephadm单节点安装ceph

    文章目录 官方文档参考安装虚拟机操作系统安装ntp lvm2配置时区安装docker安装cephadm验证 安装修改dashboard密码 安装ceph common查看可用存储添加存储验证 使用pool创建删除pool 块存储 xff08
  • Ubuntu18.04.6更新nvidia驱动后重启卡住

    这已经不是我第一次重装驱动无法重启了 xff0c 更新完驱动之后重启首先会卡在这样一个界面 xff1a 后来进行了这样的操作 xff1a 第一步 xff1a 重启Ubuntu系统开机按esc或shift xff0c 会进入启动选择页 xff
  • Springcloud--服务调度OpenFeign、RestTemplate

    一 RestTemplate RestTemplate是Spring提供的用于访问Rest服务的客户端 xff0c RestTemplate提供了多种便捷访问远程Http服务的方法 能够大大提高客户端的编写效率 1 基本使用 发送GET请求
  • AdamTechLouis's talk: Deep Learning with Knowledge Graphs

    Last week I gave a talk at Connected Data London on the approach that we have developed at Octavian to use neural networ