---
title: "Contextual forgetting — 맥락 망각"
source: "https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81"
wiki: "systems-analysis.info/int"
article: "Contextual_forgetting_—_맥락_망각"
language: "ko"
categories:
  - "Category:Korean"
  - "Category:Large language models"
  - "Category:Machine learning"
revision_id: 1227
wiki_created_at: 2026-09-06T22:45:26Z
wiki_modified_at: 2026-09-06T22:45:26Z
downloaded_at: 2026-09-07T22:44:49Z
---

# Contextual forgetting — 맥락 망각

**대형 언어 모델에서의 컨텍스트 망각(맥락 망각)**은 대형 언어 모델(LLM)이 하나의 상호작용 세션 내에서 이전에 제공된 정보를 잃어버리거나, 무시하거나, 비효율적으로 활용하는 다면적인 현상이다<sup>[\[1\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-howard-cds-1)</sup>. 인간의 기억과 달리, LLM은 장기적인 상태 저장소를 갖지 않으며, 오직 **컨텍스트 윈도우(context window)**——모델이 한 번에 처리할 수 있는 제한된 텍스트 분량(토큰 단위)——에만 의존한다. 이 윈도우는 모델의 단기 기억 또는 작업 기억의 역할을 한다<sup>[\[2\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-liu2023-lost-in-middle-2)</sup>.

이 제약의 가장 잘 알려진 발현은 '**중간 소실(Lost in the Middle)'** 문제——모델이 긴 컨텍스트의 앞부분과 끝부분에 위치한 정보는 더 잘 처리하고, 중간에 위치한 정보는 더 못 처리하는 경향——이다<sup>[\[2\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-liu2023-lost-in-middle-2)</sup>. 이 현상은 오류가 아니라 transformer 아키텍처와 학습 원리에서 비롯된 근본적인 특성이다.

## 두 가지 망각 유형: 컨텍스트 망각과 파국적 망각

LLM에서 나타나는 두 가지 근본적으로 다른 '망각' 유형을 구별하는 것이 중요하다: 컨텍스트 내 망각과 파국적 망각.

### 컨텍스트 내 망각(중간 소실)

이 유형의 망각은 이미 학습된 모델과의 **단일 상호작용 세션(추론)** 중에 발생한다. 이는 **컨텍스트 윈도우**의 제약과 관련이 있다. 대화나 문서의 분량이 윈도우 크기를 초과하면, 모델은 새로운 내용을 위한 공간을 확보하기 위해 가장 오래된 단편들을 '잊어버린다'. 윈도우 내에서도 컨텍스트 중간 부분의 정보는 덜 효율적으로 활용될 수 있다. 이것은 모델의 작업 기억 제약이다<sup>[\[3\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-aclanthology-lost-in-middle-3)</sup>. 저널리즘 분야에서는 이 현상을 '**컨텍스트 저하 증후군(Context Degradation Syndrome, CDS)'**이라고도 부른다<sup>[\[1\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-howard-cds-1)</sup>.

### 파국적 망각(모델 드리프트)

**모델 드리프트(*model drift*)**라고도 알려진 이 유형의 망각은 새로운 데이터로 모델을 **fine-tuning하는 과정**에서 발생한다. 방대한 일반 지식 코퍼스로 사전 학습된 모델을 고도로 전문화된 데이터셋(예: 의료 텍스트)으로 추가 학습시키면 모델의 가중치가 변화한다. 이로 인해 새로운 과제와 무관한 기존에 습득된 지식과 능력이 저하되거나 '삭제'될 수 있다<sup>[\[4\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-greyling-catastrophic-4)</sup>.

## 원인과 메커니즘

컨텍스트 망각은 transformer 아키텍처와 벡터 공간의 기하학적 특성의 직접적인 결과이다.

### '중간 소실(Lost in the Middle)' 효과

2023년 스탠퍼드 대학교의 'Lost in the Middle'이라는 연구는 긴 컨텍스트에서 정보를 검색할 때 LLM의 성능이 **U자형 곡선**을 그린다는 것을 명확히 보여주었다<sup>[\[2\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-liu2023-lost-in-middle-2)</sup>. 관련 정보가 컨텍스트의 맨 앞(**초두 효과**)이나 맨 끝(**최신 효과**)에 위치할 때 답변 정확도가 가장 높으며, 중간에 '숨겨져' 있을 경우 정확도가 현저히 떨어진다. 이 현상의 원인:

- **Attention 메커니즘**: Transformer 아키텍처는 전체적인 일관성을 유지하기 위해 초기 토큰(소위 'attention sinks'라 불리는 '주의 앵커')과 로컬 컨텍스트에 불균형적으로 많은 주의를 기울이는 특성이 있으며, 이로 인해 중간 부분에 대한 '초점'이 약해진다<sup>[\[5\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-neurips-poster-vectors-5)</sup>.
- **사전 학습 데이터**: 모델은 대부분 상대적으로 짧은 텍스트로 학습되는데, 이런 텍스트에서는 중요한 정보가 시작 부분으로부터 수만 토큰 떨어진 곳에 위치하는 경우가 드물어, 매우 긴 컨텍스트를 효율적으로 활용하는 능력이 저해된다<sup>[\[6\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-an2024-context-fall-short-6)</sup>.

## 발현 양상과 결과

- **컨텍스트 저하 증후군**: 장기적인 대화 과정에서 모델은 '대화의 맥락을 잃기' 시작하여, 답변을 반복하고, 이전에 확인된 사실과 모순되며, 점점 더 일반적이고 모호한 답변을 제공한다<sup>[\[1\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-howard-cds-1)</sup>.
- **다단계 과제에서의 오류**: 여러 차례의 대화를 통해 조건이 구체화되는 과제에서, 모델은 잘못된 초기 가정에 '고착'되어 이후의 수정 사항을 무시할 수 있으며, 이로 인해 과제를 완전히 해결하지 못하는 결과가 초래된다<sup>[\[7\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-anthropic-claude3-family-8)[\[9\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-google-gemini1-5-pro-9)</sup>. 그러나 연구에 따르면 윈도우를 단순히 확장하는 것만으로는 효율적인 활용이 보장되지 않으며, '중간 소실' 문제는 여전히 지속된다<sup>[\[2\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-liu2023-lost-in-middle-2)</sup>.

### 고급 prompt 엔지니어링

prompt를 체계적으로 구성하면 성능을 크게 향상시킬 수 있다. Anthropic은 다음과 같은 방법을 제안한다<sup>[\[10\]](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-anthropic-long-context-tips-10)</sup>:

- **문서를 앞부분에 배치**: 긴 텍스트를 지침과 질문 앞의 prompt 맨 앞에 놓는다.
- **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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_note-google-cloud-rag-11)</sup>.

## 참고 링크

- Lost in the Middle: How Language Models Use Long Contexts — 스탠퍼드 대학교 원본 연구.
- Anthropic의 100K 토큰 컨텍스트 윈도우를 갖춘 Claude 발표.

## 참고 문헌

- Liu, N. F. et al. (2023). *Lost in the Middle: How Language Models Use Long Contexts*. arXiv:2307.03172.
- An, C. et al. (2024). *Why Does the Effective Context Length of LLMs Fall Short?*. arXiv:2410.18745.
- Ding, J. et al. (2023). *LongNet: Scaling Transformers to 1,000,000,000 Tokens*. arXiv:2307.02486.
- Yang, A. et al. (2024). *Context Parallelism for Scalable Million-Token Inference*. arXiv:2411.01783.
- Chen, S. et al. (2023). *Extending Context Window of Large Language Models via Positional Interpolation*. arXiv:2306.15595.
- Ding, Y. et al. (2024). *LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens*. arXiv:2402.13753.
- Li, S. et al. (2023). *Functional Interpolation for Relative Positions Improves Long Context Transformers*. arXiv:2310.04418.
- Dong, Z. et al. (2024). *Exploring Context Window of Large Language Models via Decomposed Positional Vectors*. arXiv:2405.18009.
- Laban, P. et al. (2025). *LLMs Get Lost in Multi-Turn Conversation*. arXiv:2505.06120.
- 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. DOI:10.3390/app14073076.
- Yang, A. & Reizenstein, J. (2024). *Exploring Context Window of LLMs via Decomposed Positional Vectors* (NeurIPS Poster). NeurIPS 2024.

## 각주

1.  <span id="cite_note-howard-cds-1">↑ <sup>[1.0](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_ref-howard-cds_1-0)</sup> <sup>[1.1](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_ref-howard-cds_1-1)</sup> <sup>[1.2](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_ref-liu2023-lost-in-middle_2-0)</sup> <sup>[2.1](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_ref-liu2023-lost-in-middle_2-1)</sup> <sup>[2.2](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#cite_ref-liu2023-lost-in-middle_2-2)</sup> <sup>[2.3](https://systems-analysis.info/int/Contextual_forgetting_%E2%80%94_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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_%EB%A7%A5%EB%9D%BD_%EB%A7%9D%EA%B0%81#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>
