table-r1-zero-verl / README.md
sungyub's picture
Update dataset metadata
e5c7b99 verified
metadata
language:
  - en
license: apache-2.0
size_categories:
  - 10K<n<100K
task_categories:
  - reinforcement-learning
  - text-generation
  - question-answering
tags:
  - reasoning
  - reinforcement-learning
  - rlhf
  - table-qa
  - table-r1
  - table-reasoning
  - tabular-data
  - verl
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: test
        path: data/test-*

Table-R1-Zero (VERL Format)

This dataset contains 69,265 table reasoning problems from the Table-R1-Zero-Dataset, converted to VERL (Volcano Engine Reinforcement Learning) format for reinforcement learning training workflows.

Source: Table-R1/Table-R1-Zero-Dataset License: Apache 2.0

Note: System prompts have been removed from all examples for better compatibility with other VERL datasets. The dataset now contains only user messages with table reasoning problems. Ground truth answers have been converted from list format to JSON string format for consistency.

Dataset Description

Table-R1-Zero is a curated collection of table reasoning problems designed for training language models to understand and reason over structured tabular data. The problems require models to:

  • Parse and understand table structures
  • Answer questions based on table content
  • Perform reasoning across table rows and columns
  • Handle various table formats and question types
  • Extract specific information from complex tables

The dataset includes problems from multiple sources including WikiTableQuestions (WTQ) and other table QA benchmarks, making it diverse and challenging for model training.

Dataset Structure

The dataset follows the VERL format with the following fields:

  • data_source (string): Original source identifier (e.g., "WTQ" for WikiTableQuestions)
  • prompt (list): Chat template format with role/content structure
    • Contains user message with table and question
    • System prompts removed for compatibility
  • ability (string): Task category - always "table_reasoning" for this dataset
  • reward_model (dict): Evaluation information for RL training
    • style (string): Evaluation method - "rule" for answer-based evaluation
    • ground_truth (string): Expected answer(s) in JSON array format (e.g., ["2004"])
  • extra_info (dict): Additional metadata
    • index (int64): Sequential example index

Schema Details

{
    'data_source': 'WTQ',
    'prompt': [
        {
            'role': 'user',
            'content': 'Instruction\nAnswer the question based on the provided table...'
        }
    ],
    'ability': 'table_reasoning',
    'reward_model': {
        'style': 'rule',
        'ground_truth': '["answer"]'
    },
    'extra_info': {
        'index': 0
    }
}

Sample Problem

{
  "data_source": "WTQ",
  "prompt": [
    {
      "role": "user",
      "content": "Instruction\nAnswer the question based on the provided table.\n\n\nTable\nTable Title: Portland Timbers (2001–10)\nTable Content:\n| Year | Division | League | Regular Season | Playoffs | Open Cup | Avg. Attendance |\n| 2001 | 2 | USL A-League | 4th, Western | Quarterfinals | Did not qualify | 3,862 |\n| 2002 | 2 | USL A-League | 2nd, Pacific | 1st Round | Did not qualify | 4,684 |\n| 2003 | 2 | USL A-League | 3rd, Western | Conference Semifinals | 3rd Round | 5,109 |\n| 2004 | 2 | USL A-League | 1st, Western | Conference Finals | 2nd Round | 5,024 |\n| 2005 | 2 | USL First Division | 5th | Quarterfinals | 4th Round | 6,028 |\n\nQuestion\nwhat was the last year where this team was a part of the usl a-league?\n\nAnswer Format\nThe final answer should be concise and use the following format:\n```json\n{\n    \"answer\": [\n        \"answer1\",\n        \"answer2\",\n        ...\n    ]\n}\n```"
    }
  ],
  "ability": "table_reasoning",
  "reward_model": {
    "style": "rule",
    "ground_truth": "[\"2004\"]"
  },
  "extra_info": {
    "index": 0
  }
}

Usage

from datasets import load_dataset

# Load the entire dataset
dataset = load_dataset("sungyub/table-r1-zero-verl")

# Load specific split
train_dataset = load_dataset("sungyub/table-r1-zero-verl", split="train")
test_dataset = load_dataset("sungyub/table-r1-zero-verl", split="test")

# Access an example
example = dataset['train'][0]
print(example['prompt'][0]['content'])  # Table and question
print(example['reward_model']['ground_truth'])  # Expected answer
print(example['data_source'])  # Source dataset

# Stream the dataset for memory efficiency
dataset = load_dataset("sungyub/table-r1-zero-verl", streaming=True)
for example in dataset['train']:
    # Process examples one at a time
    pass

Statistics

Overall

  • Total examples: 69,265
  • Train split: 48,563 examples (70.1%)
  • Test split: 20,702 examples (29.9%)
  • Format: Parquet files with Git LFS
  • Total size: ~40 MB (compressed)

Data Sources

The problems are primarily sourced from:

  • WTQ (WikiTableQuestions): Table QA benchmark dataset
  • Other table reasoning datasets from the Table-R1 collection

Answer Statistics

  • Most examples have single answer (e.g., ["2004"])
  • Some examples have multiple valid answers (e.g., ["Bangkok", "Thailand"])
  • All answers encoded as JSON string arrays for consistency

Data Quality

High-Quality Problems:

  • Structured data - Well-formatted tables with clear schemas
  • RL-focused - Designed for reinforcement learning training
  • Verified answers - Ground truth answers for reward model evaluation
  • Compatible format - Matches structure of other VERL datasets
  • Clean prompts - System prompts removed for consistency
  • Diverse sources - Multiple table QA benchmarks included

Problem Types

The dataset covers various table reasoning challenges including:

  1. Lookup queries - Finding specific values in tables
  2. Aggregation - Counting, summing, averaging operations
  3. Comparison - Finding max/min, comparing values across rows
  4. Temporal reasoning - Date-based questions and year comparisons
  5. Multi-hop reasoning - Combining information from multiple rows/columns
  6. Filtering and sorting - Identifying items matching criteria

Conversion Details

The conversion process from the original Table-R1-Zero-Dataset:

  1. Loaded source dataset from HuggingFace Hub (train and test splits)
  2. Removed system prompts for compatibility with other VERL datasets
  3. Converted ground truth from List[string] to JSON-encoded string format
  4. Applied strict VERL schema with sequential indexing in extra_info
  5. Reordered dictionary keys using PyArrow schema casting for consistency
  6. Output to Parquet format with train/test splits maintained
  7. Validated against reference datasets (skywork-or1-code-verl)

Key Transformations

  • Original: ground_truth: ["2004"] (list type)
  • Converted: ground_truth: "[\"2004\"]" (string type, JSON encoded)
  • Removed: id and task_type fields from extra_info
  • Added: Sequential index field starting from 0

Conversion script: transform_to_verl.py (included in repository)

Use Cases

This dataset is ideal for:

  • Reinforcement Learning: Training models on table reasoning with RL algorithms
  • Fine-tuning: Improving structured data understanding capabilities
  • Table QA: Training models to answer questions about tabular data
  • Dataset Merging: Compatible with other VERL datasets for combined training
  • Evaluation: Test split for assessing table reasoning capabilities
  • Multi-task Learning: Can be combined with code/math VERL datasets

Technical Details

VERL Format Benefits

  • Standardized structure: Consistent across all VERL datasets
  • Rich metadata: Includes source information and indexing
  • Chat template: Ready for instruction-tuned models
  • Reward model integration: Ground truth answers for RL training
  • Dataset compatibility: Works seamlessly with other VERL datasets
  • Efficient storage: Parquet format with columnar compression

Schema Compatibility

This dataset uses the same schema as:

All fields follow strict ordering and typing for maximum compatibility across the VERL ecosystem.

Additional Information

For more information about VERL format and usage:

Citation

If you use this dataset, please cite the original Table-R1-Zero-Dataset:

@misc{table-r1-zero-dataset,
  title={Table-R1-Zero-Dataset},
  author={Table-R1},
  year={2024},
  publisher={HuggingFace},
  url={https://huggingface.co/datasets/Table-R1/Table-R1-Zero-Dataset}
}

Changelog

2025-10-29 - Initial Release

  • Converted 69,265 table reasoning problems to VERL format
  • Split into train (48,563) and test (20,702) sets
  • Removed system prompts for compatibility with other VERL datasets
  • Converted ground truth from list to JSON string format
  • Applied strict VERL schema with sequential indexing
  • Validated against reference VERL datasets
  • Maintained original train/test splits from source dataset