Notes from Notes on Noise Contrastive Estimation and Negative Sampling
one sample:
\[x_i \to [y_i^0,\cdots,y_{i}^{k}]\]
where \(y_i^0\) are true labeled words , and \(y_i^1,\cdots,y_i^{k}\) are noise samples word index, which is generated by unigram distribution \(q(w)\) of the dataset.
the probability of true data:
\[p(y_i^0=1|x_i,\theta)=\frac{\exp(y_i^0,h_\theta)}{\exp(y_i^0 h_\theta) + k*q(y_i^0)}\]
the noise sample probability:
\[p(y_i^t=0|x_i,\theta)=\frac{k*q(y_i^t)}{\exp(y_i^t h_\theta) + k*q(y_i^t)},t=1,\cdots,k\]
the cost function of this sample:
\[l_{nce}=\log p(y_i^0|x_i,\theta)+\sum_{t=1}^k{\log p(y_i^t|x_i,\theta)}\]
the overall cost function of the dataset:
\[\mathcal{L}_{nce}=\frac{1}{N}\sum_i^N{\left\{\log p(y_i^0|x_i,\theta)+\sum_{t=1}^k{\log p(y_i^t|x_i,\theta)}\right\}}\]

Related Paper

[Noise-Contrastive Estimation of Unnormalized Statistical Models with Applications to Natural Image Statistics]

[Word2vec Parameter Learning Explained]

[Efficient Estimation of Word Representation in Vector Space]

[Distributed Representations of Words and Phrases and their Compositionality]

[Notes on Noise Contrastive Estimation and Negative Sampling]

Noise Contrastive Estimation的更多相关文章

  1. Notes on Noise Contrastive Estimation and Negative Sampling

    Notes on Noise Contrastive Estimation and Negative Sampling ## 生成负样本 在常见的关系抽取应用中,我们经常需要生成负样本来训练一个好的系 ...

  2. Faster-rnnlm代码分析2 - HSTree的构造

    也就是构造一棵Huffman Tree,输入是按照词汇频次由高到低排序的 采用层次SoftMax的做法,是为了使得训练和预测时候的softmax输出加速,原有multinomal softmax,是和 ...

  3. Faster RNNLM (HS/NCE) toolkit

    https://github.com/kjw0612/awesome-rnn Faster Recurrent Neural Network Language Modeling Toolkit wit ...

  4. DNN论文分享 - Item2vec: Neural Item Embedding for Collaborative Filtering

    前置点评: 这篇文章比较朴素,创新性不高,基本是参照了google的word2vec方法,应用到推荐场景的i2i相似度计算中,但实际效果看还有有提升的.主要做法是把item视为word,用户的行为序列 ...

  5. 【MT】牛津的MT教程

    Preamble This repository contains the lecture slides and course description for the Deep Natural Lan ...

  6. 词向量编码 word2vec

    word2vec word2vec 是Mikolov 在Bengio Neural Network Language Model(NNLM)的基础上构建的一种高效的词向量训练方法. 词向量 词向量(w ...

  7. (转)Awesome PyTorch List

    Awesome-Pytorch-list 2018-08-10 09:25:16 This blog is copied from: https://github.com/Epsilon-Lee/Aw ...

  8. 【word2vec】Distributed Representation——词向量

    Distributed Representation 这种表示,它最早是 Hinton 于 1986 年提出的,可以克服 one-hot representation 的缺点. 其基本想法是: 通过训 ...

  9. 【AI in 美团】深度学习在文本领域的应用

    背景 近几年以深度学习技术为核心的人工智能得到广泛的关注,无论是学术界还是工业界,它们都把深度学习作为研究应用的焦点.而深度学习技术突飞猛进的发展离不开海量数据的积累.计算能力的提升和算法模型的改进. ...

随机推荐

  1. H3 BPM初次安装常见错误详解5-7

    错误5:登陆无反应,F12查看后台网络请求错误如下图所示  错误原因:ISAPI未对相应的.net版本允许. 解决方法:IIS的根节点--右侧"ISAPI和CGI限制"打开--将相 ...

  2. 国外远控软件DarkComet-RAT

    下载地址:[点此下载] 使用步骤: 注册noip.org账号创建主机地址. 安装并配置DUC. 配置监听端口 配置NO-IP Updater 然后点击Update ,配置成功则会提示Success. ...

  3. 数据备份的OSS接口

    最近在做一个新的项目,从RDS备份到OSS,进行数据备份以及后续的还原.这边对阿里云的OSS数据上传接口进行说明,先做下笔记先简单介绍下OSS: ①Object 在OSS中,用户操作的基本数据单元是O ...

  4. Oracle学习笔记五 SQL命令(三):Group by、排序、连接查询、子查询、分页

    GROUP BY和HAVING子句 GROUP BY子句 用于将信息划分为更小的组每一组行返回针对该组的单个结果 --统计每个部门的人数: Select count(*) from emp group ...

  5. Js IP转数字

    <script type="text/javascript"> function d2h(d) { return d.toString(16) } function h ...

  6. Linux下的C Socket编程 -- 简介与client端的处理

    Linux下的C Socket编程(一) 介绍 Socket是进程间通信的方式之一,是进程间的通信.这里说的进程并不一定是在同一台机器上也有可能是通过网络连接的不同机器上.只要他们之间建立起了sock ...

  7. JUnit 4 与 TestNG 对比

    原文出处: 付学良的网志 原文出处2: http://www.importnew.com/16270.html -------------------------------------------- ...

  8. Nutch搜索引擎(第1期)_ Nutch简介及安装

    1.Nutch简介 Nutch是一个由Java实现的,开放源代码(open-source)的web搜索引擎.主要用于收集网页数据,然后对其进行分析,建立索引,以提供相应的接口来对其网页数据进行查询的一 ...

  9. [LeetCode] Lowest Common Ancestor of a Binary Tree 二叉树的最小共同父节点

    Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According ...

  10. [开源]无sql之旅-Chloe.ORM之增删查改

    扯淡 这是一款轻量.高效的.NET C#数据库访问框架(ORM).查询接口借鉴 Linq(但不支持 Linq).借助 lambda 表达式,可以完全用面向对象的方式就能轻松执行多表连接查询.分组查询. ...