SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2404.04163 · ACL · 2024

Dwell in the Beginning: How Language Models Embed Long Documents for Dense Retrieval

Chenyan Xiong, Jamie Callan, Bruno Martins, João Magalhães, João Coelho

arXiv · PDF · Open in the Atlas

Code that ran

10 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 2 violated it and 0 have no contract verdict; 8 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2404.04163.json · badge: /api/ran/2404.04163.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
cxcscmu/longembeddinganalysis canonical (classifier label)
classifier basis: census
10 ran · 0 no recorded run
FunctionStatusWhere it lives
cached Ran
ran; our contract draft was wrong, not the code
cxcscmu/longembeddinganalysis/GradCache/src/grad_cache/functional.py
pointer only (licence: NONE) · get_code("7f1946b9c385a5cf")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

cat_input_tensor Ran
ran; our contract draft was wrong, not the code
cxcscmu/longembeddinganalysis/GradCache/src/grad_cache/functional.py
pointer only (licence: NONE) · get_code("fab5db4632e2fa87")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

dev Ran
ran; our contract draft was wrong, not the code
cxcscmu/longembeddinganalysis/OpenMatch/v1/gen_feature.py
pointer only (licence: NONE) · get_code("79176433334d19b4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

gather_input_tensor Ran
ran; our contract draft was wrong, not the code
cxcscmu/longembeddinganalysis/GradCache/src/grad_cache/functional.py
pointer only (licence: NONE) · get_code("7917a2079ec6b095")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

has_answers Ran
ran, violated the contract we drafted
cxcscmu/longembeddinganalysis/OpenMatch/src/openmatch/qa_utils.py
pointer only (licence: NONE) · get_code("b46a95cff9bf41b5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_beir_positives Ran
ran; our contract draft was wrong, not the code
cxcscmu/longembeddinganalysis/OpenMatch/src/openmatch/utils.py
pointer only (licence: NONE) · get_code("222c1daa5a08da51")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_from_trec Ran
ran; our contract draft was wrong, not the code
cxcscmu/longembeddinganalysis/OpenMatch/src/openmatch/utils.py
pointer only (licence: NONE) · get_code("8d2e5d58238cd53f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_positives Ran
ran; our contract draft was wrong, not the code
cxcscmu/longembeddinganalysis/OpenMatch/src/openmatch/utils.py
pointer only (licence: NONE) · get_code("9e4c17e0bdb9dcd5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

regex_match Ran
ran, violated the contract we drafted
cxcscmu/longembeddinganalysis/OpenMatch/src/openmatch/qa_utils.py
pointer only (licence: NONE) · get_code("93b0eef32604c3f7")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

test Ran
ran; our contract draft was wrong, not the code
cxcscmu/longembeddinganalysis/OpenMatch/v1/inference.py
pointer only (licence: NONE) · get_code("aaf2a2b86f345be4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, cxcscmu/longembeddinganalysis when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 8 are also present in other papers whose code we hold (8 with at least one paper dated earlier, 0 the same month, 3 later) and 2 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
regex_match 6 other papers
6 dated earlier
2101.00294 (2021-01)
Reader-Guided Passage Reranking for Open-Domain Question Answering
2102.10073 (2021-02)
Pyserini: An Easy-to-Use Python Toolkit to Support Replicable IR Research with Sparse and Dense Representations
2023.findings-acl.734 (2023 (year only))
Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data
and 3 more not named here
cached 3 other papers
1 dated earlier, 2 later
2402.09906 (2024-02)
Generative Representational Instruction Tuning
2506.11350 (2025-06)
GLAP: General contrastive audio-text pretraining across domains and languages
2510.00523 (2025-10)
VIRTUE: Visual-Interactive Text-Image Universal Embedder
cat_input_tensor 3 other papers
1 dated earlier, 2 later
2402.09906 (2024-02)
Generative Representational Instruction Tuning
2506.11350 (2025-06)
GLAP: General contrastive audio-text pretraining across domains and languages
2510.00523 (2025-10)
VIRTUE: Visual-Interactive Text-Image Universal Embedder
gather_input_tensor 3 other papers
1 dated earlier, 2 later
2402.09906 (2024-02)
Generative Representational Instruction Tuning
2506.11350 (2025-06)
GLAP: General contrastive audio-text pretraining across domains and languages
2510.00523 (2025-10)
VIRTUE: Visual-Interactive Text-Image Universal Embedder
has_answers 3 other papers
3 dated earlier
2023.findings-acl.734 (2023 (year only))
Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data
2305.17331 (2023-05)
Augmentation-Adapted Retriever Improves Generalization of Language Models as Generic Plug-In
2305.19912 (2023-05)
Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data
load_from_trec 3 other papers
3 dated earlier
2023.findings-acl.734 (2023 (year only))
Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data
2305.17331 (2023-05)
Augmentation-Adapted Retriever Improves Generalization of Language Models as Generic Plug-In
2305.19912 (2023-05)
Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data
load_beir_positives 2 other papers
2 dated earlier
2023.findings-acl.734 (2023 (year only))
Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data
2305.19912 (2023-05)
Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data
load_positives 2 other papers
2 dated earlier
2023.findings-acl.734 (2023 (year only))
Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data
2305.19912 (2023-05)
Structure-Aware Language Model Pretraining Improves Dense Retrieval on Structured Data

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

This study investigates the existence of positional biases in Transformer-based language models for text representation learning, particularly in the context of web document retrieval. We build on previous research that demonstrated loss of information in the middle of input sequences for causal language models, extending it to the domain of embedding learning. We examine positional biases at multiple stages of the training pipeline for an encoder-decoder neural retrieval model, namely language model pre-training, contrastive pre-training, and contrastive fine-tuning. Experiments with the MS-MARCO document collection reveal that after contrastive pre-training the model already generates embeddings that better capture the beginning of the input content, with fine-tuning further aggravating this effect.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2404.04163")
get_code_for_paper("2404.04163")
have("2404.04163")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2404.04163.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2404.04163.svg)](https://syntology.ai/paper/2404.04163)

Connect an agent — have() is free.