TL;DR
This paper introduces a novel supervised approach for detecting style changes within text documents and pinpointing their exact locations. By combining TF.IDF representations with custom-engineered features and a diverse ensemble of machine learning models, their method achieved state-of-the-art performance, winning the PAN@CLEF 2018 task on Style Change Detection.
What Problem Does This Paper Address?
Authorship attribution, a field focused on identifying the author of a text, has traditionally concentrated on longer documents. However, this paper tackles the more nuanced problem of style change detection in shorter texts. This involves not only predicting if a style change has occurred within a document but also precisely identifying where these "style breaches" happen. This is particularly challenging because style changes can be subtle and occur at various points, making them difficult for both humans and traditional algorithms to detect accurately. The problem is framed as identifying segments within a document that might originate from different authors or stylistic conventions, even if the overall document is assumed to have a dominant author (intrinsic plagiarism detection).
Methods
The authors propose a two-pronged approach: first, detecting the presence of a style change, and second, recursively locating the exact position of that change.
For style change detection, they employ a multifaceted ensemble learning strategy. This involves:
- Feature Engineering: They combine standard TF.IDF representations with a rich set of custom features specifically designed for style analysis. These include features related to tautology, grammar contractions, quotation mark usage, readability scores, frequent words, lexical features (character, word, and sentence-based), vocabulary richness, and named entity spellings.
- Ensemble Learning: A diverse set of classifiers, including SVM, Random Forest, AdaBoost, MLP, and LightGBM, are trained on these features. They then use a stacking ensemble approach. This involves training base classifiers, using their predictions as input for a meta-learner (a simple Logistic Regression model) to make the final prediction. This allows them to leverage the strengths of multiple models.
- Recursive Localization: Once a style change is detected in a document, the model is applied recursively. The document is split, and the detection process is repeated on each half. This continues until the text fragment is small enough (less than 20 sentences), at which point the midpoint is considered the breach location.
Datasets
The primary dataset used is from the PAN@CLEF 2018 task on Style Change Detection. This dataset consists of user posts from StackExchange, with documents ranging from 300-1,000 tokens. It includes a training set of 3,000 documents and a validation set of 1,500 documents.
For the style breach detection task, they also utilize the PAN-2017 competition dataset, which contains 187 documents with 1,000-2,400 tokens each. This dataset has between 1 and 8 style changes per document, with changes occurring at sentence boundaries.
Key Insights and Ideas
- The Power of Ensemble Diversity: Combining a wide array of features and diverse classifiers (SVM, RF, AdaBoost, MLP, LightGBM) within a stacking framework proved highly effective. This suggests that no single model or feature set is sufficient, and leveraging multiple perspectives is key.
- Custom Features Matter: Beyond standard TF.IDF, features like tautology, grammar contractions, and named entity spellings were crucial for capturing stylistic nuances that differentiate authors or writing styles.
- Recursive Localization is Effective: The recursive splitting approach for pinpointing breach locations, while computationally intensive, effectively narrows down the search space and achieves high accuracy.
- Class Imbalance is a Major Hurdle: The dataset exhibits class imbalance (fewer documents with style changes), which can lead to a high rate of false positives. The authors found that increasing the prediction threshold significantly mitigated this issue.
Key Results
The proposed approach powered the winning system for the PAN@CLEF 2018 task on Style Change Detection.
- The stacking ensemble achieved an accuracy of 87% for style change detection.
- For style breach detection, their method achieved a WindowDiff score of 0.5719 and a WinF score of 0.3302, outperforming two random baselines.
- Individually, LightGBM with TF-IDF achieved 88.5% accuracy for style change detection, highlighting its strong performance.
Limitations and Future Work
- Dataset Size and Imbalance: The PAN-2017 dataset for style breach detection is noted as being small and imbalanced, posing challenges for model training.
- Training vs. Testing Fragment Size Discrepancy: The model was trained on larger texts but tested on fragments of varying sizes, which can make the task harder. The authors mitigated this by setting a minimum fragment size of 20 sentences.
- Future Work: The authors suggest improving results by training on text pieces of different lengths. Further tuning for imbalanced classes is also recommended. Additionally, they propose exploring features based on the disparity between authors' takes on particular linguistic structures.
Summary updated