Amazon Nova、自己蒸留型推論をSFTに活用
AWS は、高品質な推論トレースの作成が困難な場合でも、Amazon Nova 2 の自己蒸留(SDR)技術を用いて推論能力を維持・向上させる手法を発表した。
キーポイント
推論データ不足への対応
SFT(教師あり微調整)において高品質な Chain-of-Thought (CoT) データを作成するのはコストと工数の面で困難であり、SDR はこれを解決する手法として提案されている。
自己蒸留(SDR)の仕組み
ベースモデルである Amazon Nova 2 Lite の推論トークンを再利用し、推論トレースを持たないデータセットに対して教師モデルとしての役割を果たさせることで学習を可能にする。
壊滅的忘却の緩和
従来のモデルマージング手法が抱える「目標性能と汎用性能のトレードオフ」や「壊滅的忘却(Catastrophic Forgetting)」の問題を、SDR はより効果的に解決し、汎用能力を維持したまま特定ドメインでの性能を向上させる。
ベンチマークによる検証
3 つのベンチマークにおける実験結果により、SDR が純粋な SFT やモデルマージングと比較して同等以上の目標性能を持ちながら、数学などの一般能力をよりよく保持することが示された。
自己蒸留による推論データの生成
既存の正解データに対して、モデルに詳細な思考過程(Chain-of-Thought)を説明させることで、トレーニング用の高品質な推論データを自動生成します。
推論設定パラメータの最適化
学習データの整合性を確保するため、温度(0.3)、topP(0.9)、topK(50)という低ランダム性のパラメータを設定して一貫した推論結果を生成します。
SFT データセットの構築プロセス
生成された推論テキストを抽出・整形し、元の入力と組み合わせて Amazon Bedrock 用の SFT(教師あり微調整)データ形式に変換して保存します。
重要な引用
creating high-quality chain-of-thought (CoT) reasoning traces for your training data is often impractical and can be prohibitively expensive.
SDR re-uses the chain of thought from the base Amazon Nova 2 Lite model as a stand-in for non-reasoning datasets.
Model merging... takes an SFT checkpoint and merges it back to the base model... However, merging often comes at the expense of forgoing gains obtained on the SFT checkpoint because of catastrophic forgetting.
"Low randomness produces consistent, deterministic reasoning traces suitable for training data."
"ONLY provide your justification within <justification></justification> tags."
影響分析・編集コメントを表示
影響分析
この記事は、LLM の微調整プロセスにおける最大のボトルネックの一つである「高品質な推論データの不足」に対する実用的な解決策を提供しています。特に、コストをかけずにモデルの推論能力を維持・強化しつつ、特定のドメインでの性能を高める手法として、開発現場における SFT や RFT(強化学習微調整)の実施可能性を大きく広げる可能性があります。AWS の Nova モデルエコシステムにおいて、推論機能を効率的に活用する標準的なプラクティスとして定着する重要な一歩となるでしょう。
編集コメント
推論能力を備えたモデルの微調整において、高品質なデータセット作成が必須という壁に直面する開発者にとって、この「自己蒸留」アプローチは非常に魅力的な解決策です。特に汎用性能を損なわずに特定タスクの精度を高める点で、実運用におけるリスク管理にも寄与する技術と言えます。
Supervised Fine-Tuning (SFT) を用いてモデルを微調整する際、トレーニングデータに高品質な思考の連鎖(Chain-of-Thought:CoT)の推論プロセスを作成するのは、現実的ではなくコストも膨大になりがちです。そのため、SFT の段階で推論プロセスを省略し、入力と出力のみで学習を行う選択肢をとるケースもあります。
しかし、推論能力は Amazon Nova 2 モデルファミリーの中核的な機能であり、Nova や他の最先端モデルにおいて、特にコーディングや数学といった難問に対する予測性能を大幅に向上させることが実証されています。Amazon Nova 2 のカスタマイズ機能を使えば、SFT や Reinforcement Fine-Tuning (RFT) などの手法を通じて、思考モデルの力を特定のドメインに応用することが可能です。
SFT でこれらの性能向上を実現する鍵となるのは、トレーニングデータセットに「ゴールデンな CoT トレーシング」が存在することです。これは、強力な教師モデルから生成された推論プロセスをさらに検証・精製したものです。
本稿では、推論プロセスの記録(トレーシング)が存在しないデータセットに対して、SFT(教師あり微調整)を適用する際に思考トークンを生成するためのアイデアを探ります。まず、推論が抑制される問題について検討し、次に「自己蒸留型推論(Self-Distilled Reasoning:SDR)」を紹介します。その後、3 つのベンチマークでその有効性を検証し、実践的な推奨事項を提示します。
SDR は、推論記録のないデータセットに対して、ベースモデルである Amazon Nova 2 Lite の思考プロセス(Chain of Thought)を再利用することで代替とします。実験を通じて、SDR を導入することによる影響についていくつかの知見を得ました。具体的には、ターゲットとなるタスクのパフォーマンス向上や、壊滅的忘却 の緩和効果です。これは、モデルが学習中に自分自身から情報を蒸留することの重要性を指摘する研究が増えている流れと一致しています。この手法は一般に 自己蒸留(self-distillation) と呼ばれています。
以下の図は、SDR が通常の SFT やモデルの融合(Model Merging)と比較して、ターゲットタスクのパフォーマンスと数学的能力の保持においてどう異なるかを示しています。モデルの融合は、以前に習得したスキルを維持するためのシンプルなアプローチで、SFT 後のチェックポイントと SFT 前のベースモデルを結合します。しかし、この手法では壊滅的忘却が起きやすく、ターゲットタスクでの成果と汎用的な能力のバランスが取れなくなるトレードオフが生じます。一方、SDR は純粋な SFT(融合なし)と同程度かそれ以上のターゲットパフォーマンスを維持しつつ、汎用性能の大部分も保持できるため、この課題を回避できます。

