Table of Contents
Fetching ...

From Tokens to Lattices: Emergent Lattice Structures in Language Models

Bo Xiong, Steffen Staab

TL;DR

This work tackles how conceptual structures emerge in pretrained masked language models (MLMs) by framing the problem with Formal Concept Analysis (FCA). It introduces a probabilistic triadic formal context constructed from MLMs via concept-pattern probing, enabling reconstruction of a concept lattice that includes latent concepts not defined by humans. The authors propose a practical lattice-construction framework (BertLattice) and provide theoretical and empirical analyses on three domain datasets, demonstrating that MLMs implicitly learn object-attribute dependencies and can recover meaningful lattices without relying on human-defined ontologies. The findings reveal latent, domain-spanning concepts and offer a scalable approach to extract concept lattices from pretrained models, with potential impacts on ontology discovery and knowledge representation in NLP systems.

Abstract

Pretrained masked language models (MLMs) have demonstrated an impressive capability to comprehend and encode conceptual knowledge, revealing a lattice structure among concepts. This raises a critical question: how does this conceptualization emerge from MLM pretraining? In this paper, we explore this problem from the perspective of Formal Concept Analysis (FCA), a mathematical framework that derives concept lattices from the observations of object-attribute relationships. We show that the MLM's objective implicitly learns a \emph{formal context} that describes objects, attributes, and their dependencies, which enables the reconstruction of a concept lattice through FCA. We propose a novel framework for concept lattice construction from pretrained MLMs and investigate the origin of the inductive biases of MLMs in lattice structure learning. Our framework differs from previous work because it does not rely on human-defined concepts and allows for discovering "latent" concepts that extend beyond human definitions. We create three datasets for evaluation, and the empirical results verify our hypothesis.

From Tokens to Lattices: Emergent Lattice Structures in Language Models

TL;DR

This work tackles how conceptual structures emerge in pretrained masked language models (MLMs) by framing the problem with Formal Concept Analysis (FCA). It introduces a probabilistic triadic formal context constructed from MLMs via concept-pattern probing, enabling reconstruction of a concept lattice that includes latent concepts not defined by humans. The authors propose a practical lattice-construction framework (BertLattice) and provide theoretical and empirical analyses on three domain datasets, demonstrating that MLMs implicitly learn object-attribute dependencies and can recover meaningful lattices without relying on human-defined ontologies. The findings reveal latent, domain-spanning concepts and offer a scalable approach to extract concept lattices from pretrained models, with potential impacts on ontology discovery and knowledge representation in NLP systems.

Abstract

Pretrained masked language models (MLMs) have demonstrated an impressive capability to comprehend and encode conceptual knowledge, revealing a lattice structure among concepts. This raises a critical question: how does this conceptualization emerge from MLM pretraining? In this paper, we explore this problem from the perspective of Formal Concept Analysis (FCA), a mathematical framework that derives concept lattices from the observations of object-attribute relationships. We show that the MLM's objective implicitly learns a \emph{formal context} that describes objects, attributes, and their dependencies, which enables the reconstruction of a concept lattice through FCA. We propose a novel framework for concept lattice construction from pretrained MLMs and investigate the origin of the inductive biases of MLMs in lattice structure learning. Our framework differs from previous work because it does not rely on human-defined concepts and allows for discovering "latent" concepts that extend beyond human definitions. We create three datasets for evaluation, and the empirical results verify our hypothesis.

Paper Structure

This paper contains 20 sections, 4 theorems, 13 equations, 5 figures, 4 tables, 2 algorithms.

Key Result

Lemma 1

Let $\mathcal{D} = \{w^i\}_1^{N}$ be a dataset consisting of data points generated by Abstraction abs:data_generation, then there exists an identification algorithm $F$ mapping a dataset $\mathcal{D}$ to a formal context $I$ such that $F(\mathcal{D})$ converges to the ground-truth formal context $I_

Figures (5)

  • Figure 1: A comparison of two hypotheses of conceptualization in language models. (a) Definitional hypothesis assumes that concepts are learned directly from the definitions (i.e., concepts are explicitly defined in the texts); (b) Distributional hypothesis assumes that concepts are learned from the observations of their attributes (i.e., similar concepts have similar attributes).
  • Figure 2: An illustration of how MLMs learn conceptual/ontological knowledge from natural language. (a) The observation is a set of sentences that describe relationships between objects and attributes (nouns and verbs in this example). Each sentence is abstracted as a filling of a pattern with an object-attribute pair; (b) the normalized conditional probability between objects and attributes is learned by the MLM (e.g., BERT) and it can be viewed as a formal context in a probabilistic space; (c) each row of the conditional probability can be viewed as the conceptual embedding of the object, and each dimension/column of the embeddings corresponds to a particular attribute. These dimensionally interpretable embeddings can be used for concept classification; (d) the abstract world (concept lattice) can be recovered from the learned formal context in (c) through FCA, and the concept lattice can be viewed as a hierarchy for concept classification.
  • Figure 3: (a) Comparision of BERT, BioBERT, and PharmBERT on formal context learning on disease-symptom; (b) The conditional distribution between diseases and symptoms learned by BioBERT; (c) The T-SNE visualization of the conceptual embeddings constructed from the learned formal context incidence matrix of animals, where the colors denote whether the animals fly or not.
  • Figure 4: (a) Comparison of different normalization approaches for lattice construction under different thresholds; (b) The reconstructed Region-language concept lattice. For visualization, only a part of the concepts and the corresponding objects are labeled. We also highlight German and French speaking lattice paths; (c) The conceptual embeddings of regions/countries in the dimension of German-speaking and French-speaking.
  • Figure 5: The normalized conditional probability of regions and their official language. The probability is generated by the cloze prompt "[object] is the official language of [attribute]".

Theorems & Definitions (17)

  • Definition 1: masked language model
  • Definition 2: formal context
  • Definition 3: formal concept
  • Definition 4: partial order relation
  • Definition 5: triadic formal context DBLP:conf/icdm/JaschkeHSGS06
  • Definition 6
  • Definition 7: construction of probabilistic triadic formal context
  • Definition 8: efficient construction
  • Definition 9: formal context generation via Gibbs sampling
  • Definition 10: $\epsilon$-approximate formal context learning
  • ...and 7 more