-
Notifications
You must be signed in to change notification settings - Fork 1
/
maximum-entropy-regularized-multi-goal-reinforcement-learning.html
1477 lines (901 loc) · 58 KB
/
maximum-entropy-regularized-multi-goal-reinforcement-learning.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html class="theme-next mist use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
<meta name="google-site-verification" content="zu-9nWphPjrzXV8v514mkHknIz4dNfHlib56-KNAu44">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">
<script src="/lib/pace/pace.min.js?v=1.0.2"></script>
<link href="/lib/pace/pace-theme-flash.min.css?v=1.0.2" rel="stylesheet">
<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
<script>
(function(i,s,o,g,r,a,m){i["DaoVoiceObject"]=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;a.charset="utf-8";m.parentNode.insertBefore(a,m)})(window,document,"script",('https:' == document.location.protocol ? 'https:' : 'http:') + "//widget.daovoice.io/widget/356f1943.js","daovoice")
daovoice('init', {
app_id: "356f1943"
});
daovoice('update');
</script>
<link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">
<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">
<link href="/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png?v=5.1.4">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32png?v=5.1.4">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png?v=5.1.4">
<link rel="mask-icon" href="/images/logo.svg?v=5.1.4" color="#222">
<meta name="keywords" content="rl,">
<link rel="alternate" href="/atom.xml" title="Keavnn'Blog" type="application/atom+xml">
<script>
(function(){
if(''){
if (prompt('请输入文章密码','') !== ''){
alert('密码错误!');
history.back();
}
}
})();
</script>
<meta name="description" content="这篇论文将强化学习的目标与最大熵结合了起来,提出了简称为MEP的经验池机制。许多将熵与强化学习结合的方法都是考虑可选动作分布的熵,该篇论文很新颖的使用的是“迹”的熵。 推荐程度中等偏下: 有些地方解释的不是很清楚 熵的结合方式特殊,可以一看 有些公式推导过于复杂,难懂 有些参考文献标注不准,如A3C算法的论文并没有使用熵的概念,却在熵相关的语句进行了标注">
<meta name="keywords" content="rl">
<meta property="og:type" content="article">
<meta property="og:title" content="Maximum Entropy-Regularized Multi-Goal Reinforcement-Learning">
<meta property="og:url" content="http://StepNeverStop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning.html">
<meta property="og:site_name" content="Keavnn'Blog">
<meta property="og:description" content="这篇论文将强化学习的目标与最大熵结合了起来,提出了简称为MEP的经验池机制。许多将熵与强化学习结合的方法都是考虑可选动作分布的熵,该篇论文很新颖的使用的是“迹”的熵。 推荐程度中等偏下: 有些地方解释的不是很清楚 熵的结合方式特殊,可以一看 有些公式推导过于复杂,难懂 有些参考文献标注不准,如A3C算法的论文并没有使用熵的概念,却在熵相关的语句进行了标注">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="http://stepneverstop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning/inequality.png">
<meta property="og:image" content="http://stepneverstop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning/x-x%5E2.png">
<meta property="og:image" content="http://stepneverstop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning/MEP.png">
<meta property="og:image" content="http://stepneverstop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning/pseudo.png">
<meta property="og:image" content="http://stepneverstop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning/env.png">
<meta property="og:image" content="http://stepneverstop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning/mean-success.png">
<meta property="og:image" content="http://stepneverstop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning/training-time.png">
<meta property="og:image" content="http://stepneverstop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning/sample-efficiency.png">
<meta property="og:updated_time" content="2019-07-07T10:19:13.194Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Maximum Entropy-Regularized Multi-Goal Reinforcement-Learning">
<meta name="twitter:description" content="这篇论文将强化学习的目标与最大熵结合了起来,提出了简称为MEP的经验池机制。许多将熵与强化学习结合的方法都是考虑可选动作分布的熵,该篇论文很新颖的使用的是“迹”的熵。 推荐程度中等偏下: 有些地方解释的不是很清楚 熵的结合方式特殊,可以一看 有些公式推导过于复杂,难懂 有些参考文献标注不准,如A3C算法的论文并没有使用熵的概念,却在熵相关的语句进行了标注">
<meta name="twitter:image" content="http://stepneverstop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning/inequality.png">
<script type="text/javascript" id="hexo.configurations">
var NexT = window.NexT || {};
var CONFIG = {
root: '/',
scheme: 'Mist',
version: '5.1.4',
sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":true,"onmobile":true},
fancybox: true,
tabs: true,
motion: {"enable":true,"async":true,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
duoshuo: {
userId: '0',
author: '博主'
},
algolia: {
applicationID: '',
apiKey: '',
indexName: '',
hits: {"per_page":10},
labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
}
};
</script>
<link rel="canonical" href="http://StepNeverStop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning.html">
<title>Maximum Entropy-Regularized Multi-Goal Reinforcement-Learning | Keavnn'Blog</title>
</head>
<body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div class="container sidebar-position-left page-post-detail">
<div class="headband"></div>
<a href="https://github.com/StepNeverStop" class="github-corner" aria-label="View source on GitHub" rel="external nofollow" target="_blank"><svg width="80" height="80" viewbox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
<header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-wrapper">
<div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">Keavnn'Blog</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<h1 class="site-subtitle" itemprop="description">If it is to be, it is up to me.</h1>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section">
<i class="menu-item-icon fa fa-fw fa-home"></i> <br>
首页
</a>
</li>
<li class="menu-item menu-item-about">
<a href="/about/" rel="section">
<i class="menu-item-icon fa fa-fw fa-user"></i> <br>
关于
</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags/" rel="section">
<i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
标签
</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories/" rel="section">
<i class="menu-item-icon fa fa-fw fa-th"></i> <br>
分类
</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives/" rel="section">
<i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
归档
</a>
</li>
<li class="menu-item menu-item-search">
<a href="javascript:;" class="popup-trigger">
<i class="menu-item-icon fa fa-search fa-fw"></i> <br>
搜索
</a>
</li>
</ul>
<div class="site-search">
<div class="popup search-popup local-search-popup">
<div class="local-search-header clearfix">
<span class="search-icon">
<i class="fa fa-search"></i>
</span>
<span class="popup-btn-close">
<i class="fa fa-times-circle"></i>
</span>
<div class="local-search-input-wrapper">
<input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input">
</div>
</div>
<div id="local-search-result"></div>
</div>
</div>
</nav>
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
<div id="posts" class="posts-expand">
<article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
<div class="post-block">
<link itemprop="mainEntityOfPage" href="http://StepNeverStop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning.html">
<span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<meta itemprop="name" content="Keavnn">
<meta itemprop="description" content="">
<meta itemprop="image" content="/images/Kicon.jpg">
</span>
<span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Keavnn'Blog">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">Maximum Entropy-Regularized Multi-Goal Reinforcement-Learning</h2>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建于" itemprop="dateCreated datePublished" datetime="2019-06-12T20:49:32+08:00">
2019-06-12
</time>
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-calendar-check-o"></i>
</span>
<span class="post-meta-item-text">更新于:</span>
<time title="更新于" itemprop="dateModified" datetime="2019-07-07T18:19:13+08:00">
2019-07-07
</time>
</span>
<span class="post-category">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-folder-o"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/ReinforcementLearning/" itemprop="url" rel="index">
<span itemprop="name">ReinforcementLearning</span>
</a>
</span>
</span>
<div class="post-wordcount">
<span class="post-meta-item-icon">
<i class="fa fa-file-word-o"></i>
</span>
<span class="post-meta-item-text">字数统计:</span>
<span title="字数统计">
1.9k
</span>
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-clock-o"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span title="阅读时长">
8
</span>
</div>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>这篇论文将强化学习的目标与最大熵结合了起来,提出了简称为MEP的经验池机制。许多将熵与强化学习结合的方法都是考虑可选动作分布的熵,该篇论文很新颖的使用的是“迹”的熵。</p>
<p>推荐程度中等偏下:</p>
<ul>
<li>有些地方解释的不是很清楚</li>
<li>熵的结合方式特殊,可以一看</li>
<li>有些公式推导过于复杂,难懂</li>
<li>有些参考文献标注不准,如A3C算法的论文并没有使用熵的概念,却在熵相关的语句进行了标注</li>
</ul>
<a id="more"></a>
<h1 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h1><p>论文地址:<a href="https://arxiv.org/pdf/1905.08786.pdf" rel="external nofollow" target="_blank">https://arxiv.org/pdf/1905.08786.pdf</a></p>
<p>原作者代码地址:<a href="https://github.com/ruizhaogit/mep.git" rel="external nofollow" target="_blank">https://github.com/ruizhaogit/mep.git</a></p>
<p>该文章发于2019年的ICML,与之前写过的《Energy-Based Hindsight Experience Prioritization》为同一作者。</p>
<p>本文主要做了三个贡献:</p>
<ol>
<li>修改了目标函数,提出了最大熵正则化多目标强化学习(Maximum Entropy-Regularized Multi-Goal RL)的想法</li>
<li>推导出替代(surrogate)目标函数,是第1步目标函数的一个下界,可以使算法稳定优化</li>
<li>提出了Maximum Entropy-based Prioritization(MEP)的经验池框架</li>
</ol>
<h1 id="文中精要"><a href="#文中精要" class="headerlink" title="文中精要"></a>文中精要</h1><p>文中目标函数的构造主要受Guiasu于1971年提出的加权熵(Weighted Entropy)启发。加权熵表示为:</p>
<script type="math/tex; mode=display">
\mathcal{H}_{p}^{w}=-\sum_{k=1}^{K} w_{k} p_{k} \log p_{k}</script><p>$w_{k}$表示权重。</p>
<h2 id="多目标强化学习的符号表示"><a href="#多目标强化学习的符号表示" class="headerlink" title="多目标强化学习的符号表示"></a>多目标强化学习的符号表示</h2><p>用$p\left(\boldsymbol{\tau} | g^{e}, \boldsymbol{\theta}\right)$表示一个迹出现的概率:</p>
<ul>
<li>$\boldsymbol{\tau}=s_{1}, a_{1}, s_{2}, a_{2}, \ldots, s_{T-1}, a_{T-1}, s_{T}$代表迹</li>
<li>$g^{e}$代表一个真实的目标,即不是“事后诸葛亮”假定的目标,$g^{e} \in \operatorname{Val}\left(G^{e}\right)$,后一项为目标空间,一般情况下,可以视为状态空间$\mathcal{S}$的子集</li>
<li>$\theta$代表策略参数</li>
</ul>
<p>展开来写,一个迹在策略$\theta$被采样到的概率为</p>
<script type="math/tex; mode=display">
p\left(\boldsymbol{\tau} | g^{e}, \boldsymbol{\theta}\right)=p\left(s_{1}\right) \prod_{t=1}^{T-1} p\left(a_{t} | s_{t}, g^{e}, \boldsymbol{\theta}\right) p\left(s_{t+1} | s_{t}, a_{t}\right)</script><p>由此定义策略$\theta$下的期望奖励回报,也就是目标函数,表示为</p>
<script type="math/tex; mode=display">
\begin{aligned} \eta(\boldsymbol{\theta}) &=\mathbb{E}\left[\sum_{t=1}^{T} r\left(S_{t}, G^{e}\right) | \boldsymbol{\theta}\right] \\ &=\sum_{g^{e}} p\left(g^{e}\right) \sum_{\boldsymbol{\tau}} p\left(\boldsymbol{\tau} | g^{e}, \boldsymbol{\theta}\right) \sum_{t=1}^{T} r\left(s_{t}, g^{e}\right) \end{aligned}</script><p>很容易理解,也就是在传统的目标函数前边加了一项关于每个目标求积分的步骤。</p>
<p>如果使用off-policy算法且用经验池机制来提升采样效率,那么目标函数为</p>
<script type="math/tex; mode=display">
\eta^{\mathcal{R}}(\boldsymbol{\theta})=\sum_{\boldsymbol{\tau}, g^{e}} p_{\mathcal{R}}\left(\boldsymbol{\tau}, g^{e} | \boldsymbol{\theta}\right) \sum_{t=1}^{T} r\left(s_{t}, g^{e}\right)</script><p>其中$\mathcal{R}$表示经验池。注意,$\eta^{\mathcal{R}}(\boldsymbol{\theta})$将$\eta(\boldsymbol{\theta})$的前两个积分项合在一起写了,所以是联合概率而不是条件概率。</p>
<h2 id="最大熵正则化目标函数"><a href="#最大熵正则化目标函数" class="headerlink" title="最大熵正则化目标函数"></a>最大熵正则化目标函数</h2><p>将前文提到的$\eta(\boldsymbol{\theta})$与加权熵结合起来,就构造出了本文中新的目标函数,即</p>
<script type="math/tex; mode=display">
\begin{aligned} \eta^{\mathcal{H}}(\boldsymbol{\theta}) &=\mathcal{H}_{p}^{w}\left(\mathcal{T}^{g}\right) \\ &=\mathbb{E}_{p}\left[\color{red} {\log \frac{1}{p\left(\boldsymbol{\tau}^{g}\right)}} \sum_{t=1}^{T} r\left(S_{t}, G^{e}\right) | \boldsymbol{\theta}\right] \end{aligned}</script><p>$\color{red} {p\left(\boldsymbol{\tau}^{g}\right)}$代表$\sum_{g^{e}} p_{\mathcal{R}}\left(\tau^{g}, g^{e} | \boldsymbol{\theta} \right )$,期望右下角的$p$也是$p\left(\boldsymbol{\tau}^{g}\right)$的意思。</p>
<p><strong>与传统的结合方式不同的是,这种结合方式并没有将熵作为一个加和的项,而是相乘。</strong></p>
<p>仔细想一下,如果将这个式子视为加权熵,那么权重系数是累计奖励$\sum_{t=1}^{T} r\left(s_{t}, g^{e}\right)$,这样做的直观解释是:<strong>对于各种各样的迹,给与累计回报大的以更多权重,使算法直到要朝哪个迹的方向优化。</strong></p>
<p>反而,如果将前一个对数项视为传统强化学习目标函数的权重系数,那么这样的直观解释是:<strong>迹出现的概率越低,就越新颖,反而要使其权重增加,从而驱使算法向探索的方向优化。</strong></p>
<h2 id="替代目标函数"><a href="#替代目标函数" class="headerlink" title="替代目标函数"></a>替代目标函数</h2><p>文中指出,$\eta^{\mathcal{H}}(\boldsymbol{\theta}) $中的$\log \frac{1}{p\left(\boldsymbol{\tau}^{g}\right)}$这一项是无界的,即取值范围为$[0,+\infty]$,这会导致通用值函数近似的训练不稳定,因此提出了可靠地替代目标函数$\eta^{\mathcal{L}}(\boldsymbol{\theta})$,这个目标函数是原目标函数的一个下界。</p>
<blockquote>
<p>the weight, $\log \left(1 / p\left(\boldsymbol{\tau}^{g}\right)\right)$, is unbounded, which makes the training of the universal function approximator unstable. </p>
</blockquote>
<p>表示为</p>
<script type="math/tex; mode=display">
\eta^{\mathcal{L}}(\boldsymbol{\theta})=Z \cdot \mathbb{E}_{\color{red}{q}}\left[\sum_{t=1}^{T} r\left(S_{t}, G^{e}\right) | \boldsymbol{\theta}\right]</script><p>注意,期望积分的是迹分布函数$q$,而不是经验池中真实的迹分布函数$p$。</p>
<p>那么,新的迹分布函数$q\left(\boldsymbol{\tau}^{g}\right)$是怎么得来的?</p>
<p>首先,使用Latent Varibale Model(LVM)对$p\left(\boldsymbol{\tau}^{g}\right)$的潜在分布进行建模,因为LVM适合于对复杂的分布进行建模。</p>
<blockquote>
<p>We use a Latent Variable Model(LVM) (Murphy, 2012) to model the underlying distribution of $p\left(\boldsymbol{\tau}^{g}\right)$, since LVM is suitable for modeling complex distributions.</p>
</blockquote>
<p>将分布用混合高斯模型MoG表示,</p>
<script type="math/tex; mode=display">
p\left(\boldsymbol{\tau}^{g} | \boldsymbol{\phi}\right)=\frac{1}{Z} \sum_{i=k}^{K} c_{k} \mathcal{N}\left(\boldsymbol{\tau}^{g} | \boldsymbol{\mu}_{k}, \boldsymbol{\Sigma}_{k}\right)</script><p>其中,</p>
<ul>
<li>$K$为隐变量的个数</li>
<li>$\boldsymbol{\mu}_{k}, \boldsymbol{\Sigma}_{k}$分布为均值与协方差矩阵</li>
<li>$c_{k}$为混合系数</li>
<li>$Z$为配分函数(归一化系数)</li>
<li>$\phi$为模型参数,包含所有的均值、协方差矩阵和混合系数</li>
</ul>
<p>文中接着使用$p\left(\boldsymbol{\tau}^{g} | \boldsymbol{\phi}\right)$的补作为经验重放的优先级,即</p>
<script type="math/tex; mode=display">
\overline{p}\left(\boldsymbol{\tau}^{g} | \boldsymbol{\phi}\right) \propto 1-p\left(\boldsymbol{\tau}^{g} | \boldsymbol{\phi}\right)</script><p>补越大,就代表迹出现的概率越低,那么就对该迹赋予更大的优先级。作者想通过过采样这些迹来增大训练时迹分布的熵。直观的解释就是,概率分布不均匀,那么让概率大的出现次数少,概率小的出现次数多,这样就会使采样的分布朝着均匀分布的方向移动,从而使熵值增加。</p>
<p>文中由此引出了新的迹分布$q\left(\boldsymbol{\tau}^{g}\right)$,它表示为原始分布与其补的联合分布,</p>
<script type="math/tex; mode=display">
\begin{aligned} q\left(\boldsymbol{\tau}^{g}\right) & \propto \overline{p}\left(\boldsymbol{\tau}^{g} | \boldsymbol{\phi}\right) p\left(\boldsymbol{\tau}^{g}\right) \\ & \propto\left(1-p\left(\boldsymbol{\tau}^{g} | \boldsymbol{\phi}\right)\right) p\left(\boldsymbol{\tau}^{g}\right) \\ & \approx p\left(\boldsymbol{\tau}^{g}\right)-p\left(\boldsymbol{\tau}^{g}\right)^{2} \end{aligned}</script><p>文中将正比的比例设置为$\color{blue}{\frac{1}{Z}}$,即$q\left(\boldsymbol{\tau}^{g}\right)=\frac{1}{Z} p\left(\boldsymbol{\tau}^{g}\right)\left(1-p\left(\boldsymbol{\tau}^{g}\right)\right)$,接下来就可以证明$\eta^{\mathcal{L}}(\boldsymbol{\theta})$为$\eta^{\mathcal{H}}(\boldsymbol{\theta}) $的下界:</p>
<script type="math/tex; mode=display">
\begin{aligned}
\eta^{\mathcal{L}}(\boldsymbol{\theta}) &=Z \cdot \mathbb{E}_{q}\left[\sum_{t=1}^{T} r\left(S_{t}, G^{e}\right) | \boldsymbol{\theta}\right] \\ &=\sum_{\boldsymbol{\tau}^{g}} Z \cdot q\left(\boldsymbol{\tau}^{g}\right) \sum_{t=1}^{T} r\left(s_{t}, g^{e}\right) \\
&=\sum_{\tau^{g}} \frac{Z}{Z} p\left(\tau^{g}\right)\left(1-p\left(\tau^{g}\right)\right) \sum_{t=1}^{T} r\left(s_{t}, g^{e}\right) \\
&<\sum_{\tau^{g}}-p\left(\boldsymbol{\tau}^{g}\right) \log p\left(\boldsymbol{\tau}^{g}\right) \sum_{t=1}^{T} r\left(s_{t}, g^{e}\right) \\
&=\mathbb{E}_{p}\left[\log \frac{1}{p\left(\boldsymbol{\tau}^{g}\right)} \sum_{t=1}^{T} r\left(S_{t}, G^{e}\right) | \boldsymbol{\theta}\right] \\
&=\mathcal{H}_{p}^{w}\left(\mathcal{T}^{g}\right) \\
&=\eta^{\mathcal{H}}(\boldsymbol{\theta})
\end{aligned}</script><p>在小于号不等式那一步,使用了函数的性质:$\log x<x-1$。很容易可以画出$f(x)=\ln{x}-x+1$在区间[0,1]上的图像:</p>
<p><img src="./maximum-entropy-regularized-multi-goal-reinforcement-learning/inequality.png" alt=""></p>
<p>文中进一步证明了$q$分布的熵比$p$分布的熵更大,因此,由$q$分布来进行采样可以使采样更均匀(= =!那么直接使用均匀分布采样不更好吗?),使学习的目标更多样化。证明过程篇幅过长,详见原论文附录,</p>
<script type="math/tex; mode=display">
p\left(\boldsymbol{\tau}^{g}\right), \text { where } p\left(\boldsymbol{\tau}_{i}^{g}\right) \in(0,1) \text { and } \sum_{i=1}^{N} p\left(\boldsymbol{\tau}_{i}^{g}\right)=1</script><script type="math/tex; mode=display">
q\left(\boldsymbol{\tau}_{i}^{g}\right)=\frac{1}{Z} p\left(\boldsymbol{\tau}_{i}^{g}\right)\left(1-p\left(\boldsymbol{\tau}_{i}^{g}\right)\right), \text { where } \sum_{i=1}^{N} q\left(\boldsymbol{\tau}_{i}^{g}\right)=1</script><script type="math/tex; mode=display">
\mathcal{H}_{q}\left(\mathcal{T}^{g}\right)-\mathcal{H}_{p}\left(\mathcal{T}^{g}\right) \geq 0</script><h2 id="基于最大熵的优先级"><a href="#基于最大熵的优先级" class="headerlink" title="基于最大熵的优先级"></a>基于最大熵的优先级</h2><p>文中说是基于最大熵的优先经验回放,但是除了使用$q\left(\boldsymbol{\tau}^{g}\right)$分布之外,在这一部分没有体现出熵的影子,优先级的设置为</p>
<script type="math/tex; mode=display">
q\left(\boldsymbol{\tau}_{i}^{g}\right)=\frac{\operatorname{rank}\left(q\left(\boldsymbol{\tau}_{i}^{g}\right)\right)}{\sum_{n=1}^{N} \operatorname{rank}\left(q\left(\boldsymbol{\tau}_{n}^{g}\right)\right)}</script><p>使用排序作为衡量优先级的标准是因为这种方式更具鲁棒性,对异常值不敏感。</p>
<p>之前文中说想要使出现概率低的迹以更高的概率被从经验池中采样到,如果是按照新的$q$分布来定义迹出现的概率,那么到这里是有些说不通的,因为,前文提到$q\left(\boldsymbol{\tau}^{g}\right) \approx p\left(\boldsymbol{\tau}^{g}\right)-p\left(\boldsymbol{\tau}^{g}\right)^{2} $,那么画出$f(x)=x-x^2$在区间[0,1]上的图像为:</p>
<p><img src="./maximum-entropy-regularized-multi-goal-reinforcement-learning/x-x^2.png" alt=""></p>
<p>由此可见,q值小的地方为p值小与p值大的地方,这就会导致出现概率最大、概率最小的迹被经验池重复的次数多,与前文所讲不同。</p>
<p>而如果考虑以真实的p分布来定义迹出现的概率,那么此处不应该使用$\operatorname{rank}\left(q\left(\tau_{i}^{g}\right)\right)$作为排序的标准,而应该是$\operatorname{rank}\overline{p}\left(\boldsymbol{\tau}^{g} | \boldsymbol{\phi}\right)$,或者$\operatorname{rank}p\left(\boldsymbol{\tau}^{g}\right)$。</p>
<p>总之,这里关于优先级的解释不是很清楚。</p>
<h2 id="流程示意图"><a href="#流程示意图" class="headerlink" title="流程示意图"></a>流程示意图</h2><p><img src="./maximum-entropy-regularized-multi-goal-reinforcement-learning/MEP.png" alt=""></p>
<h2 id="伪代码"><a href="#伪代码" class="headerlink" title="伪代码"></a>伪代码</h2><p><img src="./maximum-entropy-regularized-multi-goal-reinforcement-learning/pseudo.png" alt=""></p>
<p>解析:</p>
<ul>
<li>每一次迭代,都重新构造优先采样分布$q\left(\tau^{g}\right)$</li>
</ul>
<h1 id="实验部分"><a href="#实验部分" class="headerlink" title="实验部分"></a>实验部分</h1><h2 id="环境"><a href="#环境" class="headerlink" title="环境"></a>环境</h2><p><img src="./maximum-entropy-regularized-multi-goal-reinforcement-learning/env.png" alt=""></p>
<ul>
<li>算法:DDPG</li>
<li>5个随机种子进行实验,取最好的结果</li>
<li>19个CPU</li>
<li>训练200个epoch</li>
</ul>
<h2 id="实验结果"><a href="#实验结果" class="headerlink" title="实验结果"></a>实验结果</h2><p><img src="./maximum-entropy-regularized-multi-goal-reinforcement-learning/mean-success.png" alt=""></p>
<ul>
<li><strong>以训练的epoch为标准</strong>,使用了MEP的收敛速度更快</li>
</ul>
<p><img src="./maximum-entropy-regularized-multi-goal-reinforcement-learning/training-time.png" alt=""></p>
<p>可以看到,结合MEP的效果最好,但是我觉得这种对比一点都不严谨,从数据上看,不使用MEP比使用MEP的训练时间更短,且效果也差不多,那么如果训练相同的时间,说不定使用MEP的效果并没有不使用的好。</p>
<p><img src="./maximum-entropy-regularized-multi-goal-reinforcement-learning/sample-efficiency.png" alt=""></p>
<p>固定成功率,在机器人实验中,提升了1.95倍采样效率,即使用更少的样本训练相同的效果。</p>
<h1 id="疑问"><a href="#疑问" class="headerlink" title="疑问"></a>疑问</h1><p>前文提到原目标函数中的对数项会使训练值函数不稳定,为什么?</p>
<p>为什么构造新的迹分布$q\left(\boldsymbol{\tau}^{g}\right)$为那样的形式?</p>
</div>
<div>
<div>
<div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-heart"></i>感谢您的阅读-------------</div>
</div>
</div>
<div>
<div class="my_post_copyright">
<script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>
<!-- JS库 sweetalert 可修改路径 -->
<script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
<p><span>本文标题:</span><a href="/maximum-entropy-regularized-multi-goal-reinforcement-learning.html">Maximum Entropy-Regularized Multi-Goal Reinforcement-Learning</a></p>
<p><span>文章作者:</span><a href="/" title="访问 Keavnn 的个人博客">Keavnn</a></p>
<p><span>发布时间:</span>2019年06月12日 - 20:06</p>
<p><span>最后更新:</span>2019年07月07日 - 18:07</p>
<p><span>原始链接:</span><a href="/maximum-entropy-regularized-multi-goal-reinforcement-learning.html" title="Maximum Entropy-Regularized Multi-Goal Reinforcement-Learning">http://StepNeverStop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning.html</a>
<span class="copy-path" title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="http://StepNeverStop.github.io/maximum-entropy-regularized-multi-goal-reinforcement-learning.html" aria-label="复制成功!"></i></span>
</p>
<p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="external nofollow" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-相同方式共享 4.0 国际</a> 转载请保留原文链接及作者。</p>
</div>
<script>
var clipboard = new Clipboard('.fa-clipboard');
$(".fa-clipboard").click(function(){
clipboard.on('success', function(){
swal({
title: "",
text: '复制成功',
icon: "success",
showConfirmButton: true
});
});
});
</script>
</div>
<div>
<div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
<div>如果您获得了帮助,也可以资助一下小的啦~</div>
<button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
<span>打赏啦</span>
</button>
<div id="QR" style="display: none;">
<div id="wechat" style="display: inline-block">
<img id="wechat_qr" src="/images/wechatpay.jpg" alt="Keavnn 微信">
<p>微信</p>
</div>
<div id="alipay" style="display: inline-block">
<img id="alipay_qr" src="/images/alipay.jpg" alt="Keavnn 支付宝">
<p>支付宝</p>
</div>
</div>
</div>
</div>
<footer class="post-footer">
<div class="post-tags">
<a href="/tags/rl/" rel="tag"> <i class="fa fa-tag"></i> rl</a>
</div>
<div class="post-nav">
<div class="post-nav-next post-nav-item">
<a href="/rl-rough-reading.html" rel="next" title="强化学习论文浅读集合">
<i class="fa fa-chevron-left"></i> 强化学习论文浅读集合
</a>
</div>
<span class="post-nav-divider"></span>
<div class="post-nav-prev post-nav-item">
<a href="/rl-with-deep-energy-based-policies.html" rel="prev" title="Reinforcement Learning with Deep Energy-Based Policies">
Reinforcement Learning with Deep Energy-Based Policies <i class="fa fa-chevron-right"></i>
</a>
</div>
</div>
</footer>
</div>
</article>
<div class="post-spread">
<!-- Go to www.addthis.com/dashboard to customize your tools -->
<div class="addthis_inline_share_toolbox">
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5cefbfc88c13b0e7" async="async"></script>
</div>
</div>
</div>
</div>
<div class="comments" id="comments">
<div id="lv-container" data-id="city" data-uid="MTAyMC80MTk0NS8xODQ5MQ=="></div>
</div>
</div>
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
<div id="sidebar-dimmer"></div>
<div class="sidebar-inner">
<ul class="sidebar-nav motion-element">
<li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
文章目录
</li>
<li class="sidebar-nav-overview" data-target="site-overview-wrap">
站点概览
</li>
</ul>
<section class="site-overview-wrap sidebar-panel">
<div class="site-overview">
<div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image" src="/images/Kicon.jpg" alt="Keavnn">
<p class="site-author-name" itemprop="name">Keavnn</p>
<p class="site-description motion-element" itemprop="description">If it is to be, it is up to me.</p>
</div>
<nav class="site-state motion-element">
<div class="site-state-item site-state-posts">
<a href="/archives/">
<span class="site-state-item-count">51</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories/index.html">
<span class="site-state-item-count">11</span>
<span class="site-state-item-name">分类</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags/index.html">
<span class="site-state-item-count">26</span>
<span class="site-state-item-name">标签</span>
</a>
</div>
</nav>
<div class="feed-link motion-element">
<a href="/atom.xml" rel="alternate">
<i class="fa fa-rss"></i>
RSS
</a>
</div>
<div class="links-of-author motion-element">
<span class="links-of-author-item">
<a href="https://github.com/StepNeverStop" target="_blank" title="GitHub" rel="external nofollow">
<i class="fa fa-fw fa-github"></i>GitHub</a>
</span>
<span class="links-of-author-item">
<a href="mailto:[email protected]" target="_blank" title="E-Mail" rel="external nofollow">
<i class="fa fa-fw fa-envelope"></i>E-Mail</a>
</span>
</div>
<div class="cc-license motion-element" itemprop="license">
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" target="_blank" rel="external nofollow">
<img src="/images/cc-by-nc-sa.svg" alt="Creative Commons">
</a>
</div>
<div class="links-of-blogroll motion-element links-of-blogroll-inline">
<div class="links-of-blogroll-title">
<i class="fa fa-fw fa-link"></i>
推荐阅读
</div>
<ul class="links-of-blogroll-list">
<li class="links-of-blogroll-item">
<a href="https://bluefisher.github.io" title="Fisher Chang" target="_blank" rel="external nofollow">Fisher Chang</a>
</li>
</ul>
</div>
</div>
</section>
<!--noindex-->
<section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
<div class="post-toc">
<div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#简介"><span class="nav-number">1.</span> <span class="nav-text">简介</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#文中精要"><span class="nav-number">2.</span> <span class="nav-text">文中精要</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#多目标强化学习的符号表示"><span class="nav-number">2.1.</span> <span class="nav-text">多目标强化学习的符号表示</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#最大熵正则化目标函数"><span class="nav-number">2.2.</span> <span class="nav-text">最大熵正则化目标函数</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#替代目标函数"><span class="nav-number">2.3.</span> <span class="nav-text">替代目标函数</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#基于最大熵的优先级"><span class="nav-number">2.4.</span> <span class="nav-text">基于最大熵的优先级</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#流程示意图"><span class="nav-number">2.5.</span> <span class="nav-text">流程示意图</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#伪代码"><span class="nav-number">2.6.</span> <span class="nav-text">伪代码</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#实验部分"><span class="nav-number">3.</span> <span class="nav-text">实验部分</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#环境"><span class="nav-number">3.1.</span> <span class="nav-text">环境</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#实验结果"><span class="nav-number">3.2.</span> <span class="nav-text">实验结果</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#疑问"><span class="nav-number">4.</span> <span class="nav-text">疑问</span></a></li></ol></div>
</div>
</section>
<!--/noindex-->
</div>
</aside>
</div>
</main>
<footer id="footer" class="footer">
<div class="footer-inner">
<script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="copyright">© <span itemprop="copyrightYear">2020</span>
<span class="with-love">
<i class="fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">Keavnn</span>
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-area-chart"></i>
</span>
<span class="post-meta-item-text">Site words total count:</span>
<span title="Site words total count">80.3k</span>
</div>
<div class="powered-by">
<i class="fa fa-user-md"></i><span id="busuanzi_container_site_pv">
本站总访问量<span id="busuanzi_value_site_pv"></span>次
</span>
</div>
<!-- <div class="theme-info">
<div class="powered-by"></div>
<span class="post-count">博客全站共80.3k字</span>
</div> -->
</div>
</footer>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
<span id="scrollpercent"><span>0</span>%</span>
</div>
</div>
<script type="text/javascript">
if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
window.Promise = null;
}
</script>