{"id":5786,"date":"2022-08-15T09:10:29","date_gmt":"2022-08-15T01:10:29","guid":{"rendered":"http:\/\/139.9.1.231\/?p=5786"},"modified":"2022-08-15T14:50:27","modified_gmt":"2022-08-15T06:50:27","slug":"electra","status":"publish","type":"post","link":"http:\/\/139.9.1.231\/index.php\/2022\/08\/15\/electra\/","title":{"rendered":"ELECTRA\uff1a \u8d85\u8d8aBERT, 19\u5e74\u6700\u4f73NLP\u9884\u8bad\u7ec3\u6a21\u578b"},"content":{"rendered":"\n<p>ELECTRA\u7684\u5168\u79f0\u662fEfficiently Learning an Encoder that Classifies Token Replacements Accurately<\/p>\n\n\n\n<p class=\"has-light-pink-background-color has-background\">Github\uff1a <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/ymcui\/Chinese-ELECTRA\" target=\"_blank\">https:\/\/github.com\/ymcui\/Chinese-ELECTRA<\/a><\/p>\n\n\n\n<p class=\"has-light-pink-background-color has-background\">ELECTRA \uff1a  <a href=\"https:\/\/arxiv.org\/abs\/2003.10555\">https:\/\/arxiv.org\/abs\/2003.10555<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"585\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-194-1024x585.png\" alt=\"\" class=\"wp-image-5791\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-194-1024x585.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-194-300x171.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-194-768x439.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-194-1536x877.png 1536w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-194.png 1543w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>      \u53f3\u8fb9\u7684\u56fe\u662f\u5de6\u8fb9\u7684\u653e\u5927\u7248\uff0c\u7eb5\u8f74\u662fGLUE\u5206\u6570\uff0c\u6a2a\u8f74\u662fFLOPs (floating point operations)\uff0cTensorflow\u4e2d\u63d0\u4f9b\u7684\u6d6e\u70b9\u6570\u8ba1\u7b97\u91cf\u7edf\u8ba1\u3002\u4ece\u4e0a\u56fe\u53ef\u4ee5\u770b\u5230\uff0c\u540c\u7b49\u91cf\u7ea7\u7684ELECTRA\u662f\u4e00\u76f4\u78be\u538bBERT\u7684\uff0c\u800c\u4e14\u5728\u8bad\u7ec3\u66f4\u957f\u7684\u6b65\u6570\u4e4b\u540e\uff0c\u8fbe\u5230\u4e86\u5f53\u65f6\u7684SOTA\u6a21\u578b\u2014\u2014RoBERTa\u7684\u6548\u679c\u3002\u4ece\u5de6\u56fe\u66f2\u7ebf\u4e0a\u4e5f\u53ef\u4ee5\u770b\u5230\uff0cELECTRA\u6548\u679c\u8fd8\u6709\u7ee7\u7eed\u4e0a\u5347\u7684\u7a7a\u95f4<\/p>\n\n\n\n<h3><strong>2. \u6a21\u578b\u7ed3\u6784<\/strong><\/h3>\n\n\n\n<p><strong>NLP\u5f0f\u7684Generator-Discriminator<\/strong><\/p>\n\n\n\n<p>ELECTRA\u6700\u4e3b\u8981\u7684\u8d21\u732e\u662f\u63d0\u51fa\u4e86\u65b0\u7684\u9884\u8bad\u7ec3\u4efb\u52a1\u548c\u6846\u67b6\uff0c\u628a\u751f\u6210\u5f0f\u7684Masked language model(MLM)\u9884\u8bad\u7ec3\u4efb\u52a1\u6539\u6210\u4e86\u5224\u522b\u5f0f\u7684Replaced token detection(RTD)\u4efb\u52a1\uff0c\u5224\u65ad\u5f53\u524dtoken\u662f\u5426\u88ab\u8bed\u8a00\u6a21\u578b\u66ff\u6362\u8fc7\u3002\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff0c\u6211\u968f\u673a\u66ff\u6362\u4e00\u4e9b\u8f93\u5165\u4e2d\u7684\u5b57\u8bcd\uff0c\u518d\u8ba9BERT\u53bb\u9884\u6d4b\u662f\u5426\u66ff\u6362\u8fc7\u53ef\u4ee5\u5417\uff1f\u53ef\u4ee5\u7684\uff0c\u56e0\u4e3a\u6211\u5c31\u8fd9\u4e48\u505a\u8fc7\uff0c\u4f46\u6548\u679c\u5e76\u4e0d\u597d\uff0c\u56e0\u4e3a\u968f\u673a\u66ff\u6362<strong>\u592a\u7b80\u5355\u4e86<\/strong>\u3002<\/p>\n\n\n\n<p>\u90a3\u600e\u6837\u4f7f\u4efb\u52a1\u590d\u6742\u5316\u5462\uff1f\u3002\u3002\u3002\u54a6\uff0c\u54b1\u4eec\u4e0d\u662f\u6709\u9884\u8bad\u7ec3\u4e00\u4e2aMLM\u6a21\u578b\u5417\uff1f<\/p>\n\n\n\n<p>\u4e8e\u662f\u4f5c\u8005\u5c31\u5e72\u8106\u4f7f\u7528\u4e00\u4e2aMLM\u7684G-BERT\u6765\u5bf9\u8f93\u5165\u53e5\u5b50\u8fdb\u884c\u66f4\u6539\uff0c\u7136\u540e\u4e22\u7ed9D-BERT\u53bb\u5224\u65ad\u54ea\u4e2a\u5b57\u88ab\u6539\u8fc7\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"268\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-195-1024x268.png\" alt=\"\" class=\"wp-image-5800\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-195-1024x268.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-195-300x78.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-195-768x201.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-195.png 1500w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u4e8e\u662f\uff0c\u6211\u4eecNLPer\u7ec8\u4e8e\u6210\u529f\u5730\u628aCV\u7684GAN\u62ff\u8fc7\u6765\u4e86\uff01<\/p>\n\n\n\n<p><strong>Replaced Token Detection<\/strong><\/p>\n\n\n\n<p>\u4f46\u4e0a\u8ff0\u7ed3\u6784\u6709\u4e2a\u95ee\u9898\uff0c\u8f93\u5165\u53e5\u5b50\u7ecf\u8fc7\u751f\u6210\u5668\uff0c\u8f93\u51fa\u6539\u5199\u8fc7\u7684\u53e5\u5b50\uff0c\u56e0\u4e3a\u53e5\u5b50\u7684\u5b57\u8bcd\u662f\u79bb\u6563\u7684\uff0c\u6240\u4ee5\u68af\u5ea6\u5728\u8fd9\u91cc\u5c31\u65ad\u4e86\uff0c\u5224\u522b\u5668\u7684\u68af\u5ea6\u65e0\u6cd5\u4f20\u7ed9\u751f\u6210\u5668\uff0c\u4e8e\u662f\u751f\u6210\u5668\u7684\u8bad\u7ec3\u76ee\u6807\u8fd8\u662fMLM\uff08\u4f5c\u8005\u5728\u540e\u6587\u4e5f\u9a8c\u8bc1\u4e86\u8fd9\u79cd\u65b9\u6cd5\u66f4\u597d\uff09\uff0c\u5224\u522b\u5668\u7684\u76ee\u6807\u662f\u5e8f\u5217\u6807\u6ce8\uff08\u5224\u65ad\u6bcf\u4e2atoken\u662f\u771f\u662f\u5047\uff09\uff0c\u4e24\u8005\u540c\u65f6\u8bad\u7ec3\uff0c\u4f46<strong>\u5224\u522b\u5668\u7684\u68af\u5ea6\u4e0d\u4f1a\u4f20\u7ed9\u751f\u6210\u5668<\/strong>\uff0c\u76ee\u6807\u51fd\u6570\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-196.png\" alt=\"\" class=\"wp-image-5802\" width=\"478\" height=\"70\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-196.png 780w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-196-300x45.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-196-768x114.png 768w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/figure><\/div>\n\n\n\n<p>\u56e0\u4e3a\u5224\u522b\u5668\u7684\u4efb\u52a1\u76f8\u5bf9\u6765\u8bf4\u5bb9\u6613\u4e9b\uff0cRTD loss\u76f8\u5bf9MLM loss\u4f1a\u5f88\u5c0f\uff0c\u56e0\u6b64\u52a0\u4e0a\u4e00\u4e2a\u7cfb\u6570\uff0c\u4f5c\u8005\u8bad\u7ec3\u65f6\u4f7f\u7528\u4e8650\u3002<\/p>\n\n\n\n<p>\u53e6\u5916\u8981\u6ce8\u610f\u7684\u4e00\u70b9\u662f\uff0c<strong>\u5728\u4f18\u5316\u5224\u522b\u5668\u65f6\u8ba1\u7b97\u4e86\u6240\u6709token\u4e0a\u7684loss\uff0c\u800c\u4ee5\u5f80\u8ba1\u7b97BERT\u7684MLM loss\u65f6\u4f1a\u5ffd\u7565\u6ca1\u88abmask\u7684token<\/strong>\u3002\u4f5c\u8005\u5728\u540e\u6765\u7684\u5b9e\u9a8c\u4e2d\u4e5f\u9a8c\u8bc1\u4e86\u5728\u6240\u6709token\u4e0a\u8fdb\u884closs\u8ba1\u7b97\u4f1a\u63d0\u5347\u6548\u7387\u548c\u6548\u679c\u3002<\/p>\n\n\n\n<p>\u4e8b\u5b9e\u4e0a\uff0cELECTRA\u4f7f\u7528\u7684Generator-Discriminator\u67b6\u6784\u4e0eGAN\u8fd8\u662f\u6709\u4e0d\u5c11\u5dee\u522b\uff0c\u4f5c\u8005\u5217\u51fa\u4e86\u5982\u4e0b\u51e0\u70b9\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"276\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-197-1024x276.png\" alt=\"\" class=\"wp-image-5803\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-197-1024x276.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-197-300x81.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-197-768x207.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-197.png 1482w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3><strong>3. \u5b9e\u9a8c\u53ca\u7ed3\u8bba<\/strong><\/h3>\n\n\n\n<p>\u521b\u65b0\u603b\u662f\u4e0d\u6613\u7684\uff0c\u6709\u4e86\u4e0a\u8ff0\u601d\u60f3\u4e4b\u540e\uff0c\u53ef\u4ee5\u770b\u5230\u4f5c\u8005\u8fdb\u884c\u4e86\u5927\u91cf\u7684\u5b9e\u9a8c\uff0c\u6765\u9a8c\u8bc1\u6a21\u578b\u7ed3\u6784\u3001\u53c2\u6570\u3001\u8bad\u7ec3\u65b9\u5f0f\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<p><strong>Weight Sharing<\/strong><\/p>\n\n\n\n<p>\u751f\u6210\u5668\u548c\u5224\u522b\u5668\u7684\u6743\u91cd\u5171\u4eab\u662f\u5426\u53ef\u4ee5\u63d0\u5347\u6548\u679c\u5462\uff1f\u4f5c\u8005\u8bbe\u7f6e\u4e86\u76f8\u540c\u5927\u5c0f\u7684\u751f\u6210\u5668\u548c\u5224\u522b\u5668\uff0c\u5728\u4e0d\u5171\u4eab\u6743\u91cd\u4e0b\u7684\u6548\u679c\u662f83.6\uff0c\u53ea\u5171\u4eabtoken embedding\u5c42\u7684\u6548\u679c\u662f84.3\uff0c\u5171\u4eab\u6240\u6709\u6743\u91cd\u7684\u6548\u679c\u662f84.4\u3002\u4f5c\u8005\u8ba4\u4e3a<strong>\u751f\u6210\u5668\u5bf9embedding\u6709\u66f4\u597d\u7684\u5b66\u4e60\u80fd\u529b<\/strong>\uff0c\u56e0\u4e3a\u5728\u8ba1\u7b97MLM\u65f6\uff0csoftmax\u662f\u5efa\u7acb\u5728\u6240\u6709vocab\u4e0a\u7684\uff0c\u4e4b\u540e\u53cd\u5411\u4f20\u64ad\u65f6\u4f1a\u66f4\u65b0\u6240\u6709embedding\uff0c\u800c\u5224\u522b\u5668\u53ea\u4f1a\u66f4\u65b0\u8f93\u5165\u7684token embedding\u3002\u6700\u540e\u4f5c\u8005\u53ea\u4f7f\u7528\u4e86embedding sharing\u3002<\/p>\n\n\n\n<p><strong>Smaller Generators<\/strong><\/p>\n\n\n\n<p>\u4ece\u6743\u91cd\u5171\u4eab\u7684\u5b9e\u9a8c\u4e2d\u770b\u5230\uff0c\u751f\u6210\u5668\u548c\u5224\u522b\u5668\u53ea\u9700\u8981\u5171\u4eabembedding\u7684\u6743\u91cd\u5c31\u8db3\u77e3\u4e86\uff0c\u90a3\u8fd9\u6837\u7684\u8bdd\u662f\u5426\u53ef\u4ee5\u7f29\u5c0f\u751f\u6210\u5668\u7684\u5c3a\u5bf8\u8fdb\u884c\u8bad\u7ec3\u6548\u7387\u63d0\u5347\u5462\uff1f\u4f5c\u8005\u5728\u4fdd\u6301\u539f\u6709hidden size\u7684\u8bbe\u7f6e\u4e0b\u51cf\u5c11\u4e86\u5c42\u6570\uff0c\u5f97\u5230\u4e86\u4e0b\u56fe\u6240\u793a\u7684\u5173\u7cfb\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"654\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-198-1024x654.png\" alt=\"\" class=\"wp-image-5805\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-198-1024x654.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-198-300x192.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-198-768x491.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-198.png 1448w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0c<strong>\u751f\u6210\u5668\u7684\u5927\u5c0f\u5728\u5224\u522b\u5668\u76841\/4\u52301\/2\u4e4b\u95f4\u6548\u679c\u662f\u6700\u597d\u7684<\/strong>\u3002\u4f5c\u8005\u8ba4\u4e3a\u539f\u56e0\u662f<strong>\u8fc7\u5f3a\u7684\u751f\u6210\u5668\u4f1a\u589e\u5927\u5224\u522b\u5668\u7684\u96be\u5ea6<\/strong>\uff08\u5224\u522b\u5668\uff1a\u5c0f\u4e00\u70b9\u5427\uff0c\u6211\u592a\u96be\u4e86\uff09\u3002<\/p>\n\n\n\n<p><strong>Training Algorithms<\/strong><\/p>\n\n\n\n<p>\u5b9e\u9645\u4e0a\u9664\u4e86MLM loss\uff0c\u4f5c\u8005\u4e5f\u5c1d\u8bd5\u4e86\u53e6\u5916\u4e24\u79cd\u8bad\u7ec3\u7b56\u7565\uff1a<\/p>\n\n\n\n<ol><li>Adversarial Contrastive Estimation\uff1aELECTRA\u56e0\u4e3a\u4e0a\u8ff0\u4e00\u4e9b\u95ee\u9898\u65e0\u6cd5\u4f7f\u7528GAN\uff0c\u4f46\u4e5f\u53ef\u4ee5\u4ee5\u4e00\u79cd\u5bf9\u6297\u5b66\u4e60\u7684\u601d\u60f3\u6765\u8bad\u7ec3\u3002\u4f5c\u8005\u5c06\u751f\u6210\u5668\u7684\u76ee\u6807\u51fd\u6570\u7531\u6700\u5c0f\u5316MLM loss\u6362\u6210\u4e86<strong>\u6700\u5927\u5316\u5224\u522b\u5668\u5728\u88ab\u66ff\u6362token\u4e0a\u7684RTD loss<\/strong>\u3002\u4f46\u8fd8\u6709\u4e00\u4e2a\u95ee\u9898\uff0c\u5c31\u662f\u65b0\u7684\u751f\u6210\u5668loss\u65e0\u6cd5\u7528\u68af\u5ea6\u4e0a\u5347\u66f4\u65b0\u751f\u6210\u5668\uff0c\u4e8e\u662f\u4f5c\u8005\u7528\u5f3a\u5316\u5b66\u4e60Policy Gradient\u7684\u601d\u60f3\uff0c\u6700\u7ec8\u4f18\u5316\u4e0b\u6765\u751f\u6210\u5668\u5728MLM\u4efb\u52a1\u4e0a\u53ef\u4ee5\u8fbe\u523054%\u7684\u51c6\u786e\u7387\uff0c\u800c\u4e4b\u524dMLE\u4f18\u5316\u4e0b\u53ef\u4ee5\u8fbe\u523065%\u3002\uff08\u611f\u8c22&nbsp;<a target=\"_blank\" href=\"https:\/\/www.zhihu.com\/people\/99293c9cbd16e6df89186e59653792e8\" rel=\"noreferrer noopener\">@\u963f\u96ea\u6211\u8981<\/a>&nbsp;\u52d8\u8bef\uff09<\/li><li>Two-stage training\uff1a\u5373\u5148\u8bad\u7ec3\u751f\u6210\u5668\uff0c\u7136\u540efreeze\u6389\uff0c\u7528\u751f\u6210\u5668\u7684\u6743\u91cd\u521d\u59cb\u5316\u5224\u522b\u5668\uff0c\u518d\u63a5\u7740\u8bad\u7ec3\u76f8\u540c\u6b65\u6570\u7684\u5224\u522b\u5668\u3002<\/li><\/ol>\n\n\n\n<p>\u5bf9\u6bd4\u4e09\u79cd\u8bad\u7ec3\u7b56\u7565\uff0c\u5f97\u5230\u4e0b\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"827\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-199-1024x827.png\" alt=\"\" class=\"wp-image-5806\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-199-1024x827.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-199-300x242.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-199-768x621.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-199.png 1115w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u53ef\u89c1\u201c\u9694\u79bb\u5f0f\u201d\u7684\u8bad\u7ec3\u7b56\u7565\u6548\u679c\u8fd8\u662f\u6700\u597d\u7684\uff0c\u800c\u4e24\u6bb5\u5f0f\u7684\u8bad\u7ec3\u867d\u7136\u5f31\u4e00\u4e9b\uff0c\u4f5c\u8005\u731c\u6d4b\u662f\u751f\u6210\u5668\u592a\u5f3a\u4e86\u5bfc\u81f4\u5224\u522b\u4efb\u52a1\u96be\u5ea6\u589e\u5927\uff0c\u4f46\u6700\u7ec8\u6548\u679c\u4e5f\u6bd4BERT\u672c\u8eab\u8981\u5f3a\uff0c\u8fdb\u4e00\u6b65\u8bc1\u660e\u4e86\u5224\u522b\u5f0f\u9884\u8bad\u7ec3\u7684\u6548\u679c\u3002<\/p>\n\n\n\n<p><strong>Small model? Big model\uff1f<\/strong><\/p>\n\n\n\n<p>\u8fd9\u4e24\u8282\u771f\u662f\u540a\u6253\u4e4b\u524d\u7684\u6a21\u578b\uff0c\u4f5c\u8005\u91cd\u7533\u4e86\u4ed6\u7684\u4e3b\u8981\u76ee\u7684\u662f\u63d0\u5347\u9884\u8bad\u7ec3\u6548\u7387\uff0c\u4e8e\u662f\u505a\u4e86GPU\u5355\u5361\u5c31\u53ef\u4ee5\u6109\u5feb\u8bad\u7ec3\u7684ELECTRA-Small\u548cBERT-Small\uff0c\u63a5\u7740\u548c\u5c3a\u5bf8\u4e0d\u53d8\u7684ELMo\u3001GPT\u7b49\u8fdb\u884c\u5bf9\u6bd4\uff0c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"269\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-200-1024x269.png\" alt=\"\" class=\"wp-image-5807\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-200-1024x269.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-200-300x79.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-200-768x202.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-200.png 1081w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u6570\u636e\u7b80\u76f4\u4f18\u79c0\uff0c\u4ec5\u752814M\u53c2\u6570\u91cf\uff0c\u4ee5\u524d13%\u7684\u4f53\u79ef\uff0c\u5728\u63d0\u5347\u4e86\u8bad\u7ec3\u901f\u5ea6\u7684\u540c\u65f6\u8fd8\u63d0\u5347\u4e86\u6548\u679c\uff0c\u8fd9\u91cc\u6211\u75af\u72c2\u70b9\u8d5e\u3002<\/p>\n\n\n\n<p>\u5c0fELECTRA\u7684\u672c\u4e8b\u6211\u4eec\u89c1\u8fc7\u4e86\uff0c\u90a3\u5927ELECTRA\u884c\u5417\uff1f\u76f4\u63a5\u4e0a\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"358\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-201-1024x358.png\" alt=\"\" class=\"wp-image-5808\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-201-1024x358.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-201-300x105.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-201-768x268.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-201.png 1068w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u4e0a\u9762\u662f\u5404\u4e2a\u6a21\u578b\u5728GLUE dev\/text\u4e0a\u7684\u8868\u73b0\uff0c\u53ef\u4ee5\u770b\u5230ELECTRA\u4ec5\u7528\u4e861\/4\u7684\u8ba1\u7b97\u91cf\u5c31\u8fbe\u5230\u4e86RoBERTa\u7684\u6548\u679c\u3002\u800c\u4e14\u4f5c\u8005\u4f7f\u7528\u7684\u662fXLNet\u7684\u8bed\u6599\uff0c\u5927\u7ea6\u662f126G\uff0c\u4f46RoBERTa\u7528\u4e86160G\u3002\u7531\u4e8e\u65f6\u95f4\u548c\u7cbe\u529b\u95ee\u9898\uff0c\u4f5c\u8005\u4eec\u6ca1\u6709\u628aELECTRA\u8bad\u7ec3\u66f4\u4e45\uff08\u5e94\u8be5\u4f1a\u6709\u63d0\u5347\uff09\uff0c\u4e5f\u6ca1\u6709\u4f7f\u7528\u5404\u79cd\u699c\u5355Trick\uff0c\u6240\u4ee5\u771f\u6b63\u7684GLUE test\u4e0a\u8868\u73b0\u4e00\u822c\uff08\u73b0\u5728\u7684T5\u662f89.7\uff0cRoBERTa\u662f88.5\uff0c\u6ca1\u770b\u5230ELECTRA\uff09\u3002<\/p>\n\n\n\n<p><strong>Efficiency Analysis<\/strong><\/p>\n\n\n\n<p>\u524d\u6587\u4e2d\u63d0\u5230\u4e86\uff0cBERT\u7684loss\u53ea\u8ba1\u7b97\u88ab\u66ff\u6362\u768415%\u4e2atoken\uff0c\u800cELECTRA\u662f\u5168\u90e8\u90fd\u8ba1\u7b97\u7684\uff0c\u6240\u4ee5\u4f5c\u8005\u53c8\u505a\u4e86\u51e0\u4e2a\u5b9e\u9a8c\uff0c\u63a2\u7a76\u54ea\u79cd\u65b9\u5f0f\u66f4\u597d\u4e00\u4e9b\uff1a<\/p>\n\n\n\n<ol><li>ELECTRA 15%\uff1a\u8ba9\u5224\u522b\u5668\u53ea\u8ba1\u7b9715% token\u4e0a\u7684\u635f\u5931<\/li><li>Replace MLM\uff1a\u8bad\u7ec3BERT MLM\uff0c\u8f93\u5165\u4e0d\u7528[MASK]\u8fdb\u884c\u66ff\u6362\uff0c\u800c\u662f\u5176\u4ed6\u751f\u6210\u5668\u3002\u8fd9\u6837\u53ef\u4ee5\u6d88\u9664\u8fd9\u79cdpretrain-finetune\u76f4\u63a5\u7684diff\u3002<\/li><li>All-Tokens MLM\uff1a\u63a5\u7740\u7528Replace MLM\uff0c\u53ea\u4e0d\u8fc7BERT\u7684\u76ee\u6807\u51fd\u6570\u53d8\u4e3a\u9884\u6d4b\u6240\u6709\u7684token\uff0c\u6bd4\u8f83\u63a5\u8fd1ELECTRA\u3002<\/li><\/ol>\n\n\n\n<p>\u4e09\u79cd\u5b9e\u9a8c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"103\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-202-1024x103.png\" alt=\"\" class=\"wp-image-5809\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-202-1024x103.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-202-300x30.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-202-768x77.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-202.png 1071w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff1a<\/p>\n\n\n\n<ol><li>\u5bf9\u6bd4ELECTRA\u548cELECTRA 15%\uff1a\u5728\u6240\u6709token\u4e0a\u8ba1\u7b97loss\u786e\u5b9e\u80fd\u63d0\u5347\u6548\u679c<\/li><li>\u5bf9\u6bd4Replace MLM\u548cBERT\uff1a[MASK]\u6807\u5fd7\u786e\u5b9e\u4f1a\u5bf9BERT\u4ea7\u751f\u5f71\u54cd\uff0c\u800c\u4e14BERT\u76ee\u524d\u8fd8\u6709\u4e00\u4e2atrick\uff0c\u5c31\u662f\u88ab\u66ff\u6362\u768410%\u60c5\u51b5\u4e0b\u4f7f\u7528\u539ftoken\u6216\u5176\u4ed6token\uff0c\u5982\u679c\u6ca1\u6709\u8fd9\u4e2atrick\u4f30\u8ba1\u6548\u679c\u4f1a\u5dee\u4e00\u4e9b\u3002<\/li><li>\u5bf9\u6bd4All-Tokens MLM\u548cBERT\uff1a\u5982\u679cBERT\u9884\u6d4b\u6240\u6709token \u7684\u8bdd\uff0c\u6548\u679c\u4f1a\u63a5\u8fd1ELECTRA<\/li><\/ol>\n\n\n\n<p>\u53e6\u5916\uff0c\u4f5c\u8005\u8fd8\u53d1\u73b0\uff0cELECTRA\u4f53\u79ef\u8d8a\u5c0f\uff0c\u76f8\u6bd4\u4e8eBERT\u5c31\u63d0\u5347\u7684\u8d8a\u660e\u663e\uff0c\u8bf4\u660efully trained\u7684ELECTRA\u6548\u679c\u4f1a\u66f4\u597d\u3002\u53e6\u5916\u4f5c\u8005\u63a8\u65ad\uff0c<strong>\u7531\u4e8eELECTRA\u662f\u5224\u522b\u5f0f\u4efb\u52a1\uff0c\u4e0d\u7528\u5bf9\u6574\u4e2a\u6570\u636e\u5206\u5e03\u5efa\u6a21\uff0c\u6240\u4ee5\u66f4parameter-efficient<\/strong>\u3002<\/p>\n\n\n\n<h3><strong>4. \u603b\u7ed3<\/strong><\/h3>\n\n\n\n<p>\u65e0\u610f\u4e2d\u53d1\u73b0\u4e86\u8fd9\u7bc7\u8fd8\u5728ICLR\u76f2\u5ba1\u7684ELECTRA\uff0c\u8bfb\u5b8c\u6458\u8981\u5c31\u89c9\u5f97\u53d1\u73b0\u4e86\u65b0\u5927\u9646\uff0c\u4e3b\u8981\u662f\u81ea\u5df1\u4e5f\u8bd5\u8fc7Replaced Token Detection\u8fd9\u4e2a\u4efb\u52a1\uff0c\u56e0\u4e3a\u5e73\u65f6\u4efb\u52a1\u6548\u679c\u7684\u5206\u6790\u548c\u4e0d\u4e45\u524d\u770b\u7684\u4e00\u7bc7\u6587\u7ae0\uff0c\u8ba9\u6211\u6df1\u523b\u611f\u53d7\u5230\u4e86<strong>BERT\u867d\u7136\u5bf9\u4e0a\u4e0b\u6587\u6709\u5f88\u5f3a\u7684\u7f16\u7801\u80fd\u529b\uff0c\u5374\u7f3a\u4e4f\u7ec6\u7c92\u5ea6\u8bed\u4e49\u7684\u8868\u793a<\/strong>\uff0c\u6211\u7528\u4e00\u5f20\u56fe\u8868\u793a\u5927\u5bb6\u5c31\u660e\u767d\u4e86\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"604\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-203-1024x604.png\" alt=\"\" class=\"wp-image-5810\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-203-1024x604.png 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-203-300x177.png 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-203-768x453.png 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/image-203.png 1053w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u8fd9\u662f\u628atoken\u7f16\u7801\u964d\u7ef4\u540e\u7684\u6548\u679c\uff0c\u53ef\u4ee5\u770b\u5230sky\u548csea\u660e\u660e\u662f\u5929\u4e0e\u6d77\u7684\u533a\u522b\uff0c\u5374\u56e0\u4e3a\u4e0a\u4e0b\u6587\u4e00\u6837\u800c\u5f97\u5230\u4e86\u6781\u4e3a\u76f8\u4f3c\u7684\u7f16\u7801\u3002\u7ec6\u7c92\u5ea6\u8868\u793a\u80fd\u529b\u7684\u7f3a\u5931\u4f1a\u5bf9\u771f\u5b9e\u4efb\u52a1\u9020\u6210\u5f88\u5927\u5f71\u54cd\uff0c\u5982\u679c\u88ab\u9488\u5bf9\u6027\u653b\u51fb\u7684\u8bdd\u66f4\u662f\u65e0\u529b\uff0c\u6240\u4ee5\u5f53\u65f6\u5c31\u60f3\u529e\u6cd5\u52a0\u4e0a\u66f4\u7ec6\u7c92\u5ea6\u7684\u4efb\u52a1\u8ba9BERT\u53bb\u533a\u5206\u6bcf\u4e2atoken\uff0c\u4e0d\u8fc7\u540c\u53e5\u5185\u968f\u673a\u66ff\u6362\u7684\u6548\u679c\u5e76\u4e0d\u597d\u3002\u76f8\u4fe1\u8fd9\u4e2a\u4efb\u52a1\u5f88\u591a\u4eba\u90fd\u60f3\u5230\u8fc7\uff0c\u4e0d\u8fc7\u90fd\u6ca1\u6709\u63a2\u7d22\u8fd9\u4e48\u6df1\u5165\uff0c\u8fd9\u4e5f\u544a\u8beb\u6211\u4eec\uff0cidea\u904d\u5730\u90fd\u662f\uff0c\u5f80\u4e0b\u6316\u624d\u80fd\u6709SOTA\u3002<\/p>\n\n\n\n<p><strong>ELECTRA\u662fBERT\u63a8\u51fa\u8fd9\u4e00\u5e74\u6765\u6211\u89c1\u8fc7\u6700\u8d5e\u7684idea\uff0c\u5b83\u4e0d\u4ec5\u63d0\u51fa\u4e86\u80fd\u6253\u8d25MLM\u7684\u9884\u8bad\u7ec3\u4efb\u52a1\uff0c\u66f4\u63a8\u51fa\u4e86\u4e00\u79cd\u5341\u5206\u9002\u7528\u4e8eNLP\u7684\u7c7bGAN\u6846\u67b6<\/strong>\u3002\u6bd5\u7adfGAN\u592a\u725b\u903c\u4e86\uff0c\u770b\u5230deepfake\u7684\u65f6\u5019\u6211\u5c31\u60f3\uff0c\u4ec0\u4e48\u65f6\u5019\u6211\u4eec\u4e5f\u80fddeepcheat\uff0c\u4f46\u542c\u8bf4GAN\u5728NLP\u4e0a\u7684\u6548\u679c\u4e00\u76f4\u4e0d\u592a\u597d\uff0c\u8fd9\u6b21ELECTRA\u867d\u7136\u53ea\u7528\u4e86\u5224\u522b\u5668\uff0c\u4f46\u4e2a\u4eba\u8ba4\u4e3a\u4e5f\u5728\u4e00\u5b9a\u7a0b\u5ea6\u4e0a\u6253\u5f00\u4e86\u6f58\u591a\u62c9\u9b54\u76d2\u3002<\/p>\n\n\n\n<p class=\"has-light-pink-background-color has-background\"><strong>\u7b97\u6cd5\u5de5\u7a0b\u5e08\u9762\u8bd5\u77e5\u8bc6\u70b9\u6574\u7406\uff1a<\/strong><\/p>\n\n\n\n<p class=\"has-light-pink-background-color has-background\"><a href=\"https:\/\/mp.weixin.qq.com\/s\/nPVbgOBOPs5VjW6_U-Om3w\">https:\/\/mp.weixin.qq.com\/s\/nPVbgOBOPs5VjW6_U-Om3w<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"745\" src=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/\u4e0b\u8f7d-1024x745.jpg\" alt=\"\" class=\"wp-image-5812\" srcset=\"http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/\u4e0b\u8f7d-1024x745.jpg 1024w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/\u4e0b\u8f7d-300x218.jpg 300w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/\u4e0b\u8f7d-768x559.jpg 768w, http:\/\/139.9.1.231\/wp-content\/uploads\/2022\/08\/\u4e0b\u8f7d.jpg 1484w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>ELECTRA\u7684\u5168\u79f0\u662fEfficiently Learning an Encoder that Classif &hellip; <a href=\"http:\/\/139.9.1.231\/index.php\/2022\/08\/15\/electra\/\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">ELECTRA\uff1a \u8d85\u8d8aBERT, 19\u5e74\u6700\u4f73NLP\u9884\u8bad\u7ec3\u6a21\u578b<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,9],"tags":[],"_links":{"self":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/5786"}],"collection":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/comments?post=5786"}],"version-history":[{"count":18,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/5786\/revisions"}],"predecessor-version":[{"id":5866,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/posts\/5786\/revisions\/5866"}],"wp:attachment":[{"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/media?parent=5786"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/categories?post=5786"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/139.9.1.231\/index.php\/wp-json\/wp\/v2\/tags?post=5786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}