pino10010 commited on
Commit
265fcf1
·
verified ·
1 Parent(s): 9bbc235

Use main-paper figures and document sharded release

Browse files
README.md CHANGED
@@ -22,11 +22,11 @@ size_categories:
22
 
23
  **Deeply Interleaved Text-Image Contexts for Multimodal LLMs Assessment**
24
 
25
- TIC-Bench is a multimodal question-answering benchmark for evaluating whether multimodal large language models can bind, integrate, and propagate evidence across long, deeply interleaved sequences of images and text. It covers three complementary association domains and eight reasoning types.
26
 
27
  [Main paper](paper/TIC-Bench.pdf) · [Technical supplementary material](paper/TIC-Bench-Supplementary.pdf)
28
 
29
- ![TIC-Bench dataset construction pipeline](assets/dataset_construction_pipeline.png)
30
 
31
  ## Benchmark composition
32
 
@@ -47,112 +47,104 @@ The paper defines a benchmark of **2,280 questions** and **45,776 image instance
47
  | **Spatial subtotal** | | **770** |
48
  | **Total** | | **2,280** |
49
 
50
- ## Domains
51
 
52
- ### Logical Association
53
 
54
- Logical instances connect visual scenes through shared objects and textual relations. A model must ground indirect textual references in the corresponding images and follow the target object through a linear chain, a chain that revisits a previous scene, or multiple branches that converge on a shared answer.
 
 
55
 
56
- ![Convergent logical reasoning example](assets/logical_convergent_example.png)
57
 
58
- ### Temporal Association
59
 
60
- Temporal instances combine identity images, ordered storyboard frames, and interleaved event descriptions. Questions test whether a model can follow later developments, retrieve evidence from earlier scenes, or integrate concurrent storylines.
61
 
62
- ![Parallel temporal reasoning example](assets/temporal_parallel_example.png)
63
-
64
- ### Spatial Association
65
-
66
- Spatial instances divide a north-up source image into overlapping local crops. Selected crops are replaced with local textual descriptions and spatial-continuity clues. A model must combine the remaining images and substituted text to infer the relative direction of two targets. The domain contains aerial map scenes and natural photographs.
67
-
68
- ![Map-based spatial reasoning example](assets/spatial_map_example.png)
 
 
 
 
 
 
69
 
70
- ## Repository structure
71
 
72
  ```text
73
- .
74
- ├── spatial_qa_shuffled/
75
- │ ├── final_qids_balanced.json
76
- │ └── question_*/
77
- │ ├── dataset_caption.jsonl
78
- │ └── referenced images
79
- ├── visual_construct_final/
80
- │ ├── extended_excluded_qids.json
81
- │ └── question_*/
82
- │ ├── qa_pairs_*.json
83
- │ └── referenced images
84
- ├── time_qa/
85
- │ ├── excluded_qids_final.json
86
- │ └── question_*/
87
- │ ├── qa_pairs*.json
88
- │ └── identity and scene images
89
- ├── migration_report.json
90
- ├── assets/
91
- └── paper/
92
  ```
93
 
94
- The distributed `question_*` folders are already filtered to the intended benchmark selection. The root selection JSON files are retained for provenance and auditability.
95
 
96
- ## Data formats
97
 
98
- ### Spatial QA
99
 
100
- The canonical file is `dataset_caption.jsonl`. Each line is one question and includes a globally unique `qid`, an interleaved `sequence`, the reference `answer`, choices, and crop/detection metadata. Inference should use `dataset_caption.jsonl`, not the earlier intermediate `dataset.jsonl` format.
101
-
102
- ### Logical QA
103
 
104
- Each `qa_pairs_*.json` file contains a `qa_pairs` array. A question record includes the natural-language question, answer, reasoning depth, graph type, `qid`, and review/filtering fields.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
 
106
- The stored graph labels map to the paper terminology as follows:
107
 
108
- | Stored label family | Paper terminology |
109
- |---|---|
110
- | `linear`, `star` | Linear |
111
- | `loop` | Cyclic |
112
- | `branch_merge`, `branch merge`, `cross` | Convergent |
113
 
114
- ### Temporal QA
 
115
 
116
- Each `qa_pairs*.json` file contains a story `description` and a `qa` array. Records include the question, reference answer, reasoning steps, task type, `qid`, and review fields.
 
 
117
 
118
- | Stored label | Paper terminology |
119
- |---|---|
120
- | `Linear` | Sequential |
121
- | `Loop` | Retrospective |
122
- | `Branch` | Parallel |
123
 
124
- ## Minimal loading example
125
 
126
  ```python
127
- import json
128
- from pathlib import Path
129
 
130
- root = Path(".")
131
-
132
- # Spatial: JSONL, one QA per line
133
- spatial = []
134
- for path in root.glob("spatial_qa_shuffled/question_*/dataset_caption.jsonl"):
135
- with path.open(encoding="utf-8") as stream:
136
- spatial.extend(json.loads(line) for line in stream if line.strip())
137
 
138
- # Logical: JSON object containing a qa_pairs list
139
- logical = []
140
- for path in root.glob("visual_construct_final/question_*/qa_pairs_*.json"):
141
- with path.open(encoding="utf-8") as stream:
142
- logical.extend(json.load(stream).get("qa_pairs", []))
143
 
144
- # Temporal: JSON object containing a qa list
145
- temporal = []
146
- for path in root.glob("time_qa/question_*/qa_pairs*.json"):
147
- with path.open(encoding="utf-8") as stream:
148
- temporal.extend(json.load(stream).get("qa", []))
149
 
150
- print(len(spatial), len(logical), len(temporal))
151
- ```
152
 
153
  ## Data integrity note
154
 
155
- The release directory contains 2,280 unique QIDs. In the current Temporal source files, four QIDs are each attached to two different QA records, so a naive row count returns 730 Temporal records instead of the paper's 726 unique-QID instances. Consumers should key records by `qid` only after resolving these conflicts; silently keeping the first or last record can select different questions. This notice should be removed once the four QID conflicts are corrected in the release files.
156
 
157
  ## Evaluation
158
 
@@ -177,4 +169,3 @@ The manuscript is currently anonymized. Please cite **“Deeply Interleaved Text
177
  note = {Anonymous manuscript}
178
  }
179
  ```
180
-
 
22
 
23
  **Deeply Interleaved Text-Image Contexts for Multimodal LLMs Assessment**
24
 
25
+ TIC-Bench evaluates whether multimodal large language models can bind, integrate, and propagate evidence across long, deeply interleaved sequences of images and text. It contains 2,280 unique questions covering spatial, logical, and temporal association reasoning.
26
 
27
  [Main paper](paper/TIC-Bench.pdf) · [Technical supplementary material](paper/TIC-Bench-Supplementary.pdf)
28
 
29
+ ![Figure 1 from the main paper: TIC-Bench overview](assets/main_figure_1_overview.png)
30
 
31
  ## Benchmark composition
32
 
 
47
  | **Spatial subtotal** | | **770** |
48
  | **Total** | | **2,280** |
49
 
50
+ ![Figure 2 from the main paper: examples from all three benchmark domains](assets/main_figure_2_benchmark.png)
51
 
52
+ ## Tasks
53
 
54
+ - **Spatial Association** combines overlapping local crops and substituted text clues to infer relative directions. It contains aerial maps and natural photographs.
55
+ - **Logical Association** follows shared objects and textual relations through linear, cyclic, or convergent visual structures.
56
+ - **Temporal Association** follows identities and events through sequential, retrospective, or parallel story structures.
57
 
58
+ ![Figure 3 from the main paper: logical and temporal task structures](assets/main_figure_3_tasks.png)
59
 
60
+ ## Download-oriented release format
61
 
62
+ The dataset is distributed as **15 uncompressed tar shards** rather than more than 23,000 individually downloaded files. Every `question_*` folder remains intact inside one shard, so its QA file and referenced images are always downloaded together. The whole release is approximately 19 GiB, and each domain can be downloaded independently.
63
 
64
+ ```text
65
+ data/
66
+ ├── ticbench-spatial-00000-of-00001.tar
67
+ ├── ticbench-logical-00000-of-00010.tar ... 00009-of-00010.tar
68
+ ├── ticbench-temporal-00000-of-00004.tar ... 00003-of-00004.tar
69
+ ├── manifest.jsonl
70
+ ├── dataset_index.json
71
+ ├── SHA256SUMS
72
+ └── metadata/
73
+ paper/
74
+ assets/
75
+ ticbench_loader.py
76
+ ```
77
 
78
+ The paths stored inside the shards preserve the original domain layout:
79
 
80
  ```text
