Function-Word Adjacency Networks
- Function-Word Adjacency Networks are directed, weighted graphs that encode syntagmatic relationships among function words, enabling robust stylometric and authorship analyses.
- They construct proximity-weighted co-occurrence matrices normalized into Markov transition models, allowing quantitative comparisons via measures like KL divergence.
- Empirical studies show WANs achieve high attribution accuracy and effectively distinguish multi-author and disputed texts, highlighting their practical utility in stylometry.
Function-Word Adjacency Networks (WANs) are directed, weighted graphs constructed from texts to encode the syntagmatic relationships among function words—parts of speech that indicate grammatical structure rather than lexical content. Each node in such a network corresponds to a function word, and each directed, weighted edge denotes the frequency or strength with which one function word follows another within a specified proximity window in the text. WANs enable quantitative stylometric analysis that leverages the structural, rather than purely frequency-based, properties of function word usage, and have proven highly effective for tasks such as authorship attribution, diachronic stylistic profiling, and the detection of collaborative writing (Eisen et al., 2016, Segarra et al., 2014). This relational abstraction also admits interpretations within statistical mechanics and complex network theory, supporting the application of graph-analytic and Markovian probabilistic frameworks (Dec et al., 10 Jan 2026).
1. Mathematical Foundations and Construction of WANs
A Function-Word Adjacency Network is formally denoted as for a text , where is a fixed set of function words. The edge set is weighted by a matrix , which quantifies the proximity-weighted co-appearance of within a window of width following . Specifically, at each occurrence of , occurrences of 0 within 1 positions (2) ahead receive an increment 3, with decay parameter 4:
5
where 6 denotes the 7th word in the 8th segment of 9 (typically a sentence or syntactic unit) (Segarra et al., 2014, Eisen et al., 2016). Row normalization yields a Markov transition matrix:
0
Aggregating WANs across a corpus 1 for author 2 produces an author profile matrix 3, similarly normalized to 4:
5
This construction ensures robustness to sample size and text-length variation.
2. WANs as Markov Chains: Probabilistic Interpretation
After normalization, the WAN adjacency matrix 6 (or 7 for profiles) functions as the transition probability matrix for a discrete-time Markov chain over 8 (Segarra et al., 2014, Eisen et al., 2016). Each entry 9 corresponds to the conditional probability that a function word 0 follows 1 according to the adjacency statistics in the corpus. For corpora of sufficient scale, the Markov chain is ergodic and admits a unique stationary distribution 2 over 3.
This stochastic interpretation enables a principled, information-theoretic comparison of WANs: the dissimilarity between two networks 4 and 5 is measured by the Markov chain Kullback–Leibler divergence (relative entropy):
6
This metric quantifies how unlikely the adjacency profile of 7 would be if governed by the transition probabilities of 8 (Segarra et al., 2014). For authorship attribution, an unknown text is assigned to the author whose profile minimizes 9.
3. Empirical Performance and Stylometric Applications
WAN-based attribution has yielded state-of-the-art results across historical and modern corpora. Studies on Early Modern English plays (six authors, 94 plays) achieved 92.6% attribution accuracy using WAN relative entropy, surpassing Burrows’s Delta (91.3%), PCA-based methods (81.5%), and cosine/Euclidean baselines (<82%) (Eisen et al., 2016). In nineteenth-century novels, WANs alone posted error rates 2–3 percentage points below frequency-based SVM or Naive Bayes classifiers for candidate sets of up to ten authors, with further gains when WANs and frequency-based outputs were combined by majority vote (Segarra et al., 2014).
WANs’ authorial discrimination extends to collaborative and disputed works. The act/scene-level WAN attribution framework identifies multi-author contributions and localizes stylistic boundaries to sub-play granularity, confirming or refining prior literary attributions (Eisen et al., 2016). Robustness is maintained even when profile function-word lists are adaptively pruned for shorter units to avoid overfitting.
4. Network Theoretic Properties and Growth Models
On a structural level, WANs can be analyzed using the tools of complex networks. In the undirected, unweighted case, the average shortest-path length 0 in the word-adjacency network evolves in three regimes: initial chain-like growth (1), a crossover region, and an ultrasmall-world regime where 2 saturates or declines logarithmically with network size (Dec et al., 10 Jan 2026). Punctuation—if nodes—acts as a connectivity accelerator (“hub”), lowering average distances and thus modulating navigability.
A stochastic growth model combines (a) Heaps’s law-driven node introduction, with probability 3, and (b) accelerated intra-network edge addition governed by a time-evolving preferential attachment kernel 4. Fitting this model to empirical 5 profiles captures the structural emergent properties observed in function-word and broader word-adjacency networks.
5. Implementation: Parameter Choices and Algorithmic Steps
WAN construction depends on several key hyperparameters:
- Function-word set 6: Typically the most frequent 40–100 function words, determined via cross-validation or frequency analysis.
- Window size 7: Linguistically derived; 8 is effective, as syntactic dependencies rarely extend further.
- Discount factor 9: Optimal values near 0, favoring closer co-occurrences (Eisen et al., 2016).
- Segmentation: Usually sentences (delimited by “.”, “?”, “!”, “;”), though for plays, speeches or dialogue segments are also used.
WAN construction proceeds by iterating through the tokenized text, incrementing 1 for each relevant ordered pair within the window, weighted by 2. After aggregation, the resulting WANs are normalized row-wise. See (Segarra et al., 2014) for detailed pseudocode and illustrative examples.
6. Extensions and Limitations
WAN methodology is extendable along multiple axes:
- Higher-order adjacencies: Capturing dependencies across larger syntactic units and incorporating select lexical items or punctuation as auxiliary nodes (Eisen et al., 2016, Dec et al., 10 Jan 2026).
- Alternative distance metrics: Cosine similarity, Euclidean/Manhattan distances, spectral measures, and graph kernels supplement or complement the Markov-chain KL divergence.
- Complex embeddings for adjacency: Recent work parameterizes word–position relationships by complex-valued functions, capturing both absolute and relational (adjacency/precedence) information in neural encoding architectures. This approach achieves significant gains on tasks requiring order sensitivity in CNN, RNN, and Transformer models (Wang et al., 2019).
Limitations include potential genre effects (which can bias profile distances), sensitivity to rare word-pair sparsity (requiring smoothing or summation across profiles), and the need for large authorial corpora to reliably estimate profiles. This suggests that WAN methodology is most robust in high-resource, genre-homogeneous analysis contexts.
7. Comparative and Theoretical Significance
The principal advantage of function-word WANs lies in their ability to summarize authorial syntactic preference as relational, rather than static, statistical objects. Because function words are lexically neutral, WANs capture content-independent features, providing resilience against topical confounds and supporting applications in historical stylometry, forensic linguistics, and beyond. Their mathematical equivalence to Markov chains grounds the method in information theory and matrix analysis, while network-theoretic modeling situates WAN analysis in the broader context of complex adaptive systems. Comparative studies demonstrate that WANs outperform pure frequency-based and dimensionality reduction approaches in multiple regimes, and their interpretability enables detailed attribution—both global and local—of collaborative or disputed authorship (Eisen et al., 2016, Segarra et al., 2014, Dec et al., 10 Jan 2026).