๐ŸŽจ Thinking with Comics, Reason with Stories!

February 3, 2026 ยท View on GitHub

Enhancing LLM Generative Capabilities through Structured Visual Storytelling

License

Thinking with Comics Overview

๐Ÿ“ข Announcement

๐Ÿ“ข Update 1: The project code will be open-sourced this week. Stay tuned.

๐Ÿ“– Overview

Thinking with Comics (TwC) is a novel reasoning paradigm that leverages sequential comic panels to enhance the reasoning capabilities of Vision-Language Models (VLMs). Unlike traditional "Thinking with Text" (Chain-of-Thought) or "Thinking with Video" approaches, our method uses comics as an intermediate reasoning medium that:

  • ๐ŸŽฏ Preserves temporal logic through panel sequences
  • ๐Ÿ“ Embeds text naturally via speech bubbles and narration
  • ๐Ÿ’ก Balances information density between static images and videos
  • ๐Ÿ” Provides interpretable reasoning through visual storytelling

Key Features

  • Two Implementation Paths:

    • Path I (End-to-End): Direct comic generation as the reasoning process
    • Path II (VLM-Assisted): Comic as conditioning context for downstream inference
  • Multiple Task Support:

    • Mathematical reasoning (GSM8K, MATH-500, MathVista)
    • Document understanding (DocVQA)
    • Cultural knowledge (CulturalBench)
    • Comic translation

๐Ÿ—๏ธ Project Structure

ThinkWithComics-OpenSource/
โ”œโ”€โ”€ code/
โ”‚   โ”œโ”€โ”€ config.py                    # Configuration (API, paths, parameters)
โ”‚   โ”œโ”€โ”€ utils.py                     # Utility functions
โ”‚   โ”œโ”€โ”€ evaluate_math_comics.py      # GSM8K & MATH-500 evaluation
โ”‚   โ”œโ”€โ”€ evaluate_mathvista_comics.py # MathVista evaluation
โ”‚   โ”œโ”€โ”€ evaluate_docvqa_comics.py    # DocVQA evaluation
โ”‚   โ”œโ”€โ”€ evaluate_cultural_comics.py  # CulturalBench evaluation
โ”‚   โ”œโ”€โ”€ compare_global_incremental.py # Global vs Incremental experiment
โ”‚   โ””โ”€โ”€ analyze_human_evaluation.py  # Human evaluation analysis
โ”œโ”€โ”€ data/
โ”‚   โ””โ”€โ”€ sample_datasets/             # Place your datasets here
โ”œโ”€โ”€ examples/
โ”‚   โ”œโ”€โ”€ gsm8k/                       # Example outputs for GSM8K
โ”‚   โ”œโ”€โ”€ mathvista/                   # Example outputs for MathVista
โ”‚   โ”œโ”€โ”€ docvqa/                      # Example outputs for DocVQA
โ”‚   โ”œโ”€โ”€ culturalbench/               # Example outputs for CulturalBench
โ”‚   โ””โ”€โ”€ translation/                 # Example comic translations
โ”œโ”€โ”€ figures/                         # Paper figures
โ”œโ”€โ”€ results/                         # Evaluation results (auto-generated)
โ”œโ”€โ”€ requirements.txt                 # Python dependencies
โ””โ”€โ”€ README.md                        # This file

๐Ÿš€ Quick Start

1. Installation

# Clone the repository
git clone https://github.com/yourusername/ThinkWithComics.git
cd ThinkWithComics

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

2. Configuration

Edit code/config.py to set your API credentials and paths:

# API Configuration
API_HOST = "your-api-host"
API_KEY = "your-api-key"  # Or use environment variable: os.environ.get("COMIC_API_KEY")

# Dataset paths
BASE_DIR = "/path/to/your/project"

Environment Variable (Recommended):

export COMIC_API_KEY="your-api-key"

3. Prepare Datasets

Download and place datasets in the data/ directory:

DatasetDownload LinkPath
GSM8KHuggingFacedata/gsm8k/test.jsonl
MATH-500GitHubdata/MATH-500/test.jsonl
MathVistaGitHubdata/MathVista/
DocVQAHuggingFacedata/DocVQA/
CulturalBenchHuggingFacedata/CulturalBench/

4. Run Evaluation

cd code

# Math reasoning evaluation (GSM8K & MATH-500)
python evaluate_math_comics.py

# Visual math reasoning (MathVista)
python evaluate_mathvista_comics.py

# Document QA (DocVQA)
python evaluate_docvqa_comics.py

# Cultural knowledge (CulturalBench)
python evaluate_cultural_comics.py

๐Ÿ“Š Experiments

Main Evaluation

Run evaluations on different benchmarks:

# Adjust NUM_SAMPLES in config.py to control sample size
python evaluate_math_comics.py
python evaluate_mathvista_comics.py

Global vs Incremental Comparison

Compare global comic generation with incremental image generation:

python compare_global_incremental.py

This generates:

  • Global comic images (single cohesive multi-panel comic)
  • Incremental images (step-by-step realistic photos)
  • Human evaluation template

Human Evaluation

After collecting human ratings:

python analyze_human_evaluation.py

This produces:

  • Statistical analysis (mean, std, t-test)
  • LaTeX table for paper

๐ŸŽญ Comic Styles

The framework supports multiple narrative styles for different tasks:

StyleBest ForDescription
DocumentaryFactual problemsEducational, realistic presentation
DetectiveLogical reasoningClue-based, deductive structure
Slice-of-LifeWord problemsEveryday scenarios, relatable

Configure style in the evaluation scripts:

# In evaluate_math_comics.py
results = evaluate_dataset(
    dataset_name="gsm8k",
    data_path=GSM8K_PATH,
    question_key="question",
    style="detective"  # Options: default, detective, documentary, slice_of_life
)

๐Ÿ“ˆ Results

Reasoning Benchmarks

MethodMATH-500GSM8KMathVista
GPT-5-High99.0100.067.5
TwC (Ours) - Path I90.0100.075.0
TwC (Ours) - Path II92.395.485.8

Context Understanding

MethodDocVQACulturalBench (E/H)
TwC (Ours) - Path I92.870.0 / 80.5
TwC (Ours) - Path II99.488.3 / 82.2

๐Ÿ”ฌ Analysis Experiments

1. Role-playing Narrative Alignment

Different comic styles affect performance:

Style           | MathVista | GSM8K  | Avg. ฮ”
----------------|-----------|--------|--------
Documentary     | 60.0      | 68.0   | ---
Slice-of-Life   | 80.0      | 86.3   | +38.3%
Detective       | 85.0      | 100.0  | +18.7%

2. Panel Scaling

Optimal panel count is 4-6 for best accuracy/cost trade-off.

3. Gutter Reasoning

Panel shuffling causes >40% accuracy drop, confirming models use temporal logic between panels.

๐Ÿ“ Citation

If you find this work useful, please cite:

@article{chen2026thinking,
  title={Thinking with Comics: Enhancing {LLM} Generative Capabilities through Structured Visual Storytelling},
  author={Chen, Andong and Zhu, Wenxin and Ding, Qiuyu and Song, Yuchen and Yang, Muyun and Zhao, Tiejun},
  journal={arXiv preprint arXiv:2602.02453},
  year={2026},
  eprint={2602.02453},
  archivePrefix={arXiv},
  primaryClass={cs.CL},
  url={https://arxiv.org/abs/2602.02453}
}

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Image generation powered by Nano Banana Pro
  • Datasets: GSM8K, MATH, MathVista, DocVQA, CulturalBench

๐Ÿ“ง Contact

For questions or feedback, please open an issue or contact:


๐ŸŽจ Think with Comics, Reason with Stories! ๐Ÿ“–