Temporal sentence embeddings improve search results for time sensitive queries

TEMPS: Temporal Sentence Embeddings for Temporal Information Retrieval

Computation and LanguageArtificial Intelligence

Summary

Search systems often struggle to find documents that are about the right time as well as the right topic. The authors created a new way to measure how well two pieces of text match in time, regardless of their topic. They built a tool called TEMPS that adds a layer to existing search models to better understand when events happened. This tool learns without needing manually labeled time data by converting dates into mathematical shapes it can compare. Tests show TEMPS makes search results more accurate when timing matters.

What this means in practice

  • For clinical data teams: Improve patient record search by accurately matching clinical notes and queries to the correct time periods without manual timestamp labeling.
  • For newsroom search teams: Enhance journalistic search tools to return articles relevant to the specific time events occurred rather than just topics.

Authors

Mourad Hassani, Julien Romero, Amel Bouzeghoub, Christian Jacquelinet

Abstract

Modern information retrieval (IR) systems rarely represent time, yet many information needs depend on it: in clinical, journalistic, and legal search, when an event occurred can decide whether a document is relevant. Dense retrievers and Retrieval-Augmented Generation (RAG) pipelines match queries to documents well on topic but poorly on time, so they surface content that is on-topic yet temporally wrong. We introduce Temporal Textual Similarity (TTS), a task that measures how well two anchored texts align in time, independent of their topical similarity. We then present TEMPS (Temporal Embedding Model for Precise Search), a modular temporal branch that attaches to a frozen semantic retriever and trains on that signal. It resolves anchored temporal expressions to intervals and moment-matches each one to a Gaussian; the resulting ordering supervises an anchor-date-conditioned encoder, whose score we fuse with the semantic score at inference. Grounding supplies the supervision, so training uses no hand-labeled temporal data. The temporal score itself is the Gaussian-KL inclusion measure from distributional embeddings; what TEMPS adds is the grounding and the moment-matched supervision. On three temporal benchmarks, TEMPS improves MRR for every semantic backbone tested and, on TS- Retriever, lifts R@1 from 19.92 to 25.39 over the prior temporal state of the art.