Manuscript Offprint

arXiv:2611.12097

Calibrating Document-Local Boundaries for Contextual Chunk Retrieval

Yuanxiang Wang, Hui Jiang, Da Zhu, Zhihua Chang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Yuanxiang Wang

Hui Jiang

Da Zhu

Zhihua Chang

Qwen Business Unit, Alibaba Group

Abstract. Late Chunking encodes an entire document before pooling at chunk boundaries, preserving document context in local retrieval units. Chunk-level post-training improves context-dependent retrieval, but shared context can make semantically similar same-document negatives difficult to distinguish. We study the local decision boundary between a gold chunk and its hardest sibling. Starting from InSeNT, we analyze InSeNT's within-document gradients and show that the entropy of the conditional negative allocation decreases monotonically with the scaling factor at fixed logits. We propose a two-part framework for calibrating document-local chunk boundaries. The first component adapts the discriminative scale from within-document margins, while the second exposes chunk partitions to attention during document encoding. Experiments on ConTEB and NanoBEIR show that the resulting model improves contextual chunk retrieval across the evaluated encoder settings while retaining competitive passage-level retrieval quality; ablations further characterize the distinct roles of adaptive scaling and chunk-aware routing.

Keywords: Contextual embeddings · Dense retrieval · Contrastive learning · Document representation · Late Chunking

1 Introduction

Long-document retrieval usually returns local evidence that answers a query, rather than the whole document [1]. Its meaning often depends on context: pronouns refer to things mentioned earlier, numbers belong to particular years, and similar expressions may describe different facts [2]. Independent chunk encoding loses these cues, whereas a single document vector cannot localize evidence. Prior work improves contextual retrieval through input enrichment, long-context encoding, and chunk-level post-training [3, 4, 2]. These approaches preserve more document context, but retrieval still requires a model to separate locally similar chunks that share that context.

Because multiple chunks in a document share the same context, retrieval must distinguish the answer-bearing chunk from its same-document siblings; chunk boundaries therefore directly shape the retrieval objective. A useful training signal must preserve global context while distinguishing chunks that share entities, topics, or surface form. Therefore, we treat the gold chunk and its strongest same-document sibling as the basic unit of analysis, and evaluate both contextual and passage-level retrieval. We focus on contrastive post-training with same-document negative chunks. Of 19,974 InSeNT evaluation queries, 6,976 fail to rank gold first. Among these 6,976 queries, the highest-scoring sibling exceeds the gold score in 82.21% of cases, illustrating unresolved local factual confusion. Figure 1 asks for goals in 2019–20: both passages discuss the same player, European competitions, and scoring records, but the hard negative concerns another season.

Query How many goals did Gonçalo Ramos score in the 2019–20 UEFA Youth League?

Gold chunk During the 2019–20 UEFA Youth League, [he] helped Benfica reach the final, scoring a brace in the final and finishing as joint-top scorer with eight goals.

Same-document hard negative In 2022–23, [he] scored two goals in the Lisbon derby and two goals in a Champions League knockout match; [he] finished the season with 27 goals.

InSeNTDcLBC
Gold global rank801
Fixed negative global rank1611
Fixed-pair cosine margin-0.05+0.04

Figure 1: Season confusion in Football: the same gold–negative pair under InSeNT and DcLBC.

We identify two complementary gaps at this local boundary. First, InSeNT's fixed inverse temperature jointly controls row-wise total effort and its allocation among siblings, despite heterogeneous query–document margins. AMS instead computes a detached scale from each pair's gold–hardest-sibling margin and applies it only to the InSeNT within-document loss. Second, distinguishing sibling chunks requires contextual representations that preserve each chunk's local evidence while incorporating shared document context. Although InSeNT supervises chunks, standard Late Chunking uses partitions only during post-encoder pooling; final-layer attention does not explicitly observe retrieval-unit boundaries.

We propose Document-Chunk Local Boundary Calibration (DcLBC), combining Adaptive Margin Scaling (AMS) and Chunk-Aware Key Routing (CKR). AMS adapts the discrimin-native scale to focus conditional effort on difficult negatives. CKR injects the chunk partition into post-RoPE Keys, allowing chunk-wise context routing during encoding. Figure 2 summarizes the pipeline from CKR-enabled encoding through chunk pooling and scoring to the AMS loss. Our contributions are:

  • We analyze InSeNT at the query–document row level by separating total score-space effort from its conditional allocation among same-document negatives, and derive how competitor entropy changes with the scale.

  • We introduce DcLBC, combining AMS, which derives a detached instance-level scale from the gold–hardest-sibling margin, with CKR, which injects chunk routing into post-RoPE Keys.

  • We evaluate DcLBC on ConTEB and NanoBEIR with ModernBERT and ModernColBERT backbones, and use component ablations and CKR design tests to measure the contribution of each mechanism.

References (30)