Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks

作者信息:
Kai Sheng Tai Stanford University
Richard Socher MetaMind
Christopher D. Manning Stanford University

数据:

1)Stanford Sentiment Treebank 情感分为五类

2)Sentence Involving Compositional Knowledge(SICK)  句子对有相关性得分

1 introduction

Most models for distributed representations of phrases and sentences—that is, models where realvalued vectors are used to represent meaning—fall into one of three classes:

bag-of-words models-句子中的单词的序列关系看不出来

sequence models

tree-structured models.-包含了句法语义

与standard LSTM 相比, Tree-LSTM 有以下这行特性:
(1)Tree-LSTM 可能依赖多个子节点
(2)forget gate 可能有多个,与子节点的个数有关

本文给出两种tree-LSTM :
(1) Child-Sum Tree-LSTMs
(2) N-ary Tree-LSTMs

这篇文章介绍了将标准lstm改进为树结构一般化过程,在序列lstm上可以表示出句子的含义a generalization of
区别:

the standard LSTM composes -- hidden state from the input at the current time step and the hidden state of the LSTM unit in the previous time step,

the tree-structured LSTM, orTree-LSTM--composes its state from an input vector and the hidden states of arbitrarily many child units.

标准lstm是tree-lstm的一个特例,看做tree-lstm的每个内部节点只有一个孩子

2 Long Short-Term Memory Networks

Two commonly-used variants of the basic LSTM architecture :

the Bidirectional LSTM —— At each time step, the hidden state of the Bidirectional LSTM is the concatenation of the forward and backward hidden states.

the Multilayer LSTM (also known as the stacked or deep LSTM)—— the idea is to let the higher layers capture longerterm dependencies of the input sequence.

3Tree-Structured LSTMs

该论文提出两个结构:

the Child-Sum Tree-LSTM

and the N-ary Tree-LSTM.

Under the Tree-RNN framework,the vectorial representation associated with each node of a tree is composed as a function of the vectors corresponding to the children of the node. The choice of composition function gives rise to numerous variants of this basic framework.

Tree-RNNs have been used to parse images of natural scenes (Socher et al., 2011), compose phrase representations from word vectors (Socher et al., 2012), and classify the sentiment polarity of sentences (Socher et al., 2013).

 

4 models

tree-LSTM的两个应用: 
(1)classification

hjj 就是利用tree-LSTM计算出的node j 的embedding

(2) Semantic relatedness of Sentence Pairs

hLL 和 hRR 是利用Tree-LSTM对两个句子的embedding representations, 经过上面一系列公式的操作比较两个句子的senmantic relatedness

6 Results

指标:

1)Pearson's

2)Spearman's

3)MSE

6.1 Sentiment Classification

细腻度情感分析Fine-grained: 5-class sentiment  classification.

Binary: positive/negative sentiment classification.

微调有助于区分更细腻度的区分度

对于细腻度情感分析来说bi-lstm比lstm更更好,但是对于二分类来说效果差不多,猜测是由于细腻度的需要更多输入向量表示和隐藏层有更多更复杂的互动,而二分类中想要保留的分类的状态lstm已经足够去保持

6.2 Semantic Relatedness

--------------------------------------------------

斯坦福的sentiment treebank:

treebank的形式如下
(0 (1 You) (2 (3 can) (4 (5 (6 run) (7 (8 this) (9 code))) (10 (11 with) (12 (13 (14 our) (15 (16 trained) (17 model))) (18 (19 on) (20 (21 (22 text) (23 files)) (24 (25 with) (26 (27 the) (28 (29 following) (30 command)))))))))))
这是句子“You can run this code with our trained model on text files with the following command”经过stanford模型计算后得到的情感treebank形式。

每个括号中的第一个元素为规则的头,比如对于左右两边都只有一个节点的规则:
(1 You): 1->You , 1表示的是NON-Terminal字符,You表示terminal字符,和标准的pennetreebank的区别是1代表的是这个节点的情感强度,分五个等级。

