Bridging Continuous and Discrete Spaces: Interpretable Sentence Representation Learning via Compositional Operations

James Y. Huang, Wenlin Yao, Kaiqiang Song, Hongming Zhang, Muhao Chen, Dong Yu

Introduction

The evolution of Natural Language Processing (NLP) has been defined by the transition from discrete tokens to continuous vector representations. While models like SimCSE and RoBERTa have mastered the art of mapping sentences into high-dimensional spaces where semantic similarity is reflected by spatial proximity, these spaces remain largely "black boxes." We can measure the distance between two vectors, but we cannot easily explain what specific information is encoded, nor can we manipulate that information in a predictable, human-interpretable way.

INTERSENT addresses this gap by introducing a framework where sentence embeddings can be manipulated through compositional operations—such as fusion, difference, and compression—directly within the vector space. By bridging the gap between continuous embeddings and discrete language, INTERSENT enables a new level of control and interpretability in sentence representation learning.

The INTERSENT Framework

The core of INTERSENT is an end-to-end architecture designed to "cram" semantic information into a single vector while maintaining the ability to reconstruct and manipulate that information.

The Generative Bottleneck

Unlike standard contrastive models that only use an encoder, INTERSENT employs a bottleneck encoder-decoder structure. It utilizes RoBERTa as the encoder and BART as the decoder. The critical constraint is that the decoder is only provided with a single vector—the [CLS] token from the encoder. This forces the model to compress all necessary semantic and syntactic information into a single point in the embedding space to ensure successful reconstruction.

Operator Networks

Traditional vector arithmetic (e.g., $vec_A + vec_B$) often fails in high-dimensional manifolds because the resulting vector may land in a "low-density" region of the space that doesn't correspond to a valid sentence. INTERSENT solves this by training small, 2-layer Multi-Layer Perceptrons (MLPs) to act as dedicated operators. These operators learn the transformation logic for specific functions:

  • Fusion ($f_{fus}$): Combines two sentence embeddings into a single representation of their joint meaning: $f_{fus}(vec_A, vec_B) \approx vec_{A+B}$.
  • Difference ($f_{diff}$): Extracts the semantic difference between two sentences: $f_{diff}(vec_A, vec_B) \approx vec_{A-B}$.
  • Compression ($f_{comp}$): Reduces a sentence embedding to its most salient summary: $f_{comp}(vec_A) \approx vec_{summary}$.

Dual Objective Training

The framework is optimized using two distinct loss functions. A Contrastive Loss ensures that the output of an operator is spatially close to the embedding of a real target sentence. Simultaneously, a Generative Loss ensures that the resulting vector remains "decodable," allowing the BART decoder to translate the manipulated vector back into coherent, human-readable text.

Data and Evaluation

INTERSENT is trained on a suite of weakly supervised datasets tailored to its operations: DiscoFuse for fusion, WikiSplit for difference, and Google/Gigaword for compression. Paraphrase pairs from ParaNMT are used to refine the reconstruction capabilities.

Evaluation spans multiple dimensions, including textual generation, Semantic Textual Similarity (STS), and zero-shot passage retrieval tasks like NaturalQuestions and MSMARCO.

Key Insights

The Power of Generative Training

A significant finding is that the generative objective—forcing the model to reconstruct text—actually improves retrieval performance. While contrastive-only models might discard fine-grained details to maximize distance between negatives, the generative bottleneck preserves the nuances necessary for distinguishing between highly similar passages.

Emergent Mathematical Properties

One of the most striking results is the emergence of inverse properties. Although the model was not explicitly programmed with the rules of algebra, the joint training of fusion and difference operators led to a structured space where $f_{diff}(f_{fus}(A, B), B) \approx A$. This suggests that the model learns a consistent internal logic for the language manifold.

Compositional Generalization

INTERSENT demonstrates the ability to perform multi-step operations that were never seen during training. For example, a user can fuse two sentences and then compress the result. The model's ability to chain these MLP operators indicates that it has learned a robust, modular representation of semantics.

Results and Conclusion

INTERSENT significantly outperforms traditional baselines in interpretability tasks. On the Fusion task, it achieved a ROUGE-L score of 82.2, more than doubling the performance of a SimCSE model equipped with a similar decoder (42.0). Furthermore, it achieved state-of-the-art results in zero-shot passage retrieval, outperforming specialized models like DiffCSE.

While currently limited to a specific set of operations and subject to the noise of weakly supervised data, INTERSENT represents a major step toward making high-dimensional embedding spaces navigable and interpretable. Future work may involve expanding the operation set to include logical negation and enforcing stricter mathematical constraints like commutativity directly into the loss function.

Summary updated

BibTeX
@inproceedings{huang2023bridging,
  author = {James Y. Huang and Wenlin Yao and Kaiqiang Song and Hongming Zhang and Muhao Chen and Dong Yu},
  title = {{Bridging Continuous and Discrete Spaces: Interpretable Sentence Representation Learning via Compositional Operations}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.900},
}
Figure