Manuscript Offprint

arXiv:2610.06743

Recognizers for Graph-Encoding Languages

Anssi Yli-Jyrä

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Anssi Yli-Jyrä 1,2^{1,2}

1^{1}Digital Humanities, University of Helsinki, Finland

2^{2}Mathematics Research Centre, Tampere University, Finland

anssi.yli-jyra@helsinki.fi

We introduce recurrent incidence automata (RIAs), a new automaton model motivated by a decomposition of certain two-stack visibly pushdown computations. The decomposition separates vertex-local finite-state computations from recurrent one-stack interfaces connecting consecutive vertices. The construction is motivated by a two-stack visibly pushdown encoding of arbitrary ordered graphs whose strings admit a unique factorization into center-foldable vertex-local factors and whose auxiliary stack is empty at every factor boundary. Folding each factor into a sequence of pair symbols yields a local interface transformation. An RIA consists of a finite-state unit that computes these transformations and a recurrent layer that composes them across consecutive factors. Rather than manipulating an internal pushdown store, RIAs externalize long-range stack memory into recurrent interfaces between local computations. We show that nondeterministic RIA languages are closed under union, intersection, concatenation, Kleene-*, and reversal. Deterministic RIAs are closed under Boolean operations, although emptiness remains undecidable.

1 Introduction

Visibly pushdown languages (VPLs) [2, 29] are among the most elegant language families due to their attractive closure and decidability properties, their ability to encode hierarchical structure, and their natural automaton model, visibly pushdown automata (VPAs). In parallel, a wide variety of encodings have been developed for sequence-to-sequence parsing and sequence labeling [33] in natural language processing. Some encodings use balanced brackets to represent constituent structure [42]. Others encode non-crossing graphs [48, 16, 45, 43] or unrestricted ordered graphs [46, 44, 13]. The latter encodings arise from the formal constraints of dependency structures [19] and suggest connections with multi-stack visibly pushdown languages [9]. The encoding proposed by [44] is especially relevant since it involves a visibly controlled 2-pushdown system and encodes arbitrary ordered graphs.

The key observation of this paper is that the graph-encoding computations of [44] admit a decomposition into vertex-local finite-state transformations connected by recurrent one-stack interfaces. This decomposition motivates a new automaton model, recurrent incidence automata (RIAs), in which pushdown memory is externalized into recurrent interfaces between consecutive vertex-local factors. The model separates local finite-state computation from long-range stack memory.

By isolating long-range memory into explicit interface transformations, RIAs expose a reusable algebraic representation of stack behavior that can be analyzed, composed, and constrained independently of the local computation. This decomposition reflects the implicit restrictions of the underlying two-stack architecture and provides a natural basis for graph enumeration [45, 17], neural network probing [11, 23], constrained structure decoding [3, 37, 13], and related symbolic algorithms.

The design of RIAs is motivated by five characteristic structural properties of the graph encoding:

• Vertex-local factorization. Each vertex corresponds to one center-foldable factor representing its incidences. In our encoding, this correspondence is realized through balanced VPL factors

M. Hospodár et al. (Eds.): 17th International Conference on Automata and Formal Languages (AFL 2026) EPTCS 451, 2026, pp. 304–318, doi:10.4204/EPTCS.451.21

© A. Yli-Jyrä This work is licensed under the Creative Commons Attribution License.

derived from Dyck primes [30] rather than explicit delimiters [5]. This preserves the balanced structure of each factor while allowing edge representations to span factor boundaries. Vertex-local encoding also appears in the hardest CFL [18], lexicalized TAGs [24], dependency grammars and link grammars [48, 16], sequence-labeling parsers [14], and contextual neural sequence encoders [40, 10, 20].

• Double-Balanced Bracketing. The encoding [44] is characterized by two independent visibly pushdown structures defined over different visible partitions of the same alphabet. Unlike multi-planar encodings [47, 7], the additional pushdown is used only to access the first stack inside the local domains of vertices. The encoding is a homomorphic image of an intersection of two VPL languages [44], thereby suggesting that the language is a two-stack visibly pushdown language [6, 9]. This general characterization is more adequate without restrictions provided in [38, 9].

• Edge Partitioning. In hierarchical bracketing, edges are partitioned into standalone and leaning edges, where each leaning edge is shorter than and shares an endpoint with a standalone edge [43, 44, 13]. The graph’s proper rope cover (PRC) uniquely determines this partition, is computed directly, and minimizes the number of standalone edges [44, 13]. Although the number of leaning edges may be unbounded, the information flow between the shared endpoint of a standalone edge and its locally leaning edges remains bounded. This reduces the need to store edges separately in the stack. Such endpoint locality has yielded measurable practical advantages [7, 43, 13].

• One-Stack Interface. A crucial observation is that the auxiliary stack is always empty at the boundaries between consecutive vertex-local factors [44]. Consequently, the main stack alone carries non-local information across these boundaries and naturally forms a recurrent one-stack interface. In the RIA model, a recurrent layer propagates the interface language through successive vertex-local computations [12, 39]. This decomposition resembles recurrence in language models [21], rational recurrences [31], and graph-enumeration recurrences [28].

• Local Interface Transformations. The original encoding uses an auxiliary stack only within a vertex-local computation, leaving it empty at every factor boundary [44]. We exploit this locality through center folding, which compiles each local two-stack computation into a finite-state transformation of the persistent interface. Each factor thereby becomes a finite-state operator that visibly rewrites the evolving incidence information carried by the interface. This operator view resonates with operator precedence grammars [15, 32] and combinatory categorial grammars [36], where local operators compose to determine global structure. Associative composition of finite-state transformations combines the local computations into the global computation [4, 34].

Together, these observations motivate recurrent incidence automata (RIAs), a new automaton model based on recurrent interface transformations. Rather than manipulating a pushdown store throughout the computation, RIAs externalize long-range stack memory into a persistent one-stack interface and perform only finite-state computations locally. Unlike classical visibly pushdown automata, they introduce visible replace operations, allowing local computations to update graph incidences directly, by rewriting interface symbols before recurrently composing the resulting interface transformations.

Our main theoretical results show that a two-stack visibly pushdown computation for graph-encoding languages can be decomposed into finite vertex-local interface transformations connected by a recurrent one-stack interface. RIAs retain several attractive algebraic properties of visibly pushdown automata, and deterministic RIAs are closed under Boolean operations. We also define a subclass of RIAs that recognize languages of canonical graph-encodings. The emptiness problem for RIAs is undecidable, as it is for two-stack visibly pushdown automata [8].

Recognizers for Graph-Encoding Languages

The paper is organized as follows. Section 2 describes the structure of graph-encoding strings. Section 3 presents the RIA model and Section 4 its normalizations. Section 5 studies the RIA-recognizable languages, and Section 6 studies decision problems. The paper is concluded by Section 7.

AI use. ChatGPT assisted with language, presentation, and discussion of proofs; all technical content and proofs were independently checked and verified by the author.

References (65)