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. iOS 3D 之 SceneKit框架Demo分析

    Scene Kit 是Apple 向 OS X 开发者们提供的 Cocoa 下的 3D 渲染框架. Scene Kit 建立在 OpenGL 的基础上,包含了如光照.模型.材质.摄像机等高级引擎特性, ...

  2. 我厂 WiFi SDK 开源了, 直接开源 WiFi 万能钥匙核心功能,造福中小开发者

    官方地址: http://global.18wifibank.com/ github: https://github.com/yibawifi/wifisdk

  3. 关于多个block问题

    在某个添加文本的页面中,leftbarbutton是删除(直接将数组中的这个string删除),rightbarbutton是完成,分别对应两个block,完成的block是一开始写的,写到了view ...

  4. [Erlang 0122] Erlang Resources 2014年1月~6月资讯合集

    虽然忙,有些事还是要抽时间做; Erlang Resources 小站 2014年1月~6月资讯合集,方便检索.      小站地址: http://site.douban.com/204209/   ...

  5. plain framework 1 网络流 缓存数据详解

    网络流是什么?为什么网络流中需要存在缓存数据?为什么PF中要采用缓存网络数据的机制?带着这几个疑问,让我们好好详细的了解一下在网络数据交互中我们容易忽视以及薄弱的一块.该部分为PF现有的网络流模型,但 ...

  6. AC日记——地鼠游戏 codevs 1052

    1052 地鼠游戏  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 钻石 Diamond 题解       题目描述 Description 王钢是一名学习成绩优异的学生,在平 ...

  7. [No00009C]Visual Studio在 解决方案资源管理器 里同步定位打开的文件

    标题的意思就是在使用VS的时候,需要我们打开编辑的文件跟解决方案的资源管理器同步显示,这样方便定位到我们在修改哪个文件. 设置如下: 工具——选项——项目和解决方案——在解决方案资源管理器中跟踪活动项 ...

  8. 【repost】JavaScript 事件模型 事件处理机制

    什么是事件? 事件(Event)是JavaScript应用跳动的心脏 ,也是把所有东西粘在一起的胶水.当我们与浏览器中 Web 页面进行某些类型的交互时,事件就发生了.事件可能是用户在某些内容上的点击 ...

  9. 一个简单移动页面ionic打包成app

    先贴JS代码好了,缓动和调整透明度的功能,最后用ionic打包成应用就可以 window.onload=function(){ search(); move(); calc();}function s ...

  10. Openvpn 撤销签署的证书(删除用户)

    https://wiki.archlinux.org/index.php/Easy-rsa Revoking certificates and alerting the OpenVPN server ...