Abstract
Large language models (LLMs) frequently achieve high scores on commonsense benchmarks, yet determining whether they employ genuine reasoning or rely on statistical shortcuts remains a challenge. This paper presents CommonsenseVIS, a visual analytics system designed to "ground" model behavior using external knowledge graphs. By aligning model attention with human-defined knowledge paths, the system enables researchers to diagnose reasoning gaps and interactively refine model logic through targeted editing.
Introduction
Despite reaching human-level performance on commonsense question-answering (QA) tasks, models like GPT and T5 often operate as "black boxes." Traditional explainability methods, such as SHAP or LIME, highlight influential input words but fail to capture the implicit reasoning required for commonsense. For instance, answering that an umbrella is used during rain requires an implicit understanding of the UsedFor(umbrella, protection from rain) relationship, which is often absent from the input text. Without external reference points, it is difficult to distinguish between true world understanding and simple keyword co-occurrence.
Methods: The CommonsenseVIS Pipeline
CommonsenseVIS introduces a multi-stage pipeline to move from opaque predictions to transparent diagnosis and intervention:
- Knowledge Contextualization: The system extracts relevant triplets (Concept A → Relation → Concept B) from ConceptNet, a comprehensive commonsense knowledge graph. This serves as a "gold standard" reasoning path.
- Behavior Alignment: Using SHAP to calculate feature importance, the system aligns "model concepts" (words the model prioritized) with "ConceptNet concepts" to verify if the model is attending to logically relevant information.
- Relational Analysis: To evaluate the model's grasp of conceptual links, the system computes linear transformations between input and output embeddings. Successful learning of a relation (e.g., AtLocation) results in predictable clustering of transformed embeddings.
- Multi-level Visualization: The interface provides a Global View for performance across relations, a Subset View for identifying consistent concept misses, and an Instance View for "what-if" probing and Model Editing via the MEND algorithm.
Evaluation and Key Insights
The system was evaluated using the CommonsenseQA (CSQA) dataset and the UnifiedQA model. A user study with 10 NLP experts revealed several critical insights:
- Implicit Knowledge Gaps: Explaining commonsense requires an external knowledge source because implicit reasoning cannot be derived solely from input features.
- Spurious Pattern Detection: Experts identified cases where models ignored context in favor of simple associations—for example, defaulting to "movie theater" for any question containing the word "watch," regardless of the actual scenario.
- Actionable Explainability: Unlike tools that only display errors, CommonsenseVIS allows users to "edit" model parameters. Experts successfully fixed reasoning errors related to emotions, achieving 100% accuracy on targeted cases with a negligible (0.08%) impact on general benchmark performance.
Conclusion and Future Work
CommonsenseVIS demonstrates that grounding LLMs in external knowledge graphs significantly enhances our ability to diagnose and correct reasoning failures. Future work will focus on reducing the computational cost of SHAP values, integrating broader knowledge bases like ATOMIC for social commonsense, and extending the system to handle more complex, multi-step reasoning paths beyond the current two-hop limit.
Summary updated