LeCun Y., Chopra S., Hadsell R., Ranzato M. & Huang F. A Tutorial on Energy-Based Learning. To appear in “Predicting Structured Data, 2006, 1: 0.

从能量的角度看一些函数, 这里就记录一下这些损失.

主要内容

\(E(Y, X)\)反映了\(X, Y\)的关系, 认为能量越低, 而且的关系越紧密, 从下图中可以发现, \(X, Y\)的组合多种多样.

通常情况下, 我们需要训练一个映射, 其参数为\(W\), 一个好的参数可以使得

\[E(W, Y, X)
\]

很小. 不过我们通常会选取一些损失函数, 来间接最小化上面的能量函数

\[\mathcal{L}(E, S) = \frac{1}{P} \sum_{i=1}^P L(Y^i, E(W, \mathcal{Y}, X^i)) + R(W),
\]

其中\(R(W)\)是正则化项. 自然, 损失函数至少需要满足其最优点是最小化损失函数的, 当然应该还有一些其他的条件.

如果\(\mathcal{Y}\)是离散的, 我们可以令

\[\bar{Y}^i = \arg \min_{Y \in \mathcal{Y}, Y \not= Y^i} E(W, Y, X^i),
\]

相应的连续情况下

\[\bar{Y}^i = \arg \min_{Y \in \mathcal{Y}, \|Y-Y^i\| > \epsilon} E(W, Y, X^i),
\]

即\(\bar{Y}\)是我们最不爽的点. 很自然, 我们希望损失函数将我们希望的点\(Y^i\)的能量降低, 而拔高我们讨厌的\(\bar{Y}^i\)的能量.

损失函数

Energy Loss

\[L_{energy} (Y^i, E(W, \mathcal{Y}, X^i)) = E(W, Y^i, X^i).
\]

Generalized Perceptron Loss

\[L_{perceptron} (Y^i, E(W, \mathcal{Y}, X^i)) = E(W, Y^i, X^i) - \min_{Y \in \mathcal{Y}} E(W, Y, X^i).
\]

Generalized Margin Loss

Hinge Loss
\[L_{hinge} (W, Y^i, X^i) = \max(0, m+E(W, Y^i, X^i) - E(W, \bar{Y}^i, X^i)).
\]
Log Loss
\[L_{log} (W, Y^i,X^i) = \log (1+e^{E(W, Y^i, X^i)-E(W, \bar{Y}^i, X^i)}).
\]
LVQ2 Loss
\[L_{lvq2}(W, Y^i, X^i) = \min (1, \max(0, \frac{E(W, Y^i, X^i)- E(W, \bar{Y}^i, X^i)}{\delta E(W, \bar{Y}^i, X^i)})).
\]

虽然LVQ2 Loss和上面的非margin loss一样, 似乎是没margin的, 但是作者说最后二者有一个饱和的比例\(1+\delta\), 但是不是特别理解.

MCE Loss
\[L_{mce} (W, Y^i, X^i) = \sigma (E(W, Y^i, X^i)-E(W, \bar{Y}^i, X^i)),
\]

其中\(\sigma\)是sigmoid.

Square-Square Loss
\[L_{sq-sq} (W, Y^i, X^i) = E(X, Y^i, X^i)^2 + (\max(0, m-E(W, \bar{Y}^i, X^i)))^2.
\]
Square-Exponential
\[L_{sq-exp} (W, Y^i, X^i) = E(W, Y^i, X^i)^2 + \gamma e^{-E(W,\bar{Y}^i, X^i)}.
\]

Negative Log-Likelihood Loss

\[L_{nll}(W, Y^i, X^i) = E(W, Y^i, X^i) + \mathcal{F}_{\beta} (W, \mathcal{Y}, X^i),
\]

其中

\[\mathcal{F}_{\beta}(W, \mathcal{Y}, X^i) = \frac{1}{\beta} \log (\int_{y \in \mathcal{Y}} \exp (-\beta E(W, y, X^i))).
\]
Empirical Error Loss
\[L_{mee} (W, Y^i, X^i) = 1 - \frac{e^{-\beta E(W, Y^i, X^i)}}{\int_{y \in \mathcal{Y}}e^{-\beta E(W, y, X^i)}}.
\]

好的损失应该满足的一些条件

都是充分条件, 所以不满足也有可能是满足所需要的性质的.

条件1

对于样本\((X^i, Y^i)\), 如果预测满足

\[E(W, Y^i, X^i) < E(W, Y, X^i), \quad \forall Y \in \mathcal{Y} \: and \: Y \not = Y^i.
\]

则推断结果应当为\(Y^i\).

条件2

对于变量\(Y\)以及样本\((X^i, Y^i)\)和margin \(m\), 若

\[E(W, Y^i, X^i) < E(W, \bar{Y}, X^i) - m,
\]

则推断结果应当为\(Y^i\).

条件3

这个条件就用语言描述吧.

即, 要求\(HP_1\)与可行域\(R\)的交集中存在一解, 是的\((X^i, Y^i)\)在该点处的能量比\(HP_2\)与\(R\)交集的所有解的能量都要小, 其中