81
+ spatial_qa_shuffled/question_*/dataset_caption.jsonl
82
+ visual_construct_final/question_*/qa_pairs_*.json
83
+ time_qa/question_*/qa_pairs*.json
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  ```
85
 
86
+ `manifest.jsonl` provides one row per QA record with its QID, domain, paper-facing task type, question folder, QA filename, record index, and shard. `dataset_index.json` summarizes record counts, duplicate-QID diagnostics, shard sizes, and SHA-256 hashes. `SHA256SUMS` supports independent integrity checks.
87
 
88
+ ## Quick start
89
 
90
+ Install the Hub client and download only the domain you need:
91
 
92
+ ```bash
93
+ pip install -U huggingface_hub
94
+ ```
95
 
96
+ ```python
97
+ from huggingface_hub import snapshot_download
98
+
99
+ local_repo = snapshot_download(
100
+ repo_id="pino10010/DataConstruct",
101
+ repo_type="dataset",
102
+ allow_patterns=[
103
+ "data/manifest.jsonl",
104
+ "data/dataset_index.json",
105
+ "data/ticbench-spatial-*.tar", # change to logical or temporal
106
+ "ticbench_loader.py",
107
+ ],
108
+ )
109
+ print(local_repo)
110
+ ```
111
 
112
+ Use the included helper to inspect the manifest and safely extract a domain:
113
 
114
+ ```python
115
+ import sys
116
+ from pathlib import Path
 
 
117
 
118
+ sys.path.insert(0, local_repo)
119
+ from ticbench_loader import iter_manifest, extract_domain
120
 
121
+ root = Path(local_repo)
122
+ spatial_rows = list(iter_manifest(root, domain="spatial"))
123
+ print(len(spatial_rows), spatial_rows[0])
124
 
125
+ extract_domain(root, domain="spatial", output_dir="./ticbench-spatial")
126
+ ```
 
 
 
127
 
128
+ You can also locate one QID before downloading or extracting unrelated shards:
129
 
130
  ```python
131
+ from ticbench_loader import find_qid
 
132
 
133
+ for row in find_qid(root, "qid_20260606_235445_0001"):
134
+ print(row["shard"], row["question_folder"], row["qa_file"])
135
+ ```
 
 
 
 
136
 
137
+ ## QA formats
 
 
 
 
138
 
139
+ - **Spatial:** `dataset_caption.jsonl`; each line is a QA record with an interleaved `sequence`, reference answer, choices, and metadata. Use this final caption format rather than the earlier `dataset.jsonl` intermediate format.
140
+ - **Logical:** `qa_pairs_*.json`; the `qa_pairs` array contains question, answer, reasoning depth, graph type, QID, and review/filtering fields.
141
+ - **Temporal:** `qa_pairs*.json`; the `qa` array contains question, reference answer, reasoning steps, task type, QID, and review fields, alongside the story description.
 
 
142
 
143
+ Stored logical labels `linear`/`star`, `loop`, and `branch_merge`/`cross` correspond to Linear, Cyclic, and Convergent. Stored temporal labels `Linear`, `Loop`, and `Branch` correspond to Sequential, Retrospective, and Parallel.
 
144
 
145
  ## Data integrity note
146
 
147
+ The release contains **2,280 unique QIDs**. Four QIDs in the current Temporal source are each attached to two distinct QA records, so the physical Temporal row count is 730 rather than 726. The manifest preserves all 730 records and marks their `qid_occurrences`; it does not silently discard either record. The affected QIDs are listed in `dataset_index.json`.
148
 
149
  ## Evaluation
150
 
 
169
  note = {Anonymous manuscript}
170
  }
171
  ```
 
