Skip to main content
QUICK REVIEW

[Paper Review] Tsetlin Machine Embedding: Representing Words Using Logical Expressions

Bimal Bhattarai, Ole‐Christoffer Granmo|arXiv (Cornell University)|Jan 2, 2023
Topic ModelingComputer Science8 citations
TL;DR

The paper proposes a Tsetlin Machine autoencoder to learn sparse, human-interpretable logical embeddings of words and shows competitive performance with GloVe on downstream tasks, including favorable results when combined as a hybrid with neural embeddings.

ABSTRACT

Embedding words in vector space is a fundamental first step in state-of-the-art natural language processing (NLP). Typical NLP solutions employ pre-defined vector representations to improve generalization by co-locating similar words in vector space. For instance, Word2Vec is a self-supervised predictive model that captures the context of words using a neural network. Similarly, GLoVe is a popular unsupervised model incorporating corpus-wide word co-occurrence statistics. Such word embedding has significantly boosted important NLP tasks, including sentiment analysis, document classification, and machine translation. However, the embeddings are dense floating-point vectors, making them expensive to compute and difficult to interpret. In this paper, we instead propose to represent the semantics of words with a few defining words that are related using propositional logic. To produce such logical embeddings, we introduce a Tsetlin Machine-based autoencoder that learns logical clauses self-supervised. The clauses consist of contextual words like "black," "cup," and "hot" to define other words like "coffee," thus being human-understandable. We evaluate our embedding approach on several intrinsic and extrinsic benchmarks, outperforming GLoVe on six classification tasks. Furthermore, we investigate the interpretability of our embedding using the logical representations acquired during training. We also visualize word clusters in vector space, demonstrating how our logical embedding co-locate similar words.

Motivation & Objective

  • Motivate interpretable word embeddings that Ribs on human-understandable logic rather than dense vectors.
  • Propose a TM-based autoencoder to learn propositional logic clauses representing word contexts.
  • Demonstrate that TM embeddings can outperform or match GloVe on intrinsic and extrinsic NLP tasks.
  • Explore interpretability of learned clauses and visualize word clusters in the TM embedding space.

Proposed method

  • Represent words as propositional variables indicating word presence in a document.
  • Construct a pool of conjunctive clauses Cj that serve as features for predicting target word occurrences.
  • Use a weight matrix W to connect clauses to outputs, enabling inference via a weighted sum of clause evaluations.
  • Train via TM-specific feedback (Type Ia, Type Ib, Type II) to adjust clause memory and weights in a self-supervised manner.
  • Produce both weighted embeddings E and purely logical embeddings B from the learned clauses for similarity and interpretability analyses.
  • Evaluate embeddings intrinsically (word similarity and categorization) and extrinsically (text classification with a BiLSTM) against baselines like Word2Vec, FastText, and GloVe.

Experimental results

Research questions

  • RQ1Can a TM-based autoencoder learn compact, human-interpretable logical representations of word semantics from unlabeled text?
  • RQ2Are TM embeddings competitive with traditional neural embeddings on intrinsic word similarity and categorization tasks?
  • RQ3Do TM embeddings support downstream NLP classification tasks as effectively as GloVe, and can a hybrid with neural embeddings yield improvements?
  • RQ4How interpretable are the learned clauses, and can they reveal meaningful word-context relationships?
  • RQ5Can the approach scale to large vocabularies and potentially extend to sentence/document representations?

Key findings

  • TM embedding uses a sparse set of clauses (about 10% of clauses connect to a word) to describe word meaning through contextual literals.
  • On intrinsic similarity tasks, TM embeddings are competitive with GloVe and outperform Word2Vec and FastText in cosine-based similarity assessments across several datasets.
  • On extrinsic downstream tasks with a BiLSTM classifier, TM embeddings closely match GloVe, and a TM hybrid (TM with 80% TM + 20% GloVe) can surpass GloVe by notable margins on several datasets (e.g., R52, SST-2, SST-5).
  • The approach yields interpretable word representations via clause-based rules, enabling visualization of context-driven word clusters (e.g., health-related vs weather/geography clusters).
  • Clause-level interpretability is illustrated by shared and distinct contexts among words (e.g., surgery and heart share health-related clauses but differ in other contexts).
  • With 600 clauses, margins, and specificity settings, the TM autoencoder demonstrates competitive performance using self-supervised learning on a large corpus (One Billion Word) and scalable hardware considerations for future work.

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.