HackerPapers

arXiv:2404.01332cs.CL

Explaining Large Language Models Decisions Using Shapley Values

Behnam Mohammadi

Early discovery. Linked by one identifiable commenter. This paper is outside the main ranking; a mention is not an endorsement.

Abstract

The emergence of large language models (LLMs) has opened up exciting possibilities for simulating human behavior and cognitive processes, with potential applications in various domains, including marketing research and consumer behavior analysis. However, the validity of utilizing LLMs as stand-ins for human subjects remains uncertain due to glaring divergences that suggest fundamentally different underlying processes at play and the sensitivity of LLM responses to prompt variations. This paper presents a novel approach based on Shapley values from cooperative game theory to interpret LLM behavior and quantify the relative contribution of each prompt component to the model's output. Through two applications - a discrete choice experiment and an investigation of cognitive biases - we demonstrate how the Shapley value method can uncover what we term "token noise" effects, a phenomenon where LLM decisions are disproportionately influenced by tokens providing minimal informative content. This phenomenon raises concerns about the robustness and generalizability of insights obtained from LLMs in the context of human behavior simulation. Our model-agnostic approach extends its utility to proprietary LLMs, providing a valuable tool for practitioners and researchers to strategically optimize prompts and mitigate apparent cognitive biases. Our findings underscore the need for a more nuanced understanding of the factors driving LLM responses before relying on them as substitutes for human subjects in survey settings. We emphasize the importance of researchers reporting results conditioned on specific prompt templates and exercising caution when drawing parallels between human behavior and LLMs.

arXiv comments
Journal reference
DOI
Subjects
cs.CLComputation and Language cs.AIArtificial Intelligence cs.LGMachine Learning

On Hacker News

Linked by 1 identifiable commenter in 2 comments across 2 threads, from May 2024 to Jun 2025. Found in 5 HN submissions from Apr 2024 to Dec 2024. Open submission discussions.

Comments linking this paper, per year.

Discussed in comments2 threads

    • Whenever "AI influencers" say "prompt engineering is dead", I realize they are full of bs. If anything, prompt engineering has become more nuanced, down to the choice of each token: https://arxiv.org/abs/2404.01332

      behnamohView on HNParent context

Submitted to Hacker News

Connected through shared HN threads, not inferred similarity or a recommendation.