assets/main_figure_1_overview.png ADDED

Git LFS Details

  • SHA256: bff0b4457a316ee35d00531b3371c0963d4ff3ded1c37008f64aab64a95250f9
  • Pointer size: 131 Bytes
  • Size of remote file: 141 kB
assets/main_figure_2_benchmark.png ADDED

Git LFS Details

  • SHA256: 35ae3bddad2b9decf426ed515b532a407d4c545724b00559df50f9f7ea194a5b
  • Pointer size: 131 Bytes
  • Size of remote file: 670 kB
assets/main_figure_3_tasks.png ADDED

Git LFS Details

  • SHA256: 168ccb3f3eb576f9cd572cfd3dc04a8474abf6cf8c256a22f8b1b85eda455204
  • Pointer size: 131 Bytes
  • Size of remote file: 486 kB
ticbench_loader.py ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Small dependency-free helpers for the TIC-Bench sharded release."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import json
6
+ import tarfile
7
+ from pathlib import Path
8
+ from typing import Iterator
9
+
10
+
11
+ DOMAINS = {"spatial", "logical", "temporal"}
12
+
13
+
14
+ def iter_manifest(root: str | Path, domain: str | None = None) -> Iterator[dict]:
15
+ """Yield manifest rows, optionally restricted to one paper-facing domain."""
16
+ if domain is not None and domain not in DOMAINS:
17
+ raise ValueError(f"domain must be one of {sorted(DOMAINS)}")
18
+ path = Path(root) / "data" / "manifest.jsonl"
19
+ with path.open(encoding="utf-8") as stream:
20
+ for line in stream:
21
+ if not line.strip():
22
+ continue
23
+ row = json.loads(line)
24
+ if domain is None or row["domain"] == domain:
25
+ yield row
26
+
27
+
28
+ def find_qid(root: str | Path, qid: str) -> list[dict]:
29
+ """Return every manifest occurrence of a QID (duplicates are preserved)."""
30
+ return [row for row in iter_manifest(root) if row["qid"] == qid]
31
+
32
+
33
+ def domain_shards(root: str | Path, domain: str) -> list[Path]:
34
+ """Return the ordered local shard paths for a domain."""
35
+ if domain not in DOMAINS:
36
+ raise ValueError(f"domain must be one of {sorted(DOMAINS)}")
37
+ return sorted((Path(root) / "data").glob(f"ticbench-{domain}-*.tar"))
38
+
39
+
40
+ def _safe_destination(output_dir: Path, member_name: str) -> Path:
41
+ destination = (output_dir / member_name).resolve()
42
+ root = output_dir.resolve()
43
+ if destination != root and root not in destination.parents:
44
+ raise ValueError(f"unsafe path in tar archive: {member_name!r}")
45
+ return destination
46
+
47
+
48
+ def extract_domain(
49
+ root: str | Path,
50
+ domain: str,
51
+ output_dir: str | Path,
52
+ ) -> Path:
53
+ """Safely extract every locally downloaded shard for one domain."""
54
+ output = Path(output_dir)
55
+ output.mkdir(parents=True, exist_ok=True)
56
+ shards = domain_shards(root, domain)
57
+ if not shards:
58
+ raise FileNotFoundError(
59
+ f"no local {domain!r} shards found under {Path(root) / 'data'}"
60
+ )
61
+ for shard in shards:
62
+ with tarfile.open(shard, mode="r:") as archive:
63
+ members = archive.getmembers()
64
+ for member in members:
65
+ _safe_destination(output, member.name)
66
+ if member.issym() or member.islnk():
67
+ raise ValueError(f"links are not allowed in release shards: {member.name!r}")
68
+ archive.extractall(output, members=members)
69
+ return output