一种能够学习家谱关系的简单神经网络

血缘一共同拥有12种关系:

son, daughter, nephew, niece, father, mother, uncle, aunt, brother, sister, husband, wife

有1个英国家庭以及1个意大利家庭,每一个家庭有12个人。

各种家庭关系都是可用三元数组表示。即( Agent / Relation / Patient ) 结构:

  • (colin has-father james)
  • (colin has-mother victoria)
  • (james has-wife victoria) 能够由上述关系推导得到

该网络由5层结构组成,如图1所看到的



图1

  • 网络底层左右两边各有12个神经元。

  • 第1层左側神经元输入 Agent 向量,每次仅仅有一个为1,如000100000000。
  • 第1层右側神经元输入 Relation 向量。每次也仅仅有一个为1。
  • 第2层左側神经元用来序列化 Agent 向量,右側神经元用来序列化 Relation 向量。

  • 第3层用以学习 Agent 与 Relation 的关系,预測出 Patient。
  • 第4层解析出 Patient 向量。
  • 第5层是预測出的实际 Patient。其每次的激活值可能不仅仅一个。

    比如:Andrew has-aunt ? 可能相应多个 aunt。

网络学到了什么?

以序列化输入 Agent 的 6 个神经元为例。如图2.

- 1号神经元对不同国籍的输入非常敏感。能够进行区分。

- 2号神经元对每次输入 Agent 所属的辈分(Generation)非常敏感。

- 6号神经元对每次输入 Agent 所属的家庭非常敏感。



图2

关于 概念(Concepts) 的两种理论

  • 特征理论(The Feature Theory)

    概念是语义特征的集合。

    A concept is a set of semantic features.

因此概念就能够用特征的向量来表示

  • 结构主义理论(The Structuralist Theory)

    概念的意义存在于概念与概念之间的关系。

    The meaning of a concept lies in its relationships to other concepts.

因此概念能够用关系图模型表达

Hinton 觉得 *Both sides are wrong* ,由于

神经网络能够使用语义特征来实现关系图模型

Softmax 输出函数

均方误差有下面缺陷

  • 假设目标是1而如今的实际输出是0.00000001。那么返回给神经元的梯度差点儿为0.
  • 强制指定所属各类概率就会剥夺网络的学习能力。

    Softmax作为逻辑回归的推广,能够非常好解决这些问题。

构造公式

yi=ezi∑j∈groupezi

梯度公式

∂yi∂zi=yi(1−yi)

代价函数依旧使用相互熵

dC / dy 的陡峭正好抵消了 dy / dz 的平坦。

相互熵

C=−∑jtjlogyj

梯度

∂C∂zi=∑j∂C∂yj∂yj∂zi=yi−ti

Theano相应函数

x,y,b = T.dvectors('x','y','b')
W = T.dmatrix('W')
y = T.nnet.softmax(T.dot(W,x) + b)

Neural Networks for Machine Learning by Geoffrey Hinton (4)的更多相关文章

  1. Neural Networks for Machine Learning by Geoffrey Hinton (1~2)

    机器学习能良好解决的问题 识别模式 识别异常 预測 大脑工作模式 人类有个神经元,每一个包括个权重,带宽要远好于工作站. 神经元的不同类型 Linear (线性)神经元  Binary thresho ...

  2. [Hinton] Neural Networks for Machine Learning - Basic

    Link: Neural Networks for Machine Learning - 多伦多大学 Link: Hinton的CSC321课程笔记1 Link: Hinton的CSC321课程笔记2 ...

  3. [Hinton] Neural Networks for Machine Learning - Converage

    Link: Neural Networks for Machine Learning - 多伦多大学 Link: Hinton的CSC321课程笔记 Ref: 神经网络训练中的Tricks之高效BP ...

  4. [Hinton] Neural Networks for Machine Learning - RNN

    Link: Neural Networks for Machine Learning - 多伦多大学 Link: Hinton的CSC321课程笔记 补充: 参见cs231n 2017版本,ppt写得 ...

  5. [Hinton] Neural Networks for Machine Learning - Bayesian

    Link: Neural Networks for Machine Learning - 多伦多大学 Link: Hinton的CSC321课程笔记 Lecture 09 Lecture 10 提高泛 ...

  6. [Hinton] Neural Networks for Machine Learning - Hopfield Nets and Boltzmann Machine

    Lecture 11 — Hopfield Nets Lecture 12 — Boltzmann machine learning Ref: 能量模型(EBM).限制波尔兹曼机(RBM) 高大上的模 ...

  7. 课程一(Neural Networks and Deep Learning),第二周(Basics of Neural Network programming)—— 4、Logistic Regression with a Neural Network mindset

    Logistic Regression with a Neural Network mindset Welcome to the first (required) programming exerci ...

  8. 课程一(Neural Networks and Deep Learning),第一周(Introduction to Deep Learning)—— 2、10个测验题

    1.What does the analogy “AI is the new electricity” refer to?  (B) A. Through the “smart grid”, AI i ...

  9. 课程一(Neural Networks and Deep Learning),第四周(Deep Neural Networks) —— 3.Programming Assignments: Deep Neural Network - Application

    Deep Neural Network - Application Congratulations! Welcome to the fourth programming exercise of the ...

随机推荐

  1. resteasy json

    https://www.cnblogs.com/toSeeMyDream/p/5763725.html

  2. Idea创建模板

    新建文件模板 /** * * @author zenglw * @date ${DATE} */ Mapper #if (${PACKAGE_NAME} && ${PACKAGE_NA ...

  3. matlab安装及使用

    matlab R2015b在ubuntu 14.04环境下的安装 挂载及运行安装程序 sudo mkidr /media/matlab mount -o loop matlab_R2015b.iso ...

  4. SGU 202. The Towers of Hanoi Revisited

    多柱汉诺塔问题. 引用自wiki百科 多塔汉诺塔问题 在有3个柱子时,所需步数的公式较简单,但对于4个以上柱子的汉诺塔尚未得到通用公式,但有一递归公式(未得到证明,但目前为止没有找到反例): 令为在有 ...

  5. yum 安装

    可以有两种方式:1.sudo yum install 然后输入root密码2.su root,输入密码然后yum install

  6. ARK登录信息

    101,389B,382:仙境353:中心岛380:畸变404:孤岛371:焦土487:灭绝 eaglexmw:389b[65493013] : 初级畸变,高级飞升,TEK全解(有380权限),黑鬼, ...

  7. .net中 Timer定时器

    作者:feiying008 在开发一套视觉系统时,发现系统内存一直不断增加,直至系统内存爆满.一开始还以为是程序内存泄露,是图像操作算法写的有问题,但是,发现如果电机轴如果 不运行的状态下,每隔一秒进 ...

  8. 转:攻击JavaWeb应用[6]-程序架构与代码审计

    转:http://static.hx99.net/static/drops/tips-429.html 攻击JavaWeb应用[6]-程序架构与代码审计 园长 · 2013/08/12 16:53 注 ...

  9. 203. Remove Linked List Elements【Easy】【未排序链表删除其中的给定值】

    Remove all elements from a linked list of integers that have value val. Example: Input: 1->2-> ...

  10. 货币金额javascript正则表达式

    最多保留两位小数,货币金额(不能为0): /^(([1-9]\d*)(\.\d{1,2})?)$|^(0\.0?([1-9]\d?))$/