Using N-gram and Word Network Features for Native Language Identification

Shibamouli Lahiri, Rada MihalceaBEA @ NAACL 2013

Abstract

Native Language Identification (NLI) is the task of automatically determining a writer's native language (L1) based on their writing in a second language (L2). This paper investigates the effectiveness of traditional N-gram models compared to a novel approach that treats documents as "word networks." By analyzing the structural relationships between words rather than just their frequency, the researchers demonstrate that linguistic "fingerprints" are deeply embedded in the graph-theoretic properties of a writer's vocabulary. Using the TOEFL11 dataset, the study shows that word network features can achieve competitive accuracy with a significantly smaller feature space than traditional models.

Introduction

When individuals learn a second language, their native language often exerts a subtle influence on their writing patterns, a phenomenon known as "language transfer." While these patterns may be difficult for human readers to quantify, machine learning models can be trained to detect these stylistic markers. Most existing NLI systems rely on "bag-of-words" or N-gram models, which focus on the frequency of specific word sequences. This research explores whether the structural connectivity of words—how they cluster and relate to one another in a document—provides a more robust signal for identification.

Methodology

The researchers evaluated two distinct feature sets using the TOEFL11 dataset and various classifiers, primarily Support Vector Machines (SVM) and Naïve Bayes.

1. N-gram Features (The Baseline)

The baseline approach involved extracting sequences of words, characters, and Parts-of-Speech (POS) tags. The authors experimented with raw counts, normalized frequencies, and binary indicators (presence/absence). Notably, word unigrams (single words) including punctuation were found to be particularly effective.

2. Word Networks (The Innovation)

The core contribution of this paper is the transformation of each essay into a directed graph. In this model:

  • Nodes represent unique words.
  • Edges connect word A to word B if word B immediately follows word A in the text.
Example of a directed word network graph where nodes represent unique words and edges represent sequential occurrence.

From these graphs, several structural features were calculated, including:

  • Degree: The number of unique connections a word has.
  • Coreness: A measure of how central a word is to a dense cluster within the graph.
  • Neighborhood Size: The number of distinct neighbors within a certain distance (order) of a node.

Dataset

The study utilized the TOEFL11 dataset, the standard benchmark for the NLI 2013 Shared Task. The dataset consists of 12,100 unique English essays written by native speakers of 11 different languages: Arabic, Chinese, French, German, Hindi, Italian, Japanese, Korean, Spanish, Telugu, and Turkish. The data is balanced, with 1,100 essays per language, split across training, development, and test sets.

Key Insights

  • Structural Signal: The success of word network features suggests that L1 influence is not just about vocabulary choice, but about the "web" of how words are assembled.
  • Function Word Importance: Information Gain analysis revealed that the network properties of simple function words—specifically "a," "the," and "however"—were the most discriminatory. For instance, the "In-degree" of the word "a" varied significantly across different native languages.
  • Efficiency: Word network models use a much smaller feature space than N-gram dictionaries. While N-gram models might track tens of thousands of sequences, the network model focuses on the properties of the most frequent words, making it computationally efficient.

Results and Discussion

The top-performing N-gram system, utilizing word unigrams with punctuation and an SVM classifier, achieved 64.5% accuracy on the test set.

In comparison, the word network features performed remarkably well. As shown in the table below, the "Neighborhood Size (order 1)" feature achieved a cross-validation accuracy of 60.41% when considering the top 1,000 most frequent words.

Cross-validation accuracy for various word network features across different vocabulary sizes (k).

While the network features did not surpass the best N-gram baseline, the proximity of the results (60.41% vs 64.5%) highlights the potential of structural analysis. Interestingly, the "Clustering Coefficient" was the weakest predictor, suggesting that the immediate "cliquishness" of a word's neighbors is relatively consistent across different L1 backgrounds.

Conclusion and Future Work

This study demonstrates that the structural properties of word networks are a viable and efficient feature set for Native Language Identification. Future research could explore combining N-gram and word network features into a single ensemble system, which may yield higher accuracy than either method alone. Additionally, refining the graph model to include weighted edges (based on frequency) or accounting for sentence boundaries could further enhance the discriminatory power of the network features.

Summary updated

BibTeX
@inproceedings{lahiri2013using,
  author = {Shibamouli Lahiri and Rada Mihalcea},
  title = {{Using N-gram and Word Network Features for Native Language Identification}},
  booktitle = {BEA @ NAACL},
  year = {2013},
}
Figure