File size: 3,463 Bytes
e30e8ac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
language:
  - en
tags:
  - structural-engineering
  - truss-optimization
  - reinforcement-learning
  - reasoning
  - design-benchmark
license: mit
---

# DesignBench-Truss

## Overview

DesignBench-Truss is the benchmark split (problems 090–099) of DesignBench, a
dataset for teaching and evaluating large language models on iterative
structural engineering design via Tree-of-Thought reasoning.

Each problem requires minimising the mass of a 2-D pin-jointed truss structure
while satisfying structural safety constraints (factor of safety ≥ 1.5 for both
buckling and yielding failure modes). A finite-element analysis oracle
(trussme) provides deterministic feedback after every design modification.

## Task Description

Given an initial truss design with known joint positions, member cross-sections,
material properties, and loading conditions, a model must produce a sequence of
discrete grammar actions that transform the design into a feasible,
mass-minimised structure.

### Grammar Actions

| Action | Signature | Description |
|--------|-----------|-------------|
| SCALE_PARAM | `SCALE_PARAM(member_id_or_all, param, factor)` | Scale one parameter of one (or all) members |
| SCALE_MULTI_PARAM | `SCALE_MULTI_PARAM([member_ids], [param:factor, ...])` | Scale multiple parameters simultaneously |
| ADD_MEMBER | `ADD_MEMBER(joint1, joint2, material, shape_type, r, t)` | Add a new pipe member between two joints |

## Data Format

### `benchmark.json`

Flat list of examples — one per gold trace — with the following fields:

```json
{
  "problem_id": "auto_problem_090",
  "trace_id": "auto_problem_090_trace_0",
  "problem_text": "PROBLEM: Truss optimization ...",
  "initial_state": {
    "mass": 142.5,
    "fos_buckling": 0.31,
    "fos_yielding": 1.09,
    "deflection": 0.038,
    "is_feasible": false
  },
  "gold_action_sequence": [
    "ADD_MEMBER(5, 6, 6061_T6_Aluminum, Pipe, 0.0497, 0.0056)",
    "SCALE_PARAM(all_members, thickness, 1.28)"
  ],
  "reaches_solution": true,
  "trace_quality": 0.98
}
```

### `problems/`

Raw problem JSON files containing joint positions, member topology, loads, and
design constraints.

### `trees/`

Full modification trees as JSON. Each tree contains all explored design states
(nodes) and the grammar actions connecting them (edges).

### `traces/`

Serialized gold traces — lists of node-sequences extracted from each tree.

## Metrics

| Metric | Description |
|--------|-------------|
| feasibility_rate | Fraction of episodes reaching `is_feasible=True` |
| mass_reduction | `(initial_mass - final_mass) / initial_mass` |
| grammar_validity_rate | Fraction of steps with parseable grammar actions |
| avg_steps_to_feasibility | Mean episode length when a feasible design is found |
| overall_score | Weighted composite: design_correctness (0.5) + structural_validity (0.25) + reasoning_quality (0.15) + grammar_compliance (0.10) |

## Example Usage

```python
import json

with open("benchmark.json") as f:
    examples = json.load(f)

print(f"Loaded {len(examples)} benchmark examples")

for ex in examples[:3]:
    print(ex["problem_id"], "->", ex["reaches_solution"],
          "actions:", len(ex["gold_action_sequence"]))
```

## Citation

```bibtex
@misc{designbench2025,
  title  = {DesignBench: A Benchmark for Iterative Structural Engineering Design},
  author = {DesignBench Authors},
  year   = {2025},
  note   = {https://huggingface.co/datasets/DesignBench-Truss}
}
```