Syntax Encoding with Application in Authorship Attribution

Richong Zhang, Zhiyuan Hu, Hongyu Guo, Yongyi Mao

Abstract

Authorship Attribution (AA) identifies the writer of a text by analyzing stylistic patterns. While content and vocabulary are common focuses, syntactic structure offers a more stable indicator of identity. This paper introduces a novel "information-lossless" syntax encoding scheme that represents complex grammar trees as vectors compatible with standard neural networks. The resulting Syntax-CNN model achieves state-of-the-art results across multiple benchmarks, proving that syntax alone carries a significant "authorial fingerprint."

Introduction

Identifying the author of a text is a foundational challenge in NLP with applications in forensics and plagiarism detection. Traditional models often prioritize what is said (content) over how it is said (syntax). However, syntactic choices are often more resistant to topic shifts and more characteristic of an individual's style. Integrating these structures has typically required a trade-off between the simplicity of manual feature counting and the complexity of specialized tree-based architectures like Tree-LSTMs.

Methodology: Lossless Syntax Encoding

The core contribution of this work is a method to "flatten" hierarchical syntax trees into a sequential format without losing structural information.

Syntax Path Representation

For every word in a sentence, the model extracts its unique "syntax path" from the root of the parse tree (the "S" node) down to the word itself. This path is then converted into a syntax embedding by combining syntax token embeddings (e.g., NP for Noun Phrase, VP for Verb Phrase) with position embeddings that denote depth. Mathematically, the authors prove that this process is information-lossless if the embedding dimension is sufficiently large.

Table showing the mapping of words to their specific syntax paths derived from a parse tree.

The Syntax-CNN Model

The authors propose Syntax-CNN, a dual-channel architecture. One channel handles content-level features (character n-grams), while the other processes the syntax-level embeddings. This allows the model to benefit from the efficiency and speed of Convolutional Neural Networks while maintaining access to the full syntactic context of the text.

The dual-channel Syntax-CNN architecture combining content and syntax feature embeddings.

Experimental Results

The model was tested on five major AA benchmarks: CCAT10, CCAT50, IMDB62, Blogs10, and Blogs50. These datasets vary in size and author count, providing a robust test of the model's generalization capabilities.

Performance Highlights

Syntax-CNN outperformed previous state-of-the-art methods on all datasets. Notable results include:

  • CCAT50: Achieved 81.00% accuracy, a significant jump from the previous best of 76.5%.
  • IMDB62: Reached a high of 96.16% accuracy.

Ablation studies revealed that using syntax embeddings alone—completely ignoring the words—still yielded high accuracy (e.g., 83.48% on IMDB62). This underscores the richness of syntactic information for identifying authors.

Discussion and Conclusion

By assigning a syntax vector to every word, the authors effectively bridge the gap between structural linguistics and efficient deep learning. The "flattening" trick allows for the use of fast CNNs without the data loss associated with manual feature engineering. While the approach currently relies on external parsers like Stanford CoreNLP, the "information-lossless" nature of the encoding suggests broad applicability beyond authorship attribution, potentially benefiting tasks like machine translation or sentiment analysis where grammar plays a vital role.

Summary updated

Abstract

It is well known in the literature studies that the theoretical time-optimal control of boost converters can be achieved using switching surfaces based on the converter’s natural state trajectories. However, this method has two important drawbacks: First, the transient current peak of the time-optimal controller is far beyond the current limitations of related circuit elements in many practical cases. Second, switching based on the converter’s natural trajectories has high computational complexity and high dependence on circuit parameters. In this paper, based on the hybrid dynamical model of the converter and geometrical representation of its corresponding vector fields, a proximate constrained time-optimal sliding mode controller is proposed. The proposed method has a fast response that is near that of a time-optimal controller, with less computational complexity and sensitivity to parameter changes. The proposed method and its relevant theoretical framework are validated on an experimental setup with a boost converter prototype and an eZdsp TMS320F2812 processor board.
BibTeX
@inproceedings{zhang2018syntax,
  author = {Richong Zhang and Zhiyuan Hu and Hongyu Guo and Yongyi Mao},
  title = {{Syntax Encoding with Application in Authorship Attribution}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2018},
  doi = {10.18653/v1/d18-1294},
}
Figure