Skip to content

Repository files navigation

GenSG

PaperDatasetCodeLicense

GenSG Overview

GenSG is a prototype benchmark for evaluating the systematic generalization (SG) capabilities of large language models (LLMs) from the generative perspective. Unlike most existing SG benchmarks that adopt a discriminative paradigm — where models parse or verify pre-constructed combinations of atomic elements — GenSG requires models to autonomously construct action sequences to achieve a high-level goal from atomic components. This generative formulation forces models to navigate an exponentially larger compositional search space ($O(N^{L_{max}})$), better reflecting real-world problem solving. The current prototype includes a resource scarcity setting as one illustrative test of systematicity; please refer to our paper for details.

Our results reveal a striking gap: for the same model, switching from discriminative to generative evaluation causes accuracy to drop by 2–5×(e.g., Gemini 3.1 Pro: 92% → 52%, GPT 5.4: 78% → 23%, DeepSeek V3.2: 53% → 6%), while average output length increases by 2–4× (e.g., GPT 5.4: 5,521 → 23,117 tokens), demonstrating that the generative task is substantially harder and demands far greater reasoning effort.

Repository Structure

GenSG/
├── main_gen.py # Generative evaluation: model generates action sequences
├── main_dis.py # Discriminative evaluation: model infers goals from actions
├── utils/
│ ├── basics.py # Game rules, object definitions, and prompt templates
│ ├── engine.py # GameEngine: executes and validates game actions
│ └── validator.py # Validator: checks solution correctness
└── data/
└── test.json # The GenSG dataset

Setup

1. Install dependencies

conda create -n gensg python=3.12 -y
conda activate gensg
pip install requests tqdm loguru

2. Set your API key

export OPENROUTER_API_KEY="your-api-key-here"

Running the Evaluation

Generative Task

Evaluate how well a model generates action sequences to reach a target goal:

python main_gen.py \
--test_data data/test.json \
--model_name "openai/gpt-5.4" \
--start 0 \
--end 100 \
--concurrency 5

Output is saved to Result_{model_name}_{start}_{end}.json.

Discriminative Task

Evaluate how well a model infers the original goal from a given action sequence:

python main_dis.py \
--test_data data/test.json \
--model_name "openai/gpt-5.4" \
--start 0 \
--end 100 \
--concurrency 5

Output is saved to Discriminative_Results_{model_name}_{start}_{end}.json.

Arguments

ArgumentDefaultDescription
--test_datadata/test.jsonPath to test data
--model_nameminimax/minimax-m2.7Model ID
--start0Start index of test data
--end(full dataset)End index of test data
--concurrency5Number of parallel API calls
--max_retries3Retry limit per failed request

Results

We evaluate six state-of-the-art LLMs, including both proprietary and open-source models, on the generative and discriminative tasks. The results reveal a significant performance gap: on the same data, switching from discriminative to generative evaluation causes accuracy to drop by 2–5× (e.g., Gemini 3.1 Pro: 92% → 52%, GPT 5.4: 78% → 23%, DeepSeek V3.2: 53% → 6%), while average output length increases by 2–4× (e.g., GPT 5.4: 5,521 → 23,117 tokens, Grok 4.20: 11,497 → 28,078 tokens). This confirms that generative evaluation is substantially more challenging, requiring models to actively search through a vast compositional space rather than simply verifying predefined combinations.

ModelDiscriminative AccuracyDiscriminative Avg. Output LengthGenerative AccuracyGenerative Avg. Output Length
GPT 5.478.005520.5723.0023116.56
Gemini 3.1 Pro92.0010996.7252.0020248.39
Grok 4.2084.0011497.3013.0028078.04
Claude Opus 4.6—†—†—†—†
DeepSeek V3.253.0017030.966.0019209.09
MiniMax M2.767.0025364.042.0047368.67

† Results unavailable due to exceeding the model's maximum output length.

Citation

@article{gensg2026,
title = {},
author = {},
journal = {},
year = {2026}
}

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages