Energy based Model

the probability distribution (softmax function):

\[p(x)=\frac{\exp(-E(x))}{\sum\limits_x{\exp(-E(x))}}\]

when there are hidden units,

\[P(x)=\sum\limits_h{P(x,h)}=\frac{1}{\sum_x\exp(-E(x))}\sum\limits_h{\exp(-E(x,h))}\]

now, we define the free energy function:

\[F(x)=-\log \sum\limits_h \exp(-E(x,h))\]

so that,

\[\sum\limits_h \exp(-E(x,h))=-\exp( F(x))\]

now, we rewrite the probability distribution for simpilification:

\[P(x)=\frac{\exp(-F(x))}{\sum_x{\exp(-F(x))}}\]

then, we define the overall cost function:

\[\mathcal{L}(\theta,D)=-\frac{1}{N}\sum\limits_{x^{(i)} \in D}{\log p(x^{(i)})}\]

we firstly calculate the parcial gradient of $\log p(x)$ with respect to $\theta$:

\[-\log P(x)=F(x) + \log\left(\sum\limits_x{\exp(-F(x))}\right)\]

\[-\frac{\partial \log P(x)}{\partial \theta}=\frac{\partial F(x)}{\partial \theta}-\sum\limits_{\hat x}{p(\hat x)\frac{\partial F(\hat x)}{\partial \theta}}\]

note that, the gradient contains two terms, which is called the positive phase and the negative phase. The first term increase the probability of training data, and the second term decrease the probability of samples generated by the model.

It's difficult to determine this gradient analytically, as we can't calculate $E_P[\frac{\partial F(x)}{\partial \theta}]$. So we might estimate the expectation using sample method.

we would like elements $\tilde x$ of $\mathcal{N}$ to be sampled according to $P(\tilde x)$, where $\mathcal{N}$ is called negative particles.

Given that, the gradient can then be written as:

\[ - \frac{\partial \log p(x)}{\partial \theta}\approx \frac{\partial F(x)}{\partial \theta} - \frac{1}{|\mathcal{N}|} \sum\limits_{\tilde x \in \mathcal{N}}\frac{\partial F(\tilde x)}{\partial \theta}\]

RBM

the energy function $E(v,h)$ of RBM is defined as :

\[E(v,h)=-b'v-c'h-h'Wv\]

where

  • $W$ represents the weights connecting hidden and visble units.
  • $b,c$ are bias terms of visible and hidden layers respectively.

RBM Formula Deduction的更多相关文章

  1. Logistic Regression - Formula Deduction

    Sigmoid Function \[ \sigma(z)=\frac{1}{1+e^{(-z)}} \] feature: axial symmetry: \[ \sigma(z)+ \sigma( ...

  2. CBOW Model Formula Deduction

    Paper Reference: word2vec Parameter Learning Explained 1. One-word context Model In our setting, the ...

  3. redmine computed custom field formula tips

    项目中要用到Computed custom field插件,公式不知道怎么写,查了些资料,记录在这里. 1.http://apidock.com/ruby/Time/strftime 查看ruby的字 ...

  4. RBM阅读笔记

    RBM包含两个层,可见层(visble layer)和隐藏层(hidden layer).神经元之间的连接具有以下特点:层内无连接,层间全连接.RBM可以看做是一个二分图(神经元当做顶点,神经元之间的 ...

  5. 2-3. Using Type Deduction

    Type Deduction 发生在编译时期 可以对一般类型,自定义类型进行类型自推导 下面有两个例子: 1. Using auto with a class #include <iostrea ...

  6. salesforce 零基础开发入门学习(十五)salesforce中formula的使用(不含Date/Time)

    本文参考官方的formula介绍PDF:https://resources.docs.salesforce.com/200/latest/en-us/sfdc/pdf/salesforce_usefu ...

  7. Hibernate @Formula 注解方式

    1.Formula的作用 Formula的作用就是用一个查询语句动态的生成一个类的属性 就是一条select count(*)...构成的虚拟列,而不是存储在数据库里的一个字段.用比较标准的说法就是: ...

  8. Hibernate @Formula

    在使用Hibernate时经常会遇到实体类某个字段存的是code值而非我们最终想要的中文具体显示的值, 如果使用Hibernate的一对一关联这种,一个属性还好说,但是如果一个实体类里有多个字段都是需 ...

  9. Deep Learning 15:RBM的学习

    RBM是深度学习的核心,所以必须彻底清楚地理解RBM原理.推导及其训练方法 1.读学位论文“基于深度学习的人脸识别研究”: 对RBM.DBN的介绍比较详细,可以作为基础阅读,再去读英文论文. 2.RB ...

随机推荐

  1. 求最长回文子串 - leetcode 5. Longest Palindromic Substring

    写在前面:忍不住吐槽几句今天上海的天气,次奥,鞋子里都能养鱼了...裤子也全湿了,衣服也全湿了,关键是这天气还打空调,只能瑟瑟发抖祈祷不要感冒了.... 前后切了一百零几道leetcode的题(sol ...

  2. [PGM] I-map和D-separation

    之前在概率图模型对概率图模型做了简要的介绍.此处介绍有向图模型中几个常常提到的概念,之前参考的多为英文资料,本文参考的是<概率图模型-原理与技术的>中译版本.很新的书,纸质很好,翻译没有很 ...

  3. Web Audio API 实现音频可视化

    声明:本文为原创文章,如需转载,请注明来源WAxes,谢谢! 一转眼就已经有三个月没写博客了,毕业季事情确实多,现在也终于完全毕业了,博客还是不能落下.偶尔还是要写一下. 玩HTML5的Audio A ...

  4. JavaScript的理解记录(3)

    ---接上篇 一.函数:    1. 函数定义后直接执行:var f = (function(x){ return x*10}(10)); 2. 函数的调用有四种方式: 作为函数:作为方法:作为构造函 ...

  5. eclipse的历史版本及下载

    有时候我们总会遇到在需要eclipse而无法及时找到的时候, 所以那些有用的链接, 是帮助我们能够及时找到我们想要版本的额最好方式 Eclipse 3.1 IO[木卫一,伊奥] 2005 http:/ ...

  6. <string> 与<string.h>、<cstring>的区别

    <string.h> <string.h>是C版本的头文件,包含比如strcpy.strcat之类的字符串处理函数. <cstring> 在C++标准化(1998年 ...

  7. ClassLoader 详解及用途

    ClassLoader主要对类的请求提供服务,当JVM需要某类时,它根据名称向ClassLoader要求这个类,然后由ClassLoader返回这个类的class对象. 1.1 几个相关概念Class ...

  8. 升級 Centos 6.5 的 php 版本

    升級 Centos 6.5 的 php 版本   待會再看 Centos 6.5 的 php 預設是用 5.3.3 這個版本號 最近想要改用 Laravel 4.1 發現需要 5.3.7 才能用,所以 ...

  9. XML与 HTML

    XML是E4X中定义的一个重要的新类型,侧重于如何结构化描述信息,用它来表现XML结构中任何独立的部分,是一种用于标记电子文件使其具有结构性的标记语言. XML语言被设计用来描述数据,它的焦点是数据的 ...

  10. JS自动填写分号导致的坑

    JS中会自动清除句子和句子之间的空格以及tab缩进, 这样就可以允许用户编写的代码更加随性和更加可读, 在该行代码解析的时候如果该行代码可以解析, 就会在该行代码最后自动填写分号,如果该行代码无法解析 ...