72 / 90

第72日: 失敗帰属の体系化・定性的エラー分類・モデル比較レポート

失敗モードをハルシネーション・形式違反・過剰拒絶・破滅的忘却に分類し、定量的証拠とトレードオフに基づく誠実なモデル比較レポートを執筆する。

自律学習手法と Python エンジニアリング基礎 480 分(8時間)
01 120 分

定性的エラー分類学: ハルシネーション・形式違反・過剰拒絶

Agent支援エンジニアリングチェック

前提条件

第71日定量的評価指標およびエラー分析の基礎。

学習目標

LLMの失敗事例を4系統のエラー分類学(内部/外部ハルシネーション、スキーマ形式違反、過剰拒絶、推論破綻)に分類し、根本原因を特定する。

手順

1. Jiら(2023)NLGハルシネーション分類の学習: プロンプト内の前提・文脈に矛盾する「内部ハルシネーション(Intrinsic)」と、入力に存在しない事実無根の情報を捏造する「外部ハルシネーション(Extrinsic)」を明確に区別する。
2. スキーマおよび形式違反の体系化: JSON構文エラー、必須キーの欠落、Markdownコードブロック(```json)の漏洩、トークン上限による途中切断。
3. 安全性の過剰拒絶(Röttger et al. 2023 XSTest)の分析: 機微な単語を含む無害な要求(例: 「Linuxプロセスの強制終了方法」)に対して安全フィルターが誤検知して回答を拒絶する現象。
4. 推論連鎖の破綻: 算術計算ミス、前提の誤解、循環論法。
5. 要因帰属フローの構築: 事前学習データの不足、指示チューニングの混乱、またはサンプリング温度の揺らぎのいずれに起因するかを切り分ける。

演習と予測記録

モデルの出力レコードを入力とし、エラーを適切な分類学バケットに仕分け、対応するエンジニアリング是正策を提示するPython関数 categorize_failure を作成してください。

独立習得基準

任意のモデル出力エラーを4大分類に的確に分類し、具体的なエンジニアリング改善策を導出できること。

公式ソースリソースと権利証跡

linking Open Access / CC BY 4.0

Survey of Hallucination in Natural Language Generation

著者・提供機関: Ziwei Ji, Nayeon Lee, Rita Frieske, Tiezheng Yu, Dan Su, Yan Xu, Etsuko Ishii, Ye Jin Bang, Andrea Madotto, Pascale Fung | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 2.1 Categorization (intrinsic and extrinsic hallucination)

検証バージョンと日付: ACM Computing Surveys 2023 / arXiv:2202.03629v4 (Verified: 2026-10-30)

選定理由:

Primary taxonomy of hallucinations in NLG, formalizing the critical distinction between intrinsic hallucinations (contradicting source input context) and extrinsic hallucinations (asserting unverifiable external facts).

ソース前提知識:

Natural language generation, factuality evaluation, intrinsic vs extrinsic hallucination.

安全フォールバック(オフライン回復性):

The intrinsic/extrinsic taxonomy, fact-verification prompt protocols, and error attribution workflows are completely developed in lesson modules.

比較対象候補リソースと選定評価 (2)

Focuses on abstractive summarization faithfulness; Ji et al. provides the overarching taxonomy across dialogue, QA, and generation.

Follow-up survey on LLMs; Ji et al. sets out the taxonomy distinctions utilized across evaluation literature.

linking Open Access / CC BY 4.0

XSTest: A Test Suite for Identifying Exaggerated Safety Behaviors in Large Language Models

著者・提供機関: Paul Röttger, Hannah Rose Kirk, Bertie Vidgen, Giuseppe Attanasio, Federico Bianchi, Dirk Hovy | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 4.4 Results on Unsafe Prompts and Appendix D Details on Automated Evaluation

検証バージョンと日付: NAACL 2024 / arXiv:2308.01263v2 (Verified: 2026-10-30)

選定理由:

Groundbreaking benchmark identifying exaggerated safety behaviors and false-positive refusals, formalizing test suites that contrast real unsafe prompts against benign prompts with sensitive lexical overlap.

ソース前提知識:

Safety alignment, refusal classifiers, false-positive safety evaluation.

安全フォールバック(オフライン回復性):

The 10 refusal prompt categories, refusal detection regex/heuristics, and over-refusal error quantification are implemented in lesson exercises.

比較対象候補リソースと選定評価 (2)

Shows that zero-shot chain-of-thought increases biased and toxic outputs on harmful prompts; XSTest provides an explicit, quantitative evaluation dataset for measuring unnecessary refusal rates.

Safety fine-tuning methodology; XSTest isolates the diagnostic metric for detecting exaggerated refusal side effects.

02 120 分

破滅的忘却と汎用能力の劣化現象

独立習得チェック(AI 支援なし)

前提条件

第72日アクティビティ1およびファインチューニング重み動力学。

学習目標

ドメイン適応ファインチューニング後に生じる事前学習知識や汎用指示追従能力の破滅的忘却を監査・定量化する。

手順

1. Kirkpatrickら(2017)およびLuoら(2023)の理論: ドメイン特化データへの最適化は、事前学習で獲得した汎用言語・推論・コーディング能力の著しい低下(破滅的忘却)を引き起こしやすい。
2. アライメント税(Alignment Tax)と特化ペナルティ: 医療や法律QAで精度が+15%向上する一方、GSM8Kなどの汎用推論スコアが-25%低下する現象を分析する。
3. 忘却監査プロトコルの策定: 事前学習モデルおよび微調後モデルに対し、凍結された汎用ベンチマーク群(MMLU、GSM8K、HumanEval、ARC)を実行する。
4. 相対保持率(Retention Ratio)の計算: Retention = Metric_post / Metric_pre。許容される性能低下の閾値(例: 汎用能力の低下率 <= 5%)を設定する。
5. 緩和策の比較: リプレイバッファ(汎用データを10〜15%混合)、注意機構のみに限定したLoRA(MLP層の完全凍結)、KLダイバージェンス正則化。

演習と予測記録

微調前後のMMLU(64.2% -> 48.1%)およびGSM8K(52.0% -> 31.5%)のスコア変化から能力劣化率を算出し、3段階の具体的な緩和策を提示してください。

独立習得基準

汎用ベンチマークにおける性能劣化率を定量算定し、破滅的忘却を抑止するアーキテクチャおよびデータ設計を行えること。

公式ソースリソースと権利証跡

linking Open Access / PNAS Open Access

Overcoming Catastrophic Forgetting in Neural Networks

著者・提供機関: James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, et al. | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 2 Elastic weight consolidation

検証バージョンと日付: PNAS 2017 / arXiv:1612.00796v2 (Verified: 2026-10-30)

選定理由:

Foundational paper formalizing catastrophic forgetting during continual fine-tuning, explaining why updating parameters on domain distributions causes dramatic capability loss on pretraining tasks.

ソース前提知識:

Neural network weight drift, Fisher information matrix, continual learning.

安全フォールバック(オフライン回復性):

Mathematical explanation of weight trajectory divergence, Fisher regularized objectives, and forgetting audit protocols are integrated into the lesson.

比較対象候補リソースと選定評価 (2)

Cognitive science perspective; Kirkpatrick et al. provides the modern deep neural network gradient formulation (EWC).

Online path integral regularization; Kirkpatrick introduces the benchmark standard for evaluating catastrophic forgetting.

linking Open Access / CC BY 4.0

An Empirical Study of Catastrophic Forgetting in Large Language Models During Continual Fine-tuning

著者・提供機関: Yun Luo, Zhen Yang, Fandong Meng, Yingxue Liu, Jie Zhou, Yue Zhang | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 3 Method (3.1 Continual Tasks, 3.3 Evaluation Metric) and Section 5.1 Main Results

検証バージョンと日付: arXiv:2308.08747v2 (Verified: 2026-10-30)

選定理由:

Rigorous empirical investigation demonstrating how domain fine-tuning degrades foundation LLMs across reasoning, coding, and general instruction following, comparing full fine-tuning against parameter-efficient adapters.

ソース前提知識:

Instruction fine-tuning, general capability retention, LoRA vs full fine-tuning degradation.

安全フォールバック(オフライン回復性):

General benchmark regression tests, forgetting audit templates, and pre/post radar chart analysis are completely provided.

比較対象候補リソースと選定評価 (2)

Focuses on QA domain transfers; Luo et al. comprehensively assesses broad LLM capability collapse across multiple benchmark domains.

Studies forgetting after fine-tuning multimodal LLMs; Luo et al. targets text-only LLM continual fine-tuning and compares adapter-based with full-parameter tuning.

03 120 分

ファインチューニング前後の成果物比較と多次元トレードオフ分析

Agent支援エンジニアリングチェック

前提条件

第72日アクティビティ1〜2および推論リソース計算。

学習目標

タスク精度、推論遅延、メモリ消費、運用コストを総合評価する多次元トレードオフ決定マトリクスを構築する。

手順

1. 実運用における選定基準: モデル採用はテスト精度のみで決まることはなく、推論レイテンシ、VRAM容量、サービングコストとのトレードオフで決まる。
2. 5大トレードオフ次元: (a) タスク精度(EM、F1、ROUGE-L)、(b) 推論遅延(TTFT、TPS)、(c) メモリ使用量(重み、KVキャッシュ、アダプタオーバーヘッド)、(d) 学習・運用コスト(GPU時間、ディスク容量)、(e) 運用信頼性(スキーマ準拠率、過剰拒絶率)。
3. 成果物の比較: Base Model(ゼロショット)、汎用対話Chatモデル、ドメイン特化LoRAチェックポイント。
4. アダプタ融合の意思決定: 重み融合(ゼロレイテンシ、固定インスタンス)と動的アダプタ適用(マルチテナント共有、微小なカーネル呼び出しオーバーヘッド)の比較。
5. 事後正当化の防止: 評価結果を見る前に、本番稼働SLA(最低許容基準)を確定・文書化する。

演習と予測記録

Base 7B、Chat 7B、Domain LoRA 7B の3候補に対し、精度、P99遅延、VRAM、形式準拠率を比較するトレードオフ表を作成し、本番推奨構成を根拠とともに示してください。

独立習得基準

実験データとハードウェア制約に基づき多次元トレードオフ評価を行い、論理的な技術選定判断を下せること。

公式ソースリソースと権利証跡

linking Open Access

Llama 2: Open Foundation and Fine-Tuned Chat Models

著者・提供機関: Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, et al. | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 3.4 RLHF Results and Section 4.4 Safety Evaluation of Llama 2-Chat

検証バージョンと日付: arXiv:2307.09288v2 (Verified: 2026-10-30)

選定理由:

Defines the standard LLaMA-2 instruction format ([INST] <<SYS>> ... <</SYS>> [/INST]) and analyzes token boundary alignment impact on generation stability.

ソース前提知識:

Transformer architecture, RLHF/SFT pipelines.

安全フォールバック(オフライン回復性):

The LLaMA-2 prompt structure, token boundary rules, and comparative analysis are fully worked out in curriculum lessons.

比較対象候補リソースと選定評価 (2)

Original foundation model paper without conversational chat tuning details; LLaMA-2 formalizes dialogue formatting.

Jiang et al. Mistral 7B ↗ compared_alternative [Open Access]

Adopts similar [INST] formatting; LLaMA-2 provides the foundational ablation on system prompt integration.

linking Open Access

Training language models to follow instructions with human feedback

著者・提供機関: Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, et al. | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 4.2 Results on public NLP datasets ('alignment tax') and Appendix E.1

検証バージョンと日付: arXiv:2203.02155v1 (Verified: 2026-10-30)

選定理由:

Foundational InstructGPT paper defining the SFT objective: maximizing log-likelihood of demonstrator completions conditioned on prompts.

ソース前提知識:

Supervised fine-tuning, conditional autoregressive generation.

安全フォールバック(オフライン回復性):

The conditional likelihood objective and prompt-conditioning derivations are completely formulated in the review.

比較対象候補リソースと選定評価 (2)

Earlier RLHF formulation on summarization; InstructGPT standardizes the prompt-response SFT training phase.

Focuses on massive multi-task scaling; InstructGPT details the exact prompt-conditioned loss setup.

04 120 分

実践評価: 再現可能で誠実なモデル比較レポートの執筆

独立習得チェック(AI 支援なし)

前提条件

第72日アクティビティ1〜3。

学習目標

95%ブートストラップ信頼区間、定性的エラー内訳、ネガティブ結果、再現性台帳を網羅した誠実なモデル比較レポートを執筆する。

手順

参照資料: この活動に割り当てられた既存の読解・練習時間内で、Hugging Face LLM Evaluation Guidebook (legacy edition) の contents/model-as-a-judge/evaluating-your-evaluator.md; contents/troubleshooting/troubleshooting-reproducibility.md を参照し、ローカル課題とのつながりを一つ自分の言葉で説明する。既存の演習と合格基準は維持し、外部資料が開けない場合は本コース独自の説明を使う。1. Mitchellら(2019)Model Cards および Gebruら(2021)Datasheets の報告基準に準拠する。
2. レポートの標準構成: (1) エグゼクティブサマリーと決定事項、(2) 事前登録されたプロトコルと仮説、(3) 95%信頼区間付き定量的スコアカード、(4) 定性的エラー分類内訳(ハルシネーション、形式違反、拒絶、忘却)、(5) 運用トレードオフマトリクス、(6) ネガティブ結果と限界、(7) 再現性付録(乱数シード、プロンプト完全署名)。
3. 科学的誠実性の徹底: 統計的有意差が認められないスコア差を「圧勝」と偽らず、信頼区間の重複とp値を明記する。
4. 権利と再利用条件の完全な開示と追跡可能性を保証する。

演習と予測記録

N=100件のテストスライスにおいて、Model AlphaがModel Betaに対して+3.2%の精度差を示した場合のエグゼクティブサマリーを作成し、統計的有意性の有無を誠実に論述してください。

独立習得基準

ブートストラップ信頼区間、定性的エラー分析、ネガティブ結果を隠蔽せず開示する誠実な技術評価報告書を執筆できること。

公式ソースリソースと権利証跡

linking CC BY-NC-SA 4.0 noncommercial share-alike

Hugging Face LLM Evaluation Guidebook (legacy edition)

著者・提供機関: Hugging Face evaluation-guidebook contributors | オリジナル出所URL ↗

該当セクション・タイムスタンプ: contents/model-as-a-judge/evaluating-your-evaluator.md; contents/troubleshooting/troubleshooting-reproducibility.md

検証バージョンと日付: Public edition checked 2026-11-01; moving pages may change

選定理由:

Teaching-oriented evaluation design and reproducibility guidance complements the benchmark papers. Stable methodological chapters only; not a current tooling/version reference.

ソース前提知識:

Held-out data, basic language-model metrics and experimental comparisons.

安全フォールバック(オフライン回復性):

Use the original localized explanations, exercises and checks already present in this activity; no external account or purchase is required for that fallback.

比較対象候補リソースと選定評価 (2)
HELM ↗ compared_alternative [Open Access / CC BY 4.0]

Retained for the multi-metric framework; the guidebook makes practical choices easier to teach.

LM Evaluation Harness ↗ compared_alternative [MIT]

Useful implementation cross-check; tool configuration alone does not teach metric choice or evaluator limitations.

linking arXiv non-exclusive license / Open Access

Model Cards for Model Reporting

著者・提供機関: Margaret Mitchell, Simone Wu, Andrew Zaldivar, Parker Barnes, Lucy Vasserman, Ben Hutchinson, Elena Spitzer, Inioluwa Deborah Raji, Timnit Gebru | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 4 Model Card Sections (4.1-4.9)

検証バージョンと日付: FAT* 2019 / arXiv:1810.03993v2 (Verified: 2026-10-30)

選定理由:

Primary standard for structured, transparent model reporting, mandating explicit disclosure of intended uses, evaluation slices, out-of-scope tasks, ethical considerations, and negative results.

ソース前提知識:

Evaluation reporting, demographic and performance slicing, model limitations and caveats.

安全フォールバック(オフライン回復性):

Complete Model Card Markdown templates, section schemas, and evaluation disclosure checklists are provided in the curriculum.

比較対象候補リソースと選定評価 (2)

Corporate transparency audit index; Mitchell et al. provides the concrete technical artifact specification for individual model releases.

Dataset documentation focus; Mitchell et al. provides the required specification for trained model artifact reporting.

linking arXiv non-exclusive license / Open Access

Datasheets for Datasets

著者・提供機関: Timnit Gebru, Jamie Morgenstern, Briana Vecchione, Jennifer Wortman Vaughan, Hanna Wallach, Hal Daumé III, Kate Crawford | オリジナル出所URL ↗

該当セクション・タイムスタンプ: Section 3 Questions and Workflow (3.1 Motivation through 3.7 Maintenance)

検証バージョンと日付: Communications of the ACM 2021 / arXiv:1803.09010v8 (Verified: 2026-10-30)

選定理由:

Foundational literature introducing standardized documentation for machine learning datasets, specifying questions on dataset composition, collection mechanisms, preprocessing, and distribution rights.

ソース前提知識:

Dataset provenance, curation motivation, preprocessing transparency, maintenance lifecycle.

安全フォールバック(オフライン回復性):

Datasheet questionnaires, provenance schemas, and dataset auditing checklists are completely integrated into lesson materials.

比較対象候補リソースと選定評価 (2)

Linguistic demographic documentation focus; Gebru et al. provides the universal engineering datasheet framework adopted across AI.

Nutrition label metaphor; Gebru et al. is a widely cited framework for dataset documentation in both academic and industrial practice.