Same Formulas, Different Semantics: Do Language Models Follow Modal Logic Specifications?

Réemi Andrieu, Damien Sileo
8/5/2026
cs.CL

No confident code implementation found for this paper.

Abstract

Reasoning about necessity and possibility depends on assumptions about accessibility between worlds and about which objects exist at each one. The same inference may therefore hold under one modal system and fail under another.

Show full abstract

Evaluating language models on such problems requires testing whether their judgments follow the stated semantics rather than a familiar logic. We construct paired modal problems with identical premises and conjecture but different frame or domain conditions; automated reasoning verifies opposite labels. A balanced core prevents the semantic condition alone from revealing the answer. On this core, four of five recent models perform below the condition-only baseline under direct prompting. Yet enabling reasoning mode raises DeepSeek V4 Flash from 4.4% to 88.1% on unchanged prompts. Following stipulated modal semantics thus depends strongly on inference mode as well as model identity. When frame conditions are omitted, models often agree but fit different familiar logics best. We release the formulas, oracle artifacts, countermodels, and responses.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{andrieu2026same,
  title  = {Same Formulas, Different Semantics: Do Language Models Follow Modal Logic Specifications?},
  author = {Réemi Andrieu and Damien Sileo},
  year   = {2026},
  eprint = {2608.05097},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.05097v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2608.05097.svg)](https://codeofpaper.com/paper/2608.05097)

Discussion