Pith. sign in

REVIEW 2 cited by

WatChat: Explaining perplexing programs by debugging mental models

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 2403.05334 v2 pith:NMW3AGXT submitted 2024-03-08 cs.PL cs.AIcs.HC

classification cs.PLcs.AIcs.HC
keywords programexplanationlanguageprogrammerbehaviorexplanationsmentalmisconceptions
verification ladder T0 review T1 audit T2 compute T3 formal

Signed reviews

No signed human review yet.

0 comments
read the original abstract

Often, a good explanation for a program's unexpected behavior is a bug in the programmer's code. But sometimes, an even better explanation is a bug in the programmer's mental model of the language or API they are using. Instead of merely debugging our current code ("giving the programmer a fish"), what if our tools could directly debug our mental models ("teaching the programmer to fish")? In this paper, we apply recent ideas from computational cognitive science to offer a principled framework for doing exactly that. Given a "why?" question about a program, we automatically infer potential misconceptions about the language/API that might cause the user to be surprised by the program's behavior -- and then analyze those misconceptions to provide explanations of the program's behavior. Our key idea is to formally represent misconceptions as counterfactual (erroneous) semantics for the language/API, which can be inferred and debugged using program synthesis techniques. We demonstrate our framework, WatChat, by building systems for explanation in two domains: JavaScript type coercion, and the Git version control system. We evaluate WatChatJS and WatChatGit by comparing their outputs to experimentally-collected human-written explanations in these two domains: we show that WatChat's explanations exhibit key features of human-written explanation, unlike those of a state-of-the-art language model.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 2 Pith papers

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

  1. Who's the Leader? Analyzing Novice Workflows in LLM-Assisted Debugging of Machine Learning Code

    cs.HC 2025-05 conditional novelty 6.0 of 10

    In an eight-person formative study, novice ML engineers who actively led the ChatGPT debugging conversation outperformed those who followed it, with patterns of over- and under-reliance.

  2. Empathy in Explanation

    cs.HC 2025-06 conditional novelty 5.0 of 10

    People choose explanations partly to spare listeners' regret, and a regret-aware computational model captures this behavior.

Pith tools