# LOGO -- Long cOntext aliGnment via efficient preference Optimization

LOGO -- 효율적인 선호 최적화를 통한 긴 문맥 정렬

Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang · arXiv · 2024년 10월 24일

- **연구 문제** 긴 컨텍스트 모델은 정보를 찾아내지만 생성 품질이 낮고 환각이나 지시 불이행이 나타나며, 기존 데이터 증강은 효과와 효율에 한계가 있습니다.
- **연구 방법** LOGO는 SimPO 기반의 참조 모델 없는 선호 최적화 목표에 여러 비선호 예시와 SFT 정규화 항을 더하고, 중요도 기반 청크 선택과 위치 인덱스 합성으로 학습 데이터를 구성합니다.
- **주요 결과** LOGO를 적용한 Llama-3-8B-Instruct-80K는 LongBench 평균이 42.3에서 47.0으로 올랐고, 합성 검색과 언어 모델링에서 원래 능력을 해치지 않는 결과가 보고됩니다.

## 장문맥 모델의 생성 문제

긴 컨텍스트를 처리하는 대규모 언어 모델(LCM)은 관련 정보를 토큰 단위로 찾아내는 능력은 뛰어나지만, 찾은 정보를 바탕으로 응답을 생성하는 능력은 충분하지 않습니다. 그 결과 지시를 따르지 않거나 환각이 포함된 응답이 나타납니다. 논문은 이 현상을 Figure 1(b)의 합성 검색 과제에서 검색 점수는 모델 간 차이가 작지만 재현 점수인 생성 성능의 차이는 크다는 관찰로 제시합니다. 저자들은 원인을 컨텍스트가 예측 부분보다 훨씬 길어서 교차 엔트로피(CE) 손실의 생성 신호가 컨텍스트 쪽 신호에 묻히는 것으로 해석합니다. 기존 데이터 증강 방식은 성능과 효율의 한계가 있어, 이 논문은 학습 목표 자체를 선호 최적화로 바꾸는 문제를 다룹니다.