大規模モデルの学習において、データセットに対する教師あり微調整(SFT)を行うと、過去の知識が完全に失われる「壊滅的忘却」という問題が発生します。例えば、標準的な SFT を適用すると、数学的性能はベースライン時の 70% から平均して 6% にまで急落することが確認されています(表 2)。しかし、自己蒸留推論(SDR)を採用すれば、この低下をほぼ完全に回復させることが可能です。
SDR を用いることで、ターゲット性能を損なうことなくベースモデルの能力を維持できます。多くの場合、ターゲット性能自体も向上します。壊滅的忘却への対策としてモデルマージが一般的に利用されていますが、SDR はそれよりも効果的に知識保持を実現しています。
SDR は、モデル自身が生成した推論プロセス(リーゾントレース)をデータセットに追加することで、学習中の正則化(regularization)を提供します。これには、別の教師モデルを用意する必要もあれば、事後の補間処理を行う必要もありません。この手法は人間の注釈を一切不要とし、ドメインを問わず既存の SFT データセットに適用可能です。また、ターゲット性能と汎用性能の両方を維持する点において、モデルマージよりも優れた効果を示します。
モデルマージと比較すると、SDR は数学的性能でほぼ同等の結果(68% 対 70%)を出しつつ、同時にターゲット性能を平均して 6.5% 以上向上させます。この知見は、壊滅的忘却の緩和に有効なメカニズムとして自己蒸留を推奨する最新の 研究 と一致しています。
背景:推論トレースを含まないデータセットでの SFT は、推論能力の低下を招く
手法を紹介する前に、なぜ推論トレースを含まないデータセットで教師あり微調整(SFT)を行うとモデルのパフォーマンスが低下するのかを理解しておくことが重要です。ここでは「推論抑制」の問題を取り上げ、推論が目標性能に与える影響を定量化し、既存の回復メカニズムとしてのモデルマージについても言及します。
推論抑制の問題
推論モードを有効にした状態で、推論トレースを含まないデータセットで SFT を行うと、深刻な問題が発生します。具体的には、推論モードを明示的にオンにしても、推論を行う能力自体が失われてしまうのです。この現象の背景にあるのは、トレーニング目的関数が推論トークンと出力トークンの両方に対して同時に損失を計算している点にあります。訓練データに中間的な推論ステップが含まれず、単なる入力 - 出力ペアのみが存在する場合、モデルは整合性のある推論トレースを生成するための教師信号を受け取ることができません。その結果、損失関数は最終出力に直接寄与しないトークンを罰する形となり、モデルは推論メカニズムを迂回するように訓練されてしまいます。この行動様式は、「ショートカット学習」exemplifies shortcut learning の典型例です。ここでは、モデルが堅牢な推論パターンを学ぶ代わりに、偽相関に依存してしまう現象を指します。
リーディングの効果を定量化する
抑制の問題があるにもかかわらず、トレーニングと推論の両方で「リーディング(思考)」機能を有効にすると、目標とする性能において顕著な向上が見られます。公平な比較を行うため、トレーニング時と推論時の設定を統一しました。具体的には、「トレーニング時・推論時ともにリーディングオン」の場合と、「トレーニング時・推論時ともにリーディングオフ」の場合を対比させています。
実験結果から、トレーニング時および推論時にリーディング機能を有効にすることで、性能が大幅に向上することが明らかになりました。以下の表は、LoRA(Low-Rank Adaptation)の結合重みを変化させた場合における、LLaVA CoT データセットでのこの効果を示しています。
| 結合重み | 目標性能 (リーディングオン) | 目標性能 (リーディングオフ) | 差分 |
|---|---|---|---|
| 0.0 (ベースライン) | 12.30% | 12.30% | 0% |
| 0.3 | 34.38% | 35.28% | -0.9% |
| 0.5 | 60.51% | 48.80% | +11.7% |
| 0.7 | 66.67% | 54.05% | +12.6% |
| 1.0 (完全結合) | 65.17% | 47.90% | +17.3% |
表 1: リーディング機能と結合重みが目標性能に与える影響。トレーニング時および推論時のリーディングモードは統一されています。
モデルマージを回復メカニズムとして活用する
現在、推論トークンを使用しない SFT(教師あり微調整)ユースケースにおける「推論能力の抑制」問題への推奨アプローチは、モデルマージを活用して推論スキルを回復させることです。ドメイン特化型の微調整後に数学やコーディングの能力が復元されるのと同様に、微調整済みモデルとベースモデルの間で重み付き補間を行うことで、推論能力も回復できることが分かりました。この回復は、数学やコーディングベンチマークといった一般的な性能指標の復元と強く相関しており、推論能力が複数の下流タスクを支える基盤的な能力であることを示唆しています。
このメカニズムをより深く理解するために、本実験では以下のベンチマークを使用しました。
ToolACE – ツール呼び出し用ベンチマーク(10K サンプル)。ユーザーの問い合わせと利用可能なツールの定義が与えられた際、モデルが正しい関数名と引数値を持つ適切な関数呼び出しを生成できるかを評価します。コンテキスト長は短め(約 2K トークン)です。関数名およびすべての引数の完全一致に基づく厳格な成功率でスコアリングされます。精密な構造化出力と引数値の推論 が要求されます。
CoCoHD – 長文コンテキストにおける構造化データ抽出(730 サンプル)。米国の議会聴聞会の議事録から、タイトル、委員会名、委員、メンバー、日付など 10 のメタデータ項目を JSON 形式で抽出する能力を評価します。入力テキストは 35K〜85K 文字の長文です。評価指標は、予測された JSON と正解データのキー・バリュー間の一致度です。非常に長いドキュメントの解析と、スキーマに準拠した構造化出力の生成が求められます。GitHub から抽出。
GovReport – 長文コンテキストにおける要約生成(17K サンプル)。米国政府報告書(GAO、CRS)の内容を、250〜450 文字の平易な文章で要約する能力を評価します。入力テキストは 35K〜85K 文字の長文です。評価指標は ROUGE-L(正解となる要約との最長共通部分列の一致度)です。密度の高い政策文書を、簡潔かつ事実に基づいた文章に統合する能力が求められます。HuggingFace から抽出。
Invoice-OCR – マルチモーダルなドキュメント理解(約 500 サンプル、画像とテキストの組み合わせ)。スキャンされた請求書の画像から構造化データを抽出する能力を評価します。入力コンテキストは単一の画像とそのプロンプトのみです。評価指標は ANLS(平均正規化レベンシュタイン類似度)です。多様なレイアウトを持つドキュメントからの視覚的な文字認識と、項目ごとのデータ抽出が求められます。Kaggle から抽出。
CaptionGen – ビデオキャプション生成(1800 サンプル、動画とテキスト)。動画クリップに対する説明的なキャプションの生成能力を評価する指標です。文脈は可変で、動画フレームとプロンプトの組み合わせになります。スコアリングには自動評価(おそらく CIDEr や METEOR、あるいは LLM による判定)が用いられます。動画フレーム間の時間的関係の理解と、自然言語生成能力が求められます。HuggingFace から抽出されています。
モデルマージによって推論能力が現れるかどうかを検証しました。推論を目的として訓練されていないモデルを対象に、「指示従順性」ベンチマークで、推論に関連するトークンの数をカウントします。横軸はカスタムモデルとベースモデルの間のマージ重み(weight)を示しており、0.0 はベースモデルのみ、1.0 はマージを行わない SFT 後のモデルを意味します。