\[HP_1: E_C+m < E_I \\
HP_2: E_C + m > E_I.
\]

\(E_C=E(W, Y^i, X^i)\), \(E_I=E(W, \bar{Y}^i, X^i)\).

下图给出了满足上述三个条件的损失及其对应的\(m\).

A Tutorial on Energy-Based Learning的更多相关文章

  1. A Complete Tutorial on Tree Based Modeling from Scratch (in R & Python)

    A Complete Tutorial on Tree Based Modeling from Scratch (in R & Python) MACHINE LEARNING PYTHON  ...

  2. 强化学习之 免模型学习(model-free based learning)

    强化学习之 免模型学习(model-free based learning) ------ 蒙特卡罗强化学习 与 时序查分学习 ------ 部分节选自周志华老师的教材<机器学习> 由于现 ...

  3. Tutorial on GoogleNet based image classification --- focus on Inception module and save/load models

    Tutorial on GoogleNet based image classification  2018-06-26 15:50:29 本文旨在通过案例来学习 GoogleNet 及其 Incep ...

  4. Pros and Cons of Game Based Learning

    https://www.gamedesigning.org/learn/game-based-learning/ I remember days gone by at elementary schoo ...

  5. Octave Tutorial(《Machine Learning》)之第一课《数据表示和存储》

    Octave Tutorial 第一课 Computation&Operation 数据表示和存储 1.简单的四则运算,布尔运算,赋值运算(a && b,a || b,xor( ...

  6. Game Based Learning: Why Does it Work?

    Forty years of research[i] says yes, games are effective learning tools. People learn from games, an ...

  7. Octave Tutorial(《Machine Learning》)之第五课《控制语句和方程及向量化》

    第五课 控制语句和方程 For,while,if statements and functions (1)For loop v=zeros(10,1) %initial vectors for i=1 ...

  8. Octave Tutorial(《Machine Learning》)之第四课《绘图数据》

    第四课 Plotting Data 绘图数据 t = [0,0.01,0.98]; y1 = sin(2*pi*4*t); y2 = cos(2*pi*4*t); plot(t,y1);(绘制图1) ...

  9. Octave Tutorial(《Machine Learning》)之第三课《数据计算》

    第三课 Culculating Data 数据计算 矩阵计算 1.简单的四则运算 2.相乘除,乘方运算(元素位运算) ".*"为对应元素的相乘计算 "./"为对 ...

  10. Octave Tutorial(《Machine Learning》)之第二课《数据移动》

    第二课 Moving Data 数据移动 常用内置函数 (1)加载文件 load 文件名.dat(或load('文件名.dat')) 接着输入文件名便可查看文件里的数据 (2)显示当前工作空间的所有变 ...

随机推荐

  1. A Child's History of England.8

    CHAPTER 3 ENGLAND UNDER THE GOOD SAXON, ALFRED Alfred [born in 849 CE, 唐: 618年-907年] the Great was a ...

  2. acute, adapt

    acute In Euclidean [欧几里得] geometry, an angle is the figure [图形] formed by two rays, called the sides ...

  3. day04 sersync实时同步和ssh服务

    day04 sersync实时同步和ssh服务 sersync实时同步 1.什么是实时同步 实时同步是一种只要当前目录发生变化则会触发一个事件,事件触发后会将变化的目录同步至远程服务器. 2.为什么使 ...

  4. Linux网络(网络模型和收发流程)

    网络模型 为了解决网络互联中异构设备的兼容性问题,并解耦复杂的网络包处理流程,国际标准化组织制定的开放式系统互联通信参考模型(Open System Interconnection Reference ...

  5. IDEA中对代码进行测试

    一. 建立对应得目录 二.导入junit依赖 <dependency> <groupId>junit</groupId> <artifactId>jun ...

  6. linux ln用法

    这是linux中一个非常重要命令,请大家一定要熟悉.它的功能是为某一个文件在另外一个位置建立一个同不的链接,这个命令最常用的参数是-s,具体用法是:ln -s 源文件 目标文件 这是linux中一个非 ...

  7. Java Jar包压缩、解压使用

    什么是jar包JAR(Java Archive)是Java的归档文件,它是一种与平台无关的文件格式,它允许将许多文件组合成一个压缩文件. 如何打/解包使用jdk/bin/jar.exe工具,配置完环境 ...

  8. 【Linux】【Basis】【RHEL】KickStart for RHEL6.8

    1. 概念: 自动安装的脚本,这篇文章以RHEL6.8为例 kickstart for RHEL6.8官方教程:https://access.redhat.com/documentation/en-U ...

  9. ES在项目中的测试

    1.application.yml server: port: ${port:40100}spring: application: name: xc-search-servicexuecheng: e ...

  10. [BUUCTF]REVERSE——相册

    相册 附件 步骤: apk文件,习惯用apkide打开,看它反编译成了jar,就换jadx-gui打开,题目提示找邮箱,因此在导航栏里搜索mail 看到了sendMailByJavaMail(java ...