Graph of Words for Structural Text Representation

This direction is no longer present in the current build. Its last version stays readable and citable here.

Version 1 of 128 papers33 conceptsfrozen 2026-10-04

For decades, Natural Language Processing (NLP) has relied on the "Bag-of-Words" (BoW) model, which treats documents like laundry bags—shoving words inside and hoping their frequencies reveal the content. While simple, BoW is blind to structure. If you swap "news article" for "article about news," BoW sees different features, and it completely loses the relational context between words.

To solve this, researchers have moved toward the Graph-of-Words (GoW) representation. By modeling a document as a network of interacting terms rather than a flat list, we can capture the structural "fingerprint" of text.

From Sequences to Networks

The core intuition behind GoW, as articulated by François Rousseau and Michalis Vazirgiannis in Text Categorization as a Graph Classification Problem, is that the meaning of a word is defined by its neighborhood.

To build a GoW, we treat unique terms as nodes. We then slide a fixed-size window (e.g., 3 or 5 words) across the text. If two words appear together within that window, we draw an edge between them. This simple mechanism transforms a linear string of text into a topological map. Unlike $n$-grams, which are brittle and break if word order shifts slightly, these graphs are invariant to minor permutations while still preserving the local statistical relationships between words.

The Power of Topology

Once text is a graph, we can use the tools of network science to find what matters. In A Position-Biased PageRank Algorithm for Keyphrase Extraction, Corina Florescu and Cornelia Caragea demonstrated that the most important keywords in a document are often the most "central" nodes in its graph. By biasing the PageRank algorithm toward words that appear early in a document, they could extract keyphrases more accurately than frequency-based methods.

Similarly, Polykarpos Meladianos and colleagues used graph degeneracy (k-cores) to detect events in Twitter streams. In Degeneracy-Based Real-Time Sub-Event Detection in Twitter Stream, they showed that when a sub-event occurs (like a goal in a soccer match), the vocabulary in the tweet stream suddenly becomes more "cohesive," forming dense subgraphs that can be detected in real-time.

Every Document Owns Its Structure

Early attempts at using Graph Neural Networks (GNNs) for text often built one massive, "global" graph for an entire dataset. While powerful, these models were transductive—they couldn't handle new, unseen documents without recomputing the whole graph.

The field has shifted toward inductive approaches where every document is its own graph. Lianzhe Huang and the team at Peking University developed Text Level Graph Neural Network, which builds small, individual graphs for every document. This allows the model to learn how words interact locally.

Yufeng Zhang and others expanded on this with TextING in Every Document Owns Its Structure. By using Gated Graph Neural Networks to learn from these individual structures, they achieved state-of-the-art classification performance. Because the model learns the logic of word interactions rather than just memorizing a global word map, it can effectively classify documents containing words it has never seen before.

Capturing Stylistic Fingerprints

Graph-of-Words isn't just for classification; it's a powerful tool for stylometry. Shibamouli Lahiri demonstrated in Authorship Attribution Using Word Network Features that the way an author connects common "function words" (like the, and, or of) creates a unique structural signature.

This idea was refined by Santiago Segarra and Alejandro Ribeiro in their analysis of Early Modern English plays. By modeling the transitions between function words as a directed graph, they could identify the "fingerprints" of playwrights like Shakespeare and Marlowe with over 92% accuracy, even in collaborative works where traditional vocabulary-based methods might struggle.

Beyond Lexical Overlap

Perhaps the most significant advantage of GoW is its ability to measure similarity through topology. Traditional models rely on shared words; if two sentences use different synonyms, they look different. However, Sammy Khalife showed in Scalable graph-based method for individual named entity identification that graph kernels can compare the shape of word co-occurrence networks.

By measuring the overlap of graph substructures, these models can determine if two pieces of text are semantically similar based on how their concepts are organized, providing a more robust comparison than simple lexical overlap or sequential alignment. This structural approach has even proven effective in distinguishing human-written science from synthetic text, as Ahmed Abdeen Hamed found that ChatGPT-generated abstracts exhibit unnaturally high connectivity ratios compared to authentic research.

Papers in this version

History & citationVersion 1 · 2026-10-04

No longer present in the current build · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_graph_of_words_for_structural_text_repre_6bd86274,
  title = {Graph of Words for Structural Text Representation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/graph-of-words-for-structural-text-representation/rdr_6bd862741f3347238c887b353a4752de},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-26},
}

This exact version (version 1, frozen text):

@misc{lacuna_graph_of_words_for_structural_text_repre_6bd86274_v1,
  title = {Graph of Words for Structural Text Representation},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/graph-of-words-for-structural-text-representation/rdr_6bd862741f3347238c887b353a4752de/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-26},
}