カスタマイズへの示唆
これらの知見は、カスタムモデルを運用する際に重要な意味を持ちます。第一に、最適なパフォーマンスを得るためには、訓練時と推論時の両方で推論モードを統一することが不可欠です。第二に、何の対策も講じなければ、ドメイン特化型の SFT(Supervised Fine-Tuning)によって汎用的な推論能力が著しく低下する恐れがあります。第三に、モデルマージは事後対応策として有効ですが、競合する目的のバランスを取るために、マージ重みの調整には細心の注意が必要です。
これらのトレードオフを踏まえ、私たちは事後介入を必要とせず、推論能力を維持できる訓練アプローチの開発へと至りました。
SFT における推論の役割
SFT(教師あり微調整)における推論トレースは、強化学習微調整(RFT)、正則化、そして自己蒸留という3つのパラダイムを結びつける重要な機能を果たします。
第一に、推論トレースは暗黙的なポリシー正則化として機能し、微調整されたモデルがベースモデルのポリシーから大きく逸脱しないように制約します。これにより、RLHF における KL-正則化 と同様の効果で、壊滅的な忘却や能力の低下を防ぐことができます。
第二に、推論は単なる結果(アウトカム)への監督ではなく、RFT におけるステップごとの報酬設計と同様に、プロセスそのものに対する監督を提供します。これにより、より堅牢な汎化性能 が実現されます。
第三に、モデルが自身の予測から学習する「自己蒸留」は、Born-Again Networks から Constitutional AI まで多様な分野で効果であることが証明されています。推論トレースは、最終的な出力だけでなく、問題解決のプロセスそのものを捉えることで、特に豊富な自己監督信号となります。これは 最近の継続的学習に関する研究 でも示されています。
近年の研究では、効果的な微調整済みモデルは、パラメータ空間 においてベースモデルとの近接性を維持することが示されています。私たちのアプローチはこの知見に基づき、ベースモデル自身の推論トレースを学習目標として適用します。これにより、モデルの内部表現と整合性のある学習信号が得られる一方で、推論プロセス全体を通じて細粒度なトークンレベルの監督が可能になります。
{ground_truth}自己蒸留による推論
推論トレースが存在しないデータセットに対して、SFT(Supervised Fine-Tuning)をカスタマイズするための効果的な手法として、「自己蒸留による推論(SDR)」を提案します。このプロセスは3つの段階で構成されます。
まず、ベースとなる推論モデル(Amazon Nova 2 Lite など)を用いて、SFT データセットの各サンプルに対して推論トレースを生成します。次に、生成した推論トレースを元の出力の前に付加することで、トレーニングデータを拡張します。最後に、推論モードを有効にした状態でモデルをファインチューニングし、推論トークンと出力トークンの両方に対する教師信号を提供します。
SDR は SFT ワークフローにおいていくつかの利点をもたらします。まず、推論トレースを作成するために人手を要さないため、アノテーションコストはゼロです。また、生成される推論トレースは、ベースモデル固有の問題解決アプローチと整合性があります。さらに、この手法はドメインや規模に関わらず既存の SFT データセットに適用可能であり、異なる教師モデルを選択する柔軟性を提供します。
SFT 用の推論トレース構築
与えられたデータセットに対して Amazon Bedrock をクエリし、推論トレースを取得します。連鎖思考(Chain-of-Thought)を構築するには2つのアプローチがあり、それぞれに異なるトレードオフがあります。
基本的な推論
この手法では、モデルが質問のみを与えられて自然に推論を展開する「順方向」の方式で推論トレースを生成します。これは、推論時にモデルがどのように思考するかを模倣したものです。使用するプロンプトテンプレートは以下の通りです。
必ず JSON 形式で返してください。translation フィールドのみ。他のフィールドは一切追加しないこと — 余計なフィールドを書こうとして本文がトークン上限で打ち切られる事故を防ぐため:
{"
translation": "## 自己蒸留による推論\n\n推論トレースが存在しないデータセットに対して、SFT(Supervised Fine-Tuning)をカスタマイズするための効果的な手法として、「自己蒸留による推論(SDR)」を提案します。このプロセスは3つの段階で構成されます。\n\nまず、ベースとなる推論モデル(Amazon Nova 2 Lite など)を用いて、SFT データセットの各サンプルに対して推論トレースを生成します。次に、生成した推論トレースを元の出力の前に付加することで、トレーニングデータを拡張します。最後に、推論モードを有効にした状態でモデルをファインチューニングし、推論トークンと出力トークンの両方に対する教師信号を提供します。\n\nSDR は SFT ワークフローにおいていくつかの利点をもたらします。まず、推論トレースを作成するために人手を要さないため、アノテーションコストはゼロです。また、生成される推論トレースは、ベースモデル固有の問題解決アプローチと整合性があります。さらに、この手法はドメインや規模に関わらず既存の SFT データセットに適用可能であり、異なる教師モデルを選択する柔軟性を提供します。\n\n## SFT 用の推論トレース構築\n\n与えられたデータセットに対して Amazon Bedrock をクエリし、推論トレースを取得します。連鎖思考(Chain-of-Thought)を構築するには2つのアプローチがあり、それぞれに異なるトレードオフがあります。\n\n### 基本的な推論\n\nこの手法では、モデルが質問のみを与えられて自然に推論を展開する「順方向」の方式で推論トレースを生成します。これは、推論時にモデルがどのように思考するかを模倣したものです。使用するプロンプトテンプレートは以下の通りです。"\n}
この質問を自然に考え、推論過程を示してください。
{user_text}
回答は、推論部分をタグで、最終的な答えをタグで囲んで出力してください。推論のスタイルは一貫性を持たせてください。
ガイド付き推論
この手法では、正解(グランドトゥルース)が利用可能な情報を活用し、後方から推論生成を誘導します。質問と答えの両方を提示することで、モデルにそれらを結びつける妥当な推論過程を再構築させます。これは「事後学習(hindsight learning)」のアプローチに似ています。
プロンプトテンプレートは以下の通りです:
自然な推論プロセスでこの問題を解いてください。
答えはまだ知らないという前提で行動してください。
質問:
{user_text}
到達すべき答え:
{assistant_content}
回答は、推論部分をタグで、最終的な答えをタグで囲んで出力してください。事前に答えを知っているかのような仮定を避け、この答えにたどり着くための自然な推論過程を書いてください。推論のスタイルは一貫性を持たせてください。
モデルが誤って推論プロセスの中に答えを漏れ出さないか(これがノイズの原因となるため)を確認するため、最終的な推論トレースを取得する際に、答えに関する言及を除去する二次的なフィルタリングステップを実行します。
実装パイプライン
以下のコードは、Amazon Bedrock の Converse API を用いてガイド付き推論を実装する方法を示しています。このパイプラインでは、SFT(教師あり微調整)のトレーニングデータを読み込み、Chain-of-Thought(CoT:思考の連鎖)による推論トレースを生成し、reasoningContent ブロックを含む最終的なデータセットを組み立てます。
設定と CoT プロンプト生成
import json, re, boto3, time
{ground_truth}MODEL_ID = "amazon.nova-lite-v1:0"
bedrock = boto3.client("bedrock-runtime", region_name="us-east-1")
COT_SYSTEM = """あなたは熟練した評価者です。与えられた正解がなぜ正しいのか、またなぜ妥当なのかを説明する詳細な思考プロセス(Chain-of-Thought)を提供してください。"""
COT_USER_TEMPLATE = """タスクの文脈と正解注釈に基づき、思考プロセス(Chain-of-Thought)を展開してください。
元のシステムコンテキスト: {system_prompt}
元のユーザーリクエスト: {user_prompt}
正解注釈:
{ground_truth}回答は タグ内にのみ記述してください。"""
Amazon Bedrock を呼び出して最終データセットを構築する
各思考プロセス(CoT)プロンプトに対して Bedrock を呼び出す
for req in cot_requests:
response = bedrock.converse(
modelId=MODEL_ID,
system=[{"text": req["system"]}],
messages=[{"role":"user",
"content":[{"text":req["query"]}]}],
inferenceConfig={"maxTokens":4096,"temperature":0.3,"topP": 0.9,"topK": 50})
output = response["output"]["message"]["content"][0]["text"]
time.sleep(2) # レート制限対策
必ず JSON 形式で返してください。translation フィールドのみです。他のフィールドは一切追加しないでください。余計なフィールドを追加しようとして本文がトークン上限に達し、出力が途中で切れてしまう事故を防ぐためです:
{"translation": "リライト全文"}
Parse tags and build SFT dataset
for idx, item in enumerate(original_data):
tags = extract_xml_tag(inference[idx], "justification")
reasoning_block = {"reasoningContent": {"reasoningText":
{"text": "Based on the provided context, lets think"
" step by step " + tags[0].strip()}}}
sft_dataset.append({
"schemaVersion": "bedrock-conversation-2024",
"system": item["system"],
"messages": [item["messages"][0],
{"role": "assistant",
"content": [reasoning_block, original_text]}]})
Inference configuration parameters
- temperature: 0.3 低いランダム性を設定することで、学習データとして利用可能な一貫性のある決定論的な推論結果を得ます。
- topP: 0.9 トップ 90% の確率質量を保持するヌクレウスサンプリングです。整合性を保ちつつ、退化的な繰り返しを防ぐための十分な多様性を確保します。
- topK: 50 各ステップでのトークン候補を上位 50 個に制限します。推論結果に不自然なトークンが混入するのを防ぎながら、自然な言語の流れを維持します。
Sample input (no reasoning)
{"schemaVersion": "bedrock-conversation-2024",
"system": [{"text": "You are a legal expert..."}],
"messages": [
{"role": "user", "content": [{"text":
"Review this clause: Company shall not disclose
data to third parties."}]},
{"role": "assistant", "content": [{"text":
"[{\"comment_id\": \"001\", \"severity\": \"Medium\",
\"comment\": \"Add standard confidentiality
exceptions...\", ...}]"}]}]}
原文を表示
When you fine-tune a model using Supervised Fine-Tuning (SFT), creating high-quality chain-of-thought (CoT) reasoning traces for your training data is often impractical and can be prohibitively expensive. As a result, you might choose to skip reasoning during SFT and train with only inputs and outputs. However, reasoning is a key capability of the Amazon Nova 2 family of models, and it’s been shown to significantly enhance prediction performance in Nova and other frontier models, often with performance gains on hard problems like coding and math. With Amazon Nova 2 customization, you can use the power of thinking models on your specific domains through techniques such as SFT and Reinforcement Fine-Tuning (RFT). For SFT, a key requirement to unlock these gains is the availability of golden CoT traces in the SFT dataset, that is, thinking traces from a strong teacher model that have been further validated and cleaned.
In this post, we explore an idea for generating thinking tokens for datasets that lack reasoning traces in SFT customization. We first examine the reasoning suppression problem, then introduce Self-Distilled Reasoning (SDR), validate it across three benchmarks, and provide practical recommendations. SDR re-uses the chain of thought from the base Amazon Nova 2 Lite model as a stand-in for non-reasoning datasets. Through our experiments we make a few observations on the impact of introducing SDR, from improving target performance to mitigating catastrophic forgetting. This is in line with a growing body of work that is discovering the importance of distilling information from a model into itself during training, otherwise known as self-distillation.
The following figure illustrates how SDR compares with vanilla SFT and model merging across target performance and math retention. Model merging is a straightforward approach to retain previously acquired skills, that takes an SFT checkpoint and merges it back to the base model (before SFT). However, merging often comes at the expense of forgoing gains obtained on the SFT checkpoint because of catastrophic forgetting which manifests as a trade-off between target and general performance. SDR on the other hand mitigates this issue with similar or better target performance as pure SFT (with no merging) while retaining most of general performance.

Because of catastrophic forgetting, we observe that SFT on a dataset can lead to previous knowledge being completely lost. For instance, we find that vanilla SFT leads to Math performance dropping from 70 percent (base) to 6 percent on average (Table 2). With SDR, we’re able to almost entirely recover it back. Self-distilled reasoning allows us to retain the base model’s capabilities without compromising on target performance, and in many cases it improves target performance as well. Model merging is a common solution to mitigate catastrophic forgetting, but SDR achieves this retention more effectively.
SDR provides in-training regularization by augmenting the dataset with the model’s own reasoning traces. It doesn’t require a separate teacher model or post-hoc interpolation. This approach requires no human annotation, is applicable to existing SFT datasets regardless of domain, and is more effective than model merging at preserving both target and general performance.
Compared with model merging, self-distillation yields nearly identical math performance (70 percent compared to 68 percent) while improving target performance by over 6.5 percent on average at the same time. This finding aligns with recent research that advocates self-distillation as a powerful mechanism to mitigate catastrophic forgetting.
Background: SFT on datasets without reasoning tokens may result in loss of reasoning ability
Before introducing the approach, it is important to understand why SFT on datasets without reasoning traces leads to degraded model performance. This section examines the reasoning suppression problem, quantifies the impact of reasoning on target performance, and discusses model merging as an existing recovery mechanism.
The reasoning suppression problem
SFT training on non-reasoning datasets with reasoning mode active leads to a critical issue: the model loses its ability to reason during inference, even when you explicitly turn on reasoning mode. We hypothesize that this phenomenon occurs because the training objective calculates loss on both reasoning and output tokens together. When training data contains only input-output pairs without intermediate reasoning steps, the model receives no supervision signal for generating coherent reasoning traces. The loss function effectively penalizes tokens that don’t directly contribute to the final output, training the model to bypass its reasoning mechanisms. This behavior exemplifies shortcut learning, where models rely on spurious correlations rather than learning robust reasoning patterns.
Quantifying the impact of reasoning
Despite the suppression issue, turning on reasoning during both training and inference produces significant benefits in target performance. To confirm fair comparison, we maintain consistency between train and inference settings: comparing reasoning-on during both training and inference versus reasoning-off during both training and inference. Our experiments reveal that turning on reasoning during training and inference leads to a significant improvement. The following table demonstrates this effect on the LLaVA CoT dataset with varying LoRA (Low-Rank Adaptation) merge weights.
Merge weight
Target perf (reasoning on)
Target perf (reasoning off)
Delta
0.0 (base)
12.30%
12.30%
0%
0.3
34.38%
35.28%
-0.9%
0.5
60.51%
48.80%
+11.7%
0.7
66.67%
54.05%
+12.6%
1.0 (full merge)
65.17%
47.90%
+17.3%
Table 1: Impact of reasoning and merging weight on target performance. Training and inference reasoning modes are kept consistent.
Model merging as a recovery mechanism
Our current recommended approach to address the reasoning suppression issue for SFT use cases without reasoning tokens is to use model merging as a mechanism to recover the reasoning skill. Similar to how model merging can restore mathematical or coding capabilities after domain-specific fine-tuning, we find that reasoning capability can be recovered through weighted interpolation between the fine-tuned model and the base model. This recovery is strongly correlated with the restoration of general performance metrics (such as math and coding benchmarks), suggesting that reasoning is a fundamental capability that underlies multiple downstream skills.
To understand this better, we use the following benchmarks in this experiment:
ToolACE – Tool-calling benchmark (10K samples). Evaluates the model’s ability to generate correct function calls with proper argument names and values given a user query and available tool definitions. Short context (approximately 2K tokens). Scored on strict success rate (exact match of function name and all arguments). Requires precise structured output and argument value inference.
CoCoHD – Long-context structured extraction (730 samples). Evaluates extraction of 10 metadata fields (title, chamber, committee, members, dates) from U.S. congressional hearing transcripts in JSON format. Long context (35K–85K characters). Scored on key/value overlap between predicted and target JSON. Requires parsing very long documents and producing schema-conformant structured output. Extracted from GitHub.
GovReport – Long-context abstractive summarization (17K samples). Evaluates generation of 250–450 word plain-text summaries of U.S. government reports (GAO, CRS). Long context (35K–85K characters input). Scored on ROUGE-L (longest common subsequence overlap with reference summary). Requires synthesizing dense policy documents into concise, factual narratives. Extracted from HuggingFace.
Invoice-OCR – Multimodal document understanding (approximately 500 samples, image and text). Evaluates extraction of structured fields from scanned invoice images. Short context (single image and prompt). Scored on ANLS (Average Normalized Levenshtein Similarity). Requires visual text recognition and field-level extraction from varied document layouts. Extracted from Kaggle.
CaptionGen – Video captioning (1800 samples, video and text). Evaluates generation of descriptive captions for video clips. Variable context (video frames and prompt). Scored using automated evaluation (likely CIDEr/METEOR or LLM-judge). Requires temporal understanding across video frames and natural language generation. Extracted from HuggingFace.
We investigate whether reasoning emerges with model merging. On an Instruction Following benchmark, we count the number of reasoning tokens on a model that is trained without reasoning. The x-axis shows the merging weight between the custom and the base model, where 0.0 corresponds to the base model and 1.0 is the SFT model without merging.

Implications for customization
These findings have important implications if you’re deploying customized models. First, maintaining the same reasoning mode during training and inference is critical for optimal performance. Second, without intervention, domain-specific SFT can significantly degrade general reasoning abilities. Third, model merging offers a post-hoc solution, but requires careful tuning of the merging weight to balance competing objectives. These trade-offs motivated us to develop a training approach that preserves reasoning capability without requiring post-hoc interventions.
Role of reasoning in SFT
Reasoning traces in SFT serve three critical functions that connect reinforcement fine-tuning (RFT), regularization, and self-distillation paradigms.
First, reasoning traces act as implicit policy regularization by constraining the fine-tuned model to stay close to the base model’s policy. This prevents catastrophic forgetting and capability degradation in a manner similar to KL-regularization in RLHF. Second, reasoning provides process supervision, analogous to step-by-step reward shaping in RFT, rather than just outcome supervision. This leads to more robust generalization. Third, self-distillation, where a model learns from its own predictions, has proven effective across domains from Born-Again Networks to Constitutional AI. Reasoning traces offer particularly rich self-supervision by capturing the model’s problem-solving process rather than just final outputs, as demonstrated in recent continual learning research.
Recent work shows that effective fine-tuned models maintain proximity to the base model in parameter space, and our approach uses this insight by applying the base model’s own reasoning traces as training targets, creating a learning signal consistent with the model’s internal representations while providing dense token-level supervision throughout the reasoning process.
Self-distilled reasoning
We propose an effective approach that uses self-distilled reasoning (SDR) for SFT customization on datasets without reasoning traces. The process works in three stages. First, you use the base reasoning model (such as Amazon Nova 2 Lite) to generate reasoning traces for each example in the SFT dataset. Next, you augment the training data by prepending the generated reasoning traces to the original outputs. Finally, you fine-tune the model with reasoning mode turned on, providing supervision on both reasoning and output tokens.
SDR offers several advantages for your SFT workflow. There is zero annotation cost because no human effort is required to create the reasoning traces. The reasoning traces are consistent with the base model’s own problem-solving approach. The technique scales to existing SFT datasets regardless of domain and gives you flexibility to use different teacher models.
Constructing reasoning traces for SFT
We query Amazon Bedrock to obtain reasoning traces for a given dataset. There are two approaches to construct chain-of-thought reasoning, each with different trade-offs.
Basic reasoning
This approach generates reasoning traces in a forward manner, where the model naturally produces its reasoning given only the question. This mimics how the model would reason during inference. The prompt template is:
Think through this question naturally and show your reasoning:
{user_text}
Format your response with tags for reasoning and tags for the final answer.
Use a consistent reasoning style.Guided reasoning
This approach uses the availability of ground-truth answers to guide reasoning generation in a backward manner. By providing both the question and answer, we ask the model to reconstruct plausible reasoning that connects them, similar to hindsight learning approaches. The prompt template is:
Generate natural reasoning for solving this question.
Act as if you don't know the answer yet.
Question:
{user_text}
Answer to arrive at:
{assistant_content}
Format your response with tags for reasoning
and tags for the final answer. Write natural
reasoning that works toward this answer without assuming
you know it beforehand. Use a consistent reasoning style.To verify the model does not accidentally leak the answer into the reasoning trace (which would introduce noise), we perform a secondary filtering step that removes mentions of the answer to obtain the final reasoning trace.
Implementation pipeline
The following code shows how to implement guided reasoning using the Amazon Bedrock Converse API. The pipeline reads your SFT training data, generates Chain-of-Thought (CoT) reasoning traces, and assembles the final dataset with reasoningContent blocks.
Setup and CoT prompt generation
import json, re, boto3, time
MODEL_ID = "amazon.nova-lite-v1:0"
bedrock = boto3.client("bedrock-runtime", region_name="us-east-1")
COT_SYSTEM = """You are an expert evaluator. Provide a
detailed Chain-of-Thought explaining why the given
ground truth answer is correct and makes sense."""
COT_USER_TEMPLATE = """Given the task context and ground
truth annotation, provide a Chain-of-Thought.
**Original System Context:** {system_prompt}
**Original User Request:** {user_prompt}
**Ground Truth Annotation:**
```json
{ground_truth}ONLY provide your justification within
tags."""
### Invoke Amazon Bedrock and assemble the final dataset
Invoke Bedrock for each CoT prompt
for req in cot_requests:
response = bedrock.converse(
modelId=MODEL_ID,
system=[{"text": req["system"]}],
messages=[{"role":"user",
"content":[{"text":req["query"]}]}],
inferenceConfig={"maxTokens":4096,"temperature":0.3,"topP": 0.9,"topK": 50})
output = response["output"]["message"]["content"][0]["text"]
time.sleep(2) # rate limit
Parse tags and build SFT dataset
for idx, item in enumerate(original_data):
tags = extract_xml_tag(inference[idx], "justification")
reasoning_block = {"reasoningContent": {"reasoningText":
{"text": "Based on the provided context, lets think"
" step by step " + tags[0].strip()}}}
sft_dataset.append({
"schemaVersion": "bedrock-conversation-2024",
"system": item["system"],
"messages": [item["messages"][0],
{"role": "assistant",
"content": [reasoning_block, original_text]}]})
### Inference configuration parameters
- temperature: 0.3 Low randomness produces consistent, deterministic reasoning traces suitable for training data.
- topP: 0.9 Nucleus sampling that retains the top 90 percent probability mass. Balances coherence with enough diversity to avoid degenerate repetitions.
- topK: 50 Limits token candidates to the top 50 at each step. Prevents unlikely tokens from appearing in reasoning traces while keeping natural language flow.
### Sample input (no reasoning)
{"schemaVersion": "bedrock-conversation-2024",
"system": [{"text": "You are a legal expert..."}],
"messages": [
{"role": "user", "content": [{"text":
"Review this clause: Company shall not disclose
data to third parties."}]},
{"role": "assistant", "content": [{"text":
"[{"comment_id": "001", "severity": "Medium",
"comment": "Add standard confidentiality
exceptions...", ...}]"}]}]}
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み