← All projects
05Aug 2026

Temporal Drift in Accounting Concept Networks

PythonGraph Embeddingsnode2vecSEC XBRLNetworkX

Overview

A graph ETL and embedding alignment pipeline processing multi-quarter SEC XBRL financial statements. It converts raw filings into Pointwise Mutual Information (PMI) weighted concept co-occurrence networks, trains quarterly node2vec embeddings, and applies Procrustes rotation alignment to quantify structural drift over time.

Approach

  • Engineered a 5-table canonical database schema and modular parser translating raw SEC XBRL datasets into standardized graph edges.
  • Constructed PMI-weighted concept co-occurrence graphs for each quarter and executed orthogonal Procrustes alignment across sequential node2vec embedding spaces.
  • Implemented a 5-metric evaluation suite (embedding displacement, edge overlap, degree distribution shape, vocabulary churn, and community detection).
0.000.220.43EmbeddingEdge overlapVocab churnQ1→Q2Q2→Q3
Drift metrics, Q1→Q2 vs. Q2→Q3 — all decelerating
0.000.290.59RetailServicesMfgAgriFin/REConstrTranspMining
Mean concept drift by industry — core sectors drift most

Results

Metrics — sourced from the repo (README / model card / test output)

Embedding drift, Q1→Q2 vs. Q2→Q3
0.431 → 0.373

5 independent metrics agree drift is decelerating

Vocabulary churn, Q1→Q2 vs. Q2→Q3
23.0% → 12.1%
Centrality → stability regression
R² = 0.25, n = 3,935 concepts
Zero-drift sanity check
<0.1 vs. 0.43 real

real drift measured at ~4–5x the alignment-noise floor

Test suite
23 test files, built test-first

Proved systemic decelerating structural drift across sequential financial quarters (embedding distance 0.431 → 0.373) and revealed counter-intuitive drift patterns in core GAAP concept pairs, validated against a zero-drift sanity check built into the test suite.

Impact