FactoryBench / README.md
FactoryNet3's picture FactoryBench's picture
Duplicate from FactoryBench/FactoryBench
5117960
|
Raw History Blame Contribute Delete
10.4 kB
metadata
license: cc-by-4.0
language:
  - en
task_categories:
  - question-answering
  - time-series-forecasting
tags:
  - robotics
  - industrial
  - time-series
  - causal-reasoning
  - benchmark
  - machine-understanding
pretty_name: FactoryBench
size_categories:
  - 10K<n<100K
configs:
  - config_name: level_1
    data_files:
      - split: train
        path: factorybench_qa/level_1.jsonl
  - config_name: level_2
    data_files:
      - split: train
        path: factorybench_qa/level_2.jsonl
  - config_name: level_3
    data_files:
      - split: train
        path: factorybench_qa/level_3.jsonl
  - config_name: level_4
    data_files:
      - split: train
        path: factorybench_qa/level_4.jsonl
  - config_name: lite_level_1
    data_files:
      - split: train
        path: factorybench_lite/level_1.jsonl
  - config_name: lite_level_2
    data_files:
      - split: train
        path: factorybench_lite/level_2.jsonl
  - config_name: lite_level_3
    data_files:
      - split: train
        path: factorybench_lite/level_3.jsonl
  - config_name: lite_level_4
    data_files:
      - split: train
        path: factorybench_lite/level_4.jsonl

FactoryBench

FactoryBench is a benchmark for evaluating machine-behavior reasoning in time-series models and LLMs over industrial robotic telemetry. Question-answer pairs are organised along the four levels of Pearl's causal hierarchy:

Level Capability Example
L1 — State Identify the operational state from raw signals "Which fault, if any, is occurring in this episode?"
L2 — Intervention Predict the effect of an intervention "How would the joint torques change if the payload were doubled?"
L3 — Counterfactual Reason about alternative histories "Would the collision still have occurred if the speed had been 50% lower?"
L4 — Decision Engineering decision-making (troubleshooting + optimisation) "Given this anomaly, what is the most likely root cause and remediation?"

The benchmark is grounded in FactoryWave, a dense multivariate telemetry dataset collected from a UR3 collaborative robot (125 Hz) and a KUKA KR10 industrial arm (83 Hz), supplemented with the AURSAD and voraus-AD open-source datasets.

Dataset summary

  • 69,691 Q&A pairs across four causal levels, released as a single undivided pool (the public release is not split into train/validation/test).
  • FactoryBench-Lite: a balanced 3,000-item subset for cheap evaluation, even across templates and within each template on the dimension that determines its answer.
  • 5 answer formats: single-select MCQ, multi-select MCQ, ranking, tensor/numerical, free-form (judged by an LLM-as-judge voting protocol).
  • Telemetry from real industrial robots with systematic fault injection (27 atomic mechanisms across pick-and-place, screwing, and peg-in-hole tasks).

Repository layout

FactoryBench/
├── factorybench_qa/                 # Question-answer pairs (full pool)
│   ├── level_1.jsonl
│   ├── level_2.jsonl
│   ├── level_3.jsonl
│   └── level_4.jsonl
├── factorybench_lite/               # Balanced 3,000-item evaluation subset
│   ├── level_1.jsonl
│   ├── level_2.jsonl
│   ├── level_3.jsonl
│   └── level_4.jsonl
├── knowledge_graph/                 # Combined knowledge graph
│   ├── knowledge_graph.json         # Machines, grippers, tasks, events, faults, anomalies, error→protocol map, relevance specs
│   └── SCHEMA.md                    # Field-level schema documentation
└── factorywave/                     # Underlying telemetry & metadata
    ├── episodes.parquet             # Episode-level metadata (9,728 episodes)
    ├── flow.parquet                 # Task flow definitions
    ├── kuka_signals.parquet         # KUKA KR10 signals (~83 Hz, 1,428 episodes)
    ├── ur_signals.parquet           # UR3 signals (~125 Hz, 3,076 episodes)
    ├── ur_signals_10hz.parquet      # UR3 signals (10 Hz, 3,984 episodes — disjoint from ur_signals)
    └── ur_screwdriver_signals.parquet  # UR3 screwdriver subset (~125 Hz, 1,240 episodes)

Note on UR coverage. ur_signals.parquet (~125 Hz) and ur_signals_10hz.parquet (10 Hz) cover disjoint UR3 episode subsets — no episode appears in both files. Together they span 7,060 distinct UR3 episodes; ur_screwdriver_signals.parquet adds another 1,240 screwdriver-task episodes. Each row in episodes.parquet corresponds to exactly one signal table.

Knowledge graph

knowledge_graph/knowledge_graph.json is the structured "world model" that grounds FactoryBench Q&A items: machine and gripper capability tables, the task/event vocabulary, the fault root-cause catalogue, the observable-anomaly catalogue, the error→protocol mapping used to derive ground-truth answers for L4 troubleshooting items, an anomaly severity ranking, and the relevance specs that drive fault-aware sub-series sampling. See knowledge_graph/SCHEMA.md for field-level documentation.