![Figure 1: (a) Performance of LCMs on real-world long-context tasks; (b) Retrieval score (long- context understanding ability) and recall score (generation abil…](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334/figures/figure-ab0fdd09c2ea0cd9e1f33170c4c24609.png?thumb=512)

**Figure 1** : (a) Performance of LCMs on real-world long-context tasks; (b) Retrieval score (long- context understanding ability) and recall score (generation ability) of LCMs on the synthetic retrieval long-context task (multi-value NIAH); (c) Long-context (pre-)training data size for each LCM.

[원문](https://arxiv.org/abs/2410.18533v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang · LOGO -- Long cOntext aliGnment via efficient preference Optimization · 원문 그림 인용 · 원본 PDF 1쪽에서 그림 영역을 추출했습니다.

## LOGO의 학습 목표와 선호 최적화

LOGO는 긴 컨텍스트 정렬을 위해 선호 최적화를 도입한 학습 전략입니다. 기반이 되는 SimPO는 시퀀스의 평균 로그 확률을 암묵적 보상으로 사용하며 참조 모델이 필요 없습니다. LOGO 손실은 이 SimPO 목표를 바탕으로, 선호 응답 하나와 M개의 비선호 응답을 함께 사용하도록 확장됩니다. 여기서 M은 비선호 예시의 개수이며, M=1이면 목표가 SimPO로 축소됩니다. 여기에 λ를 곱한 SFT 정규화 항을 더해 정책 모델이 SFT로 얻은 원래 능력에서 벗어나지 않도록 하고, 이는 보상 해킹을 억제하는 역할을 합니다. 따라서 비선호 샘플 공간을 넓혀 여러 종류의 잘못된 출력에서 모델을 밀어내는 것이 핵심 아이디어입니다.

## 선호 데이터 구성과 위치 인덱스 합성

LOGO 학습 데이터는 긴 컨텍스트 C를 동일한 길이의 청크로 나누는 것에서 시작합니다. 자동 평가기는 spaCy의 개체 인식 모델로 청크와 질문이 공유하는 개체 수를 세어 중요도 점수를 부여합니다. 임계값 δ를 넘는 중요 청크만 질문과 결합해 선호 예측을 만들고, 중요하지 않은 청크를 섞거나 중요 청크만 일부 사용해 비선호 예측을 만듭니다. 이때 같은 컨텍스트를 공유하는 선호 샘플과 비선호 샘플이 만들어집니다. 긴 컨텍스트는 GPU 메모리를 넘기 쉬우므로, 위치 인덱스 합성으로 청크마다 서로 다른 위치 편향을 부여해 짧은 데이터를 긴 시퀀스처럼 모사합니다. 청크 내부 인덱스는 연속적으로 유지되고 인접 청크 사이에는 간격이 생깁니다.

![Figure 2: Dataset construction pipeline of LOGO](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334/figures/figure-75b8ddf1d77ed9a9e53e425cae4bb6f3.png?thumb=512)

**Figure 2** : Dataset construction pipeline of LOGO.

[원문](https://arxiv.org/abs/2410.18533v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang · LOGO -- Long cOntext aliGnment via efficient preference Optimization · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

![Figure 10: Illustration of positional indices synthesis process, where the original context length is 19, and we extend it to a context length of 43. It is not…](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334/figures/figure-4def1f6a12b2e01ffe9a4a5cd97f141c.png?thumb=512)

**Figure 10** : Illustration of positional indices synthesis process, where the original context length is 19, and we extend it to a context length of 43. It is noteworthy that one batch in the figure corresponds to one training sample of LOGO, which contains one preference instance and several dis-preference instances.

[원문](https://arxiv.org/abs/2410.18533v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang · LOGO -- Long cOntext aliGnment via efficient preference Optimization · 원문 그림 인용 · 원본 PDF 18쪽에서 그림 영역을 추출했습니다.

## 학습 설정과 평가 구성

학습 데이터는 RedPajama 기반 2,000개와 long-llm-data 기반 4,000개 인스턴스를 바탕으로 만들어졌으며, 최종적으로 12,000개 학습 샘플이 구성되었다고 보고됩니다. 이 설정에서 임계값 δ는 6, 선택하는 청크 수 N은 16, 비선호 예시 수 M은 2로 제시됩니다. 학습에서는 백본을 고정하고 LoRA로 어텐션과 토큰 임베딩 모듈만 미세 조정합니다. 실험 대상은 Llama-3-8B-Instruct, Llama-2-7B-Chat 같은 짧은 컨텍스트 모델과 Llama-3-8B-Instruct-80K, Mistral-Instruct-7B-V0.2 같은 긴 컨텍스트 모델입니다. 비교 방법은 YaRN, RandPOS, 전체 시퀀스 또는 예측 부분에 대한 지시 튜닝입니다.

β와 γ는 모델 계열마다 Meng et al.의 권장값을 따르며, 이 값들은 해당 모델 계열에 묶인 설정입니다.

## 실제 장문맥 과제 결과

LongBench에서 LOGO는 여러 설정에서 기존 방법보다 높은 평균 점수를 보고합니다. Llama-3-8B-Instruct-80K에서 기준선 42.3이 LOGO-80K 적용 후 47.0으로 올라가며, 이는 약 5점 상승입니다. 짧은 컨텍스트 모델에 대해서는 Llama-3-8B-Instruct-8K의 LOGO-64K 결과가 43.9로, YaRN-64K의 40.9와 RandPOS-64K의 36.8보다 높습니다. 다만 Code 범주는 학습 데이터가 해당 영역을 다루지 않아 제외되었습니다. 요약과 합성 과제에서 LOGO의 향상이 두드러진다고 원문은 설명하며, 이는 정보를 여러 위치에서 모아야 하는 과제에서의 효과로 해석됩니다.

![Table 1: Evaluation results on LongBench benchmark, where † denotes training-free method](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334/figures/figure-6e783b15ecc4b4fb288bae65f45dc473.png?thumb=512)

**Table 1** : Evaluation results on LongBench benchmark, where † denotes training-free method.

[원문](https://arxiv.org/abs/2410.18533v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang · LOGO -- Long cOntext aliGnment via efficient preference Optimization · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

## 합성 검색과 언어 모델링 결과

Needle-in-a-Haystack 평가에서 LOGO는 원래 LCM이 실패하는 영역의 성능을 개선한다고 보고됩니다. 이 실험은 8K부터 88K까지 0.5K 간격으로 측정되었으며, 원래 LCM과 LOGO 적용 모델은 비슷한 색 패턴을 보입니다. 언어 모델링은 PG-19 테스트 세트에서 2K부터 64K까지의 컨텍스트 길이로 PPL을 측정했습니다. LCM에서는 원래 모델과 LOGO의 PPL 곡선이 거의 겹쳐, 언어 모델링 능력을 해치지 않는다고 설명됩니다. SCM에서는 LOGO가 기준선보다 컨텍스트 창을 넓히면서도 PPL을 낮게 유지합니다.

![Figure 3: Results of the Needle-in-a-Haystack testing](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334/figures/figure-b1b0341746437b6d72d9338b28656017.png?thumb=512)

**Figure 3** : Results of the Needle-in-a-Haystack testing.

[원문](https://arxiv.org/abs/2410.18533v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang · LOGO -- Long cOntext aliGnment via efficient preference Optimization · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

![Figure 4: Evaluation results of language modeling task. The solid and dashed curves represent the PPL of the baselines and LOGO, respectively](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334/figures/figure-74a2e8b34f71ad72a5666116db66f360.png?thumb=512)

**Figure 4** : Evaluation results of language modeling task. The solid and dashed curves represent the PPL of the baselines and LOGO, respectively.

[원문](https://arxiv.org/abs/2410.18533v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang · LOGO -- Long cOntext aliGnment via efficient preference Optimization · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

## 절제 실험과 학습 목표의 구성요소

절제 실험은 Llama-3-8B-Instruct-80K를 대상으로 수행되었습니다. λ를 바꾸면 PPL은 낮아지지만 LongBench 평균은 약 1.5점 정도만 달라지는 것으로 보고됩니다. M을 늘리면 실제 과제 점수가 오르는 반면 언어 모델링 성능은 약간 떨어지고, 메모리 사용량은 커져 GPU 한계에 가까워집니다. 컨텍스트 길이를 4K에서 8K로 바꾼 설정은 두 과제 모두에서 성능을 높였고, 원문은 짧은 원래 길이에서 16배로 확장하면 일부 위치 인덱스가 빠져 성능이 떨어질 수 있다고 해석합니다. 또한 SFT 손실을 전체 시퀀스에 적용하면 검색 능력이 점차 떨어지지만, LOGO는 생성과 검색 능력을 함께 높이는 것으로 보고됩니다.

![Figure 6: Ablation study results. (a) Comparison among different settings on the language modeling task (PPL) and real-world tasks (Avg. score on LongBench tes…](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334/figures/figure-5975eb88cafe62d316bba38d159054cb.png?thumb=512)

**Figure 6** : Ablation study results. (a) Comparison among different settings on the language modeling task (PPL) and real-world tasks (Avg. score on LongBench testing set); (b) Reward difference dis- tribution under different M settings; (c) Training GPU memory consumption of different settings.

[원문](https://arxiv.org/abs/2410.18533v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang · LOGO -- Long cOntext aliGnment via efficient preference Optimization · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.

![Figure 7: Comparison between SFT and LOGO training strategies on the synthetic retrieval task](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334/figures/figure-e8b55be67d275aae827b61b133383e54.png?thumb=512)

**Figure 7** : Comparison between SFT and LOGO training strategies on the synthetic retrieval task.

[원문](https://arxiv.org/abs/2410.18533v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang · LOGO -- Long cOntext aliGnment via efficient preference Optimization · 원문 그림 인용 · 원본 PDF 10쪽에서 그림 영역을 추출했습니다.

## 한계와 남은 질문

논문은 LongBench 결과가 실험마다 다른 프롬프트의 영향을 받아 다른 연구의 결과를 직접 재현하기 어렵다고 밝힙니다. 또한 환각 등 잘못된 출력을 정확히 판정할 평가 모델이 부족해, LOGO 목표 자체에도 개선 여지가 있다고 설명합니다. 데이터 구성에서는 더 높은 품질의 데이터셋을 사용하면 결과가 개선될 수 있다고 언급합니다. 저자들은 RAG 검사기 같은 평가 전략을 도입하여 선호와 비선호 샘플을 구성하는 방향을 향후 과제로 제시합니다. 이들 한계는 평가 기준과 데이터 품질에 관한 것이며, 원문에서 LOGO가 실패한 구체적 사례를 추가로 보고한 것은 아닙니다.

## 논문 정보

- **저자**: Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2024년 10월 24일
- **등록일**: 2026년 11월 5일
- **수정일**: 2024년 10월 24일
- **버전**: v1
- **arXiv**: 2410.18533
- **분류**: cs.CL · cs.AI
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

[논문 원문 ↗](https://arxiv.org/abs/2410.18533v1) · [원문 PDF ↗](https://arxiv.org/pdf/2410.18533v1)

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

## 초록

Long-context models(LCMs) have shown great potential in processing long input sequences(even more than 100M tokens) conveniently and effectively. With significant progress, recent research has pointed out that LCMs can accurately locate token-level salient information within the context. Yet, the generation performance of these LCMs is far from satisfactory and might result in misaligned responses, such as hallucinations. To enhance the generation capability of LCMs, existing works have investigated the effects of data size and quality for both pre-training and instruction tuning. Though achieving meaningful improvement, previous methods fall short in either effectiveness or efficiency. In this paper, we introduce LOGO(Long cOntext aliGnment via efficient preference Optimization), a training strategy that first introduces preference optimization for long-context alignment. To overcome the GPU memory-bound issue caused by the long sequence, LOGO employs a reference-free preference optimization strategy and adopts a position synthesis method to construct the training data. By training with only 0.3B data on a single 8$\\times$A800 GPU machine for 16 hours, LOGO allows the Llama-3-8B-Instruct-80K model to achieve comparable performance with GPT-4 in real-world long-context tasks while preserving the model's original capabilities on other tasks, e.g., language modeling and MMLU. Moreover, LOGO can extend the model's context window size while enhancing its generation performance.

## 원문 인용

Zecheng Tang, Zechen Sun, Juntao Li, Qiaoming Zhu, Min Zhang (2024). LOGO -- Long cOntext aliGnment via efficient preference Optimization. arXiv:2410.18533v1. https://arxiv.org/abs/2410.18533v1

**BibTeX**

```
@misc{tang2024logo,
  title = {{LOGO -- Long cOntext aliGnment via efficient preference Optimization}},
  author = {Zecheng Tang and Zechen Sun and Juntao Li and Qiaoming Zhu and Min Zhang},
  year = {2024},
  eprint = {2410.18533},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2410.18533v1}
}
```

## 이 논문의 용어

- [LoRA](https://refivu.com/terms/84da7a415b66-low-rank-adaptation-lora)
- [MMLU](https://refivu.com/terms/3036c0ba5adb-mmlu)
- [Direct Preference Optimization](https://refivu.com/terms/81ed2010f707-direct-preference-optimization)
- [reward hacking](https://refivu.com/terms/2413bbf555b3-reward-hacking)
- [LongBench](https://refivu.com/terms/ff37fb1a4d82-longbench)
- [needle-in-a-haystack](https://refivu.com/terms/d2affe3634bd-needle-in-a-haystack)
- [YARN](https://refivu.com/terms/3110363f5fbc-yarn)
- [SimPO](https://refivu.com/terms/a200795d58fe-simpo)
- [Perplexity (PPL)](https://refivu.com/terms/e6cef285046a-perplexity-ppl)
- [PG-19](https://refivu.com/terms/4412c63d44c7-pg-19)
- [Llama-2-7B-Chat](https://refivu.com/terms/57c878d56d01-llama-2-7b-chat)

## 다른 논문 해설

- [GAW-PO: Preference Optimization with Gradient-Aligned Token Weights](https://refivu.com/papers/1751cadd-c5ac-4be5-b5f4-d5f5efd0c8fd-gaw-po-preference-optimization-with-gradient-aligned-token.md)
- [Multi-Objective Preference Optimization: Improving Human Alignment of Generative Models](https://refivu.com/papers/041fdbd0-012b-4a3d-919c-d5e10dca7d53-multi-objective-preference-optimization-improving-human.md)
- [Correcting the Mythos of KL-Regularization: Direct Alignment without Overoptimization via Chi-Squared Preference Optimization](https://refivu.com/papers/55e2d93e-c557-46e7-9034-94b78fdd5f91-correcting-the-mythos-of-kl-regularization-direct-alignment.md)
- [Self-Augmented Preference Optimization: Off-Policy Paradigms for Language Model Alignment](https://refivu.com/papers/50754b91-ac9f-4a37-9a55-591663932431-self-augmented-preference-optimization-off-policy-paradigms.md)
- [Forecasting How RLHF Responds to Reward-Model Edits Before Training](https://refivu.com/papers/0f5038d0-6a7f-4d8d-b0a7-bfed975369e2-forecasting-how-rlhf-responds-to-reward-model-edits.md)
- [Are Fake Citations a Form of Reward Hacking? A Pre-Registered Study of Post-Training and Citation Cues](https://refivu.com/papers/9ff2abb0-1bf9-4d66-a173-14ba57e93ce2-are-fake-citations-a-form-of-reward-hacking.md)
- [Re-Align: Aligning Vision Language Models via Retrieval-Augmented Direct Preference Optimization](https://refivu.com/papers/b1f33794-2f7e-4db7-ad58-b04894663792-re-align-aligning-vision-language-models-via-retrieval.md)
- [The Signals and Systems Approach to Animation](https://refivu.com/papers/3f080585-d012-4ba3-9f6c-8eb1fa0e3f56-the-signals-and-systems-approach-to-animation.md)
- [InstructRetro: Instruction Tuning post Retrieval-Augmented Pretraining](https://refivu.com/papers/dd0abb30-a6bc-4a8d-9d46-a2308c9cb88b-instructretro-instruction-tuning-post-retrieval-augmented.md)
- [PrivacyMind: Large Language Models Can Be Contextual Privacy Protection Learners](https://refivu.com/papers/feae8934-f8bd-4e3d-8c48-42c0cd1eb0b3-privacymind-large-language-models-can-be-contextual-privacy.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/853ee23f-3eb7-405a-8ff7-08e7d2510334-logo-long-context-alignment-via-efficient-preference)
