{"id":4060,"date":"2024-07-09T17:59:38","date_gmt":"2024-07-09T09:59:38","guid":{"rendered":"https:\/\/nullthought.net\/?p=4060"},"modified":"2025-02-23T11:09:47","modified_gmt":"2025-02-23T03:09:47","slug":"%e6%b5%8b%e8%af%95%e6%97%b6%e8%ae%ad%e7%bb%83%e5%b1%82test-time-trainingttt%ef%bc%8c%e4%b8%80%e7%a7%8d%e6%96%b0%e7%9a%84%e5%ba%8f%e5%88%97%e5%bb%ba%e6%a8%a1%e5%b1%82","status":"publish","type":"post","link":"https:\/\/nullthought.net\/?p=4060","title":{"rendered":"\u6d4b\u8bd5\u65f6\u8bad\u7ec3\u5c42Test-Time Training(TTT)\uff0c\u4e00\u79cd\u65b0\u7684\u5e8f\u5217\u5efa\u6a21\u5c42"},"content":{"rendered":"\n<p>\u81ea\u6ce8\u610f\u529b\u673a\u5236\u5728\u957f\u4e0a\u4e0b\u6587\u4e2d\u8868\u73b0\u826f\u597d\uff0c\u4f46\u5176\u590d\u6742\u5ea6\u4e3a\u4e8c\u6b21\u65b9\u3002\u73b0\u6709\u7684RNN\u5c42\u5177\u6709\u7ebf\u6027\u590d\u6742\u5ea6\uff0c\u4f46\u5176\u5728\u957f\u4e0a\u4e0b\u6587\u4e2d\u7684\u6027\u80fd\u53d7\u9650\u4e8e\u5176\u9690\u85cf\u72b6\u6001\u7684\u8868\u8fbe\u80fd\u529b\u3002\u8bba\u6587<strong><em><a href=\"https:\/\/arxiv.org\/abs\/2407.04620\" target=\"_blank\" rel=\"noreferrer noopener\">Learning to (Learn at Test Time): RNNs with Expressive Hidden States<\/a><\/em><\/strong>\u63d0\u51fa\u4e86\u4e00\u7c7b\u65b0\u7684\u5e8f\u5217\u5efa\u6a21\u5c42\uff0c\u5177\u6709\u7ebf\u6027\u590d\u6742\u5ea6\u548c\u5f3a\u8868\u8fbe\u80fd\u529b\u7684\u9690\u85cf\u72b6\u6001\u3002\u5173\u952e\u601d\u60f3\u662f\u4f7f\u9690\u85cf\u72b6\u6001\u672c\u8eab\u6210\u4e3a\u4e00\u4e2a\u673a\u5668\u5b66\u4e60\u6a21\u578b\uff0c\u5e76\u5c06\u66f4\u65b0\u89c4\u5219\u89c6\u4e3a\u81ea\u76d1\u7763\u5b66\u4e60\u7684\u4e00\u6b65\u3002\u7531\u4e8e\u9690\u85cf\u72b6\u6001\u5728\u6d4b\u8bd5\u5e8f\u5217\u4e0a\u4e5f\u4f1a\u901a\u8fc7\u8bad\u7ec3\u8fdb\u884c\u66f4\u65b0\uff0c\u8fd9\u4e9b\u5c42\u88ab\u79f0\u4e3a\u6d4b\u8bd5\u65f6\u8bad\u7ec3\uff08Test-Time Training, TTT\uff09\u5c42\u3002\u8bba\u6587\u8003\u8651\u4e86\u4e24\u79cd\u5b9e\u73b0\u65b9\u5f0f\uff1aTTT-Linear\u548cTTT-MLP\uff0c\u5206\u522b\u4ee5\u7ebf\u6027\u6a21\u578b\u548c\u4e24\u5c42MLP\u4f5c\u4e3a\u9690\u85cf\u72b6\u6001\u3002\u8bba\u6587\u5728125M\u52301.3B\u53c2\u6570\u7684\u89c4\u6a21\u4e0a\u8bc4\u4f30\u4e86\u8fd9\u4e9b\u5b9e\u73b0\uff0c\u5e76\u4e0e\u4e00\u4e2a\u5f3a\u5927\u7684Transformer\u548c\u73b0\u4ee3RNN\uff08Mamba\uff09\u8fdb\u884c\u4e86\u6bd4\u8f83\u3002TTT-Linear\u548cTTT-MLP\u90fd\u80fd\u5339\u654c\u6216\u8d85\u8d8a\u57fa\u7ebf\u3002\u7c7b\u4f3c\u4e8eTransformer\uff0c\u5b83\u4eec\u53ef\u4ee5\u901a\u8fc7\u8003\u8651\u66f4\u591a\u7684tokens\u6765\u4e0d\u65ad\u964d\u4f4e\u56f0\u60d1\u5ea6\uff0c\u800cMamba\u572816k\u4e0a\u4e0b\u6587\u4e4b\u540e\u65e0\u6cd5\u7ee7\u7eed\u964d\u4f4e\u3002\u5728\u521d\u6b65\u7684\u7cfb\u7edf\u4f18\u5316\u4e0b\uff0cTTT-Linear\u57288k\u4e0a\u4e0b\u6587\u4e2d\u5df2\u7ecf\u6bd4Transformer\u66f4\u5feb\uff0c\u5e76\u5728\u5b9e\u9645\u8fd0\u884c\u65f6\u95f4\u4e0a\u4e0eMamba\u76f8\u5f53\u3002TTT-MLP\u4ecd\u7136\u9762\u4e34\u5185\u5b58I\/O\u7684\u6311\u6218\uff0c\u4f46\u5728\u957f\u4e0a\u4e0b\u6587\u4e2d\u8868\u73b0\u51fa\u66f4\u5927\u7684\u6f5c\u529b\uff0c\u6307\u5411\u672a\u6765\u7814\u7a76\u7684\u4e00\u4e2a\u6709\u5e0c\u671b\u7684\u65b9\u5411\u3002<\/p>\n\n\n\n<p>\u8bba\u6587\u4f5c\u8005\u4e3aYu Sun, Xinhao Li, Karan Dalal, Jiarui Xu, Arjun Vikram, Genghan Zhang, Yann Dubois, Xinlei Chen, Xiaolong Wang, Sanmi Koyejo, Tatsunori Hashimoto, Carlos Guestrin\u3002\u4f5c\u8005\u6765\u81eaStanford University, UC San Diego, UC Berkeley\u548cMeta AI\u3002<\/p>\n\n\n\n<p>\u8bba\u6587\u6982\u8981\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e00\u3001\u4e3b\u8981\u8d21\u732e<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>TTT\u5c42\u7684\u63d0\u51fa<\/strong>\uff1a\u63d0\u51fa\u4e86\u4e00\u79cd\u65b0\u7684\u5e8f\u5217\u5efa\u6a21\u5c42\uff0c\u5176\u9690\u85cf\u72b6\u6001\u662f\u4e00\u4e2a\u6a21\u578b\uff0c\u66f4\u65b0\u89c4\u5219\u662f\u81ea\u76d1\u7763\u5b66\u4e60\u3002\u8be5\u89c6\u89d2\u5c06\u5c42\u7684\u524d\u5411\u4f20\u64ad\u89c6\u4e3a\u4e00\u4e2a\u8bad\u7ec3\u5faa\u73af\uff0c\u4e3a\u672a\u6765\u7814\u7a76\u5f00\u8f9f\u4e86\u65b0\u65b9\u5411\u3002<\/li>\n\n\n\n<li><strong>TTT-Linear\u7684\u6027\u80fd<\/strong>\uff1a\u5728\u8bc4\u4f30\u4e2d\uff0cTTT-Linear\u5728125M\u52301.3B\u53c2\u6570\u8303\u56f4\u5185\u7684\u8868\u73b0\u8d85\u8fc7\u4e86Transformer\u548cMamba\u3002<\/li>\n\n\n\n<li><strong>\u786c\u4ef6\u6548\u7387\u6539\u8fdb<\/strong>\uff1a\u901a\u8fc7mini-batch TTT\u548c\u5bf9\u5076\u5f62\u5f0f\u7684\u8bbe\u8ba1\uff0c\u63d0\u9ad8\u4e86TTT\u5c42\u7684\u786c\u4ef6\u6548\u7387\uff0c\u4f7f\u5f97TTT-Linear\u6210\u4e3aLLM\u7684\u4e00\u4e2a\u5b9e\u7528\u6784\u4ef6\u3002<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e8c\u3001\u65b9\u6cd5<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>TTT\u5c42\u6982\u5ff5<\/strong>\uff1a\u6240\u6709\u5e8f\u5217\u5efa\u6a21\u5c42\u90fd\u53ef\u4ee5\u89c6\u4e3a\u5b58\u50a8\u5386\u53f2\u4e0a\u4e0b\u6587\u5230\u9690\u85cf\u72b6\u6001\u4e2d\uff0c\u66f4\u65b0\u89c4\u5219\u5219\u662f\u81ea\u76d1\u7763\u5b66\u4e60\u7684\u4e00\u6b65\u3002TTT\u5c42\u7684\u524d\u5411\u4f20\u64ad\u8fc7\u7a0b\u4e2d\uff0c\u9690\u85cf\u72b6\u6001\u4f1a\u6839\u636e\u8f93\u5165\u5e8f\u5217\u4e0d\u65ad\u66f4\u65b0\u3002<\/li>\n\n\n\n<li><strong>\u81ea\u76d1\u7763\u4efb\u52a1<\/strong>\uff1aTTT\u5c42\u7684\u6838\u5fc3\u5728\u4e8e\u81ea\u76d1\u7763\u4efb\u52a1\u7684\u8bbe\u8ba1\uff0c\u8be5\u4efb\u52a1\u51b3\u5b9a\u4e86\u9690\u85cf\u72b6\u6001\u4ece\u6d4b\u8bd5\u5e8f\u5217\u4e2d\u5b66\u4e60\u7684\u7279\u5f81\u3002\u901a\u8fc7\u4f18\u5316\u81ea\u76d1\u7763\u4efb\u52a1\u4ee5\u5b9e\u73b0\u6700\u7ec8\u7684\u4e0b\u4e00\u4e2a\u8bcd\u9884\u6d4b\u76ee\u6807\u3002<\/li>\n\n\n\n<li><strong>mini-batch TTT<\/strong>\uff1a\u63d0\u51fa\u4e86mini-batch\u68af\u5ea6\u4e0b\u964d\uff0c\u901a\u8fc7\u5728\u5c0f\u6279\u91cf\u5185\u5e76\u884c\u8ba1\u7b97\u591a\u4e2a\u68af\u5ea6\uff0c\u63d0\u9ad8\u4e86\u8ba1\u7b97\u6548\u7387\u3002<\/li>\n\n\n\n<li><strong>\u5bf9\u5076\u5f62\u5f0f<\/strong>\uff1a\u901a\u8fc7\u5bf9\u5076\u5f62\u5f0f\u8ba1\u7b97Wb\u548c\u8f93\u51fa\u5e8f\u5217\uff0c\u8fdb\u4e00\u6b65\u63d0\u9ad8\u4e86\u8ba1\u7b97\u6548\u7387\u3002<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e09\u3001\u5b9e\u9a8c\u7ed3\u679c<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u77ed\u4e0a\u4e0b\u6587\u8bc4\u4f30\uff082k\u548c8k\uff09<\/strong>\uff1a\u57282k\u4e0a\u4e0b\u6587\u4e2d\uff0cTTT-Linear\u3001Mamba\u548cTransformer\u6027\u80fd\u76f8\u5f53\uff1b\u57288k\u4e0a\u4e0b\u6587\u4e2d\uff0cTTT-Linear\u548cTTT-MLP\u663e\u8457\u4f18\u4e8eMamba\u3002<\/li>\n\n\n\n<li><strong>\u957f\u4e0a\u4e0b\u6587\u8bc4\u4f30\uff081k\u523032k\uff09<\/strong>\uff1a\u5728\u957f\u4e0a\u4e0b\u6587\u8bc4\u4f30\u4e2d\uff0cTTT-Linear\u548cTTT-MLP\u572832k\u4e0a\u4e0b\u6587\u65f6\u7684\u8868\u73b0\u4f18\u4e8eMamba\u3002TTT-MLP\u5728\u66f4\u957f\u4e0a\u4e0b\u6587\u548c\u66f4\u5927\u89c4\u6a21\u7684\u6a21\u578b\u4e2d\u8868\u73b0\u51fa\u66f4\u5927\u7684\u6f5c\u529b\u3002<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">\u56db\u3001\u7ed3\u8bba<\/h4>\n\n\n\n<p>TTT\u5c42\u901a\u8fc7\u5728\u6d4b\u8bd5\u65f6\u8fdb\u884c\u8bad\u7ec3\uff0c\u80fd\u591f\u5728\u4fdd\u6301\u7ebf\u6027\u590d\u6742\u5ea6\u7684\u540c\u65f6\uff0c\u5229\u7528\u66f4\u957f\u7684\u4e0a\u4e0b\u6587\uff0c\u63d0\u9ad8\u5e8f\u5217\u5efa\u6a21\u7684\u6027\u80fd\u3002TTT-Linear\u548cTTT-MLP\u7684\u8868\u73b0\u8868\u660e\uff0c\u8fd9\u79cd\u65b9\u6cd5\u5728\u73b0\u6709\u5e8f\u5217\u5efa\u6a21\u6280\u672f\u4e0a\u6709\u663e\u8457\u7684\u6539\u8fdb\uff0c\u5e76\u4e3a\u672a\u6765\u7684\u7814\u7a76\u65b9\u5411\u63d0\u4f9b\u4e86\u65b0\u7684\u601d\u8def\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u4e94\u3001\u672a\u6765\u7814\u7a76\u65b9\u5411<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u8fdb\u4e00\u6b65\u4f18\u5316\u81ea\u76d1\u7763\u4efb\u52a1<\/strong>\uff1a\u63a2\u7d22\u66f4\u590d\u6742\u7684\u81ea\u76d1\u7763\u4efb\u52a1\uff0c\u4ee5\u63d0\u9ad8TTT\u5c42\u7684\u6027\u80fd\u3002<\/li>\n\n\n\n<li><strong>\u63a2\u7d22\u4e0d\u540c\u7684\u6a21\u578b\u548c\u4f18\u5316\u5668<\/strong>\uff1a\u7814\u7a76\u66f4\u590d\u6742\u7684\u6a21\u578b\uff08\u5982\u6df1\u5ea6\u795e\u7ecf\u7f51\u7edc\uff09\u548c\u4f18\u5316\u5668\uff08\u5982Adam\uff09\u5728TTT\u5c42\u4e2d\u7684\u5e94\u7528\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u8fd9\u7bc7\u8bba\u6587\u901a\u8fc7\u63d0\u51fa\u65b0\u7684\u5e8f\u5217\u5efa\u6a21\u65b9\u6cd5\uff0c\u5c55\u793a\u4e86\u5728\u4fdd\u6301\u7ebf\u6027\u590d\u6742\u5ea6\u7684\u540c\u65f6\uff0c\u5982\u4f55\u5229\u7528\u66f4\u957f\u7684\u4e0a\u4e0b\u6587\u6765\u63d0\u9ad8\u6a21\u578b\u6027\u80fd\uff0c\u5177\u6709\u91cd\u8981\u7684\u7814\u7a76\u610f\u4e49\u548c\u5e94\u7528\u6f5c\u529b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>P.S., \u8bba\u6587\u7814\u7a76\u6210\u679c\u7684\u76f8\u5173\u4ee3\u7801\u5b9e\u73b0\uff1a<br>1. Jax for training and testing: <a href=\"https:\/\/github.com\/test-time-training\/ttt-lm-jax\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/test-time-training\/ttt-lm-jax<\/a><br>2. Pytorch inference code: <a href=\"https:\/\/github.com\/test-time-training\/ttt-lm-pytorch\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/test-time-training\/ttt-lm-pytorch<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u81ea\u6ce8\u610f\u529b\u673a\u5236\u5728\u957f\u4e0a\u4e0b\u6587\u4e2d\u8868\u73b0\u826f\u597d\uff0c\u4f46\u5176\u590d\u6742\u5ea6\u4e3a\u4e8c\u6b21\u65b9\u3002\u73b0\u6709\u7684RNN\u5c42\u5177\u6709\u7ebf\u6027\u590d\u6742\u5ea6\uff0c\u4f46\u5176\u5728\u957f\u4e0a\u4e0b\u6587\u4e2d\u7684\u6027\u80fd\u53d7\u9650 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[8,36],"tags":[39,77,95,86],"class_list":["post-4060","post","type-post","status-publish","format-standard","hentry","category-tech","category-36","tag-ai","tag-meta","tag-transformer","tag-llm"],"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"NullThought","author_link":"https:\/\/nullthought.net\/?author=1"},"rttpg_comment":0,"rttpg_category":"<a href=\"https:\/\/nullthought.net\/?cat=8\" rel=\"category\">Tech<\/a> <a href=\"https:\/\/nullthought.net\/?cat=36\" rel=\"category\">\u79d1\u5b66<\/a>","rttpg_excerpt":"\u81ea\u6ce8\u610f\u529b\u673a\u5236\u5728\u957f\u4e0a\u4e0b\u6587\u4e2d\u8868\u73b0\u826f\u597d\uff0c\u4f46\u5176\u590d\u6742\u5ea6\u4e3a\u4e8c\u6b21\u65b9\u3002\u73b0\u6709\u7684RNN\u5c42\u5177\u6709\u7ebf\u6027\u590d\u6742\u5ea6\uff0c\u4f46\u5176\u5728\u957f\u4e0a\u4e0b\u6587\u4e2d\u7684\u6027\u80fd\u53d7\u9650&hellip;","_links":{"self":[{"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/posts\/4060","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nullthought.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4060"}],"version-history":[{"count":1,"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/posts\/4060\/revisions"}],"predecessor-version":[{"id":4061,"href":"https:\/\/nullthought.net\/index.php?rest_route=\/wp\/v2\/posts\/4060\/revisions\/4061"}],"wp:attachment":[{"href":"https:\/\/nullthought.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nullthought.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nullthought.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}