Pith. sign in

REVIEW 3 cited by

Do Large Language Models Pay Similar Attention Like Human Programmers When Generating Code?

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2306.01220 v2 pith:2MXKXTPF submitted 2023-06-02 cs.SE cs.HCcs.LG

classification cs.SEcs.HCcs.LG
keywords codellmsattentiongenerationprogrammershumanmodelslanguage
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Large Language Models (LLMs) have recently been widely used for code generation. Due to the complexity and opacity of LLMs, little is known about how these models generate code. We made the first attempt to bridge this knowledge gap by investigating whether LLMs attend to the same parts of a task description as human programmers during code generation. An analysis of six LLMs, including GPT-4, on two popular code generation benchmarks revealed a consistent misalignment between LLMs' and programmers' attention. We manually analyzed 211 incorrect code snippets and found five attention patterns that can be used to explain many code generation errors. Finally, a user study showed that model attention computed by a perturbation-based method is often favored by human programmers. Our findings highlight the need for human-aligned LLMs for better interpretability and programmer trust.

Discussion (0). Sign in to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. AdaptiveLLM: A Framework for Selecting Optimal Cost-Efficient LLM for Code-Generation Based on CoT Length

    cs.SE 2025-06 conditional novelty 6.0 of 10

    AdaptiveLLM routes coding problems to cost-effective LLMs by clustering chain-of-thought lengths into three difficulty levels, improving pass@1 by 7.86% over ComplexityNet while cutting inference cost by 88.9%.

  2. Deconstructing Obfuscation: A four-dimensional framework for evaluating Large Language Models assembly code deobfuscation capabilities

    cs.SE 2025-05 conditional novelty 5.0 of 10

    Commercial LLMs deobfuscate simple OLLVM-obfuscated assembly well for some techniques but universally fail when three obfuscations are combined.

  3. Human-Centered Explainability in Interactive Information Systems: A Survey

    cs.HC 2025-07 conditional novelty 4.0 of 10

    A systematic review of 100 empirical user studies synthesizes explainability research into five conceptual dimensions, a design classification, and six measurement categories.

Pith tools