Exploring How LLMs Capture and Represent Domain-Specific Knowledge
Not on the map. Why?
Abstract (arXiv)
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
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 39 of its 48 references that are in the map. First posted on arXiv 23 Apr 2025.
Builds on
39 of 48 references.
References · 39
- 2017Attention Is All You Needcited by 59,932
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,203
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
- 2020What Disease does this Patient Have? A Large-scale Open Domain Question Answering Dataset from Medical Examscited by 1,324
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
- 2019PubMedQA: A Dataset for Biomedical Research Question Answeringcited by 1,271
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
- 2022Mass-Editing Memory in a Transformercited by 976
- 2019Attention is not Explanationcited by 916
- 2020Quantifying Attention Flow in Transformerscited by 759
27 more
- 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 733
- 2024RouteLLM: Learning to Route LLMs with Preference Datacited by 633
- 2021Knowledge Neurons in Pretrained Transformerscited by 590
- 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 579
- 2023LLM-Blender: Ensembling Large Language Models with Pairwise Ranking and Generative Fusioncited by 550
- 2022MedMCQA : A Large-scale Multi-Subject Multi-Choice Dataset for Medical domain Question Answeringcited by 525
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
- 2021Fast Model Editing at Scalecited by 491
- 2024Hybrid LLM: Cost-Efficient and Quality-Aware Query Routingcited by 354
- 2024INSIDE: LLMs' Internal States Retain the Power of Hallucination Detectioncited by 317
- 2021LexGLUE: A Benchmark Dataset for Legal Language Understanding in Englishcited by 302
- 2020Information-Theoretic Probing for Linguistic Structurecited by 204
- 2021When Does Pretraining Help? Assessing Self-Supervised Learning for Law and the CaseHOLD Datasetcited by 199
- 2023Linearity of Relation Decoding in Transformer Language Modelscited by 190
- 2021Implicit Representations of Meaning in Neural Language Modelscited by 179
- 2023Text Is All You Need: Learning Language Representations for Sequential Recommendationcited by 149
- 2023Inspecting and Editing Knowledge Representations in Language Modelscited by 140
- 2022Analyzing Transformers in Embedding Spacecited by 131
- 2023Fly-Swat or Cannon? Cost-Effective Language Model Choice via Meta-Modelingcited by 94
- 2024Towards Modular LLMs by Building and Reusing a Library of LoRAscited by 72
- 2024Can LLMs Separate Instructions From Data? And What Do We Even Mean By That?cited by 70
- 2023Eliciting Latent Knowledge from Quirky Language Modelscited by 56
- 2023Knowing What LLMs DO NOT Know: A Simple Yet Effective Self-Detection Methodcited by 51
- 2024Taxonomy-Guided Zero-Shot Recommendations with LLMscited by 15
- 2024Semantic Routing for Enhanced Performance of LLM-Assisted Intent-Based 5G Core Network Management and Orchestrationcited by 7
- 2023LLM Factoscope: Uncovering LLMs' Factual Discernment through Inner States Analysiscited by 6
- 2024DFA-RAG: Conversational Semantic Router for Large Language Model with Definite Finite Automatoncited by 5
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.