(0 (1 You) (2 (3 can)…) :
在这个规则里,右边有两个节点,是一个标准的二叉树,0-> 1, 2。

Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks-paper的更多相关文章

  1. LSTM学习—Long Short Term Memory networks

    原文链接:https://colah.github.io/posts/2015-08-Understanding-LSTMs/ Understanding LSTM Networks Recurren ...

  2. Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks(1)

    今天和陈驰,汪鑫讨论了一下,借此记录一下想法. 关于这篇论文,要弄清的地方有: 1.LSTMtree到底是从上往下还是从下往上学的,再确认一下 2.关于每个节点的标注问题 3.label的值到底该怎么 ...

  3. 论文阅读及复现 | Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks

    两种形式的LSTM变体 Child-Sum Tree-LSTMs N-ary Tree-LSTMs https://paperswithcode.com/paper/improved-semantic ...

  4. LSTM(Long Short Term Memory)

    长时依赖是这样的一个问题,当预测点与依赖的相关信息距离比较远的时候,就难以学到该相关信息.例如在句子”我出生在法国,……,我会说法语“中,若要预测末尾”法语“,我们需要用到上下文”法国“.理论上,递归 ...

  5. (转)The Neural Network Zoo

    转自:http://www.asimovinstitute.org/neural-network-zoo/ THE NEURAL NETWORK ZOO POSTED ON SEPTEMBER 14, ...

  6. RNN 入门教程 Part 4 – 实现 RNN-LSTM 和 GRU 模型

    转载 - Recurrent Neural Network Tutorial, Part 4 – Implementing a GRU/LSTM RNN with Python and Theano ...

  7. [转] Understanding-LSTMs 理解LSTM

    图文并茂,讲得极清晰. 原文:http://colah.github.io/posts/2015-08-Understanding-LSTMs/ colah's blog Blog About Con ...

  8. 循环神经(LSTM)网络学习总结

    摘要: 1.算法概述 2.算法要点与推导 3.算法特性及优缺点 4.注意事项 5.实现和具体例子 6.适用场合 内容: 1.算法概述 长短期记忆网络(Long Short Term Memory ne ...

  9. IMPLEMENTING A GRU/LSTM RNN WITH PYTHON AND THEANO - 学习笔记

    catalogue . 引言 . LSTM NETWORKS . LSTM 的变体 . GRUs (Gated Recurrent Units) . IMPLEMENTATION GRUs 0. 引言 ...

随机推荐

  1. 微信小程序开发学习(一):开发前准备

    开发前准备 Step1:注册 微信小程序开放平台: https://mp.weixin.qq.com/cgi-bin/wx 开发者注册: https://mp.weixin.qq.com/wxopen ...

  2. Android 音视频深入 十六 FFmpeg 推流手机摄像头,实现直播 (附源码下载)

    源码地址https://github.com/979451341/RtmpCamera/tree/master 配置RMTP服务器,虽然之前说了,这里就直接粘贴过来吧 1.配置RTMP服务器 这个我不 ...

  3. day43-python消息队列二-queue模块

    Python提供了Queue模块来专门实现消息队列Queue对象 Queue对象实现一个fifo队列(其他的还有lifo.priority队列,这里不再介绍).queue只有maxsize一个构造参数 ...

  4. 面向对象编程思想(OOP)

    本文我将从面向对象编程思想是如何解决软件开发中各种疑难问题的角度,来讲述我们面向对象编程思想的理解,梳理面向对象四大基本特性.七大设计原则和23种设计模式之间的关系. 软件开发中疑难问题: 软件复杂庞 ...

  5. 电脑小白和ta的小白电脑——MySQL数据库

    数据库我选择了MySQL,因为据说MySQL是最流行的关系型数据库管理系统,在WEB应用方面 MySQL 是最好的RDBMS之一了,而且,免费呀! MySQL数据库开发环境的配置 (一)下载MySQL ...

  6. 前端车牌识别SDK算法提取

    同行业中,别人标配有的产品我有,别人没有的产品我们也有,如此才能增强竞争力,通过优化创新,前端车牌识别SDK功能,性能上,都是行业NO.1的水平.车牌识别sdk这个用于越来越多人集成了,汽车保有量日益 ...

  7. if -----if else语句

    if语句是用来进行判断的,其使用格式如下: 单分支 if 判断的条件: 满足条件后要执行的代码 双分支 if 条件: 满足条件执行代码 else: if条件不满足就走这段 这里必须要插入这个缩进的知识 ...

  8. 2017年4月13日用VS写C程序遇到的一些问题

    在网上找到一篇展示计算机浮点数格式的文章,且有C代码如下: #include <stdio.h> #include <stdlib.h> #include <string ...

  9. 转载-Python单元测试框架——unittest

    一.Pyhon工作原理—— 核心概念:test case, testsuite, TestLoder,TextTestRunner,TextTestResult, test fixture TestC ...

  10. 练习 HashSet 去重复

    package com.rf.xs.list; import java.util.HashSet; public class Person { private String name; private ...