Learning to Look at the Other Side: A Semantic Probing Study of Word Embeddings in LLMs with Enabled Bidirectional Attention

Zhaoxin Feng, Jianfei Ma, Emmanuele Chersoni, Xiaojing Zhao, Xiaoyi Bao
10/2/2025
cs.CL

No official code found. Best implementation: Zhaoxin-Feng/semantic-probing-2025 (1 star, last commit 2025-08-18).

Abstract

Autoregressive Large Language Models (LLMs) demonstrate exceptional performance in language understanding and generation. However, their application in text embedding tasks has been relatively slow, along with the analysis of their semantic representation in probing tasks, due to the constraints of the unidirectional attention mechanism. This paper aims to explore whether such constraints can be overcome by enabling bidirectional attention in LLMs. We tested different variants of the Llama architecture through additional training steps, progressively enabling bidirectional attention and unsupervised/supervised contrastive learning.

View on arXivView PDF

Code Implementations(1)

Codes and data for the paper "Learning to Look at the Other Side: A Semantic Probing Study of Word Embeddings in LLMs with Enabled Bidirectional Attention".

10Python, Jupyter NotebookMay 29, 20251 years ago

Similar Papers

Cite this paper

@article{feng2025learning,
  title  = {Learning to Look at the Other Side: A Semantic Probing Study of Word Embeddings in LLMs with Enabled Bidirectional Attention},
  author = {Zhaoxin Feng and Jianfei Ma and Emmanuele Chersoni and Xiaojing Zhao and Xiaoyi Bao},
  year   = {2025},
  eprint = {2510.01652},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.01652v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.01652.svg)](https://codeofpaper.com/paper/2510.01652)

Discussion