Papers
Topics
Authors
Recent
Search
2000 character limit reached

FOLTY: Triadic Temporal Motif Framework

Updated 7 July 2026
  • FOLTY is an algorithmic framework that applies thresholded first-order logic to triadic queries on temporal networks, enabling richer motif analysis.
  • It combines existential and thresholded universal quantifiers to detect temporal triangles under ordered, bounded time constraints without full enumeration.
  • The method leverages degeneracy orientation, specialized segment trees, and efficient data structures to achieve performance comparable to the best static triangle-counting bounds.

Searching arXiv for the target paper and closely related temporal motif-mining context. FOLTY, short for First Order Logic Triadic Yielder, is an algorithmic framework for answering thresholded First-Order Logic (FOL) triadic queries on temporal networks. It is introduced in the context of motif analysis, where a small pattern graph HH is sought inside a large input network GG, but extends ordinary triadic temporal motif queries by supporting both existential and thresholded universal quantifiers (Bhalerao et al., 23 Jul 2025). In this formulation, the target is no longer limited to asking whether a single temporal triangle exists. Instead, the framework supports higher-level structural conditions such as whether at least a τ\tau-fraction of a vertex’s relevant neighbors satisfy a temporal motif predicate. The paper positions this as a way to mine richer information than standard motif counting, while retaining running time comparable to the best known bounds for sparse temporal triangle counting (Bhalerao et al., 23 Jul 2025).

1. Formal setting and query model

FOLTY operates on a temporal network G=(V,E)G=(V,E), where each temporal edge is a triple (u,v,t)(u,v,t) with a timestamp, and multiple temporal edges may exist between the same pair of vertices. The corresponding underlying static graph GSG_S is obtained by removing timestamps and directions (Bhalerao et al., 23 Jul 2025). The motif predicate of interest is triadic: it involves three vertices u,v,wu,v,w and specifies a temporal triangle pattern through direction constraints, ordering constraints, and a time-window bound such as “within one hour” (Bhalerao et al., 23 Jul 2025).

The paper defines a thresholded First Order Logic triadic query as

Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),

where each QiQ_i is either \exists or a thresholded universal quantifier GG0, with GG1 (Bhalerao et al., 23 Jul 2025). The semantics are local rather than global in the classical logical sense: GG2 requires the existence of a witness GG3, while GG4 requires the remainder of the formula to hold for at least a GG5-fraction of the relevant universe, typically a neighborhood. The paper’s informal reading is explicit: GG6 means “for at least a GG7-fraction of the neighbors” (Bhalerao et al., 23 Jul 2025).

A representative example is

GG8

which asks for vertices GG9 such that at least half of the neighbors τ\tau0 of τ\tau1 make τ\tau2 true (Bhalerao et al., 23 Jul 2025). The notion of a solution depends on the existential structure of the query. For τ\tau3, the solution is a pair τ\tau4; for τ\tau5 and τ\tau6, the solution is a single vertex; and for τ\tau7, it is a triple (Bhalerao et al., 23 Jul 2025).

This query language is intended to separate ordinary temporal motif detection from richer thresholded semantics. A classical triadic temporal query asks for triples τ\tau8 that form a prescribed temporal triangle. A thresholded FOL query instead asks how frequently a local structural relation holds across a neighborhood, for example whether “for half of the τ\tau9 where G=(V,E)G=(V,E)0 is an edge, G=(V,E)G=(V,E)1 is also an edge within an hour” (Bhalerao et al., 23 Jul 2025). This suggests a shift from fixed-instance pattern detection to local, quantified motif semantics.

2. Temporal triangle semantics and expressive scope

The core predicate studied in the paper is a temporal triangle. For the concrete motif used by FOLTY, a G=(V,E)G=(V,E)2-temporal triangle consists of temporal edges G=(V,E)G=(V,E)3, G=(V,E)G=(V,E)4, and G=(V,E)G=(V,E)5 satisfying

