Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data

Xinze Li,Zhenghao Liu,Chenyan Xiong,Shi Yu,Yu Gu,Zhiyuan Liu,Ge Yu
2023-05-31
Abstract:This paper presents Structure Aware Dense Retrieval (SANTA) model, which encodes user queries and structured data in one universal embedding space for retrieving structured data. SANTA proposes two pretraining methods to make language models structure-aware and learn effective representations for structured data: 1) Structured Data Alignment, which utilizes the natural alignment relations between structured data and unstructured data for structure-aware pretraining. It contrastively trains language models to represent multi-modal text data and teaches models to distinguish matched structured data for unstructured texts. 2) Masked Entity Prediction, which designs an entity-oriented mask strategy and asks language models to fill in the masked entities. Our experiments show that SANTA achieves state-of-the-art on code search and product search and conducts convincing results in the zero-shot setting. SANTA learns tailored representations for multi-modal text data by aligning structured and unstructured data pairs and capturing structural semantics by masking and predicting entities in the structured data. All codes are available at <a class="link-external link-https" href="https://github.com/OpenMatch/OpenMatch" rel="external noopener nofollow">this https URL</a>.
Information Retrieval
What problem does this paper attempt to address?
The paper primarily focuses on addressing the issue of improving dense retrieval performance in structured data retrieval. Specifically, the authors propose a new model named SANTA (Structure-Aware Dense Retrieval), which aims to enhance the language model's understanding and representation of structured data through two pre-training methods, thereby improving the effectiveness of dense retrieval based on structured data. The core contributions of the SANTA model include: 1. **Structured Data Alignment (SDA)**: Utilizing the natural alignment between structured and unstructured data, the language model is trained through contrastive learning to distinguish and represent the correspondence between structured data and unstructured text. This helps the language model understand the semantics behind structured data and bridge the modality gap between structured and unstructured data. 2. **Masked Entity Prediction (MEP)**: An entity-oriented masking strategy is designed, requiring the language model to predict the masked entities. This method helps capture the semantic information of entities in structured data, thereby better understanding the structural semantics of structured data. Through these two pre-training methods, SANTA can effectively match user queries and structured data within a unified embedding space, achieving efficient retrieval of structured data. Experimental results show that SANTA achieves state-of-the-art performance in tasks such as code search and product search, particularly excelling in zero-shot settings, demonstrating its strong generalization ability. Additionally, comparative experiments and visual analysis further validate the effectiveness and advantages of the SANTA model.