arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.16871cs.LG
收藏

探索大语言模型如何捕获和表示领域特定知识

Exploring How LLMs Capture and Represent Domain-Specific Knowledge

Microsoft(微软公司);Rice University(里士满大学)

Mirian Hipolito Garcia, Camille Couturier, Daniel Madrigal Diaz, Ankur Mallick, Anastasios Kyrillidis, Robert Sim, Victor Ruhle, Saravan Rajmohan

AI总结:

本研究通过分析LLM预填充阶段的隐藏状态,揭示其内部领域识别轨迹,并利用该表示进行模型选择,发现LLM能区分相关领域查询,且微调模型并非总是最优。

摘要:

我们研究大语言模型(LLMs)是否在自然语言中固有地捕获领域特定的细微差别。我们的实验通过检查模型在预填充阶段生成的隐藏状态来区分来自不同领域的查询,从而探测LLMs的领域敏感性。我们揭示了潜在的领域相关轨迹,这些轨迹表明模型对查询领域的内部识别。我们还研究了这些领域表示对提示风格和来源变化的鲁棒性。我们的方法利用这些表示进行模型选择,映射出与输入查询的领域轨迹最匹配的LLM(即,在类似轨迹上性能最高的模型)。我们的研究结果表明,LLMs能够区分相关领域的查询,并且微调后的模型并不总是最准确的。与以往的工作不同,我们的解释适用于封闭式和开放式生成任务。

英文摘要:

We study whether Large Language Models (LLMs) inherently capture domain-specific nuances in natural language. Our experiments probe the domain sensitivity of LLMs by examining their ability to distinguish queries from different domains using hidden states generated during the prefill phase. We reveal latent domain-related trajectories that indicate the model's internal recognition of query domains. We also study the robustness of these domain representations to variations in prompt styles and sources. Our approach leverages these representations for model selection, mapping the LLM that best matches the domain trace of the input query (i.e., the model with the highest performance on similar traces). Our findings show that LLMs can differentiate queries for related domains, and that the fine-tuned model is not always the most accurate. Unlike previous work, our interpretations apply to both closed and open-ended generative tasks

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