G=(V,E)G=(V,E)6

Equivalently, for a fixed temporal edge G=(V,E)G=(V,E)7, the edge G=(V,E)G=(V,E)8 forms a G=(V,E)G=(V,E)9-temporal triangle with (u,v,t)(u,v,t)0 if there exist (u,v,t)(u,v,t)1 and (u,v,t)(u,v,t)2 such that

(u,v,t)(u,v,t)3

(Bhalerao et al., 23 Jul 2025).

This temporal semantics matters because FOLTY is not merely counting static wedges or static triangles. It evaluates whether timestamped interactions satisfy an ordered, bounded temporal constraint. The distinction becomes especially important when the query contains a thresholded universal quantifier, since the task is no longer to enumerate every valid (u,v,t)(u,v,t)4, but to determine whether sufficiently many witnesses (u,v,t)(u,v,t)5 satisfy the predicate relative to a local universe such as (u,v,t)(u,v,t)6 (Bhalerao et al., 23 Jul 2025).

The paper emphasizes that ordinary triadic motif queries can express standard triangle patterns but do not naturally encode statements such as “for most neighbors” or “for at least a (u,v,t)(u,v,t)7-fraction of neighbors” (Bhalerao et al., 23 Jul 2025). The thresholded FOL formalism is introduced to capture this gap. The motivating examples include scatter-gather and bipartite money-laundering patterns, where the number of intermediate vertices is not fixed in advance (Bhalerao et al., 23 Jul 2025). A plausible implication is that the framework is intended for settings where structural prevalence, rather than isolated existence, is the relevant signal.

3. Algorithmic design: orientation, counts, and direct query answering

The central technical goal is to evaluate thresholded queries without enumerating all temporal triangles. FOLTY addresses this by combining degeneracy orientation, sparse triangle listing, and specialized temporal data structures (Bhalerao et al., 23 Jul 2025). The algorithm begins with the underlying static graph (u,v,t)(u,v,t)8, computes a degeneracy ordering (u,v,t)(u,v,t)9, and orients every static edge from smaller to larger order. If GSG_S0 denotes the degeneracy, then each vertex has at most GSG_S1 out-neighbors under this orientation (Bhalerao et al., 23 Jul 2025).

The orientation step is crucial because it imports the classical sparsity control embodied by the Chiba–Nishizeki bound: GSG_S2 where GSG_S3 is the degree of the lower-degree endpoint of edge GSG_S4 (Bhalerao et al., 23 Jul 2025). FOLTY adapts this orientation framework to temporal motifs rather than static triangle listing.

For the main GSG_S5 query, FOLTY maintains two arrays for every temporal edge GSG_S6: in-count and out-count. These record the number of relevant in-neighbors and out-neighbors, respectively, that form at least one GSG_S7-temporal triangle with GSG_S8 (Bhalerao et al., 23 Jul 2025). The threshold test is then

GSG_S9

for u,v,wu,v,w0, in which case u,v,wu,v,w1 is a solution to the u,v,wu,v,w2 query (Bhalerao et al., 23 Jul 2025).

The same pair of arrays is reused to answer other query types after reduction to the u,v,wu,v,w3 core, specifically u,v,wu,v,w4 and u,v,wu,v,w5 (Bhalerao et al., 23 Jul 2025). This reuse is a defining aspect of the framework: FOLTY is not presented as a family of unrelated procedures, but as a core counting-and-threshold mechanism that can serve several quantified triadic query forms.

A central point in the paper is that FOLTY answers the query directly rather than by first enumerating all temporal triangles and then post-processing them (Bhalerao et al., 23 Jul 2025). This distinction is algorithmically significant because thresholded FOL queries are solution-oriented: they ask whether enough witnesses exist, not how many total motif instances occur. The design of the in-count and out-count arrays reflects that change in objective.

4. Temporal primitives and segment-tree machinery

