Skip to main content

Temporal and Evolving Networks

A static aggregate says that edges occurred during a window. A temporal network also records when, so a valid path must respect event order. Aggregation can create static routes that no message, infection, or resource could have followed in time.

Prerequisites​

Complete link prediction. Keep its temporal cutoff discipline and return to the directed event stream rather than the undirected training projection.

Learning goals​

  • Distinguish event streams, snapshots, and static aggregates.
  • Compute a simple earliest-arrival reachability scan.
  • Exhibit a static path that is not time-respecting.
  • Separate evolving structure from changes in collection, missingness, and coverage.

Analysis contract​

  • Graph type: the valid directed temporal multigraph; every event retains its identity and UTC timestamp, parallel events remain separate, and weight means strength rather than duration.
  • Normalization: daily snapshots report raw event counts; temporal reachability is Boolean and earliest arrival is an absolute timestamp, with no rescaling across windows.
  • Disconnected case: if no nondecreasing-time event sequence reaches a target, temporal distance is undefined even when the static aggregate contains a directed path.
  • Interpretation limit: time-respecting reachability and snapshot change are evidence, not realized diffusion, influence, future truth, mechanism, or causality.

Event order changes reachability​

Starting from Ada before the observation window, the event sequence Ada→Ben, Ben→Cy, then Cy→Dia is time-respecting. Starting from Fox, the only outgoing event to Ada occurs on October 3, after Ada→Ben, Ben→Cy, and Cy→Dia have already happened. The static aggregate forgets this order and incorrectly suggests a usable Fox-to-Dia route.

This scan assumes instantaneous events and allows a later event only when its source has already been reached. Other applications need duration, simultaneous-event rules, waiting-time limits, node availability, or repeated transmission. A snapshot series introduces a separate choice of window boundaries; daily counts below do not make differently sized windows comparable.

Worked example​

import csv
from collections import Counter
from datetime import datetime
from pathlib import Path

import networkx as nx

fixture = Path("tests/fixtures/graph-data-science")
with (fixture / "interaction-nodes.csv").open(encoding="utf-8") as handle:
node_ids = [row["node_id"] for row in csv.DictReader(handle)]
with (fixture / "interaction-relationships.csv").open(encoding="utf-8") as handle:
events = [row for row in csv.DictReader(handle) if row["record_status"] == "valid"]
events.sort(key=lambda row: (row["observed_at"], row["relationship_id"]))

aggregate = nx.DiGraph()
aggregate.add_nodes_from(node_ids)
aggregate.add_edges_from((row["source"], row["target"]) for row in events)

def earliest_arrivals(source):
reached = {source: None}
for event in events:
if event["source"] not in reached:
continue
source_time = reached[event["source"]]
event_time = datetime.fromisoformat(event["observed_at"].replace("Z", "+00:00"))
if source_time is None or source_time <= event_time:
reached.setdefault(event["target"], event_time)
return reached

from_fox = earliest_arrivals("fox")
from_ada = earliest_arrivals("ada")
daily = Counter(row["observed_at"][:10] for row in events)
print(f"static_fox_to_dia={nx.has_path(aggregate, 'fox', 'dia')} temporal_fox_to_dia={'dia' in from_fox}")
arrival = from_ada["dia"].isoformat().replace("+00:00", "Z")
print(f"temporal_ada_to_dia={'dia' in from_ada} arrival={arrival}")
print(f"snapshots={sorted(daily.items())}")

Expected output:

static_fox_to_dia=True temporal_fox_to_dia=False
temporal_ada_to_dia=True arrival=2026-10-02T09:00:00Z
snapshots=[('2026-10-01', 4), ('2026-10-02', 4), ('2026-10-03', 2)]

The counterexample shows why temporal order is part of topology for flow-like questions.

Limitations​

  • The timestamps record observations, not necessarily the exact start, duration, or causal order of real interactions.
  • Day boundaries can manufacture apparent change; compare fixed, justified windows and exposure.
  • Late arrival, backfill, and collection outages can look like network evolution.
  • Computing temporal paths at scale can be expensive, and the appropriate waiting rule is domain-specific.
  • Reusing post-cutoff events in earlier features creates time leakage even if the final labels are held out.

Practice​

Start the scan from Ben immediately after r03. Decide whether equality at the timestamp boundary is allowed, document that convention, and list the reachable nodes.

Next steps​

Continue to knowledge graph fundamentals to separate typed assertions and query semantics from interaction-network structure.

Primary sources​

Checked 2026-10-18: P. Holme and J. Saramäki, Temporal networks; R. K. Pan and J. Saramäki, Path lengths, correlations, and centrality in temporal networks; NetworkX, has_path.