<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Rlhf on k4i's blog</title><link>https://k4i.top/tags/rlhf/</link><description>Recent content in Rlhf on k4i's blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>sky_io@outlook.com (K4i)</managingEditor><webMaster>sky_io@outlook.com (K4i)</webMaster><copyright>All content is subject to the license of &lt;a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank"&gt;CC BY-NC-SA 4.0&lt;/a&gt; .</copyright><lastBuildDate>Tue, 07 Jul 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://k4i.top/tags/rlhf/index.xml" rel="self" type="application/rss+xml"/><item><title>Why KL Divergence Is Not A Distance: Direction Changes The Question</title><link>https://k4i.top/posts/kl-divergence-not-a-distance/</link><pubDate>Tue, 07 Jul 2026 10:00:00 +0800</pubDate><author>sky_io@outlook.com (K4i)</author><atom:modified>Tue, 07 Jul 2026 10:00:00 +0800</atom:modified><guid>https://k4i.top/posts/kl-divergence-not-a-distance/</guid><description>&lt;p&gt;KL divergence is often described as a distance between two distributions. That is half useful and half dangerous. It compares two distributions, but &lt;strong&gt;it is not a distance because direction matters&lt;/strong&gt;. More precisely, KL is nonnegative and vanishes only when \(P=Q\), but it fails the symmetry and triangle-inequality requirements of a metric.&lt;/p&gt;
&lt;p&gt;The formula is:&lt;/p&gt;
&lt;p&gt;$$D_{\mathrm{KL}}(P\Vert Q)=\sum_x P(x)\log\frac{P(x)}{Q(x)}$$&lt;/p&gt;
&lt;p&gt;Do not read this as &amp;ldquo;the distance between P and Q.&amp;rdquo; A better reading is:&lt;/p&gt;</description><dc:creator>K4i</dc:creator><media:content url="https://k4i.top//images/icons/math-operators.png" medium="image"><media:title type="html">featured image</media:title></media:content><category>deep-learning</category><category>kl-divergence</category><category>cross-entropy</category><category>rlhf</category><category>information-theory</category><category>AI</category></item></channel></rss>