# ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval

ChatRetriever: 일반화되고 견고한 대화형 밀집 검색을 위한 대형 언어 모델 적응

Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai 외 1명 · arXiv · 2024년 4월 21일

- **연구 문제** 대화형 검색에서 기존 종단간 밀집 검색기는 LLM 기반 질의 재작성 방법에 비해 성능이 크게 낮았습니다.
- **연구 방법** LLM을 대화형 밀집 검색기로 적응시키기 위해 대조 순위 손실과 세션 마스킹 명령어 튜닝 손실을 결합한 CSIT를 제안합니다.
- **주요 결과** ChatRetriever는 CAsT-20과 CAsT-21에서 기존 CDR 최고 점수 대비 큰 절대 향상을 보이고, 문맥 변경 실험에서 상대적으로 안정적인 결과를 보고합니다.

## 대화형 검색에서 밀집 검색기가 풀어야 할 문제

대화형 검색은 길고 복잡한 다중 턴 문맥에서 사용자의 실제 검색 의도를 정확히 읽어야 합니다. 한 가지 우회로는 대화 세션을 독립형 질의로 재작성한 뒤 일반 검색기를 쓰는 방식입니다. 그러나 이 재작성 단계는 검색 성능을 직접 최적화하기 어렵고 추가 지연을 만듭니다. 반면 대화 세션과 구절을 밀집 벡터로 직접 인코딩하는 종단간 대화형 밀집 검색은 이런 추가 처리 없이 근사 최근접 이웃 탐색의 효율을 누릴 수 있어 더 유망해 보입니다.

문제는 기존 대화형 밀집 검색기의 성능이 LLM 기반 질의 재작성 방법에 크게 못 미친다는 점입니다. 저자들은 LLM이 강한 텍스트 이해와 생성 능력 덕분에 재작성기로 뛰어난 성능을 낸다는 점을 출발점으로 삼습니다. 그렇다면 LLM 자체를 밀집 검색기로 적응시켜 대화 세션 표현을 강화할 수 있는지가 이 논문의 질문입니다.

![Figure 1: Illustration of adapting LLM for query rewrit- ing and conversational dense retrieval](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7/figures/figure-27089aaac6e9df4992baf26f31a7da16.png?thumb=512)

**Figure 1** : Illustration of adapting LLM for query rewrit- ing and conversational dense retrieval.

