---
title: "Contextual forgetting — コンテキストの忘却"
source: "https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4"
wiki: "systems-analysis.info/int"
article: "Contextual_forgetting_—_コンテキストの忘却"
language: "ja"
categories:
  - "Category:Japanese"
  - "Category:Large language models"
  - "Category:Machine learning"
revision_id: 1225
wiki_created_at: 2026-09-06T22:45:24Z
wiki_modified_at: 2026-09-06T22:45:24Z
downloaded_at: 2026-09-07T22:44:49Z
---

# Contextual forgetting — コンテキストの忘却

**大規模言語モデルにおけるコンテキストの忘却**とは、大規模言語モデル（LLM）が、単一の対話セッション内で以前に提供された情報を失ったり、無視したり、非効率的に使用したりする多面的な現象である<sup>[\[1\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-howard-cds-1)</sup>。人間の記憶とは異なり、LLMは長期的な状態保存領域を持たず、モデルが一度に処理できるテキストの限られた量（トークン単位）である**コンテキストウィンドウ**のみに依存する。このウィンドウは、モデルの短期記憶またはワーキングメモリとして機能する<sup>[\[2\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-liu2023-lost-in-middle-2)</sup>。

この制約の最もよく知られた現れが、**「中間での喪失」（Lost in the Middle）**問題である。これは、モデルが長いコンテキストの最初と最後に位置する情報をより良く処理し、中間の情報を処理しにくくなる傾向を指す<sup>[\[2\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-liu2023-lost-in-middle-2)</sup>。この現象は不具合ではなく、トランスフォーマーアーキテクチャとその学習原理に起因する基本的な特性である。

## 2種類の忘却：コンテキスト忘却と破滅的忘却

LLMにおける「忘却」には、コンテキスト内忘却と破滅的忘却という、根本的に異なる2つのタイプを区別することが重要である。

### コンテキスト内忘却（中間での喪失）

このタイプの忘却は、学習済みモデルとの**単一の対話セッション中**（推論中）に発生する。これは**コンテキストウィンドウ**の制約に関連している。対話や文書の量がウィンドウサイズを超えると、モデルは新しい情報のためのスペースを確保するために最も古い部分を「忘れる」。ウィンドウ内であっても、コンテキストの中間にある情報は効率的に利用されないことがある。これはモデルのワーキングメモリの制約である<sup>[\[3\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-aclanthology-lost-in-middle-3)</sup>。一般向けの文章では、この現象は**「コンテキスト劣化症候群」**（Context Degradation Syndrome, CDS）とも呼ばれる<sup>[\[1\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-howard-cds-1)</sup>。

### 破滅的忘却（モデルドリフト）

「モデルドリフト」（*model drift*）としても知られるこのタイプの忘却は、モデルを新しいデータで**ファインチューニングする過程**で発生する。巨大な一般知識コーパスで事前学習されたモデルを、特定の専門データセット（例えば医療テキスト）で追加学習させると、その重みが変化する。これにより、新しいタスクとは無関係な、以前に学習した知識やスキルが劣化したり「消去」されたりする可能性がある<sup>[\[4\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-greyling-catastrophic-4)</sup>。

## 原因とメカニズム

コンテキストの忘却は、トランスフォーマーアーキテクチャとベクトル空間の幾何学的性質の直接的な結果である。

### 「中間での喪失」（Lost in the Middle）効果

2023年に行われたスタンフォード大学の研究「Lost in the Middle」は、長いコンテキストから情報を抽出する際のLLMの性能が**U字型の曲線**を描くことを明確に示した<sup>[\[2\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-liu2023-lost-in-middle-2)</sup>。回答の精度は、関連情報がコンテキストの最初（**初頭効果**）または最後（**新近性効果**）にある場合に最も高くなり、中間に「隠されて」いる場合には著しく低下する。 この現象の原因は以下の通りである：

- **アテンション機構**: トランスフォーマーアーキテクチャは、その性質上、全体的な一貫性を維持するために最初のトークン（「アテンションシンク」または*attention sinks*と呼ばれる）に不釣り合いに多くの注意を払い、また局所的なコンテキストにも注意を払うため、中間部分への「焦点」が弱まる<sup>[\[5\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-neurips-poster-vectors-5)</sup>。
- **事前学習データ**: モデルはほとんどの場合、比較的短いテキストで学習される。そのようなテキストでは、重要な情報が開始点から数万トークンも離れた場所にあることは稀であり、このことが非常に長いコンテキストを効果的に利用する妨げとなっている<sup>[\[6\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-an2024-context-fall-short-6)</sup>。

## 兆候と結果

- **コンテキスト劣化症候群**: 長時間の対話において、モデルは「話の筋を見失い」始め、回答を繰り返したり、以前に確立された事実に矛盾したり、ますます一般的で曖昧な回答をするようになる<sup>[\[1\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-howard-cds-1)</sup>。
- **多段階タスクでの失敗**: 複数のやり取りを通じて条件が уточされるタスクにおいて、モデルは誤った初期の仮定に「固執」し、その後の уточを無視することがある。これにより、タスクを完全に解決できなくなる<sup>[\[7\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-arxiv-multi-turn-lost-7)</sup>。
- **文書分析の信頼性の欠如**: 長い報告書や法的文書を分析する際、LLMは中央のセクションに位置する重要な事実を見落とす可能性があり、そのようなタスクにおいては信頼性の低いツールとなる。

## 緩和策と防止策

研究者や開発者は、コンテキストの忘却問題に対処するために、いくつかのアプローチを採用している。

### コンテキストウィンドウの拡大

最も直接的なアプローチは、コンテキストウィンドウのサイズを拡大することである。**Claude 3**（20万トークン）や**Gemini 1.5 Pro**（最大200万トークン）のような最新モデルは、この上限を大幅に拡大した<sup>[\[8\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-anthropic-claude3-family-8)[\[9\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-google-gemini1-5-pro-9)</sup>。しかし、研究によれば、単にウィンドウを拡大するだけではその効果的な利用が保証されず、「中間での喪失」問題は依然として残ることが示されている<sup>[\[2\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-liu2023-lost-in-middle-2)</sup>。

### 高度なプロンプトエンジニアリング

プロンプトを巧みに構成することで、パフォーマンスを大幅に向上させることができる。Anthropic社は以下の実践方法を提案している<sup>[\[10\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-anthropic-long-context-tips-10)</sup>：

- **文書を先頭に配置する**: 長いテキストを、指示や質問の前に、プロンプトの冒頭に配置する。
- **XMLタグの使用**: 文書を\`\<document\>\`タグで囲み、明確に区別する。
- **引用による回答の根拠付け**: モデルに対し、まず関連する引用を抽出し、それに基づいて回答を生成するように指示する。

### メモリの外部化：Retrieval-Augmented Generation (RAG)

根本的に異なるアプローチは、すべての情報をコンテキストウィンドウに含めるのではなく、外部システム（ベクトルデータベース）に情報を格納し、要求に応じて提供することである。

1.  **検索 (Retrieve)**: クエリが入力されると、システムは外部データベースで関連情報を検索する。
2.  **拡張 (Augment)**: 見つかった断片が元のクエリに追加される。
3.  **生成 (Generate)**: LLMは提供されたコンテキストに基づいて回答を生成する。

**RAG**は、実質的に無制限のデータ量を扱うことを可能にし、最新かつ検証済みの情報へのアクセスを提供するため、ハルシネーションのリスクを低減し、今日最も信頼性の高い解決策とされている<sup>[\[11\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_note-google-cloud-rag-11)</sup>。

## 外部リンク

- <a href="https://cs.stanford.edu/~nfliu/papers/lost-in-the-middle.arxiv2023.pdf" class="external text" rel="nofollow">Lost in the Middle: How Language Models Use Long Contexts</a> — スタンフォード大学による独創的な研究。
- <a href="https://www.anthropic.com/news/100k-context-windows" class="external text" rel="nofollow">Claudeの100Kコンテキストウィンドウ発表</a> by Anthropic。

## 参考文献

- Liu, N. F. et al. (2023). *Lost in the Middle: How Language Models Use Long Contexts*. <a href="https://arxiv.org/abs/2307.03172" class="external text" rel="nofollow">arXiv:2307.03172</a>.
- An, C. et al. (2024). *Why Does the Effective Context Length of LLMs Fall Short?*. <a href="https://arxiv.org/abs/2410.18745" class="external text" rel="nofollow">arXiv:2410.18745</a>.
- Ding, J. et al. (2023). *LongNet: Scaling Transformers to 1,000,000,000 Tokens*. <a href="https://arxiv.org/abs/2307.02486" class="external text" rel="nofollow">arXiv:2307.02486</a>.
- Yang, A. et al. (2024). *Context Parallelism for Scalable Million-Token Inference*. <a href="https://arxiv.org/abs/2411.01783" class="external text" rel="nofollow">arXiv:2411.01783</a>.
- Chen, S. et al. (2023). *Extending Context Window of Large Language Models via Positional Interpolation*. <a href="https://arxiv.org/abs/2306.15595" class="external text" rel="nofollow">arXiv:2306.15595</a>.
- Ding, Y. et al. (2024). *LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens*. <a href="https://arxiv.org/abs/2402.13753" class="external text" rel="nofollow">arXiv:2402.13753</a>.
- Li, S. et al. (2023). *Functional Interpolation for Relative Positions Improves Long Context Transformers*. <a href="https://arxiv.org/abs/2310.04418" class="external text" rel="nofollow">arXiv:2310.04418</a>.
- Dong, Z. et al. (2024). *Exploring Context Window of Large Language Models via Decomposed Positional Vectors*. <a href="https://arxiv.org/abs/2405.18009" class="external text" rel="nofollow">arXiv:2405.18009</a>.
- Laban, P. et al. (2025). *LLMs Get Lost in Multi-Turn Conversation*. <a href="https://arxiv.org/abs/2505.06120" class="external text" rel="nofollow">arXiv:2505.06120</a>.
- Li, R. et al. (2024). *Extending Context Window in Large Language Models with Segmented Base Adjustment for Rotary Position Embeddings*. *Applied Sciences*, 14(7), 3076. <a href="https://www.mdpi.com/2076-3417/14/7/3076" class="external text" rel="nofollow">DOI:10.3390/app14073076</a>.
- Yang, A. & Reizenstein, J. (2024). *Exploring Context Window of LLMs via Decomposed Positional Vectors* (NeurIPS Poster). <a href="https://neurips.cc/virtual/2024/poster/92943" class="external text" rel="nofollow">NeurIPS 2024</a>.

## 脚注

1.  <span id="cite_note-howard-cds-1">↑ <sup>[1.0](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-howard-cds_1-0)</sup> <sup>[1.1](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-howard-cds_1-1)</sup> <sup>[1.2](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-howard-cds_1-2)</sup> Howard, James. “Context Degradation Syndrome: When Large Language Models Lose the Plot”. *jameshoward.us*. <a href="https://jameshoward.us/2024/11/26/context-degradation-syndrome-when-large-language-models-lose-the-plot/" class="external autonumber" rel="nofollow">[1]</a></span>
2.  <span id="cite_note-liu2023-lost-in-middle-2">↑ <sup>[2.0](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-liu2023-lost-in-middle_2-0)</sup> <sup>[2.1](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-liu2023-lost-in-middle_2-1)</sup> <sup>[2.2](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-liu2023-lost-in-middle_2-2)</sup> <sup>[2.3](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-liu2023-lost-in-middle_2-3)</sup> Liu, Nelson F.; et al. “Lost in the Middle: How Language Models Use Long Contexts”. *arXiv*. <a href="https://cs.stanford.edu/~nfliu/papers/lost-in-the-middle.arxiv2023.pdf" class="external autonumber" rel="nofollow">[2]</a></span>
3.  <span id="cite_note-aclanthology-lost-in-middle-3">[↑](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-aclanthology-lost-in-middle_3-0) Liu, Nelson F.; et al. “Lost in the Middle: How Language Models Use Long Contexts”. *ACL Anthology*. <a href="https://aclanthology.org/2024.tacl-1.9/" class="external autonumber" rel="nofollow">[3]</a></span>
4.  <span id="cite_note-greyling-catastrophic-4">[↑](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-greyling-catastrophic_4-0) Greyling, Cobus. “Catastrophic Forgetting In LLMs”. *Medium*. <a href="https://cobusgreyling.medium.com/catastrophic-forgetting-in-llms-bf345760e6e2" class="external autonumber" rel="nofollow">[4]</a></span>
5.  <span id="cite_note-neurips-poster-vectors-5">[↑](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-neurips-poster-vectors_5-0) “Exploring Context Window of Large Language Models via Decomposed Positional Vectors”. *NeurIPS Proceedings*. <a href="https://neurips.cc/virtual/2024/poster/92943" class="external autonumber" rel="nofollow">[5]</a></span>
6.  <span id="cite_note-an2024-context-fall-short-6">[↑](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-an2024-context-fall-short_6-0) An, Chenxin; et al. “Why Does the Effective Context Length of LLMs Fall Short?”. *arXiv*. <a href="https://arxiv.org/html/2410.18745v1" class="external autonumber" rel="nofollow">[6]</a></span>
7.  <span id="cite_note-arxiv-multi-turn-lost-7">[↑](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-arxiv-multi-turn-lost_7-0) “LLMs Get Lost In Multi-Turn Conversation”. *arXiv*. <a href="https://arxiv.org/html/2505.06120v1" class="external autonumber" rel="nofollow">[7]</a></span>
8.  <span id="cite_note-anthropic-claude3-family-8">[↑](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-anthropic-claude3-family_8-0) “Introducing the next generation of Claude”. *Anthropic*. <a href="https://www.anthropic.com/news/claude-3-family" class="external autonumber" rel="nofollow">[8]</a></span>
9.  <span id="cite_note-google-gemini1-5-pro-9">[↑](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-google-gemini1-5-pro_9-0) “Google's Gemini 1.5 Pro - Revolutionizing AI with a 1M Token Context Window”. *Medium*. <a href="https://medium.com/google-cloud/googles-gemini-1-5-pro-revolutionizing-ai-with-a-1m-token-context-window-bfea5adfd35f" class="external autonumber" rel="nofollow">[9]</a></span>
10. <span id="cite_note-anthropic-long-context-tips-10">[↑](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-anthropic-long-context-tips_10-0) “Long context prompting tips”. *Anthropic Documentation*. <a href="https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/long-context-tips" class="external autonumber" rel="nofollow">[10]</a></span>
11. <span id="cite_note-google-cloud-rag-11">[↑](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%E3%82%B3%E3%83%B3%E3%83%86%E3%82%AD%E3%82%B9%E3%83%88%E3%81%AE%E5%BF%98%E5%8D%B4#cite_ref-google-cloud-rag_11-0) “What is Retrieval-Augmented Generation (RAG)?”. *Google Cloud*. <a href="https://cloud.google.com/use-cases/retrieval-augmented-generation" class="external autonumber" rel="nofollow">[11]</a></span>
