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

Order Invariance in Descriptive Complexity

38 concepts16 papers2 proposals

A fundamental mismatch lies at the heart of theoretical computer science. On one side stands the Turing machine—the standard model of computation—which is inherently sequential. It processes data by moving a tape head step-by-step across an ordered sequence of cells. On the other side stands mathematical logic, which evaluates relational structures like graphs or databases as unordered collections of nodes and edges.

Descriptive complexity attempts to bridge this gap by equating computational complexity classes (such as PTIME or LOGSPACE) with the expressive power of logical languages. However, as noted by Johannes Ebbing et al. and Jonni Virtema et al., standard logical characterizations of these classes break down unless the input structures are explicitly ordered. Without a built-in linear order or successor relation, a logic struggles to perform basic sequential operations like counting, indexing, or tracking execution steps.

This reality introduces a major open challenge: How can we logically characterize computation on unordered structures without making the logic dependent on an arbitrary data arrangement?

The Semantic Tax of Order Invariance

When relational data is processed by a computer, it must be arranged in memory according to some arbitrary linear order. To prevent this arbitrary arrangement from affecting the outcome of a query, we require the logic to be order-invariant. An order-invariant logic is permitted to use an auxiliary linear order during its intermediate computation steps, provided that the final output is identical regardless of which specific linear order is chosen.

While this sounds like a reasonable compromise, enforcing order-independence imposes a severe semantic constraint on the logic.

[Unordered Graph] ---> (Apply Arbitrary Order A) ---> [Intermediate Computation] ---> [Result]
                                                                                        || (Must Match)
[Unordered Graph] ---> (Apply Arbitrary Order B) ---> [Intermediate Computation] ---> [Result]

As Sebastian Rudolph et al. demonstrated, order-invariant Datalog fails to capture the full class of homomorphism-closed queries computable in polynomial time. The requirement that a program's output must remain invariant across all possible domain orderings acts as a drag on its expressive power. It prevents the logic from fully exploiting the auxiliary order for tasks like matching or counting, creating an expressivity gap between what can be computed in PTIME and what can be expressed order-invariantly.

Why does this happen? Kord Eickmeyer et al. suggest that the computational overhead in ordered structures stems from the ability to distinguish specific, arbitrary positions. When we force a logic to be order-invariant, we strip away its ability to rely on those specific positions. While this constraint restores algorithmic tractability for model-checking on certain graph classes, it fundamentally limits the logic's capacity to simulate general sequential computation.

Definable Canonization

One way to bypass the order-invariance dilemma is to avoid arbitrary external orderings altogether. Instead, we can force the logic to construct its own unique, canonical ordering based entirely on the structural properties of the input. This mechanism is known as definable canonization.

If a logic can deterministically generate a unique structural "fingerprint" or canonical ordering for any given graph, it can safely transition from an unordered domain to an ordered one. Once this canonical order is established, standard logics designed for ordered structures can be applied to capture complexity classes perfectly.

[Unordered Graph] ---> [Logical Formulas] ---> [Unique Canonical Order] ---> [Standard Ordered Logic]

Martin Grohe successfully applied this mechanism to complex graph topologies, proving that fixed-point logic can achieve definable canonization on chordal graphs and line graphs. By logically defining a canonical ordering from the graph's inherent geometry, the logic gains the ability to express any property that a standard computer can calculate in polynomial time, bypassing the traditional requirement for pre-ordered inputs.

Bootstrapping Order in Higher-Order Logics

As we climb higher up the complexity hierarchy into exponential time and space, the requirement for an externally ordered input structure disappears. This is because higher-order logics possess enough internal expressive power to bootstrap their own coordinate systems.

Instead of relying on a pre-defined total order on the input domain, a high-order logic can manipulate sets of sets. Florian Bruse et al. showed that higher-order modal logics can internally define a total lexicographical order over bisimulation-equivalence classes.

In a subsequent work, Florian Bruse et al. proved that for exponential-space hierarchies, order-$(k+1)$ logic can internally define a total order over the input elements from scratch. Because the logic can build its own internal data representations, it can simulate sequential Turing machines even when the underlying data structure is completely unordered.

Interestingly, the authors note that this capability is a feature of higher-order abstractions; at the base level of the hierarchy (like PSPACE or PTIME), the necessity of an explicit total order remains an unresolved nuance.

Another way to achieve completeness on unordered data without a built-in order is through exhaustive permutation. Sebastian Rudolph et al. demonstrated that rule-based systems with existential quantification can achieve computational completeness on unordered data by internally constructing all possible linear orderings of domain elements simultaneously, leveraging existential rules to explore the space of permutations.

The Sublinear and Local Frontiers

The challenge of order-dependence becomes exceptionally acute when computational resources are highly constrained, such as in logarithmic space (LOGSPACE) or deterministic polylogarithmic time (PolylogTime). In these sublinear regimes, a logic cannot afford the computational budget to build complex higher-order relations or compute global graph canonizations.

Flavio Ferrarotti et al. and Flavio Ferrarotti et al. exposed this limitation when analyzing "index logic" for PolylogTime. They discovered that an explicit order predicate on the domain is strictly necessary for the logic to maintain its expressive power in the presence of constant symbols. Without a built-in mechanism to order domain elements, sublinear logics cannot reliably track binary addresses or process inputs sequentially, making order-invariant characterizations in sublinear time an ongoing obstacle.

To counter this, researchers must design specialized, highly localized operators. For example, André Hernich et al. introduced LREC, a logic that extends first-order logic with a "limited recursion" operator. By restricting the recursion depth to stay within logarithmic space bounds, the authors proved that this logic can capture LOGSPACE on specific unordered structures like directed trees and interval graphs, demonstrating that tailored recursive mechanisms can substitute for a global linear order in restricted structural settings.

Analyzing Order Invariance via Compositionality

To prove what order-invariant languages can and cannot express, model theorists need tools to analyze these logics mathematically. A primary challenge is that standard model-theoretic tools (like types) are designed for standard first-order logic and do not easily adapt to the semantic constraints of order-invariance.

To solve this, Pablo Barcelo et al. developed the framework of order-invariant types. This framework isolates and considers only the formulas whose truth values remain constant regardless of the specific linear ordering assigned to a structure's elements.

Using this tool, the authors demonstrated that order-invariant properties exhibit compositionality. This means that the logical characteristics of a large, composite structure (such as a disjoint union or product of two graphs) can be determined entirely by analyzing the order-invariant types of its individual components.

[Component Graph X] ---> (Order-Invariant Type X) \
                                                    ---> [Combined Type] ---> [Property of X ∪ Y]
[Component Graph Y] ---> (Order-Invariant Type Y) /

This compositional behavior allows researchers to apply classical decomposition theorems to order-invariant logics. It provides a clean mathematical foundation to prove the limits of these languages, helping map exactly where order-independent logical characterization succeeds and where the sequential nature of computation still demands an explicit order.

Key Foundational Work

Fixed-Point Definability and Polynomial Time on Chordal Graphs and Line Graphs (2010) — contributed 3 concept elements to this direction.
Towards a characterization of order-invariant queries over tame graphs (2009) — contributed 2 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_order_independent_logical_characterizati_39ac90cf,
  title = {order-independent logical characterization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/order-independent-logical-characterization/rdr_39ac90cff35d4aa9a96669f48fd16985},
  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_order_independent_logical_characterizati_39ac90cf_v1,
  title = {order-independent logical characterization},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/order-independent-logical-characterization/rdr_39ac90cff35d4aa9a96669f48fd16985/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