The algorithmic treatment of out-neighbors and in-neighbors differs substantially. For out-neighbors, FOLTY considers a directed static edge u,v,wu,v,w6 and each out-neighbor u,v,wu,v,w7 adjacent to u,v,wu,v,w8. It forms three timestamp-sorted temporal edge lists,

u,v,wu,v,w9

and uses a set of helper primitives (Bhalerao et al., 23 Jul 2025).

These primitives are:

  • Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),0: for each edge in Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),1, find the first edge in Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),2 with timestamp at least that edge’s timestamp.
  • Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),3: for each edge in Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),4, binary-search in Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),5 for the first edge with timestamp at least the timestamp of the edge in Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),6.
  • Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),7: a bounding primitive used to determine whether the temporal window condition can be satisfied (Bhalerao et al., 23 Jul 2025).

Using these routines, FOLTY can determine whether an edge Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),8 participates in a valid temporal triangle with Q1u  Q2v  Q3w  ϕ(u,v,w),Q_1 u \; Q_2 v \; Q_3 w \; \phi(u,v,w),9 in essentially linear time in the list sizes (Bhalerao et al., 23 Jul 2025). The correctness criterion is stated in the paper as an equivalence: an edge QiQ_i0 forms at least one QiQ_i1-temporal triangle with QiQ_i2 if and only if the selected timestamp witnesses satisfy the triangle ordering condition (Bhalerao et al., 23 Jul 2025).

For in-neighbors, the situation is harder because the relevant vertices are not all accessible through the oriented source’s out-neighborhood. The solution is an interval representation combined with segment trees (Bhalerao et al., 23 Jul 2025). For each static edge QiQ_i3, the algorithm creates two segment trees, QiQ_i4 and QiQ_i5. For an in-neighbor QiQ_i6, it constructs a collection of intervals

QiQ_i7

where QiQ_i8 is the first edge in QiQ_i9 not earlier than \exists0 (Bhalerao et al., 23 Jul 2025).

The key theorem states: \exists1 if and only if there exists an interval in \exists2 containing \exists3 (Bhalerao et al., 23 Jul 2025). The segment tree then serves as an interval accumulator: intervals from many in-neighbors are inserted, and a lookup at timestamp \exists4 returns how many distinct in-neighbors generated a covering interval.

The insertion process is designed to avoid duplicate counting. A naive approach may overcount the same in-neighbor multiple times, so the paper introduces a three-phase procedure with node colors (Bhalerao et al., 23 Jul 2025):

Phase Operation Purpose
1 Mark canonical nodes as grey without updating counters Delay counting
2 Recolor only a subset of grey nodes that are “highest” along white paths Avoid duplicates from nested intervals
3 Update counters only at surviving grey nodes, using a Vertex field Prevent incorrect merging across in-neighbors

The Vertex field records the most recent vertex that caused a node’s counter to be updated (Bhalerao et al., 23 Jul 2025). The paper also notes that the segment trees are built on the timestamps of the edges between a pair of vertices rather than on all real-valued interval endpoints. If an inserted interval does not align with timestamps, it is mapped by binary search to the maximal contained timestamp interval (Bhalerao et al., 23 Jul 2025). This is a practical discretization choice tied directly to the data layout.

5. Complexity and implementation characteristics

The theoretical running time of FOLTY is

\exists5

where \exists6 is the number of temporal edges, \exists7 is the maximum core number or degeneracy of the static graph, and \exists8 is the maximum multiplicity of any static edge (Bhalerao et al., 23 Jul 2025). The paper states that this matches the best known running time for sparse temporal triangle counting, and up to the \exists9 factor it matches the classical GG00 Chiba–Nishizeki bound for static triangle counting (Bhalerao et al., 23 Jul 2025).

This complexity claim is central to the significance of the framework. The query language is richer than ordinary existential motif counting, yet the asymptotic cost remains tied to the same sparsity parameter GG01 that controls efficient triangle processing in static graphs. This suggests that the main computational burden is still local sparse-triangle structure, not the logical quantification layer itself.

