{"id":286,"date":"2026-05-01T14:40:08","date_gmt":"2026-05-01T06:40:08","guid":{"rendered":"https:\/\/xuzbo.top\/?p=286"},"modified":"2026-07-07T20:03:54","modified_gmt":"2026-07-07T12:03:54","slug":"loss-function%e6%8d%9f%e5%a4%b1%e5%87%bd%e6%95%b0%e7%9a%84%e8%ae%be%e8%ae%a1","status":"publish","type":"post","link":"https:\/\/xuzbo.top\/index.php\/2026\/05\/01\/loss-function%e6%8d%9f%e5%a4%b1%e5%87%bd%e6%95%b0%e7%9a%84%e8%ae%be%e8%ae%a1\/","title":{"rendered":"Loss Function\u635f\u5931\u51fd\u6570\u7684\u8bbe\u8ba1"},"content":{"rendered":"\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">\u7ecf\u8fc7\u5927\u5b66\u8bfe\u7a0b\u7684\u5b66\u4e60\u4e0e\u8003\u8bd5\uff0c\u6211\u5584\u4e8e\u5404\u7c7b\u635f\u5931\u51fd\u6570\u7684\u8ba1\u7b97\uff0c\u4f46\u5bf9\u635f\u5931\u51fd\u6570\u662f\u5982\u4f55\u8bbe\u8ba1\u51fa\u6765\u7684\uff0c\u53ea\u6709\u4e00\u77e5\u534a\u89e3\u3002\u5728\u6b64\u8fdb\u884c\u63a2\u7a76\uff0c\u590d\u73b0\u6211\u5b66\u4e60\u7684\u601d\u8def\uff0c\u4ee5\u671f\u5f97\u5230\u7cfb\u7edf\u800c\u6df1\u5165\u7684\u7406\u89e3\u3002<\/p>\n<\/blockquote>\n\n\n  \r\n<style>\r\n  .wpj-jtoc.--jtoc-theme-basic-light.--jtoc-has-custom-styles {\r\n      --jtoc-numeration-suffix: \". \";    }<\/style>\r\n\r\n<div id=\"wpj-jtoc\" class=\"wpj-jtoc wpj-jtoc--main --jtoc-the-content --jtoc-theme-basic-light --jtoc-title-align-left --jtoc-toggle-icon --jtoc-toggle-position-right --jtoc-toggle-1 --jtoc-has-numeration --jtoc-has-custom-styles --jtoc-is-unfolded\" >\r\n  <!-- TOC -->\r\n  <div class=\"wpj-jtoc--toc \" >\r\n              <div class=\"wpj-jtoc--header\">\r\n        <div class=\"wpj-jtoc--header-main\">\r\n                    <div class=\"wpj-jtoc--title\">\r\n                        <span class=\"wpj-jtoc--title-label\">Table of contents<\/span>\r\n          <\/div>\r\n                                <div class=\"wpj-jtoc--toggle-wrap\">\r\n                                                          <div class=\"wpj-jtoc--toggle-box\">\r\n                  <div class=\"wpj-jtoc--toggle\"><\/div>\r\n                <\/div>\r\n                          <\/div>\r\n                  <\/div>\r\n      <\/div>\r\n            <div class=\"wpj-jtoc--body\">\r\n            <nav class=\"wpj-jtoc--nav\">\r\n        <ol class=\"wpj-jtoc--items\"><li class=\"wpj-jtoc--item --jtoc-h2\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"2\">\r\n                        <a href=\"#%25e6%258d%259f%25e5%25a4%25b1%25e7%259a%2584%25e5%2590%25ab%25e4%25b9%2589%25e7%2590%2586%25e6%2583%25b3%25e6%25a8%25a1%25e5%259e%258b%25e4%25b8%258e%25e5%25ad%25a6%25e4%25b9%25a0%25e6%25a8%25a1%25e5%259e%258b%25e7%259a%2584%25e6%25af%2594%25e8%25be%2583\" title=\"\u635f\u5931\u7684\u542b\u4e49\uff1a\u7406\u60f3\u6a21\u578b\u4e0e\u5b66\u4e60\u6a21\u578b\u7684\u6bd4\u8f83\" data-numeration=\"1\" >\u635f\u5931\u7684\u542b\u4e49\uff1a\u7406\u60f3\u6a21\u578b\u4e0e\u5b66\u4e60\u6a21\u578b\u7684\u6bd4\u8f83<\/a>\r\n                    <\/div><\/li><li class=\"wpj-jtoc--item --jtoc-h2\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"2\">\r\n                        <a href=\"#%25e6%259c%2580%25e5%25b0%258f%25e4%25ba%258c%25e4%25b9%2598%25e6%25b3%2595mse%25e5%2592%258cmae%25e7%259a%2584%25e8%25ae%25be%25e8%25ae%25a1\" title=\"\u6700\u5c0f\u4e8c\u4e58\u6cd5\uff1aMSE\u548cMAE\u7684\u8bbe\u8ba1\" data-numeration=\"2\" >\u6700\u5c0f\u4e8c\u4e58\u6cd5\uff1aMSE\u548cMAE\u7684\u8bbe\u8ba1<\/a>\r\n                    <\/div><\/li><li class=\"wpj-jtoc--item --jtoc-h2\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"2\">\r\n                        <a href=\"#%25e6%259e%2581%25e5%25a4%25a7%25e4%25bc%25bc%25e7%2584%25b6%25e4%25bc%25b0%25e8%25ae%25a1%25e6%25a8%25a1%25e5%259e%258b%25e8%25a7%25a3%25e9%2587%258a%25e6%2595%25b0%25e6%258d%25ae%25e7%259a%2584%25e8%2583%25bd%25e5%258a%259b\" title=\"\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\uff1a\u6a21\u578b\u89e3\u91ca\u6570\u636e\u7684\u80fd\u529b\" data-numeration=\"3\" >\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\uff1a\u6a21\u578b\u89e3\u91ca\u6570\u636e\u7684\u80fd\u529b<\/a>\r\n                    <\/div><\/li><li class=\"wpj-jtoc--item --jtoc-h2\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"2\">\r\n                        <a href=\"#%25e4%25ba%25a4%25e5%258f%2589%25e7%2586%25b5%25e6%25a6%2582%25e7%258e%2587%25e5%2588%2586%25e5%25b8%2583%25e4%25b9%258b%25e9%2597%25b4%25e7%259a%2584%25e5%258c%25b9%25e9%2585%258d\" title=\"\u4ea4\u53c9\u71b5\uff1a\u6982\u7387\u5206\u5e03\u4e4b\u95f4\u7684\u5339\u914d\" data-numeration=\"4\" >\u4ea4\u53c9\u71b5\uff1a\u6982\u7387\u5206\u5e03\u4e4b\u95f4\u7684\u5339\u914d<\/a>\r\n                    <\/div><\/li><li class=\"wpj-jtoc--item --jtoc-h2\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"2\">\r\n                        <a href=\"#%25e6%258d%259f%25e5%25a4%25b1%25e5%2587%25bd%25e6%2595%25b0%25e8%25ae%25be%25e8%25ae%25a1%25e7%259a%2584%25e5%258e%259f%25e5%2588%2599%25e6%2580%25bb%25e7%25bb%2593\" title=\"\u635f\u5931\u51fd\u6570\u8bbe\u8ba1\u7684\u539f\u5219\u603b\u7ed3\" data-numeration=\"5\" >\u635f\u5931\u51fd\u6570\u8bbe\u8ba1\u7684\u539f\u5219\u603b\u7ed3<\/a>\r\n                    <\/div><\/li><li class=\"wpj-jtoc--item --jtoc-h2\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"2\">\r\n                        <a href=\"#%25e7%25bb%259f%25e4%25b8%2580%25e8%25a7%2586%25e8%25a7%2592%25e6%258d%259f%25e5%25a4%25b1%25e5%2587%25bd%25e6%2595%25b0%25e6%2598%25af%25e5%25bb%25ba%25e6%25a8%25a1%25e5%2581%2587%25e8%25ae%25be%25e7%259a%2584%25e5%25a4%2596%25e5%258c%2596\" title=\"\u7edf\u4e00\u89c6\u89d2\uff1a\u635f\u5931\u51fd\u6570\u662f\u5efa\u6a21\u5047\u8bbe\u7684\u5916\u5316\" data-numeration=\"6\" >\u7edf\u4e00\u89c6\u89d2\uff1a\u635f\u5931\u51fd\u6570\u662f\u5efa\u6a21\u5047\u8bbe\u7684\u5916\u5316<\/a>\r\n                    <\/div><\/li><li class=\"wpj-jtoc--item --jtoc-h2\">\r\n        <div class=\"wpj-jtoc--item-content\" data-depth=\"2\">\r\n                        <a href=\"#%25e5%25b0%258f%25e7%25bb%2593\" title=\"\u5c0f\u7ed3\" data-numeration=\"7\" >\u5c0f\u7ed3<\/a>\r\n                    <\/div><\/li><\/ol>      <\/nav>\r\n          <\/div>\r\n      <\/div>\r\n<\/div>\r\n\n\n<h4 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"%25e6%258d%259f%25e5%25a4%25b1%25e7%259a%2584%25e5%2590%25ab%25e4%25b9%2589%25e7%2590%2586%25e6%2583%25b3%25e6%25a8%25a1%25e5%259e%258b%25e4%25b8%258e%25e5%25ad%25a6%25e4%25b9%25a0%25e6%25a8%25a1%25e5%259e%258b%25e7%259a%2584%25e6%25af%2594%25e8%25be%2583\">\u635f\u5931\u7684\u542b\u4e49\uff1a\u7406\u60f3\u6a21\u578b\u4e0e\u5b66\u4e60\u6a21\u578b\u7684\u6bd4\u8f83<\/h4>\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u5148\u8fdb\u884c\u4e00\u4e2a\u57fa\u672c\u5047\u8bbe\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5b58\u5728\u7740\u4e00\u4e2a\u7edd\u5bf9\u6b63\u786e\u7684\u7406\u60f3\u7edf\u8ba1\u6a21\u578b\uff0c\u8bb0\u4f5c\u771f\u5b9e\u5206\u5e03 <strong><math data-latex=\"P\"><semantics><mi>P<\/mi><annotation encoding=\"application\/x-tex\">P<\/annotation><\/semantics><\/math><\/strong><\/li>\n\n\n\n<li>\u53e6\u6709\u4e00\u4e2a\u662f\u9700\u8981\u5b66\u4e60\u3001\u9700\u8981\u8c03\u6574\u53c2\u6570\u7684\u6982\u7387\u7edf\u8ba1\u6a21\u578b\uff0c\u8bb0\u4f5c <math data-latex=\"Q_\\theta\"><semantics><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><annotation encoding=\"application\/x-tex\">Q_\\theta<\/annotation><\/semantics><\/math><\/li>\n\n\n\n<li>\u4efb\u52a1\u76ee\u6807\u662f\u8c03\u6574\u53c2\u6570 <math data-latex=\"\\theta\"><semantics><mi>\u03b8<\/mi><annotation encoding=\"application\/x-tex\">\\theta<\/annotation><\/semantics><\/math>\uff0c\u4f7f\u5f97 <math data-latex=\"Q_\\theta\"><semantics><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><annotation encoding=\"application\/x-tex\">Q_\\theta<\/annotation><\/semantics><\/math> \u5c3d\u53ef\u80fd\u63a5\u8fd1 <strong><math data-latex=\"P\"><semantics><mi>P<\/mi><annotation encoding=\"application\/x-tex\">P<\/annotation><\/semantics><\/math><\/strong><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6240\u4ee5\uff0c\u635f\u5931\u51fd\u6570\u8bbe\u8ba1\u7684\u95ee\u9898\u53ef\u4ee5\u6536\u675f\u4e3a\uff0c\u6211\u4eec\u5982\u4f55\u6bd4\u8f83\u4e24\u4e2a\u6982\u7387\u6a21\u578b <math data-latex=\" P \\text{ \u4e0e } Q_\\theta\"><semantics><mrow><mi>P<\/mi><mtext>\u00a0\u4e0e\u00a0<\/mtext><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><\/mrow><annotation encoding=\"application\/x-tex\"> P \\text{ \u4e0e } Q_\\theta<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u6211\u4eec\u77e5\u9053\u771f\u5b9e\u5206\u5e03 P\uff0c\u6700\u81ea\u7136\u7684\u505a\u6cd5\u662f\u76f4\u63a5\u5b9a\u4e49\u67d0\u79cd\u2018\u8ddd\u79bb\u2019\u6216\u2018\u5dee\u5f02\u5ea6\u2019\uff1a<math data-latex=\"D(P, Q_\\theta)\"><semantics><mrow><mi>D<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>P<\/mi><mo separator=\"true\">,<\/mo><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">D(P, Q_\\theta)<\/annotation><\/semantics><\/math>\uff0c\u7136\u540e\u9009\u62e9\u4f7f\u5176\u7684\u53c2\u6570\uff1a<\/p>\n\n\n\n<p class=\"has-text-align-center wp-block-paragraph\" id=\"interact-paragraph-c0bab7\"> <math data-latex=\"\\theta^* = \\arg\\min_\\theta D(P, Q_\\theta)\"><semantics><mrow><msup><mi>\u03b8<\/mi><mo>\u2217<\/mo><\/msup><mo>=<\/mo><mrow><mi>arg<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>min<\/mi><mi>\u03b8<\/mi><\/msub><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><mi>D<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>P<\/mi><mo separator=\"true\">,<\/mo><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">\\theta^* = \\arg\\min_\\theta D(P, Q_\\theta)<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u6b64\uff0c\u6211\u4eec\u4fbf\u5b9a\u4e49\u4e86<strong>\u5e7f\u4e49\u610f\u4e49\u4e0a\u7684\u635f\u5931<\/strong>\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fd9\u91cc\u7684\u2018\u8ddd\u79bb\u2019\u4e0d\u4e00\u5b9a\u662f\u6b27\u5f0f\u8ddd\u79bb\uff0c\u4e5f\u4e0d\u4e00\u5b9a\u6ee1\u8db3\u6570\u5b66\u4e0a\u4e25\u683c\u7684\u8ddd\u79bb\u5b9a\u4e49\uff0c\u5b83\u9700\u8981\u6ee1\u8db3\u7684\u662f\uff1a\u2460 \u5f53 <math data-latex=\"Q_\\theta\"><semantics><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><annotation encoding=\"application\/x-tex\">Q_\\theta<\/annotation><\/semantics><\/math> \u8d8a\u63a5\u8fd1 <math data-latex=\"P\"><semantics><mi>P<\/mi><annotation encoding=\"application\/x-tex\">P<\/annotation><\/semantics><\/math> \u65f6\uff0c\u635f\u5931\u8d8a\u5c0f\uff1b\u5f53 <math data-latex=\"Q_\\theta\"><semantics><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><annotation encoding=\"application\/x-tex\">Q_\\theta<\/annotation><\/semantics><\/math> \u504f\u79bb <math data-latex=\"P\"><semantics><mi>P<\/mi><annotation encoding=\"application\/x-tex\">P<\/annotation><\/semantics><\/math> \u65f6\uff0c\u635f\u5931\u8d8a\u5927\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f46\u73b0\u5b9e\u4e2d\uff0c\u771f\u5b9e\u7684\u5206\u5e03 <math data-latex=\"P\"><semantics><mi>P<\/mi><annotation encoding=\"application\/x-tex\">P<\/annotation><\/semantics><\/math> \u4e0d\u53ef\u76f4\u63a5\u83b7\u5f97\uff0c\u6211\u4eec\u53ea\u6709\u4ece\u4e2d\u901a\u8fc7\u89c2\u5bdf\u91c7\u6837\u5f97\u5230\u7684\u4e00\u6279\u6570\u636e<math data-latex=\"Dataset:\\mathcal{D}=\\{(x_i,y_i)\\}_{i=1}^{n}\"><semantics><mrow><mi>D<\/mi><mi>a<\/mi><mi>t<\/mi><mi>a<\/mi><mi>s<\/mi><mi>e<\/mi><mi>t<\/mi><mo lspace=\"0.2222em\" rspace=\"0.2222em\">:<\/mo><mi class=\"mathcal\">\ud835\udc9f<\/mi><mo>=<\/mo><mo form=\"prefix\" stretchy=\"false\">{<\/mo><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo separator=\"true\">,<\/mo><msub><mi>y<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><msubsup><mo form=\"postfix\" stretchy=\"false\">}<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><\/mrow><annotation encoding=\"application\/x-tex\">Dataset:\\mathcal{D}=\\{(x_i,y_i)\\}_{i=1}^{n}<\/annotation><\/semantics><\/math>\u3002\u56e0\u6b64\uff0c\u635f\u5931\u51fd\u6570\u9700\u8981\u6ee1\u8db3\uff1a\u2461 \u7528\u6709\u9650\u6837\u672c\u8fd1\u4f3c\u771f\u5b9e\u5206\u5e03\u4e0b\u7684\u6574\u4f53\u8bef\u5dee\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7406\u8bba\u4e0a\u6211\u4eec\u5173\u5fc3\u7684\u662f\u671f\u671b\u98ce\u9669Risk\uff1a<math data-latex=\"R(\\theta)=\\mathbb{E}{(x,y)\\sim P}\\left[\\ell(f\\theta(x),y)\\right]\"><semantics><mrow><mi>R<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>\u03b8<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><mi>\ud835\udd3c<\/mi><mrow><mo form=\"prefix\" stretchy=\"false\" lspace=\"0em\" rspace=\"0em\">(<\/mo><mi>x<\/mi><mo separator=\"true\">,<\/mo><mi>y<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>\u223c<\/mo><mi>P<\/mi><\/mrow><mrow><mo fence=\"true\" form=\"prefix\">[<\/mo><mi>\u2113<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>f<\/mi><mi>\u03b8<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>x<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo separator=\"true\">,<\/mo><mi>y<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo fence=\"true\" form=\"postfix\">]<\/mo><\/mrow><\/mrow><annotation encoding=\"application\/x-tex\">R(\\theta)=\\mathbb{E}{(x,y)\\sim P}\\left[\\ell(f\\theta(x),y)\\right]<\/annotation><\/semantics><\/math>\uff0c\u4f46\u5b9e\u9645\u8bad\u7ec3\u65f6\u53ea\u80fd\u4f7f\u7528\u7ecf\u9a8c\u98ce\u9669\uff1a<math data-latex=\"\\hat{R}(\\theta)=\\frac{1}{n}\\sum_{i=1}^{n}\\ell(f_\\theta(x_i),y_i)\"><semantics><mrow><mover><mi>R<\/mi><mo stretchy=\"false\" class=\"tml-capshift\" style=\"math-style:normal;math-depth:0;\">^<\/mo><\/mover><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>\u03b8<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><mfrac><mn>1<\/mn><mi>n<\/mi><\/mfrac><msubsup><mo movablelimits=\"false\">\u2211<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><mi>\u2113<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>f<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo separator=\"true\">,<\/mo><msub><mi>y<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">\\hat{R}(\\theta)=\\frac{1}{n}\\sum_{i=1}^{n}\\ell(f_\\theta(x_i),y_i)<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7efc\u4e0a\uff0c\u6211\u6240\u7406\u89e3\u7684\u635f\u5931\u51fd\u6570\uff0c\u672c\u8d28\u5c31\u662f\u201c\u6211\u4eec\u5e0c\u671b\u6a21\u578b\u600e\u6837\u63a5\u8fd1\u771f\u5b9e\u4e16\u754c\u201d\u91cf\u5316\u6210\u4e00\u4e2a\u53ef\u4ee5\u5728\u6570\u636e\u4e0a\u8ba1\u7b97\u3001\u53ef\u4ee5\u88ab\u7b97\u6cd5\u4f18\u5316\u7684\u76ee\u6807\uff1b\u8bbe\u8ba1\u7684\u76ee\u6807\u5c31\u662f\u627e\u5230\u7b26\u5408\u4e0a\u9762\u4e24\u4e2a\u6761\u4ef6\u7684\u51fd\u6570\uff0c\u6765\u8fde\u63a5\u771f\u5b9e\u6a21\u578b\u3001\u73b0\u5b9e\u6a21\u578b\u4e0e\u89c2\u6d4b\u6570\u636e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u6211\u7814\u7a76\u95ee\u9898\u7684\u8fc7\u7a0b\u4e2d\uff0c\u6709\u4e09\u4e2a\u5173\u952e\u8bcd\u4e00\u76f4\u51fa\u73b0\uff1a\u6700\u5c0f\u4e8c\u4e58\u3001\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\u3001\u4ea4\u53c9\u71b5\uff0c\u8fd9\u6070\u6070\u662f\u6bd4\u8f83\u4e24\u4e2a\u6a21\u578b\u2018\u5dee\u8ddd\u2019\u7684\u4e09\u79cd\u601d\u8def<sup data-fn=\"548e0e8b-b219-4c4e-9392-145ce4cdc8c3\" class=\"fn\"><a href=\"#548e0e8b-b219-4c4e-9392-145ce4cdc8c3\" id=\"548e0e8b-b219-4c4e-9392-145ce4cdc8c3-link\">1<\/a><\/sup>\uff1a\u6700\u5c0f\u4e8c\u4e58\u6cd5\u5f3a\u8c03\u6570\u503c\u8bef\u5dee\uff0c\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\u5f3a\u8c03\u6a21\u578b\u89e3\u91ca\u6570\u636e\u7684\u6982\u7387\u80fd\u529b\uff0c\u4ea4\u53c9\u71b5\u5f3a\u8c03\u6982\u7387\u5206\u5e03\u4e4b\u95f4\u7684\u5339\u914d\u3002<\/p>\n\n\n<h4 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"%25e6%259c%2580%25e5%25b0%258f%25e4%25ba%258c%25e4%25b9%2598%25e6%25b3%2595mse%25e5%2592%258cmae%25e7%259a%2584%25e8%25ae%25be%25e8%25ae%25a1\">\u6700\u5c0f\u4e8c\u4e58\u6cd5\uff1aMSE\u548cMAE\u7684\u8bbe\u8ba1<\/h4>\n\n\n<p class=\"wp-block-paragraph\">\u6700\u5c0f\u4e8c\u4e58\u6cd5\uff08Ordinary Least Squares, OLS\uff09\u6216\u8bb8\u662f\u6bd4\u8f83\u4e24\u4e2a\u6a21\u578b\u2018\u5dee\u8ddd\u2019\u6700\u7b80\u5355\u7684\u529e\u6cd5\uff0c\u5f53\u6211\u4eec\u8003\u8651\u56de\u5f52\u7c7b\u95ee\u9898\uff0c\u6a21\u578b\u7ed9\u51fa\u9884\u6d4b\u503c <math data-latex=\"f_\\theta(x_i)\"><semantics><mrow><msub><mi>f<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">f_\\theta(x_i)<\/annotation><\/semantics><\/math>\uff0c\u771f\u5b9e\u89c2\u6d4b\u503c\u4e3a <math data-latex=\"y_i\"><semantics><msub><mi>y<\/mi><mi>i<\/mi><\/msub><annotation encoding=\"application\/x-tex\">y_i<\/annotation><\/semantics><\/math> \u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">OLS\u7684\u76ee\u6807\u662f\u6700\u5c0f\u5316 <math data-latex=\"Loss(\\theta)=\\sum_{i=1}^{n}(y_i-f_\\theta(x_i))^2\"><semantics><mrow><mi>L<\/mi><mi>o<\/mi><mi>s<\/mi><mi>s<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>\u03b8<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><msubsup><mo movablelimits=\"false\">\u2211<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>y<\/mi><mi>i<\/mi><\/msub><mo>\u2212<\/mo><msub><mi>f<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><msup><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mn>2<\/mn><\/msup><\/mrow><annotation encoding=\"application\/x-tex\">Loss(\\theta)=\\sum_{i=1}^{n}(y_i-f_\\theta(x_i))^2<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u672c\u8eab\u770b\u8d77\u6765\u50cf\u662f\u4e00\u4e2a\u5f88\u81ea\u7136\u7684\u8ba1\u7b97\u89c4\u5219\uff0c\u4ece\u8ba1\u7b97\u89d2\u5ea6\u770b\uff0c\u8fd9\u79cd\u5e73\u65b9\u8bef\u5dee\u5f62\u5f0f\u7b80\u5355\u3001\u53ef\u5bfc\u3001\u5bb9\u6613\u4f18\u5316\uff1b\u800c\u4ece\u8bbe\u8ba1\u89d2\u5ea6\u770b\uff0c\u5b83\u6765\u81ea\u4e8e\u4e00\u4e2a\u6982\u7387\u6a21\u578b\u7684\u5047\u8bbe\uff0c\u6211\u4eec\u5047\u8bbe\u4e86\u89c2\u6d4b\u503c\u7b49\u4e8e\u6a21\u578b\u9884\u6d4b\u503c\u52a0\u4e0a\u968f\u673a\u8bef\u5dee\uff1a<math data-latex=\"y_i=f_\\theta(x_i)+\\varepsilon_i\"><semantics><mrow><msub><mi>y<\/mi><mi>i<\/mi><\/msub><mo>=<\/mo><msub><mi>f<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>+<\/mo><msub><mi>\u03b5<\/mi><mi>i<\/mi><\/msub><\/mrow><annotation encoding=\"application\/x-tex\">y_i=f_\\theta(x_i)+\\varepsilon_i<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u6211\u4eec\u8fdb\u4e00\u6b65\u5047\u8bbe\u8bef\u5dee\u670d\u4ece\u9ad8\u65af\u5206\u5e03<math data-latex=\"\\varepsilon_i\\sim \\mathcal{N}(0,\\sigma^2)\"><semantics><mrow><msub><mi>\u03b5<\/mi><mi>i<\/mi><\/msub><mo>\u223c<\/mo><mi class=\"mathcal\">\ud835\udca9<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mn>0<\/mn><mo separator=\"true\">,<\/mo><msup><mi>\u03c3<\/mi><mn>2<\/mn><\/msup><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">\\varepsilon_i\\sim \\mathcal{N}(0,\\sigma^2)<\/annotation><\/semantics><\/math>\uff0c\u5728\u7ed9\u5b9a <math data-latex=\"x_i\"><semantics><msub><mi>x<\/mi><mi>i<\/mi><\/msub><annotation encoding=\"application\/x-tex\">x_i<\/annotation><\/semantics><\/math> \u548c\u53c2\u6570 <math data-latex=\"\\theta\"><semantics><mi>\u03b8<\/mi><annotation encoding=\"application\/x-tex\">\\theta<\/annotation><\/semantics><\/math> \u65f6\uff0c<math data-latex=\"y_i\"><semantics><msub><mi>y<\/mi><mi>i<\/mi><\/msub><annotation encoding=\"application\/x-tex\">y_i<\/annotation><\/semantics><\/math> \u7684\u6761\u4ef6\u6982\u7387\u5bc6\u5ea6\u4e3a\uff1a<math data-latex=\"p(y_i|x_i;\\theta)=\\frac{1}{\\sqrt{2\\pi}\\sigma}e^{(-\\frac{(y_i-f_\\theta(x_i))^2}{2\\sigma^2})}\"><semantics><mrow><mi>p<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>y<\/mi><mi>i<\/mi><\/msub><mi>|<\/mi><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo separator=\"true\">;<\/mo><mi>\u03b8<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><mfrac><mn>1<\/mn><mrow><msqrt><mrow><mn>2<\/mn><mi>\u03c0<\/mi><\/mrow><\/msqrt><mi>\u03c3<\/mi><\/mrow><\/mfrac><msup><mi>e<\/mi><mrow><mo form=\"prefix\" stretchy=\"false\" lspace=\"0em\" rspace=\"0em\">(<\/mo><mo form=\"prefix\" stretchy=\"false\">\u2212<\/mo><mfrac><mrow><mo form=\"prefix\" stretchy=\"false\" lspace=\"0em\" rspace=\"0em\">(<\/mo><msub><mi>y<\/mi><mi scriptlevel=\"2\">i<\/mi><\/msub><mo>\u2212<\/mo><msub><mi>f<\/mi><mi scriptlevel=\"2\">\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>x<\/mi><mi scriptlevel=\"2\">i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><msup><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mn scriptlevel=\"2\">2<\/mn><\/msup><\/mrow><mrow><mn>2<\/mn><msup><mi>\u03c3<\/mi><mn scriptlevel=\"2\">2<\/mn><\/msup><\/mrow><\/mfrac><mo form=\"postfix\" stretchy=\"false\" lspace=\"0em\" rspace=\"0em\">)<\/mo><\/mrow><\/msup><\/mrow><annotation encoding=\"application\/x-tex\">p(y_i|x_i;\\theta)=\\frac{1}{\\sqrt{2\\pi}\\sigma}e^{(-\\frac{(y_i-f_\\theta(x_i))^2}{2\\sigma^2})}<\/annotation><\/semantics><\/math>\uff0c\u5982\u679c\u6837\u672c\u72ec\u7acb\u540c\u5206\u5e03\uff0c\u6574\u4e2a\u6570\u636e\u96c6\u7684\u4f3c\u7136\u51fd\u6570\u4e3a\uff1a<math data-latex=\"L(\\theta)=\\prod_{i=1}^{n}p(y_i|x_i;\\theta)\"><semantics><mrow><mi>L<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>\u03b8<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><msubsup><mo movablelimits=\"false\">\u220f<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><mi>p<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>y<\/mi><mi>i<\/mi><\/msub><mi>|<\/mi><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo separator=\"true\">;<\/mo><mi>\u03b8<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">L(\\theta)=\\prod_{i=1}^{n}p(y_i|x_i;\\theta)<\/annotation><\/semantics><\/math>\uff0c\u6781\u5927\u5316\u8fd9\u4e2a\u4f3c\u7136\u51fd\u6570\u7b49\u4ef7\u4e8e\u6781\u5c0f\u5316\u8d1f\u5bf9\u6570\u4f3c\u7136\uff1a<math data-latex=\"-\\log L(\\theta)\"><semantics><mrow><mo>\u2212<\/mo><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><mi>L<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>\u03b8<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">-\\log L(\\theta)<\/annotation><\/semantics><\/math>\uff0c\u4ee3\u5165\u9ad8\u65af\u5206\u5e03\u540e\uff0c\u53ef\u4ee5\u5f97\u5230\uff1a<math data-latex=\"L(\\theta)=\\text{\u5e38\u6570} + \\frac{1}{2\\sigma^2}\\sum_{i=1}^{n}(y_i-f_\\theta(x_i))^2\"><semantics><mrow><mi>L<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>\u03b8<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><mtext>\u5e38\u6570<\/mtext><mo>+<\/mo><mfrac><mn>1<\/mn><mrow><mn>2<\/mn><msup><mi>\u03c3<\/mi><mn>2<\/mn><\/msup><\/mrow><\/mfrac><msubsup><mo movablelimits=\"false\">\u2211<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>y<\/mi><mi>i<\/mi><\/msub><mo>\u2212<\/mo><msub><mi>f<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><msup><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mn>2<\/mn><\/msup><\/mrow><annotation encoding=\"application\/x-tex\">L(\\theta)=\\text{\u5e38\u6570} + \\frac{1}{2\\sigma^2}\\sum_{i=1}^{n}(y_i-f_\\theta(x_i))^2<\/annotation><\/semantics><\/math>\uff0c\u800c\u7531\u4e8e\u5e38\u6570\u548c\u6b63\u6bd4\u4f8b\u7cfb\u6570\u4e0d\u5f71\u54cd\u6700\u4f18\u89e3\uff0c\u6240\u4ee5\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\u7b49\u4ef7\u4e8e\u6700\u5c0f\u4e8c\u4e58\u6cd5\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u8bc1\u660e\u4e86 \u5e73\u65b9\u635f\u5931\u5bf9\u5e94\u7740\u201c\u8bef\u5dee\u670d\u4ece\u9ad8\u65af\u5206\u5e03\u201d\u7684\u5efa\u6a21\u5047\u8bbe\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5f53\u6211\u4eec\u4f7f\u7528\u5747\u65b9\u8bef\u5dee\u65f6\uff0c\u5b9e\u9645\u4e0a\u8003\u8651\u7684\u662f\uff1a\u6211\u4eec\u8ba4\u4e3a\u9884\u6d4b\u8bef\u5dee\u5927\u4f53\u4e0a\u662f\u5bf9\u79f0\u7684\u3001\u96c6\u4e2d\u5728\u96f6\u9644\u8fd1\u7684\uff0c\u5e76\u4e14\u5927\u8bef\u5dee\u5e94\u8be5\u53d7\u5230\u66f4\u4e25\u91cd\u7684\u60e9\u7f5a\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6362\u53e5\u8bdd\u8bf4\uff0c\u6211\u4eec\u53ef\u4ee5\u8ba4\u4e3a<strong>\u6700\u5c0f\u4e8c\u4e58\u6cd5=\u9ad8\u65af\u566a\u58f0\u5047\u8bbe\u4e0b\u7684\u6781\u5927\u4f3c\u7136\u4f30\u8ba1<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e73\u65b9\u635f\u5931\u7684\u7279\u70b9\u4e5f\u7531\u6b64\u4ea7\u751f\u3002\u56e0\u4e3a\u8bef\u5dee\u88ab\u5e73\u65b9\uff0c\u8f83\u5927\u7684\u504f\u5dee\u4f1a\u88ab\u653e\u5927\uff0c\u6240\u4ee5\u5747\u65b9\u8bef\u5dee\u5bf9\u5f02\u5e38\u503c\u975e\u5e38\u654f\u611f\u3002\u5982\u679c\u6570\u636e\u4e2d\u5b58\u5728\u5927\u91cf\u5f02\u5e38\u70b9\uff0c\u5e73\u65b9\u635f\u5931\u53ef\u80fd\u5e76\u4e0d\u662f\u6700\u5408\u9002\u7684\u9009\u62e9\u3002\u8fd9\u65f6\u53ef\u4ee5\u8003\u8651\u7edd\u5bf9\u8bef\u5dee\uff1a<math data-latex=\"\\sum_{i=1}^{n}|y_i-f_\\theta(x_i)|\"><semantics><mrow><msubsup><mo movablelimits=\"false\">\u2211<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><mi>|<\/mi><msub><mi>y<\/mi><mi>i<\/mi><\/msub><mo>\u2212<\/mo><msub><mi>f<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mi>|<\/mi><\/mrow><annotation encoding=\"application\/x-tex\">\\sum_{i=1}^{n}|y_i-f_\\theta(x_i)|<\/annotation><\/semantics><\/math>\u3002\u5b83\u5bf9\u5e94\u7684\u7edf\u8ba1\u5047\u8bbe\u901a\u5e38\u4e0e\u62c9\u666e\u62c9\u65af\u5206\u5e03\u6709\u5173\u3002\u76f8\u6bd4\u5e73\u65b9\u635f\u5931\uff0c\u7edd\u5bf9\u8bef\u5dee\u5bf9\u5f02\u5e38\u503c\u66f4\u7a33\u5065\u3002\u8fd9\u4e5f\u8bf4\u660e\uff0c\u635f\u5931\u51fd\u6570\u7684\u9009\u62e9\u5f80\u5f80\u53cd\u6620\u4e86\u6211\u4eec\u5bf9\u566a\u58f0\u7ed3\u6784\u7684\u5224\u65ad\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8fd9\u4e00part\uff0c\u6211\u660e\u767d\u4e86<strong>\u635f\u5931\u51fd\u6570\u7684\u9009\u62e9\uff0c\u672c\u8d28\u4e0a\u4f9d\u8d56\u4e8e\u6211\u4eec\u5bf9\u6570\u636e\u566a\u58f0\u7684\u5047\u8bbe\u3002<\/strong><\/p>\n\n\n<h4 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"%25e6%259e%2581%25e5%25a4%25a7%25e4%25bc%25bc%25e7%2584%25b6%25e4%25bc%25b0%25e8%25ae%25a1%25e6%25a8%25a1%25e5%259e%258b%25e8%25a7%25a3%25e9%2587%258a%25e6%2595%25b0%25e6%258d%25ae%25e7%259a%2584%25e8%2583%25bd%25e5%258a%259b\">\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\uff1a\u6a21\u578b\u89e3\u91ca\u6570\u636e\u7684\u80fd\u529b<\/h4>\n\n\n<p class=\"wp-block-paragraph\">\u5728\u4e0a\u4e00\u90e8\u5206\uff0c\u6211\u4eec\u5df2\u7ecf\u63d0\u5230\u4e86\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\uff08Maximum Likelihood Estimation, MLE\uff09\uff0c\u5b83\u7684\u601d\u60f3\u662f\uff1a\u5982\u679c\u6a21\u578b\u662f\u597d\u7684\uff0c\u90a3\u4e48\u5b83\u5e94\u8be5\u7ed9\u5df2\u7ecf\u53d1\u751f\u7684\u6570\u636e\u8f83\u9ad8\u7684\u6982\u7387\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5047\u8bbe\u6a21\u578b\u4e3a\u6570\u636e\u70b9 <math data-latex=\"z_i\"><semantics><msub><mi>z<\/mi><mi>i<\/mi><\/msub><annotation encoding=\"application\/x-tex\">z_i<\/annotation><\/semantics><\/math> \u5206\u914d\u6982\u7387 <math data-latex=\"q_\\theta(z_i)\"><semantics><mrow><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>z<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">q_\\theta(z_i)<\/annotation><\/semantics><\/math>\u3002\u6574\u4e2a\u6570\u636e\u96c6\u7684\u4f3c\u7136\u4e3a\uff1a<math data-latex=\"\\prod_{i=1}^{n}q_\\theta(z_i)\"><semantics><mrow><msubsup><mo movablelimits=\"false\">\u220f<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>z<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">\\prod_{i=1}^{n}q_\\theta(z_i)<\/annotation><\/semantics><\/math><\/li>\n\n\n\n<li>\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\u9009\u62e9\uff1a<math data-latex=\"\\theta^*=\\arg\\max_\\theta \\prod_{i=1}^{n}q_\\theta(z_i)\"><semantics><mrow><msup><mi>\u03b8<\/mi><mo>\u2217<\/mo><\/msup><mo>=<\/mo><mrow><mi>arg<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>max<\/mi><mi>\u03b8<\/mi><\/msub><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><msubsup><mo movablelimits=\"false\">\u220f<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>z<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">\\theta^*=\\arg\\max_\\theta \\prod_{i=1}^{n}q_\\theta(z_i)<\/annotation><\/semantics><\/math><\/li>\n\n\n\n<li>\u4e3a\u4e86\u4fbf\u4e8e\u4f18\u5316\u3001\u89e3\u51b3\u6570\u636e\u6ea2\u51fa\u95ee\u9898\uff0c\u901a\u5e38\u53d6\u5bf9\u6570\uff1a<math data-latex=\"\\theta^*=\\arg\\max_\\theta \\sum_{i=1}^{n}\\log q_\\theta(z_i)\"><semantics><mrow><msup><mi>\u03b8<\/mi><mo>\u2217<\/mo><\/msup><mo>=<\/mo><mrow><mi>arg<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>max<\/mi><mi>\u03b8<\/mi><\/msub><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><msubsup><mo movablelimits=\"false\">\u2211<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>z<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">\\theta^*=\\arg\\max_\\theta \\sum_{i=1}^{n}\\log q_\\theta(z_i)<\/annotation><\/semantics><\/math><\/li>\n\n\n\n<li>\u8fdb\u4e00\u6b65\uff0c\u5c06\u6700\u5927\u5316\u95ee\u9898\u8f6c\u5316\u4e3a\u6700\u5c0f\u5316\u95ee\u9898\uff1a<math data-latex=\"\\theta^*=\\arg\\min_\\theta -\\sum_{i=1}^{n}\\log q_\\theta(z_i)\"><semantics><mrow><msup><mi>\u03b8<\/mi><mo>\u2217<\/mo><\/msup><mo>=<\/mo><mrow><mi>arg<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>min<\/mi><mi>\u03b8<\/mi><\/msub><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><mo>\u2212<\/mo><msubsup><mo movablelimits=\"false\">\u2211<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>z<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">\\theta^*=\\arg\\min_\\theta -\\sum_{i=1}^{n}\\log q_\\theta(z_i)<\/annotation><\/semantics><\/math><\/li>\n\n\n\n<li>\u4e8e\u662f\uff0c\u8d1f\u5bf9\u6570\u4f3c\u7136\u81ea\u7136\u6210\u4e3a\u4e00\u79cd\u635f\u5931\u51fd\u6570\uff1a<math data-latex=\"\\ell(\\theta;z_i)=-\\log q_\\theta(z_i)\"><semantics><mrow><mi>\u2113<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>\u03b8<\/mi><mo separator=\"true\">;<\/mo><msub><mi>z<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><mo form=\"prefix\" stretchy=\"false\">\u2212<\/mo><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>z<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">\\ell(\\theta;z_i)=-\\log q_\\theta(z_i)<\/annotation><\/semantics><\/math><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u4e00\u5f62\u5f0f\u8868\u8fbe\u7740\u4e00\u4e2a\u539f\u5219\uff1a\u771f\u5b9e\u53d1\u751f\u7684\u4e8b\u4ef6\uff0c\u6a21\u578b\u7ed9\u51fa\u7684\u6982\u7387\u8d8a\u9ad8\uff0c\u635f\u5931\u8d8a\u5c0f\uff1b\u6a21\u578b\u7ed9\u51fa\u7684\u6982\u7387\u8d8a\u4f4e\uff0c\u635f\u5931\u8d8a\u5927\u3002\u5c24\u5176\u5f53\u6a21\u578b\u628a\u771f\u5b9e\u53d1\u751f\u7684\u4e8b\u4ef6\u8d4b\u4e88\u63a5\u8fd1 0 \u7684\u6982\u7387\u65f6\uff0c<math data-latex=\"-\\log q_\\theta(z_i)\"><semantics><mrow><mo>\u2212<\/mo><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>z<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">-\\log q_\\theta(z_i)<\/annotation><\/semantics><\/math>  \u4f1a\u53d8\u5f97\u975e\u5e38\u5927\u3002\u8fd9\u610f\u5473\u7740\u8d1f\u5bf9\u6570\u4f3c\u7136\u4f1a\u663e\u8457\u60e9\u7f5a\u90a3\u4e9b\u5bf9\u9519\u8bef\u7ed3\u679c\u8d4b\u4e88\u8fc7\u9ad8\u7f6e\u4fe1\u5ea6\u7684\u6a21\u578b\uff08\u6a21\u578b\u975e\u5e38\u80af\u5b9a\u5730\u7ed9\u51fa\u4e86\u9519\u8bef\u7b54\u6848\uff09\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u62bd\u8c61\u8fd9\u79cd\u601d\u60f3\uff1a\u5148\u5047\u8bbe\u6570\u636e\u7531\u67d0\u4e2a\u6982\u7387\u6a21\u578b\u751f\u6210\uff0c\u518d\u7528\u6a21\u578b\u8d4b\u4e88\u89c2\u6d4b\u6570\u636e\u7684\u6982\u7387\u5927\u5c0f\u6765\u8861\u91cf\u6a21\u578b\u597d\u574f\u3002\u4e0d\u540c\u7684\u6982\u7387\u5047\u8bbe\u4f1a\u5bfc\u51fa\u4e0d\u540c\u7684\u635f\u5931\u51fd\u6570\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u636e\u6b64\u8bbe\u8ba1\u7684\u635f\u5931\u51fd\u6570\u56e0\u6b64\u6709\u660e\u786e\u7684\u7edf\u8ba1\u6027\u8d28\uff1a<strong>\u6a21\u578b\u53ef\u4ee5\u6700\u5927\u7a0b\u5ea6\u89e3\u91ca\u89c2\u5bdf\u5230\u7684\u6570\u636e<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u4e0a\u4e00\u90e8\u5206\uff0c\u9ad8\u65af\u566a\u58f0\u5bfc\u51fa\u5e73\u65b9\u635f\u5931\uff0c\u62c9\u666e\u62c9\u65af\u566a\u58f0\u5bfc\u51fa\u7edd\u5bf9\u635f\u5931\uff0c\u800c\u5728\u4e0b\u4e00\u90e8\u5206\uff0c\u6211\u5c06\u63a8\u5bfc\u4f2f\u52aa\u5229\u5206\u5e03\u5982\u4f55\u5bfc\u51fa\u4e8c\u5206\u7c7b\u7684\u4ea4\u53c9\u71b5\uff0c\u7c7b\u522b\u5206\u5e03\u5bfc\u51fa\u591a\u5206\u7c7b\u4ea4\u53c9\u71b5\u3002\u7edf\u4e00\u6846\u67b6\u90e8\u5206\u603b\u7ed3\u4e3a\uff1a\u8bb8\u591a\u770b\u4f3c\u4e0d\u540c\u7684\u635f\u5931\u51fd\u6570\uff0c\u5176\u5b9e\u90fd\u53ef\u4ee5\u7edf\u4e00\u7406\u89e3\u4e3a\u8d1f\u5bf9\u6570\u4f3c\u7136\u3002<\/p>\n\n\n<h4 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"%25e4%25ba%25a4%25e5%258f%2589%25e7%2586%25b5%25e6%25a6%2582%25e7%258e%2587%25e5%2588%2586%25e5%25b8%2583%25e4%25b9%258b%25e9%2597%25b4%25e7%259a%2584%25e5%258c%25b9%25e9%2585%258d\">\u4ea4\u53c9\u71b5\uff1a\u6982\u7387\u5206\u5e03\u4e4b\u95f4\u7684\u5339\u914d<\/h4>\n\n\n<p class=\"wp-block-paragraph\">\u5728\u5206\u7c7b\u95ee\u9898\u4e2d\uff0c\u6a21\u578b\u7684\u8f93\u51fa\u901a\u5e38\u4e0d\u662f\u4e00\u4e2a\u5355\u4e00\u6570\u503c\uff0c\u800c\u662f\u4e00\u4e2a\u6982\u7387\u5206\u5e03\u3002\u4f8b\u5982\uff0c\u5bf9\u4e8e\u4e00\u4e2a K \u5206\u7c7b\u95ee\u9898\uff0c\u771f\u5b9e\u6807\u7b7e\u53ef\u4ee5\u8868\u793a\u4e3a\u5206\u5e03 <math data-latex=\"p\"><semantics><mi>p<\/mi><annotation encoding=\"application\/x-tex\">p<\/annotation><\/semantics><\/math>\uff0c\u6a21\u578b\u9884\u6d4b\u53ef\u4ee5\u8868\u793a\u4e3a\u5206\u5e03 <math data-latex=\"q_\\theta\"><semantics><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><annotation encoding=\"application\/x-tex\">q_\\theta<\/annotation><\/semantics><\/math>\uff1a<math data-latex=\"p=(p_1,p_2,\\dots,p_K),\\quad q_\\theta=(q_1,q_2,\\dots,q_K)\"><semantics><mrow><mi>p<\/mi><mo>=<\/mo><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>p<\/mi><mn>1<\/mn><\/msub><mo separator=\"true\">,<\/mo><msub><mi>p<\/mi><mn>2<\/mn><\/msub><mo separator=\"true\">,<\/mo><mo>\u2026<\/mo><mo separator=\"true\">,<\/mo><msub><mi>p<\/mi><mi>K<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo separator=\"true\">,<\/mo><mspace width=\"1em\"><\/mspace><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo>=<\/mo><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>q<\/mi><mn>1<\/mn><\/msub><mo separator=\"true\">,<\/mo><msub><mi>q<\/mi><mn>2<\/mn><\/msub><mo separator=\"true\">,<\/mo><mo>\u2026<\/mo><mo separator=\"true\">,<\/mo><msub><mi>q<\/mi><mi>K<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">p=(p_1,p_2,\\dots,p_K),\\quad q_\\theta=(q_1,q_2,\\dots,q_K)<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u771f\u5b9e\u7c7b\u522b\u662f\u7b2c c \u7c7b\uff0c\u90a3\u4e48 one-hot \u6807\u7b7e\u6ee1\u8db3\uff1a<math data-latex=\"p_c=1,\\quad p_j=0\\ (j\\neq c)\"><semantics><mrow><msub><mi>p<\/mi><mi>c<\/mi><\/msub><mo>=<\/mo><mn>1<\/mn><mo separator=\"true\">,<\/mo><mspace width=\"1em\"><\/mspace><msub><mi>p<\/mi><mi>j<\/mi><\/msub><mo>=<\/mo><mn>0<\/mn><mtext>\u00a0<\/mtext><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>j<\/mi><mo>\u2260<\/mo><mi>c<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">p_c=1,\\quad p_j=0\\ (j\\neq c)<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ea4\u53c9\u71b5\u5b9a\u4e49\u4e3a\uff1a<math data-latex=\"H(p,q_\\theta)=-\\sum_{j=1}^{K}p_j\\log q_j\"><semantics><mrow><mi>H<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>p<\/mi><mo separator=\"true\">,<\/mo><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><mo form=\"prefix\" stretchy=\"false\">\u2212<\/mo><msubsup><mo movablelimits=\"false\">\u2211<\/mo><mrow><mi>j<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>K<\/mi><\/msubsup><msub><mi>p<\/mi><mi>j<\/mi><\/msub><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>q<\/mi><mi>j<\/mi><\/msub><\/mrow><annotation encoding=\"application\/x-tex\">H(p,q_\\theta)=-\\sum_{j=1}^{K}p_j\\log q_j<\/annotation><\/semantics><\/math>\uff0c\u5728 one-hot \u60c5\u51b5\u4e0b\uff0c\u5b83\u5316\u7b80\u4e3a\uff1a<math data-latex=\"H(p,q_\\theta)=-\\log q_c\"><semantics><mrow><mi>H<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>p<\/mi><mo separator=\"true\">,<\/mo><msub><mi>q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><mo form=\"prefix\" stretchy=\"false\">\u2212<\/mo><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>q<\/mi><mi>c<\/mi><\/msub><\/mrow><annotation encoding=\"application\/x-tex\">H(p,q_\\theta)=-\\log q_c<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e5f\u5c31\u662f\u8bf4\uff0c\u591a\u5206\u7c7b\u4ea4\u53c9\u71b5\u5c31\u662f\u8981\u6c42\u6a21\u578b\u7ed9\u771f\u5b9e\u7c7b\u522b\u5c3d\u53ef\u80fd\u9ad8\u7684\u6982\u7387\u3002\u82e5\u6a21\u578b\u7ed9\u771f\u5b9e\u7c7b\u522b\u7684\u6982\u7387\u4e3a 0.9\uff0c\u635f\u5931\u8f83\u5c0f\uff1b\u82e5\u6a21\u578b\u7ed9\u771f\u5b9e\u7c7b\u522b\u7684\u6982\u7387\u4e3a 0.01\uff0c\u635f\u5931\u4f1a\u5f88\u5927\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ea4\u53c9\u71b5\u4e0e\u4fe1\u606f\u8bba\u4e2d\u7684\u71b5\u548c KL \u6563\u5ea6\u6709\u5bc6\u5207\u5173\u7cfb\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u771f\u5b9e\u5206\u5e03 P \u4e0e\u6a21\u578b\u5206\u5e03 Q \u7684\u4ea4\u53c9\u71b5\u4e3a\uff1a<math data-latex=\"H(P,Q)=\\mathbb{E}_{x\\sim P}[-\\log Q(x)]\"><semantics><mrow><mi>H<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>P<\/mi><mo separator=\"true\">,<\/mo><mi>Q<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><msub><mi>\ud835\udd3c<\/mi><mrow><mi>x<\/mi><mo>\u223c<\/mo><mi>P<\/mi><\/mrow><\/msub><mo form=\"prefix\" stretchy=\"false\">[<\/mo><mo form=\"prefix\" stretchy=\"false\">\u2212<\/mo><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><mi>Q<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>x<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo form=\"postfix\" stretchy=\"false\">]<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">H(P,Q)=\\mathbb{E}_{x\\sim P}[-\\log Q(x)]<\/annotation><\/semantics><\/math><\/li>\n\n\n\n<li>\u53ef\u4ee5\u5206\u89e3\u4e3a\uff1a<math data-latex=\"H(P,Q)=H(P)+D_{\\mathrm{KL}}(P|Q)\"><semantics><mrow><mi>H<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>P<\/mi><mo separator=\"true\">,<\/mo><mi>Q<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><mi>H<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>P<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>+<\/mo><msub><mi>D<\/mi><mrow><mtext><\/mtext><mi>KL<\/mi><\/mrow><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>P<\/mi><mi>|<\/mi><mi>Q<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">H(P,Q)=H(P)+D_{\\mathrm{KL}}(P|Q)<\/annotation><\/semantics><\/math><\/li>\n\n\n\n<li>\u5176\u4e2d H(P) \u662f\u771f\u5b9e\u5206\u5e03\u81ea\u8eab\u7684\u71b5\uff1a<math data-latex=\"H(P)=\\mathbb{E}_{x\\sim P}[-\\log P(x)]\"><semantics><mrow><mi>H<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>P<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>=<\/mo><msub><mi>\ud835\udd3c<\/mi><mrow><mi>x<\/mi><mo>\u223c<\/mo><mi>P<\/mi><\/mrow><\/msub><mo form=\"prefix\" stretchy=\"false\">[<\/mo><mo form=\"prefix\" stretchy=\"false\">\u2212<\/mo><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><mi>P<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>x<\/mi><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo form=\"postfix\" stretchy=\"false\">]<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">H(P)=\\mathbb{E}_{x\\sim P}[-\\log P(x)]<\/annotation><\/semantics><\/math><\/li>\n\n\n\n<li>\u800c KL \u6563\u5ea6\u4e3a\uff1a<math data-latex=\"\\mathbb{E}_{x\\sim P}\\left[\\log\\frac{P(x)}{Q(x)}\\right]\"><semantics><mrow><msub><mi>\ud835\udd3c<\/mi><mrow><mi>x<\/mi><mo>\u223c<\/mo><mi>P<\/mi><\/mrow><\/msub><mrow><mo fence=\"true\" form=\"prefix\">[<\/mo><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><mfrac><mrow><mi>P<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>x<\/mi><mo form=\"postfix\" stretchy=\"false\" lspace=\"0em\" rspace=\"0em\">)<\/mo><\/mrow><mrow><mi>Q<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>x<\/mi><mo form=\"postfix\" stretchy=\"false\" lspace=\"0em\" rspace=\"0em\">)<\/mo><\/mrow><\/mfrac><mo fence=\"true\" form=\"postfix\">]<\/mo><\/mrow><\/mrow><annotation encoding=\"application\/x-tex\">\\mathbb{E}_{x\\sim P}\\left[\\log\\frac{P(x)}{Q(x)}\\right]<\/annotation><\/semantics><\/math><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u56e0\u4e3a\u771f\u5b9e\u5206\u5e03 P \u56fa\u5b9a\uff0c\u6240\u4ee5 H(P) \u5bf9\u6a21\u578b\u53c2\u6570 <math data-latex=\"\\theta\"><semantics><mi>\u03b8<\/mi><annotation encoding=\"application\/x-tex\">\\theta<\/annotation><\/semantics><\/math> \u6765\u8bf4\u662f\u5e38\u6570\u3002\u56e0\u6b64\uff0c\u6700\u5c0f\u5316\u4ea4\u53c9\u71b5\u7b49\u4ef7\u4e8e\u6700\u5c0f\u5316\uff1a<math data-latex=\"D_{\\mathrm{KL}}(P|Q_\\theta)\"><semantics><mrow><msub><mi>D<\/mi><mrow><mtext><\/mtext><mi>KL<\/mi><\/mrow><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>P<\/mi><mi>|<\/mi><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">D_{\\mathrm{KL}}(P|Q_\\theta)<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u5c31\u56de\u7b54\u4e86\u6700\u521d\u7684\u95ee\u9898\uff1a\u5982\u679c\u6211\u4eec\u8981\u6bd4\u8f83\u4e00\u4e2a\u771f\u5b9e\u6982\u7387\u6a21\u578b\u548c\u4e00\u4e2a\u5b66\u4e60\u5f97\u5230\u7684\u6982\u7387\u6a21\u578b\uff0c\u4ea4\u53c9\u71b5\u63d0\u4f9b\u4e86\u4e00\u79cd\u81ea\u7136\u65b9\u6cd5\u3002\u5b83\u8861\u91cf\u7684\u662f\uff1a\u5982\u679c\u771f\u5b9e\u6570\u636e\u6765\u81ea P\uff0c\u800c\u6211\u4eec\u5374\u7528 <math data-latex=\"Q_\\theta\"><semantics><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><annotation encoding=\"application\/x-tex\">Q_\\theta<\/annotation><\/semantics><\/math> \u53bb\u7f16\u7801\u6216\u89e3\u91ca\u8fd9\u4e9b\u6570\u636e\uff0c\u5e73\u5747\u9700\u8981\u4ed8\u51fa\u591a\u5c11\u989d\u5916\u4ee3\u4ef7\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u673a\u5668\u5b66\u4e60\u4e2d\uff0c\u7531\u4e8e\u771f\u5b9e\u5206\u5e03 (P) \u4e0d\u53ef\u76f4\u63a5\u83b7\u5f97\uff0c\u6211\u4eec\u7528\u6837\u672c\u5e73\u5747\u6765\u8fd1\u4f3c\u671f\u671b\uff1a<math data-latex=\"H(P,Q_\\theta) \\approx -\\frac{1}{n}\\sum_{i=1}^{n}\\log Q_\\theta(y_i|x_i)\"><semantics><mrow><mi>H<\/mi><mo form=\"prefix\" stretchy=\"false\">(<\/mo><mi>P<\/mi><mo separator=\"true\">,<\/mo><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><mo>\u2248<\/mo><mo form=\"prefix\" stretchy=\"false\">\u2212<\/mo><mfrac><mn>1<\/mn><mi>n<\/mi><\/mfrac><msubsup><mo movablelimits=\"false\">\u2211<\/mo><mrow><mi>i<\/mi><mo>=<\/mo><mn>1<\/mn><\/mrow><mi>n<\/mi><\/msubsup><mrow><mi>log<\/mi><mo>\u2061<\/mo><mspace width=\"0.1667em\"><\/mspace><\/mrow><msub><mi>Q<\/mi><mi>\u03b8<\/mi><\/msub><mo form=\"prefix\" stretchy=\"false\">(<\/mo><msub><mi>y<\/mi><mi>i<\/mi><\/msub><mi>|<\/mi><msub><mi>x<\/mi><mi>i<\/mi><\/msub><mo form=\"postfix\" stretchy=\"false\">)<\/mo><\/mrow><annotation encoding=\"application\/x-tex\">H(P,Q_\\theta) \\approx -\\frac{1}{n}\\sum_{i=1}^{n}\\log Q_\\theta(y_i|x_i)<\/annotation><\/semantics><\/math><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6b63\u662f\u5206\u7c7b\u4efb\u52a1\u4e2d\u5e38\u7528\u7684\u4ea4\u53c9\u71b5\u635f\u5931\uff0c\u4e5f\u5c31\u662f\u8d1f\u5bf9\u6570\u4f3c\u7136\u3002<\/p>\n\n\n<h4 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"%25e6%258d%259f%25e5%25a4%25b1%25e5%2587%25bd%25e6%2595%25b0%25e8%25ae%25be%25e8%25ae%25a1%25e7%259a%2584%25e5%258e%259f%25e5%2588%2599%25e6%2580%25bb%25e7%25bb%2593\">\u635f\u5931\u51fd\u6570\u8bbe\u8ba1\u7684\u539f\u5219\u603b\u7ed3<\/h4>\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u6700\u5c0f\u4e8c\u4e58\u6cd5\u3001\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\u548c\u4ea4\u53c9\u71b5\u4e2d\uff0c\u53ef\u4ee5\u603b\u7ed3\u51fa\u635f\u5931\u51fd\u6570\u8bbe\u8ba1\u7684\u51e0\u4e2a\u57fa\u672c\u539f\u5219\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e00\uff0c\u635f\u5931\u51fd\u6570\u5e94\u8be5\u5bf9\u5e94\u95ee\u9898\u76ee\u6807\u3002\u56de\u5f52\u95ee\u9898\u5173\u6ce8\u6570\u503c\u9884\u6d4b\u8bef\u5dee\uff0c\u5206\u7c7b\u95ee\u9898\u5173\u6ce8\u7c7b\u522b\u6982\u7387\uff0c\u6392\u5e8f\u95ee\u9898\u5173\u6ce8\u76f8\u5bf9\u987a\u5e8f\uff0c\u751f\u6210\u6a21\u578b\u5173\u6ce8\u6570\u636e\u5206\u5e03\u3002\u76ee\u6807\u4e0d\u540c\uff0c\u635f\u5931\u51fd\u6570\u81ea\u7136\u4e0d\u540c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e8c\uff0c\u635f\u5931\u51fd\u6570\u5e94\u8be5\u53cd\u6620\u5bf9\u6570\u636e\u566a\u58f0\u7684\u5047\u8bbe\u3002\u5982\u679c\u8ba4\u4e3a\u8bef\u5dee\u8fd1\u4f3c\u9ad8\u65af\u5206\u5e03\uff0c\u5e73\u65b9\u635f\u5931\u662f\u81ea\u7136\u9009\u62e9\uff1b\u5982\u679c\u8ba4\u4e3a\u5f02\u5e38\u503c\u8f83\u591a\uff0c\u7edd\u5bf9\u635f\u5931\u6216 Huber \u635f\u5931\u53ef\u80fd\u66f4\u5408\u9002\uff1b\u5982\u679c\u8f93\u51fa\u662f\u79bb\u6563\u7c7b\u522b\uff0c\u4ea4\u53c9\u71b5\u66f4\u7b26\u5408\u6982\u7387\u5efa\u6a21\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e09\uff0c\u635f\u5931\u51fd\u6570\u5e94\u8be5\u80fd\u591f\u6bd4\u8f83\u771f\u5b9e\u5206\u5e03\u4e0e\u6a21\u578b\u5206\u5e03\u3002\u7406\u60f3\u60c5\u51b5\u4e0b\uff0c\u6211\u4eec\u5e0c\u671b\u6700\u5c0f\u5316\u67d0\u79cd\u5206\u5e03\u5dee\u5f02\uff0c\u5982 KL \u6563\u5ea6\u3001\u4ea4\u53c9\u71b5\u6216\u5176\u4ed6 divergence\u3002\u7531\u4e8e\u771f\u5b9e\u5206\u5e03\u672a\u77e5\uff0c\u6211\u4eec\u901a\u5e38\u4f7f\u7528\u6837\u672c\u4e0a\u7684\u7ecf\u9a8c\u635f\u5931\u6765\u8fd1\u4f3c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u56db\uff0c\u635f\u5931\u51fd\u6570\u5e94\u8be5\u4fbf\u4e8e\u4f18\u5316\u3002\u4e00\u4e2a\u7406\u8bba\u4e0a\u5408\u7406\u4f46\u96be\u4ee5\u6c42\u5bfc\u3001\u975e\u8fde\u7eed\u3001\u6781\u5ea6\u4e0d\u7a33\u5b9a\u7684\u635f\u5931\u51fd\u6570\uff0c\u53ef\u80fd\u65e0\u6cd5\u5728\u5b9e\u9645\u8bad\u7ec3\u4e2d\u4f7f\u7528\u3002\u56e0\u6b64\uff0c\u635f\u5931\u51fd\u6570\u5f80\u5f80\u8fd8\u8981\u8003\u8651\u53ef\u5bfc\u6027\u3001\u51f8\u6027\u3001\u68af\u5ea6\u7a33\u5b9a\u6027\u7b49\u8ba1\u7b97\u6027\u8d28\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e94\uff0c\u635f\u5931\u51fd\u6570\u5e94\u8be5\u907f\u514d\u9519\u8bef\u6fc0\u52b1\u3002\u6a21\u578b\u4f1a\u6309\u7167\u635f\u5931\u51fd\u6570\u7684\u89c4\u5219\u5b66\u4e60\u3002\u5982\u679c\u635f\u5931\u51fd\u6570\u53ea\u5956\u52b1\u8868\u9762\u6307\u6807\uff0c\u6a21\u578b\u53ef\u80fd\u5b66\u5230\u4e0e\u771f\u5b9e\u76ee\u6807\u4e0d\u4e00\u81f4\u7684\u7b56\u7565\u3002\u4f8b\u5982\uff0c\u5728\u7c7b\u522b\u6781\u5ea6\u4e0d\u5e73\u8861\u7684\u95ee\u9898\u4e2d\uff0c\u666e\u901a\u4ea4\u53c9\u71b5\u53ef\u80fd\u4f1a\u8ba9\u6a21\u578b\u504f\u5411\u591a\u6570\u7c7b\uff0c\u6b64\u65f6\u9700\u8981\u52a0\u6743\u4ea4\u53c9\u71b5\u3001\u91cd\u91c7\u6837\u6216 focal loss \u7b49\u6539\u8fdb\u3002<\/p>\n\n\n<h4 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"%25e7%25bb%259f%25e4%25b8%2580%25e8%25a7%2586%25e8%25a7%2592%25e6%258d%259f%25e5%25a4%25b1%25e5%2587%25bd%25e6%2595%25b0%25e6%2598%25af%25e5%25bb%25ba%25e6%25a8%25a1%25e5%2581%2587%25e8%25ae%25be%25e7%259a%2584%25e5%25a4%2596%25e5%258c%2596\">\u7edf\u4e00\u89c6\u89d2\uff1a\u635f\u5931\u51fd\u6570\u662f\u5efa\u6a21\u5047\u8bbe\u7684\u5916\u5316<\/h4>\n\n\n<p class=\"wp-block-paragraph\">\u6211\u5728\u6b64\u5efa\u8bbe\u4e00\u4e2a\u6846\u67b6\uff1a<math data-latex=\"\\text{\u5efa\u6a21\u5047\u8bbe} \\rightarrow \\text{\u6982\u7387\u6a21\u578b} \\rightarrow \\text{\u4f3c\u7136\u51fd\u6570} \\rightarrow \\text{\u8d1f\u5bf9\u6570\u4f3c\u7136} \\rightarrow \\text{\u635f\u5931\u51fd\u6570}\"><semantics><mrow><mtext>\u5efa\u6a21\u5047\u8bbe<\/mtext><mo stretchy=\"false\">\u2192<\/mo><mtext>\u6982\u7387\u6a21\u578b<\/mtext><mo stretchy=\"false\">\u2192<\/mo><mtext>\u4f3c\u7136\u51fd\u6570<\/mtext><mo stretchy=\"false\">\u2192<\/mo><mtext>\u8d1f\u5bf9\u6570\u4f3c\u7136<\/mtext><mo stretchy=\"false\">\u2192<\/mo><mtext>\u635f\u5931\u51fd\u6570<\/mtext><\/mrow><annotation encoding=\"application\/x-tex\">\\text{\u5efa\u6a21\u5047\u8bbe} \\rightarrow \\text{\u6982\u7387\u6a21\u578b} \\rightarrow \\text{\u4f3c\u7136\u51fd\u6570} \\rightarrow \\text{\u8d1f\u5bf9\u6570\u4f3c\u7136} \\rightarrow \\text{\u635f\u5931\u51fd\u6570}<\/annotation><\/semantics><\/math>\uff0c\u5f88\u591a\u635f\u5931\u51fd\u6570\u90fd\u53ef\u4ee5\u770b\u4f5c\u67d0\u79cd\u6982\u7387\u6a21\u578b\u4e0b\u7684\u8d1f\u5bf9\u6570\u4f3c\u7136\u5f97\u5230\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5bf9\u56de\u5f52\u95ee\u9898\uff1a\u9ad8\u65af\u5206\u5e03\u2192\u6700\u5927\u5316\u4f3c\u7136\u2192\u6700\u5c0f\u5316\u8d1f\u5bf9\u6570\u4f3c\u7136\u2192\u5e73\u65b9\u635f\u5931<\/li>\n\n\n\n<li>\u5bf9\u5206\u7c7b\u95ee\u9898\uff1a\u7c7b\u522b\u5206\u5e03\u2192\u6700\u5927\u5316\u4f3c\u7136\u2192\u6700\u5c0f\u5316\u8d1f\u5bf9\u6570\u4f3c\u7136\u2192\u4ea4\u53c9\u71b5\u635f\u5931<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u8fd9\u4e2a\u89c6\u89d2\u770b\uff0c\u635f\u5931\u51fd\u6570\u4e0d\u662f\u4efb\u610f\u9009\u62e9\u7684\u8ba1\u7b97\u516c\u5f0f\uff0c\u800c\u662f\u6211\u4eec\u5bf9\u95ee\u9898\u7684\u7406\u89e3\u3001\u5bf9\u8bef\u5dee\u7684\u5047\u8bbe\u3001\u5bf9\u6a21\u578b\u597d\u574f\u7684\u8bc4\u4ef7\u6807\u51c6\u7684\u96c6\u4e2d\u4f53\u73b0\u3002<\/p>\n\n\n<h4 class=\"wp-block-heading joli-heading jtoc-heading\" id=\"%25e5%25b0%258f%25e7%25bb%2593\">\u5c0f\u7ed3<\/h4>\n\n\n<p class=\"wp-block-paragraph\">\u5b66\u4e60\u635f\u5931\u51fd\u6570\uff0c\u6700\u521d\u5f80\u5f80\u662f\u4ece\u8ba1\u7b97\u5f00\u59cb\u7684\u3002\u6211\u4eec\u4f1a\u8ba1\u7b97\u5747\u65b9\u8bef\u5dee\uff0c\u4f1a\u5c55\u5f00\u4f3c\u7136\u51fd\u6570\uff0c\u4f1a\u4ee3\u5165\u4ea4\u53c9\u71b5\u516c\u5f0f\u3002\u4f46\u771f\u6b63\u6df1\u5165\u7406\u89e3\u635f\u5931\u51fd\u6570\uff0c\u9700\u8981\u8fdb\u4e00\u6b65\u8ffd\u95ee\uff1a\u8fd9\u4e2a\u635f\u5931\u51fd\u6570\u5728\u60e9\u7f5a\u4ec0\u4e48\uff1f\u5b83\u5047\u8bbe\u6570\u636e\u5982\u4f55\u4ea7\u751f\uff1f\u5b83\u9f13\u52b1\u6a21\u578b\u5b66\u5230\u4ec0\u4e48\uff1f\u5b83\u4e0e\u771f\u5b9e\u5206\u5e03\u4e4b\u95f4\u7684\u5dee\u5f02\u6709\u4ec0\u4e48\u5173\u7cfb\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u8bf4\u6a21\u578b\u662f\u6211\u4eec\u5bf9\u4e16\u754c\u7684\u63cf\u8ff0\uff0c\u90a3\u4e48\u635f\u5931\u51fd\u6570\u5c31\u662f\u6211\u4eec\u8bc4\u4ef7\u8fd9\u79cd\u63cf\u8ff0\u662f\u5426\u51c6\u786e\u7684\u6807\u51c6\u3002\u8bbe\u8ba1\u635f\u5931\u51fd\u6570\uff0c\u672c\u8d28\u4e0a\u662f\u5728\u8bbe\u8ba1\u5b66\u4e60\u7684\u65b9\u5411\u3002\u6a21\u578b\u6700\u7ec8\u5b66\u5230\u4ec0\u4e48\uff0c\u5e76\u4e0d\u53ea\u53d6\u51b3\u4e8e\u7f51\u7edc\u7ed3\u6784\u6216\u4f18\u5316\u7b97\u6cd5\uff0c\u4e5f\u53d6\u51b3\u4e8e\u635f\u5931\u51fd\u6570\u544a\u8bc9\u5b83\uff1a\u4ec0\u4e48\u662f\u9519\u8bef\uff0c\u4ec0\u4e48\u662f\u66f4\u597d\u7684\u89e3\u91ca\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u540e\uff0c\u6211\u5c06\u635f\u5931\u51fd\u6570\u7684\u8bbe\u8ba1\u95ee\u9898\u6982\u62ec\u4e3a\u4e00\u53e5\u8bdd\uff1a<strong>\u635f\u5931\u51fd\u6570\u662f\u6a21\u578b\u4e0e\u771f\u5b9e\u4e16\u754c\u4e4b\u95f4\u5dee\u8ddd\u7684\u6570\u5b66\u8868\u8fbe<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u53c2\u8003\u4e0e\u542f\u53d1\uff1a<\/p>\n\n\n<ol class=\"wp-block-footnotes\"><li id=\"548e0e8b-b219-4c4e-9392-145ce4cdc8c3\"><a href=\"https:\/\/www.bilibili.com\/video\/BV1Y64y1Q7hi?spm_id_from=333.788.videopod.sections&amp;vd_source=fda50ec66424325130024051a613f144\">\u201c\u635f\u5931\u51fd\u6570\u201d\u662f\u5982\u4f55\u8bbe\u8ba1\u51fa\u6765\u7684\uff1f\u76f4\u89c2\u7406\u89e3\u201c\u6700\u5c0f\u4e8c\u4e58\u6cd5\u201d\u548c\u201c\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\u6cd5\u201d_\u54d4\u54e9\u54d4\u54e9_bilibili<\/a> <a href=\"#548e0e8b-b219-4c4e-9392-145ce4cdc8c3-link\" aria-label=\"\u8df3\u8f6c\u5230\u811a\u6ce8\u5f15\u7528 1\">\u21a9\ufe0e<\/a><\/li><\/ol>","protected":false},"excerpt":{"rendered":"<p>\u7ecf\u8fc7\u5927\u5b66\u8bfe\u7a0b\u7684\u5b66\u4e60\u4e0e\u8003\u8bd5\uff0c\u6211\u5584\u4e8e\u5404\u7c7b\u635f\u5931\u51fd\u6570\u7684\u8ba1\u7b97\uff0c\u4f46\u5bf9\u635f\u5931\u51fd\u6570\u662f\u5982\u4f55\u8bbe\u8ba1\u51fa\u6765\u7684\uff0c\u53ea\u6709\u4e00\u77e5\u534a\u89e3\u3002\u5728\u6b64\u8fdb\u884c\u63a2\u7a76\uff0c &hellip; <a href=\"https:\/\/xuzbo.top\/index.php\/2026\/05\/01\/loss-function%e6%8d%9f%e5%a4%b1%e5%87%bd%e6%95%b0%e7%9a%84%e8%ae%be%e8%ae%a1\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cLoss Function\u635f\u5931\u51fd\u6570\u7684\u8bbe\u8ba1\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"footnotes":"[{\"content\":\"<a href=\\\"https:\/\/www.bilibili.com\/video\/BV1Y64y1Q7hi?spm_id_from=333.788.videopod.sections&amp;vd_source=fda50ec66424325130024051a613f144\\\">\u201c\u635f\u5931\u51fd\u6570\u201d\u662f\u5982\u4f55\u8bbe\u8ba1\u51fa\u6765\u7684\uff1f\u76f4\u89c2\u7406\u89e3\u201c\u6700\u5c0f\u4e8c\u4e58\u6cd5\u201d\u548c\u201c\u6781\u5927\u4f3c\u7136\u4f30\u8ba1\u6cd5\u201d_\u54d4\u54e9\u54d4\u54e9_bilibili<\/a>\",\"id\":\"548e0e8b-b219-4c4e-9392-145ce4cdc8c3\"}]"},"categories":[7],"tags":[],"class_list":["post-286","post","type-post","status-publish","format-standard","hentry","category-7"],"_links":{"self":[{"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/posts\/286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/comments?post=286"}],"version-history":[{"count":4,"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/posts\/286\/revisions"}],"predecessor-version":[{"id":321,"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/posts\/286\/revisions\/321"}],"wp:attachment":[{"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/media?parent=286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/categories?post=286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xuzbo.top\/index.php\/wp-json\/wp\/v2\/tags?post=286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}