RBM Formula Deduction
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的更多相关文章
- Logistic Regression - Formula Deduction
Sigmoid Function \[ \sigma(z)=\frac{1}{1+e^{(-z)}} \] feature: axial symmetry: \[ \sigma(z)+ \sigma( ...
- CBOW Model Formula Deduction
Paper Reference: word2vec Parameter Learning Explained 1. One-word context Model In our setting, the ...
- redmine computed custom field formula tips
项目中要用到Computed custom field插件,公式不知道怎么写,查了些资料,记录在这里. 1.http://apidock.com/ruby/Time/strftime 查看ruby的字 ...
- RBM阅读笔记
RBM包含两个层,可见层(visble layer)和隐藏层(hidden layer).神经元之间的连接具有以下特点:层内无连接,层间全连接.RBM可以看做是一个二分图(神经元当做顶点,神经元之间的 ...
- 2-3. Using Type Deduction
Type Deduction 发生在编译时期 可以对一般类型,自定义类型进行类型自推导 下面有两个例子: 1. Using auto with a class #include <iostrea ...
- salesforce 零基础开发入门学习(十五)salesforce中formula的使用(不含Date/Time)
本文参考官方的formula介绍PDF:https://resources.docs.salesforce.com/200/latest/en-us/sfdc/pdf/salesforce_usefu ...
- Hibernate @Formula 注解方式
1.Formula的作用 Formula的作用就是用一个查询语句动态的生成一个类的属性 就是一条select count(*)...构成的虚拟列,而不是存储在数据库里的一个字段.用比较标准的说法就是: ...
- Hibernate @Formula
在使用Hibernate时经常会遇到实体类某个字段存的是code值而非我们最终想要的中文具体显示的值, 如果使用Hibernate的一对一关联这种,一个属性还好说,但是如果一个实体类里有多个字段都是需 ...
- Deep Learning 15:RBM的学习
RBM是深度学习的核心,所以必须彻底清楚地理解RBM原理.推导及其训练方法 1.读学位论文“基于深度学习的人脸识别研究”: 对RBM.DBN的介绍比较详细,可以作为基础阅读,再去读英文论文. 2.RB ...
随机推荐
- Github优秀java项目集合(中文版) - 涉及java所有的知识体系
Java资源大全中文版 我想很多程序员应该记得 GitHub 上有一个 Awesome - XXX 系列的资源整理.awesome-java 就是 akullpp 发起维护的 Java 资源列表,内容 ...
- java并发:线程同步机制之Volatile关键字&原子操作Atomic
volatile关键字 volatile是一个特殊的修饰符,只有成员变量才能使用它,与Synchronized及ReentrantLock等提供的互斥相比,Synchronized保证了Synchro ...
- JavaScript学习笔记-自定义滚动条
这是一个基本实现思路,如果有新手和我一样没什么事,喜欢瞎研究话,可以参考下. 一.Html <div class="scroll_con"> <div class ...
- Spring学习进阶 (三) Spring AOP
一.是什么AOP是Aspect Oriented Programing的简称,最初被译为“面向方面编程”:AOP通过横向抽取机制为无法通过纵向继承体系进行抽象的重复性代码提供了解决方案.比如事务的控制 ...
- MVC视图引擎优化
请首先看如下内容: 未找到视图"Index"或其母版视图,或没有视图引擎支持搜索的位置.搜索了以下位置: ~/Views/Home/Index.aspx~/Views/Home/I ...
- linux基础-第十七单元 Samba服务
Samba的功能 Samba的安装 Samba服务的启动.停止.重启 Samba服务的配置 Samba服务的主配置文件 samba服务器配置实例 Samba客户端设置 windows客户端 Linux ...
- 1017关于EXPLAIN的语法
转自博客 http://blog.csdn.net/zhuxineli/article/details/14455029 explain显示了MySQL如何使用索引来处理select语句以及连接表.可 ...
- Criteria查询之sqlRestriction()的理解
sqlRestriction()的理解 在Criteria查询中 使用sqlRestriction()方法来提供SQL语法作限定查询,作为where字句 查看官方给的例子,如下 List cats = ...
- 概率 高消light oj 1151
t个样例 n个楼梯或蛇; a b 刚好走到a会到b; 问走到100期望; dp[i] i到100的期望 这一点没奇怪的东西 dp[i]=1/6(dp[i+1]+dp[i+2]..+6); 有 ...
- SpringMVC 参数传递
使用@RequestParam 注解获取GET请求或POST请求提交的参数: 获取Cookie的值:使用@CookieValue : 根据不同的Web请求方法,映射到不同的处理方法:使用登陆页面作示例 ...