paper-with-me

홈 › Papers

Do LLMs "know" internally when they follow instructions?

2024-10-18 · Juyeon Heo, Christina Heinze-Deml, Oussama Elachqar, Kwan Ho Ryan Chan, Shirley Ren, Udhay Nallasamy, Andy Miller, Jaya Narain

Instruction-following is crucial for building AI agents with large language models (LLMs), as these models must adhere strictly to user-provided constraints and guidelines. However, LLMs often fail to follow even simple and clear instructions. To improve instruction-following behavior and prevent undesirable outputs, a deeper understanding of how LLMs' internal states relate to these outcomes is required. In this work, we investigate whether LLMs encode information in their representations that correlate with instruction-following success - a property we term knowing internally. Our analysis identifies a direction in the input embedding space, termed the instruction-following dimension, that predicts whether a response will comply with a given instruction. We find that this dimension generalizes well across unseen tasks but not across unseen instruction types. We demonstrate that modifying representations along this dimension improves instruction-following success rates compared to random changes, without compromising response quality. Further investigation reveals that this dimension is more closely related to the phrasing of prompts rather than the inherent difficulty of the task or instructions. This work provides insight into the internal workings of LLMs' instruction-following, paving the way for reliable LLM agents.

📄 PDF Abstract BibTeX arXiv:2410.14516

Code (1)

apple/ml-internal-llms-instruction-following 공식 구현 pytorch

Tasks

Instruction FollowingPrompt Engineering

Similar Papers 제목 키워드 기반

Inside-Out: Hidden Factual Knowledge in LLMs

2025-03-19 · Zorik Gekhman, Eyal Ben David, Hadas Orgad, Eran Ofek 외

This work presents a framework for assessing whether large language models (LLMs) encode more factual knowledge in their parameters than what they express in their outputs. While a few studies hint at this possibility, n…

Think-to-Talk or Talk-to-Think? When LLMs Come Up with an Answer in Multi-Step Arithmetic Reasoning

2024-12-02 · Keito Kudo, Yoichi Aoki, Tatsuki Kuribayashi, Shusaku Sone 외

This study investigates the internal reasoning process of language models during arithmetic multi-step reasoning, motivated by the question of when they internally form their answers during reasoning. Particularly, we in…

Arithmetic Reasoning

Analysing the Residual Stream of Language Models Under Knowledge Conflicts

2024-10-21 · Yu Zhao, Xiaotang Du, Giwon Hong, Aryo Pradipta Gema 외

Large language models (LLMs) can store a significant amount of factual knowledge in their parameters. However, their parametric knowledge may conflict with the information provided in the context. Such conflicts can lead…

Quantized but Deceptive? A Multi-Dimensional Truthfulness Evaluation of Quantized LLMs

2025-08-26 · Yao Fu, Xianxuan Long, Runchao Li, Haotian Yu 외 arxiv

Quantization enables efficient deployment of large language models (LLMs) in resource-constrained environments by significantly reducing memory and computation costs. While quantized LLMs often maintain performance on pe…

Logical Reasoning

Investigating Neurons and Heads in Transformer-based LLMs for Typographical Errors

2025-02-27 · Kohei Tsuji, Tatsuya Hiraoka, Yuchang Cheng, Eiji Aramaki 외

This paper investigates how LLMs encode inputs with typos. We hypothesize that specific neurons and attention heads recognize typos and fix them internally using local and global contexts. We introduce a method to identi…