import json, urllib.request
url = "https://huggingface.co/datasets/FactoryBench/FactoryBench/resolve/main/knowledge_graph/knowledge_graph.json"
kg = json.loads(urllib.request.urlopen(url).read())

# Machine spec lookup
machines_by_id = {m["machine_id"]: m for m in kg["machines"]}

# Error → operator protocol (the ground truth for L4 troubleshooting answers)
protocol_for = {e["root_cause"]: e["ur3_protocol"] for e in kg["root_cause_error_mapping"]}
print(protocol_for["collision_rigid_object"])

Q&A pair counts

Level Full pool Lite
L1 15,321 572
L2 40,226 1,430
L3 2,939 712
L4 11,205 286
Total 69,691 3,000

The public release is a single undivided pool per level. The train split name in the config block is the Hugging Face default for a single-file config, not a semantic split. A private 15% slice is held back for contamination checks and is not counted here.

Q&A fields

Each line in factorybench_qa/level_*.jsonl (and factorybench_lite/level_*.jsonl) is a single Q&A item:

Field Description
id Unique item identifier
level Causal level (1–4)
template_id Question template the item was generated from
template_type Answer format (single_choice, multi_choice, ranking, tensor, free_form)
hides Channels/fields hidden from the model in this item
question Natural-language question
options Answer options (for MCQ/ranking templates)
answer Ground-truth answer
root_cause Underlying fault/cause (Level 4 only)
acceptance_bounds Tolerance for numerical answers
provenance Source episode(s) and channels used to derive the item
context Time-series and metadata context exposed to the model

Loading the data

from datasets import load_dataset

# Load one level of the full pool
ds = load_dataset("FactoryBench/FactoryBench", "level_1", split="train")

# Load one level of the balanced Lite subset
lite = load_dataset("FactoryBench/FactoryBench", "lite_level_1", split="train")

# Or address a file directly
ds = load_dataset(
    "FactoryBench/FactoryBench",
    data_files="factorybench_qa/level_1.jsonl",
    split="train",
)

# Load underlying telemetry
import pandas as pd
root = "hf://datasets/FactoryBench/FactoryBench/factorywave"
episodes = pd.read_parquet(f"{root}/episodes.parquet")
ur_125 = pd.read_parquet(f"{root}/ur_signals.parquet")
ur_10  = pd.read_parquet(f"{root}/ur_signals_10hz.parquet")  # different episodes
kuka   = pd.read_parquet(f"{root}/kuka_signals.parquet")
screw  = pd.read_parquet(f"{root}/ur_screwdriver_signals.parquet")

# Load the combined knowledge graph (machines, faults, error→protocol, ...)
import json, urllib.request
kg = json.loads(urllib.request.urlopen(
    "https://huggingface.co/datasets/FactoryBench/FactoryBench/resolve/main/knowledge_graph/knowledge_graph.json"
).read())

Citation

If you use FactoryBench, please cite the dataset and the two upstream open-source datasets it incorporates (AURSAD and voraus-AD):

@misc{anonymous2026factorybench,
  title  = {FactoryBench: Evaluating Industrial Machine Understanding},
  author = {Anonymous},
  year   = {2026},
  note   = {Submission under double-blind review}
}

@article{leporowski2022aursad,
  title   = {{AURSAD}: Universal Robot Screwdriving Anomaly Detection Dataset},
  author  = {Leporowski, B{\l}a{\.z}ej and Tola, Daniella and Hansen, Christian and Iosifidis, Alexandros},
  journal = {arXiv preprint arXiv:2202.03211},
  year    = {2022}
}

@misc{brockmann2024vorausad,
  title         = {voraus-{AD}: A New Dataset for Anomaly Detection in Robot Applications},
  author        = {Brockmann, Jan Thie{\ss} and Rudolph, Marco and Rosenhahn, Bodo and Wandt, Bastian},
  year          = {2024},
  eprint        = {2311.04153},
  archivePrefix = {arXiv},
  primaryClass  = {cs.RO}
}

Intended use & limitations

Intended use. Benchmark evaluation of LLMs and time-series models on structured industrial Q&A reasoning tasks (state, intervention, counterfactual, decision-making).

Limitations. Domain-specific to factory and industrial robotic scenarios; may not generalise to open-domain Q&A. Faults are atomic and drawn from a closed catalogue of 27 physically injected mechanisms — different from compound or gradual real-world faults. The dataset shows a size imbalance between Levels 2 and 3.

Out-of-scope. Not intended for deployment in safety-critical, medical, legal, or financial decision systems without further validation by domain experts.

License

Released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license. You may share and adapt the dataset for any purpose, including commercial, with appropriate attribution to the FactoryBench authors. The accompanying generator source code, evaluation scripts, LLM-as-judge prompts, and tooling (linked from the paper) are released separately under the MIT License.