Experimental Contexts Can Facilitate Robust Semantic Property Inference in Language Models, but Inconsistently

Kanishka Misra, Allyson Ettinger, Kyle Mahowald · OpenReview

Abstract

Recent zero-shot evaluations have highlighted important limitations in the abilities of language models (LMs) to perform meaning extraction. However, it is now well known that LMs can demonstrate radical improvements in the presence of experimental contexts such as in-context examples and instructions. How well does this translate to previously studied meaning-sensitive tasks? We present a case-study on the extent to which experimental contexts can improve LMs' robustness in performing property inheritance -- predicting semantic properties of novel concepts, a task that they have been previously shown to fail on. Upon carefully controlling the nature of the in-context examples and the instructions, our work reveals that they can indeed lead to non-trivial property inheritance behavior in LMs. However, this ability is inconsistent: with a minimal reformulation of the task, some LMs were found to pick up on shallow, non-semantic heuristics from their inputs, suggesting that the computational principles of semantic property inference are yet to be mastered by LMs.

Introduction

A recurring critique of Large Language Models (LLMs) is their struggle with "meaning extraction"—the ability to truly understand and manipulate concepts rather than just predicting the next token. Previous studies using the COMPS benchmark showed that models often fail at "property inheritance": if you tell a model "A wug is a robin," it frequently fails to infer that a wug can fly.

However, most of these critiques rely on zero-shot evaluations, which may be an overly harsh "stress test." This paper investigates whether LLMs possess a latent ability for robust semantic inference that can be "unlocked" using experimental contexts, such as in-context examples and explicit instructions. The central question is whether observed improvements represent genuine reasoning or the adoption of shallow, non-semantic shortcuts.

Methods

The researchers systematically explored the performance of 12 different LLMs (ranging from 1.5B to 13B parameters) by varying three factors:

  1. Task Formulation: Comparing the original COMPS (completing a declarative sentence) with COMPS-QA (answering a direct question).
  2. In-Context Learning (ICL): Providing between 0 and 6 examples to observe performance scaling.
  3. Instructions: Testing four different instruction templates, from minimal to detailed.

To ensure models generalized principles rather than memorizing facts, the study used the COMPS-WUGS-DIST dataset, which employs "nonce" words (e.g., wug, dax). Models must map these to known animals and inherit their properties. Crucially, the experimental design controlled for position-based heuristics, testing whether models were simply biased toward the first-mentioned or most recent concept.

Experimental setup and heuristic sampling.

Key Results and Insights

The "QA Trap" and Heuristic Bias

Reformulating the task into a Question-Answering format (COMPS-QA) made models significantly more prone to heuristics. In this format, the output space is directly linked to the order of words in the prompt, tempting models to use positional shortcuts like "always pick the first name mentioned."

Many models, including GPT-2 XL and OPT-6.7b, showed a massive performance gap between cases where the heuristic worked and cases where it didn't. If the correct answer happened to be the first-mentioned concept, they succeeded; if it was the second, performance often dropped below chance.

Model performance across task formulations.

Context vs. Instructions

Instructions alone rarely fixed zero-shot failures. Real performance gains emerged from the interaction between instructions and in-context examples. While accuracy generally improved as more examples were added in the standard COMPS format, the QA format revealed the fragility of this "reasoning."

Instruction Tuning as a Shield

Models that underwent instruction tuning, such as Mistral-7B-Instruct and Gemma-2-9B, were significantly more robust. They maintained higher accuracy across different formulations and resisted shallow positional biases better than their base-model counterparts, though they were not entirely immune.

Conclusion

While providing context and instructions can significantly boost LLM performance on semantic reasoning tasks, this improvement is often inconsistent. The tendency for models to adopt shallow heuristics, especially in QA formats, suggests that they have not yet mastered the underlying computational principles of semantic property inference. Future work using mechanistic interpretability may help reveal how these models represent novel concepts and why they remain susceptible to non-semantic shortcuts.

Summary updated

BibTeX
@inproceedings{misra2024experimental,
  author = {Kanishka Misra and Allyson Ettinger and Kyle Mahowald},
  title = {{Experimental Contexts Can Facilitate Robust Semantic Property Inference in Language Models, but Inconsistently}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  url = {https://openreview.net/forum?id=kC2MTyH713},
}
Figure