NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

The Search for Logics Capturing Polynomial Time

21 concepts10 papers2 proposals

In computational complexity theory, we typically measure the difficulty of a problem by how many resources—like time or space—a machine needs to solve it. Descriptive complexity offers an entirely different perspective: it measures the difficulty of a problem by the complexity of the logical language required to define it.

This approach has yielded stunning successes. For instance, Fagin's Theorem proved that the complexity class NP corresponds exactly to existential second-order logic. However, a profound roadblock emerges when we try to find a similar logical characterization for efficient computation—specifically, Polynomial Time (PTIME).

The core challenge stems from a fundamental tension between how machines and logics handle data structure symmetries.

The Symmetry Problem and the Need for Order

A standard Turing machine is inherently sequential. When given a graph or a database as input, the machine receives it as a flattened, ordered string of bits on a tape. Because the input is ordered, the machine can easily break ties, index specific elements, and step through the data sequentially.

Pure logic, however, operates on abstract structures without an inherent sequence. If you want to express a property of an unordered graph, your logic must be isomorphism-invariant—it must yield the same result regardless of how the graph's nodes are arranged or numbered.

If a structure comes with a built-in total order, capturing PTIME is straightforward. The Immerman-Vardi theorem shows that Least Fixed-Point logic perfectly captures PTIME on ordered structures because the order allows the logic to simulate the step-by-step execution of a Turing machine. But on unordered structures, a logic cannot easily simulate a machine because it cannot arbitrarily pick a "first" or "next" element when elements are symmetric.

To bridge this descriptive complexity gap, computer scientists introduced Fixed-Point Logic with Counting ($\text{IFP+C}$ or $\text{FPC}$). The intuition was that while logic cannot break arbitrary symmetries, it might bypass them by counting the sizes of symmetric sets, allowing it to track the progress of polynomial-time algorithms.

Where Fixed-Point Logics Break Down

For a long time, $\text{FPC}$ was a leading candidate for a logic that might perfectly capture PTIME on all finite structures. However, researchers eventually discovered that counting is not enough to overcome the barriers imposed by structural symmetry.

A definitive blow was struck by Anuj Dawar et al. in Definability of linear equation systems over groups and rings. The authors demonstrated that solving systems of linear equations over finite groups is a problem that can be computed efficiently in polynomial time (via standard Gaussian elimination), yet it cannot be expressed in $\text{FPC}$.

The intuition behind this failure relates directly to symmetry: Gaussian elimination requires choosing a "pivot" element to eliminate variables. On highly symmetric algebraic structures, $\text{FPC}$ cannot find a logical justification to select one specific pivot over another, causing the logic to stall where a sequential algorithm would simply make an arbitrary choice and proceed.

One natural question is whether we can fix this issue by restricting our focus to specific, well-behaved inputs. If general graphs are too complex, perhaps $\text{FPC}$ can capture PTIME on simpler graph classes?

Martin Grohe investigated this possibility across two papers, Fixed-Point Definability and Polynomial Time and Fixed-Point Definability and Polynomial Time on Chordal Graphs and Line Graphs. The author demonstrated that structural restrictions do not necessarily lower descriptive complexity. Specifically, even when restricting inputs to chordal graphs or line graphs, $\text{FPC}$ still fails to capture PTIME. These graph classes are rich enough to encode the full symmetry-breaking challenges of general structures, meaning that the expressivity gap persists even within these specialized domains.

Mapping Finer Complexity Bounds

The difficulty of aligning logic with computation is not unique to PTIME; it extends to even more restrictive, highly efficient complexity classes.

For instance, deterministic polylogarithmic time (PolylogTime) governs exceptionally fast sublinear algorithms. In Descriptive Complexity of Deterministic Polylogarithmic Time and its follow-up Descriptive complexity of deterministic polylogarithmic time and space, Flavio Ferrarotti et al. tackled the lack of a logical equivalent for these sublinear bounds. The authors introduced "index logic," a novel two-sorted logic designed to precisely mirror the computational constraints of polylogarithmic classes, providing a formal language for algorithms that cannot even read their entire input.

Other researchers have looked to alternative logical paradigms to capture PTIME itself. In A Fragment of Dependence Logic Capturing Polynomial Time, Johannes Ebbing et al. shifted focus away from fixed-points toward team semantics, identifying a specific fragment of dependence logic that perfectly matches PTIME. This demonstrates that alternative semantic frameworks can sometimes sidestep the limitations of traditional first-order extensions.

Database Queries and the Usability Gap

This theoretical divide between logic and computation has practical ramifications for database query languages and information extraction. Ideally, any query that can be computed in polynomial time should be expressible in a declarative database language.

However, the expressivity gap remains stubborn. In Expressivity of Datalog Variants - Completing the Picture, Sebastian Rudolph et al. proved that even if we allow Datalog variants to be order-invariant, they still cannot express all monotonic PTIME queries. This completed a long-standing map of query language expressivity, confirming that standard rule-based database languages fall short of full PTIME computational power.

Conversely, even when a language does successfully capture PTIME, the translation can be incredibly unwieldy. In Recursive Programs for Document Spanners, Liat Peterfreund et al. introduced a recursive language called RGXlog that perfectly captures all polynomial-time computable document spanners (mechanisms for text extraction). However, the authors noted that the equivalence relies on highly complex, intricate simulations of Turing machines rather than natural expressions. This highlights a secondary challenge: finding a logic that is not only computationally equivalent to PTIME but also intuitive enough for practical programming.

This ongoing effort to connect inductive definitions to efficient evaluation traces its roots back to foundational database theory. For example, Michel de Rougemont in Constructive Second-Order Proofs in Logical Databases early on established links between polynomial-time query evaluation and the existence of uniform, constructive second-order proofs.

The Horizon: Deep Combinatorial Testing

Today, the frontier of this research direction lies at the intersection of combinatorial graph algorithms and high-level logic.

In Deep Weisfeiler Leman, Martin Grohe et al. investigated the limits of the Weisfeiler-Leman algorithm—a combinatorial method for testing graph isomorphism that is deeply intertwined with fixed-point logics. By proposing a "deep" algorithmic framework, the authors continue to probe whether isomorphism-invariant logics can ever fully capture PTIME graph properties, or if certain structural traits will always remain fundamentally invisible to frameworks like choiceless polynomial time.

Until a definitive logic is found, the descriptive complexity gap remains one of the most significant open challenges in finite model theory, serving as a constant reminder that what can be computed step-by-step is fundamentally distinct from what can be described globally.

Key Foundational Work

Fixed-Point Definability and Polynomial Time (2009) — contributed 4 concept elements to this direction.
Constructive Second-Order Proofs in Logical Databases (1987) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_descriptive_complexity_gap_4295fb62,
  title = {descriptive complexity gap},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/descriptive-complexity-gap/rdr_4295fb6249934f2da1a63d88b919eabb},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-28},
}

This exact version (version 1, frozen text):

@misc{lacuna_descriptive_complexity_gap_4295fb62_v1,
  title = {descriptive complexity gap},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/descriptive-complexity-gap/rdr_4295fb6249934f2da1a63d88b919eabb/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-28},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake