Skip to main content
QUICK REVIEW

[Paper Review] PySS3: A Python package implementing a novel text classifier with visualization tools for Explainable AI

Sergio Burdisso, Marcelo Luis Errecalde|arXiv (Cornell University)|Dec 19, 2019
Explainable Artificial Intelligence (XAI)Computer Science6 references6 citations
TL;DR

PySS3 is an open-source Python package implementing the SS3 text classifier, a novel, explainable, and incremental model for text classification with built-in visualization tools for interpretability. It enables robust, trusty, and transparent document classification through confidence vector computation, hierarchical block processing, and interactive tools for live testing and hyperparameter optimization, achieving state-of-the-art performance on CLEF eRisk tasks.

ABSTRACT

A recently introduced text classifier, called SS3, has obtained state-of-the-art performance on the CLEF's eRisk tasks. SS3 was created to deal with risk detection over text streams and, therefore, not only supports incremental training and classification but also can visually explain its rationale. However, little attention has been paid to the potential use of SS3 as a general classifier. We believe this could be due to the unavailability of an open-source implementation of SS3. In this work, we introduce PySS3, a package that implements SS3 and also comes with visualization tools that allow researchers to deploy robust, explainable, and trusty machine learning models for text classification.

Motivation & Objective

  • To address the lack of open-source implementations for the SS3 text classifier, which has shown state-of-the-art performance in early risk detection tasks.
  • To enable researchers and practitioners to deploy explainable, incremental, and robust text classification models using a user-friendly Python package.
  • To provide interactive visualization tools that highlight relevant text portions, improving model interpretability and trust.
  • To support hyperparameter optimization through interactive 3D evaluation plots and grid search functionality.
  • To enhance transparency and reproducibility in NLP research by enabling sharing of interactive model evaluation results.

Proposed method

  • The SS3 classifier computes word confidence vectors $\overrightarrow{gv}(w)$ using a function $gv(w,c)$ that assigns a value in [0,1] to each word-category pair, reflecting the word's exclusive relevance to a category.
  • The model processes documents hierarchically by splitting them into blocks (e.g., paragraphs, sentences), then applies word-level summary operators (default: vector addition) to reduce confidence vectors up the hierarchy.
  • The package supports incremental training by updating category dictionaries with new documents without retraining from scratch.
  • PySS3 includes a 'Live Test' tool that enables real-time, visual model inference and explanation by highlighting relevant text segments.
  • A custom 'Evaluation' class supports grid search hyperparameter tuning over $\sigma$, $\lambda$, and $\rho$ parameters, with interactive 3D HTML visualization of results.
  • The package is built on Python with dependencies on scikit-learn and Matplotlib, and provides a web-based interface for model inspection and sharing.

Experimental results

Research questions

  • RQ1Can an open-source implementation of the SS3 text classifier improve accessibility and adoption in NLP research?
  • RQ2How effective is the SS3 model in providing explainable, incremental, and robust text classification without feature engineering?
  • RQ3To what extent do the visualization tools in PySS3 enhance model interpretability and user trust?
  • RQ4What is the impact of hyperparameters $\sigma$, $\lambda$, and $\rho$ on model performance, and how can they be optimally tuned?
  • RQ5Can interactive, shareable 3D evaluation plots improve transparency and reproducibility in model evaluation?

Key findings

  • PySS3 successfully implements the SS3 classifier with full support for incremental training and classification, enabling real-time deployment on text streams.
  • The package’s visualization tools allow users to interactively inspect and explain model predictions by highlighting relevant words and phrases in input text.
  • Grid search hyperparameter optimization identified $\sigma=0.32$, $\lambda=1.24$, and $\rho=1.1$ as optimal values for the tested configuration, improving model performance.
  • The 3D evaluation plot revealed that the $\rho$ (sanction) hyperparameter had minimal impact on performance, while $\lambda$ (significance) and $\sigma$ (smoothness) showed clear performance trends.
  • The interactive HTML evaluation plots are portable and shareable, enabling reproducibility and transparency in model evaluation, as demonstrated by the public availability of the evaluation file.
  • PySS3 is released under the MIT License and is compatible with Linux, macOS, and Windows, with full documentation and support available via GitHub and Read the Docs.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.