[논문 리뷰] Clustering-driven Memory Compression for On-device Large Language Models
이 논문은 온-디바이스 LLM을 위한 클러스터링 기반 메모리 압축 방법을 제안합니다. 이 방법은 클러스터 내에서 메모리를 그룹화하고 병합하여 맥락 사용을 줄이면서 개인화 품질을 보존하고, 평균 및 연결(concatenation) 베이스라인보다 성능이 더 우수합니다.
Large language models (LLMs) often rely on user-specific memories distilled from past interactions to enable personalized generation. A common practice is to concatenate these memories with the input prompt, but this approach quickly exhausts the limited context available in on-device LLMs. Compressing memories by averaging can mitigate context growth, yet it frequently harms performance due to semantic conflicts across heterogeneous memories. In this work, we introduce a clustering-based memory compression strategy that balances context efficiency and personalization quality. Our method groups memories by similarity and merges them within clusters prior to concatenation, thereby preserving coherence while reducing redundancy. Experiments demonstrate that our approach substantially lowers the number of memory tokens while outperforming baseline strategies such as naive averaging or direct concatenation. Furthermore, for a fixed context budget, clustering-driven merging yields more compact memory representations and consistently enhances generation quality.
연구 동기 및 목표
- 제한된 컨텍스트 창을 가진 온-디바이스 LLM에서 개인화를 추진한다.
- 사용자 히스토리로 인한 메모리 증가를 효율적으로 압축하여 해결한다.
- 맥락 효율성과 개인화 품질의 균형을 맞추기 위해 클러스터링 기반 메모리 압축을 제안한다.
- 다수의 모델/데이터셋에서 순수 평균(mean) 및 연결(concatenation) 베이스라인 대비 실험적 이득을 입증한다.
제안 방법
- BM25를 사용하여 상위-N개의 관련 메모리를 검색한다.
- 고정된 LLM에 LoRA 미세 조정을 사용하는 각 메모리를 고정된 메모리 토큰 집합으로 인코딩한다.
- 유사도에 따라 메모리를 K개의 클러스터로 군집화한다(K-Means).
- 각 클러스터 내의 메모리들을 평균화하여 클러스터 수준 표현을 구한다.
- 클러스터 표현을 연결(concatenate)하고 LLM 추론 전 입력 프롬프트에 추가한다.
실험 결과
연구 질문
- RQ1클러스터링 기반 메모리 병합이 온-디바이스 LLM에서 개인화 성능을 해치지 않으면서 토큰 사용을 줄일 수 있는가?
- RQ2고정된 컨텍스트 예산 아래 클러스터 수와 메모리당 메모리 토큰 수가 성능에 어떻게 영향을 미치는가?
- RQ3다양한 모델에서 클러스터링 기반 표현이 평균 기반(mean-based) 또는 순진한 연결 기반 접근법을 능가하는가?
- RQ4개인화된 메모리를 압축할 때 컨텍스트 효율성과 생성 품질 사이의 트레이드오프는 무엇인가?
주요 결과
- 클러스터링 기반 메모리 압축은 연결(concatenation)에 비해 메모리 토큰을 줄이면서 ROUGE-L 성능을 유지하거나 향상시킨다.
- 고정된 컨텍스트 예산에서 클러스터링은 순진한 평균화보다 더 간결한 메모리 표현과 더 나은 생성 품질을 제공한다.
- 모델(Qwen2.5 1.5B, Gemma3 1B, StableLM2 1.6B) 전반에 걸쳐 클러스터링은 ROUGE-L에서 평균(mean) 및 연결(concatenation) 베이스라인을 능가한다.
- 연결에 비해 훨씬 적은 메모리 토큰으로 성능 이득이 얻어졌으며(예: 더 적은 토큰으로 클러스터링).
- 클러스터 수를 늘리면 일반적으로 성능이 향상되나 일정 지점을 넘어서면 이득이 점차 감소한다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.