[원문](https://arxiv.org/abs/2404.13556v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou · ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval · 원문 그림 인용 · 원본 PDF 1쪽에서 그림 영역을 추출했습니다.

기존 LLM 기반 검색기도 한계가 있습니다. 이들은 주로 단일 턴의 ad-hoc 검색을 대상으로 하며, 고정된 지시 템플릿으로 학습되어 복잡한 대화 상황으로 일반화하기 어렵다고 논의됩니다.

## CSIT의 두 목적함수와 마지막 특수 토큰 표현

ChatRetriever는 Contrastive Session-Masked Instruction Tuning, 곧 CSIT로 학습됩니다. 학습 샘플은 대화 세션 x와 응답 y+의 쌍이며, 첫 번째 목적은 contrastive ranking loss입니다. 이 손실은 정답 응답의 점수를 부정 응답 집합의 점수와 비교해 세션 표현이 검색에 맞도록 LLM을 조정합니다. 인코딩 방식은 입력 끝에 특수 토큰 세 개를 붙이고 마지막 특수 토큰의 표현을 전체 텍스트의 밀집 표현으로 사용하는 것입니다.

두 번째 목적은 session-masked instruction tuning입니다. 세션과 응답을 이어 붙인 뒤 응답 토큰의 표현이 세션 토큰을 직접 보지 않고, 세션 뒤의 특수 토큰 표현만 참조하도록 주의 마스크를 설계합니다. 그래서 응답의 생성 손실은 세션의 특수 토큰 표현을 통해서만 세션 정보를 받게 되고, 이 표현이 세션을 더 잘 담도록 강제됩니다. 최종 목적은 두 손실을 가중치 α로 더한 L = LC + αLS입니다.

저자들은 연속된 특수 토큰이 representational chain-of-thought처럼 학습 공간을 넓히는 역할을 한다고 가설을 세웁니다. 이는 저자의 가설이며, 이 논문이 별도로 증명한 기능으로 읽지 않습니다.

## 학습 데이터와 구현 설정

ChatRetriever는 Qwen-7B-Chat을 초기값으로 사용하며 LoRA로 학습됩니다. 학습 데이터는 UltraChat의 Question About the World 부분집합과 MSMARCO 구절 순위 데이터입니다. UltraChat은 다중 턴 지시 튜닝 데이터이고, MSMARCO는 질의를 지시로, 긍정 구절을 응답으로 취급해 단일 턴 검색 지향 데이터로 활용됩니다. 저자들은 MSMARCO를 포함하는 것이 기본 ad-hoc 검색 성능을 높이는 데 중요하다고 보고합니다.

![Table 6: Comparisons of using different data sources combinations for training. U, M, and Q represent Ultra- Chat, MSMARCO, and QReCC, respectively](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7/figures/figure-d79c529da7743e318c82b6fee6722e92.png?thumb=512)

**Table 6** : Comparisons of using different data sources combinations for training. U, M, and Q represent Ultra- Chat, MSMARCO, and QReCC, respectively.

[원문](https://arxiv.org/abs/2404.13556v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou · ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

평가는 QReCC, TopiOCQA, CAsT-19, CAsT-20, CAsT-21의 다섯 개 대화형 검색 벤치마크에서 이루어집니다. 주 지표는 NDCG@3입니다. 학습은 최대 입력 길이 1024, 2500 스텝, 학습률 1e-4, 배치 크기 64, 샘플당 4개의 하드 네거티브로 수행되며 8개의 40G A100 GPU를 사용합니다. 이 설정은 ChatRetriever 학습에 적용된 것이며, 기준선은 각 원래 논문의 구현 설정을 따릅니다.

## 정상 평가와 기존 방법과의 비교

정상 평가에서 ChatRetriever는 CAsT-20에서 NDCG@3 40.0, CAsT-21에서 49.6을 기록합니다. 저자들은 기존 대화형 밀집 검색기의 최고 점수 대비 CAsT-20과 CAsT-21에서 각각 6.8%와 12.2%의 절대 향상이 있다고 보고합니다. 이 향상은 같은 조건의 표에서 기존 CDR 최고 점수와 비교한 결과입니다.

![Table 1: Results of the normal evaluation on five conversational search benchmarks. The base models of CQR methods are their rewriters and the model parameters…](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7/figures/figure-cff4d9e0daf46f4686d33e27289ea31b.png?thumb=512)

**Table 1** : Results of the normal evaluation on five conversational search benchmarks. The base models of CQR methods are their rewriters and the model parameters are also counted as the rewriter’s parameters. † denotes significant differences to baselines (p \<0.05). The best results are bold and the second-best results are underlined.

[원문](https://arxiv.org/abs/2404.13556v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou · ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.

LLM 기반 재작성 방법인 LLM4CS와의 비교는 CAsT 세 데이터셋에서 다르게 나타납니다. CAsT-19에서 ChatRetriever는 52.1로 LLM4CS의 51.5보다 높고, CAsT-21에서는 49.6으로 LLM4CS의 49.2보다 높습니다. 반면 CAsT-20에서는 40.0으로 LLM4CS의 45.5보다 낮습니다. 따라서 LLM4CS와 비슷하거나 더 나은 성능이라는 설명은 데이터셋별로 나누어 읽어야 합니다. LLM4CS는 여러 번 생성을 거치는 방식이므로, 단일 생성 변형인 RAR과 REW와 비교하면 ChatRetriever의 우위가 더 분명하게 나타난다고 저자들은 설명합니다.

## 문맥 변경에 대한 강건성

강건성 평가는 현재 질의를 고정하고 대화 문맥만 바꾸는 방식으로 이루어집니다. 부분 응답 수정에서는 평가 데이터의 응답 대신 LLM이 생성한 응답을 쓰며, 다음 질의가 문맥상 불합리하면 사람이 쓴 재작성 질의로 바꿉니다. 이 설정에서 ChatRetriever의 성능 변화는 가장 작다고 보고됩니다. 전체 문맥 수정에서는 ChatGPT 3.5로 생성한 다섯 개의 문맥에 대해 평균과 표준편차를 보고합니다.

![Figure 4: The prompt to generate the response in the experiment of partial response modification](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7/figures/figure-722cfe1dc4d1d846bc75246815109ae7.png?thumb=512)

**Figure 4** : The prompt to generate the response in the experiment of partial response modification.

[원문](https://arxiv.org/abs/2404.13556v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou · ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval · 원문 그림 인용 · 원본 PDF 13쪽에서 그림 영역을 추출했습니다.

![Figure 5: The prompt to judge whether the current query is reasonable in the experiment of partial response mod- ification](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7/figures/figure-d0aa5742639db0722bcbf09a65f572a6.png?thumb=512)

**Figure 5** : The prompt to judge whether the current query is reasonable in the experiment of partial response mod- ification.

[원문](https://arxiv.org/abs/2404.13556v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou · ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

![Figure 7: An example prompt to generate synthetic con- versation text in the experiment of full context modifica- tion. Italicized contents are filled into the…](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7/figures/figure-9a70a325250d08565cb0015c4a0a5f00.png?thumb=512)

**Figure 7** : An example prompt to generate synthetic con- versation text in the experiment of full context modifica- tion. Italicized contents are filled into the placeholders of the prompt. The green content is the model output.

[원문](https://arxiv.org/abs/2404.13556v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou · ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

전체 문맥 수정의 표준편차 평균은 ChatRetriever가 1.7이며, ConvDR의 3.0과 LeCoRE의 2.1보다 낮습니다. 다만 LLM4CS는 표준편차 1.3으로 이보다 더 낮습니다. 따라서 ChatRetriever의 안정성은 대화형 밀집 검색기 사이에서 강조되는 결과이며, LLM4CS보다 모든 면에서 안정적이라는 뜻은 아닙니다.

![Table 2: Results of the robust evaluation. Diff. represents the absolute difference compared to the results in Table 1 and SD represents the standard deviation…](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7/figures/figure-6ad88ada12992049625db1924c85d9aa.png?thumb=512)

**Table 2** : Results of the robust evaluation. Diff. represents the absolute difference compared to the results in Table 1 and SD represents the standard deviation, where a smaller value means more stable.

[원문](https://arxiv.org/abs/2404.13556v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou · ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

## 절제 실험이 보여주는 두 구성요소의 역할

절제 실험에서 세션 마스킹 명령어 튜닝을 제거한 w/o SIT는 CAsT-19 49.5, CAsT-20 36.8, CAsT-21 45.8을 기록하며, 전체 CSIT의 52.1, 40.0, 49.6보다 낮습니다. 표현 수준의 연속 특수 토큰을 제거한 w/o R-CoT는 49.9, 38.5, 47.5입니다. 세션 마스킹 명령어 튜닝을 일반 명령어 튜닝으로 바꾼 with Vanilla IT는 51.1, 39.3, 48.4입니다. 제거하거나 교체하면 세 데이터셋에서 모두 점수가 낮아지므로, 두 구성요소를 유지하는 것이 이 실험 설정에서 효과적이라고 해석할 수 있습니다.

![Table 4: Results of ablation studies](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7/figures/figure-1d66fc24fee29e60c12f856f230abb39.png?thumb=512)

**Table 4** : Results of ablation studies.

[원문](https://arxiv.org/abs/2404.13556v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou · ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.

저자들은 세션 마스킹 명령어 튜닝이 세 CAsT 데이터셋에서 평균 6.6%의 상대 이득을 주고, 표현 수준 연속 토큰은 평균 3.4%의 상대 이득을 준다고 요약합니다. 이 수치는 이 절제 설정에서의 평균이며, 다른 데이터나 모델로 일반화한 결과가 아닙니다.

## 비용과 학습 데이터의 제약

ChatRetriever는 7B 모델이며 임베딩 차원이 4096입니다. 따라서 기존 CDR 모델보다 인덱싱과 검색에 더 많은 시간과 저장 비용이 듭니다. 저자들은 검색 정확도가 높아지면 재순위화의 필요가 줄어들 수 있어 전체 비용을 상쇄할 수 있다고 설명하지만, 이 주장을 직접 측정한 결과로 보기는 어렵습니다. 저자들은 더 작은 모델로 증류하는 가능성도 탐색 중이라고 밝힙니다.

하드 네거티브는 UltraChat에 대해 CAsT-21 코퍼스에서 선택되었습니다. 저자들은 하드 네거티브가 검색 성능에 중요하다고 보며, 대화 지시 데이터에 맞는 더 나은 채굴 전략이 필요하다고 한계로 밝힙니다. 또한 학습 스텝 실험에서는 500 스텝 부근에서 성능이 이미 상당히 높아지고, 2500 스텝에서 성능이 안정화되는 것으로 보고됩니다. 이 결과도 이 학습 설정에 한정해 읽어야 합니다.

## 논문 정보

- **저자**: Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou
- **학회·저널**: arXiv · 프리프린트
- **최초 공개일**: 2024년 4월 21일
- **등록일**: 2026년 11월 5일
- **수정일**: 2024년 4월 21일
- **버전**: v1
- **arXiv**: 2404.13556
- **분류**: cs.IR · cs.CL
- **원문 이용 조건**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **제공 범위**: 논문 정보, 해설, 허용된 원문 그림

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

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

## 초록

Conversational search requires accurate interpretation of user intent from complex multi-turn contexts. This paper presents ChatRetriever, which inherits the strong generalization capability of large language models to robustly represent complex conversational sessions for dense retrieval. To achieve this, we propose a simple and effective dual-learning approach that adapts LLM for retrieval via contrastive learning while enhancing the complex session understanding through masked instruction tuning on high-quality conversational instruction tuning data. Extensive experiments on five conversational search benchmarks demonstrate that ChatRetriever substantially outperforms existing conversational dense retrievers, achieving state-of-the-art performance on par with LLM-based rewriting approaches. Furthermore, ChatRetriever exhibits superior robustness in handling diverse conversational contexts. Our work highlights the potential of adapting LLMs for retrieval with complex inputs like conversational search sessions and proposes an effective approach to advance this research direction.

## 원문 인용

Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou (2024). ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval. arXiv:2404.13556v1. https://arxiv.org/abs/2404.13556v1

**BibTeX**

```
@misc{mao2024chatretriever,
  title = {{ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval}},
  author = {Kelong Mao and Chenlong Deng and Haonan Chen and Fengran Mo and Zheng Liu and Tetsuya Sakai and Zhicheng Dou},
  year = {2024},
  eprint = {2404.13556},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.13556v1}
}
```

## 이 논문의 용어

- [LoRA](https://refivu.com/terms/84da7a415b66-low-rank-adaptation-lora)
- [hard negatives](https://refivu.com/terms/17c156ae3902-hard-negatives)
- [MSMARCO](https://refivu.com/terms/037e161ee3eb-msmarco)
- [TopiOCQA](https://refivu.com/terms/3f70a4cfdcb4-topiocqa)

## 다른 논문 해설

- [Astraios: Parameter-Efficient Instruction Tuning Code Large Language Models](https://refivu.com/papers/b61f49a7-6245-42de-8be2-62db558d11f2-astraios-parameter-efficient-instruction-tuning-code-large.md)
- [Large Language Models are Perplexed by some Political Parties](https://refivu.com/papers/07ee32dd-3a4a-4c38-8a88-39cd5e3494a5-large-language-models-are-perplexed-by-some-political.md)
- [Conformity in Large Language Models](https://refivu.com/papers/da9a0128-629d-4c9c-bdf2-329cc9841cc4-conformity-in-large-language-models.md)
- [MultiPLY: A Multisensory Object-Centric Embodied Large Language Model in 3D World](https://refivu.com/papers/cf200415-a9b6-4192-ac1e-4030b14e4a6a-multiply-a-multisensory-object-centric-embodied-large.md)
- [ILLUMINER: Instruction-tuned Large Language Models as Few-shot Intent Classifier and Slot Filler](https://refivu.com/papers/a1052bc1-d7c1-4883-996d-717b6ef96039-illuminer-instruction-tuned-large-language-models-as-few.md)
- [Large Language Models Are Overconfident in Their Own Responses](https://refivu.com/papers/d3f998f5-053d-4127-a0fd-a5892ef0f001-large-language-models-are-overconfident-in-their-own.md)
- [Advancing Multimodal Large Language Models with Quantization-Aware Scale Learning for Efficient Adaptation](https://refivu.com/papers/35356cf7-bcb7-44f0-8fb3-6d156fdcda5f-advancing-multimodal-large-language-models-with-quantization.md)
- [Instruction Tuning Vs. In-Context Learning: Revisiting Large Language Models in Few-Shot Computational Social Science](https://refivu.com/papers/e48c2117-5c89-4d48-8ec1-48a7fb8331a1-instruction-tuning-vs-in-context-learning-revisiting-large.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/c76f3af3-d7d0-44d3-bb30-280b7d0217a7-chatretriever-adapting-large-language-models-for-generalized)
