--- license: mit language: - en task_categories: - text-retrieval - visual-document-retrieval - image-text-to-text tags: - mixed-modality-retrieval - multimodal-retrieval - visual-document-retrieval - contrastive-learning - training-data pretty_name: Trident-Train size_categories: - 100KTrident-Train

Official training data for Chaos in the Text: Revealing the Modality Preference in Mixed-Modality Retrievers

Project Page arXiv Code Model Train data Eval data License

## Overview Dense retrievers tend to assign higher similarity scores to *text* representations than to semantically equivalent *image* representations, which makes mixed-modality retrieval fragile. Trident-Train is the **modality-balanced** training set used to mitigate this bias. Every training instance pairs one query with **three co-equal positive views** of the same document: | View | Content | How it is built | | --------- | -------------------------------------------- | ------------------------------------------------------------ | | **Text** | A detailed description of the document image | Generated by [Qwen3-VL-235B-A22B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-235B-A22B-Instruct) | | **Image** | The original document image | Original image | | **Fused** | A short summary **+** the original image | Summary generated by [Qwen3-VL-235B-A22B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-235B-A22B-Instruct) | The three views are optimized jointly with the Multi-Positive View InfoNCE loss (see the [paper](https://arxiv.org/abs/2610.11816) and the [code](https://github.com/OpenBMB/Trident)). Three training files are provided: | File | Domain | Source | #Queries | | -------------------- | --------------------------------- | ---------------------------- | -------- | | `train_vdoc.jsonl` | Visual documents | OpenDocVQA | ~41K | | `train_nature.jsonl` | Natural images | MMEB training sets | ~170K | | `train_all.jsonl` | Visual documents + natural images | Union of the two files above | ~211K | `train_all.jsonl` is the data used to train the released [Trident-Qwen3VL-2B](https://huggingface.co/OpenBMB/Trident-Qwen3VL-2B). The two domain files can be used to train domain-specific retrievers. ## Directory Structure ``` Trident-Train/ ├── README.md ├── train_all.jsonl ├── train_vdoc.jsonl ├── train_nature.jsonl └── images/ ├── aokvqa.tar.gz ├── docvqa.tar.gz ├── dude.tar.gz ├── fvqa.tar.gz ├── infovqa.tar.gz ├── mscoco.tar.gz ├── openwikitable.tar.gz ├── render_images.tar.gz ├── visualmrc.tar.gz ├── visualnews.tar.gz └── wiki.tar.gz ``` After downloading and extracting, the layout matches what the [Trident code](https://github.com/OpenBMB/Trident) expects under `data/`: ``` data/ └── Train/ ├── train_all.jsonl ├── train_vdoc.jsonl ├── train_nature.jsonl └── images/ ├── docvqa/ ... ├── mscoco/ ... └── ... ``` ### Image archives | Archive | Source dataset | | ---------------------- | ----------------------------------------------- | | `aokvqa.tar.gz` | A-OKVQA | | `docvqa.tar.gz` | DocVQA | | `dude.tar.gz` | DUDE | | `fvqa.tar.gz` | FVQA | | `infovqa.tar.gz` | InfographicVQA | | `mscoco.tar.gz` | MSCOCO | | `openwikitable.tar.gz` | OpenWikiTable | | `render_images.tar.gz` | Rendered images generated for the training data | | `visualmrc.tar.gz` | VisualMRC | | `visualnews.tar.gz` | VisualNews | | `wiki.tar.gz` | Wikipedia images | Each archive extracts into `images/` and keeps its own sub-folder, so image paths in the `.jsonl` files resolve as `data/Train/images/`. ## Download & Extract ### Option 1: one-line script (recommended) The [Trident repository](https://github.com/OpenBMB/Trident) ships a helper script that downloads and extracts the data in the expected layout: ```bash git clone https://github.com/OpenBMB/Trident.git && cd Trident bash data/download_data.sh train # everything (train_all.jsonl + all images) bash data/download_data.sh train --train-subset vdoc # only train_vdoc.jsonl bash data/download_data.sh train --train-images docvqa,dude # only some image archives bash data/download_data.sh train --mirror # use hf-mirror.com ``` ### Option 2: manual ```bash # 1. Download (everything, or pass --include "train_vdoc.jsonl" "images/docvqa.tar.gz" for a subset) hf download OpenBMB/Trident-Train \ --repo-type dataset --local-dir data/Train # 2. Extract the image archives in place for f in data/Train/images/*.tar.gz; do tar -xzf "$f" -C data/Train/images done # 3. (optional) remove archives to save disk space # rm data/Train/images/*.tar.gz ``` Or download from Python: ```python from huggingface_hub import snapshot_download snapshot_download( repo_id="OpenBMB/Trident-Train", repo_type="dataset", local_dir="data/Train", allow_patterns=["train_vdoc.jsonl", "images/docvqa.tar.gz"], # omit to download everything ) ``` Then train with the code repository, e.g.: ```bash bash scripts/train.sh configs/trident_qwen3vl.yaml \ --set data.train_path=data/Train/train_all.jsonl ``` ## Data Format Every `.jsonl` file contains one JSON object per line. Image paths are **relative to `images/`** and use forward slashes. ```json {"query": [{"text": "How many stores did Saint Laurent operate in Western Europe in 2020?"}], "positive": [{"text": "", "id": "d1_text"}, {"image": "docvqa/d1.png", "id": "d1_image"}, {"text": "", "image": "docvqa/d1.png", "id": "d1_fused"}], "doc_id": "d1", "query_id": "q1", "task": "default"} ``` | Field | Description | | -------------------------- | ------------------------------------------------------------ | | `query` | A list with the query content (`text` and/or `image`). | | `positive` | Exactly three positive views of the same document, **always in the order text → image → fused**. Each view carries its own `id`. | | `doc_id`, `query_id` | Identities of the document and the query. Used to mask false negatives inside a batch. | | `task` | Task tag (`"default"`). | | `positive_ids`, `group_id` | *Optional.* Extra identity fields for false-negative masking. Missing ids fall back to content hashes. | | View | Fields present | | ----------------------- | --------------------- | | Text | `id`, `text` | | Image | `id`, `image` | | Fused (summary + image) | `id`, `text`, `image` | See [`src/mmemb/data/schema.py`](https://github.com/OpenBMB/Trident/blob/main/src/mmemb/data/schema.py) in the code repository for all supported fields. > All ids (`id`, `doc_id`, `query_id`) are **strings**. ## Construction Following Section 4.1 of the paper, we build training instances from OpenDocVQA (visual documents) and the MMEB training sets (natural images). For every image document, [Qwen3-VL-235B-A22B-Instruct](https://huggingface.co/Qwen/Qwen3-VL-235B-A22B-Instruct) generates (i) a detailed description (Text view) and (ii) a short summary that is paired with the image (Fused view). The original image is kept as the Image view, so each document is represented by three equally weighted positive views. ## License The annotations released here are under the [MIT License](https://github.com/OpenBMB/Trident/blob/main/LICENSE). The images originate from third-party datasets (see [Image archives](#image-archives)) and remain subject to their **original licenses**; please make sure your use complies with them. ## Citation If you find this work useful, please cite: ```bibtex @article{sun2026chaos, title={Chaos in the Text: Revealing the Modality Preference in Mixed-Modality Retrievers}, author={Sun, Yubo and Peng, Chunyi and Yan, Yukun and Liu, Zhenghao and Xu, Zhipeng and Mei, Sen and Xin, Linlin and Zeng, Zheni and Sun, Maosong}, journal={arXiv preprint arXiv:2610.11816}, year={2026} } ```