The implementation is given in C++ and is designed for commodity hardware, specifically an Intel Xeon Platinum 8380 CPU (Bhalerao et al., 23 Jul 2025). The implementation uses precomputed static adjacency, timestamp-sorted edge lists GG02, and GG03 access to those lists. It stores two temporal edge lists per static edge direction and relies on the degeneracy orientation to keep the number of expensive triangle-like operations bounded (Bhalerao et al., 23 Jul 2025).

The helper routines FindExceedingEntryLS, FindExceedingEntryBS, FindBoundingEntry, and the segment-tree operations are described as central to the implementation (Bhalerao et al., 23 Jul 2025). This emphasizes that the framework’s efficiency is not solely a matter of asymptotic design; it also depends on careful temporal indexing and pairwise list access.

6. Empirical behavior, scope restrictions, and significance

The empirical evaluation uses SNAP temporal datasets ranging from around 50K edges to nearly 70M edges (Bhalerao et al., 23 Jul 2025). The reported datasets are CollegeMsg, email-Eu-core-Temporal, sx-mathoverflow, sx-superuser, sx-askubuntu, wiki-talk-temporal, and sx-stackoverflow (Bhalerao et al., 23 Jul 2025). For GG04 queries, runtimes range from fractions of a second on smaller graphs to about 956 seconds on the largest StackOverflow graph with about 63.5M edges, while still producing tens of thousands of solutions (Bhalerao et al., 23 Jul 2025). For GG05, the paper reports about 1746 seconds on StackOverflow, and for GG06 it reports similarly strong performance (Bhalerao et al., 23 Jul 2025).

The main empirical comparison is against a triangle-enumeration baseline, BT (MinTemporalMotif). FOLTY is reported as consistently faster for the GG07 and GG08 tasks because it does not incur the full cost of enumerating all triangles first (Bhalerao et al., 23 Jul 2025). This aligns with the framework’s design goal of direct query answering.

The paper also reports several qualitative trends (Bhalerao et al., 23 Jul 2025). As the threshold GG09 increases, the number of solutions generally decreases. Beyond relatively high thresholds such as GG10 or GG11, the number of solutions often flattens, suggesting that many surviving solutions are already highly cohesive. As the time window GG12 increases, the number of solutions typically increases, since a larger window makes the motif constraints easier to satisfy.

The scope of the method is deliberately restricted. FOLTY focuses on triadic queries and on predicates based on a temporal triangle (Bhalerao et al., 23 Jul 2025). It does not solve general FOL queries over arbitrary motifs, although the authors suggest that the techniques may generalize. The method assumes access to the temporal network as a static graph plus timestamped edge lists sorted by time. It also assumes that the universe of the universal quantifier is typically a neighborhood or a similar local set, though the paper remarks that intersections of neighborhoods can also be handled with modest changes (Bhalerao et al., 23 Jul 2025).

Another restriction is that the framework does not allow queries beginning with a universal quantifier, because such queries do not naturally yield a set of solutions in the proposed formulation. The paper notes, however, that these can often be transformed using negation and De Morgan’s laws (Bhalerao et al., 23 Jul 2025). A common misconception would therefore be to regard FOLTY as a general-purpose temporal FOL engine; it is more precisely a triadic temporal motif framework with thresholded universal quantification and solution-oriented semantics.

Within those limits, FOLTY is significant because it reframes temporal motif analysis as a richer logical querying problem while preserving near-optimal triangle-counting complexity (Bhalerao et al., 23 Jul 2025). Rather than asking only whether a temporal triangle exists, it can ask how broadly a temporal relation propagates across a local neighborhood. This suggests a substantive extension of motif analysis from fixed-size pattern enumeration toward logic-driven temporal graph mining.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to FOLTY.