atlas

Research map / Large language models / Reasoning and chain of thought

StackSight: Unveiling WebAssembly through Large Language Models and Neurosymbolic Chain-of-Thought Decompilation

ICML 2024 · Large language models › Reasoning and chain of thought · approach: Long CoT dynamics and efficiency · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes StackSight, a neurosymbolic pipeline that annotates WebAssembly text with static-analysis virtual-stack states and applies chain-of-thought prompting to LLMs to decompile WASM into C++.

Problem

WebAssembly decompilation is hard because its implicit stack machine, low-level types, and minified/obfuscated names hinder comprehension, and direct sequence-to-sequence LLM translation performs poorly due to scarce WASM pretraining data.

Approach

Combine a static analysis tool that tracks and annotates the virtual stack state (with symbolic handling of branches) for each WAT line with a three-stage chain-of-thought prompt (data type prediction, variable semantic recovery, function summary) before C++ generation.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use StackSight instead of 10-shot ICLGPT-3.5 WebAssembly decompilation · HumanEval-XCorrect (%): 23.4 -> 31.4Helped
Use StackSight instead of 3-shot ICLGPT-3.5 WebAssembly decompilation · MBXPCorrect (%): 21.1 -> 29.5Helped
Use StackSight instead of 1-shot ICLGPT-4 WebAssembly decompilation · HumanEval-XCorrect (%): 19.7 -> 36.5Helped
Use StackSight instead of 1-shot ICLGPT-4 WebAssembly decompilation · MBXPCorrect (%): 42.4 -> 59.6Helped
Add stack visualization (ablation)StackSight with GPT-3.5 · HumanEval-XCorrect (%): 23.6 -> 31.4Helped
Add stack visualization (ablation)StackSight with GPT-3.5 · MBXPCorrect (%): 26.5 -> 29.5Helped
Use the extended prompt instead of basic CoT (ablation)StackSight with GPT-3.5 · HumanEval-XCorrect (%): +1.4%Helped
Use the extended prompt instead of basic CoT (ablation)StackSight with GPT-3.5 · MBXPCorrect (%): +0.3%Helped
Add variable semantics recovery (ablation)StackSight with GPT-3.5 · HumanEval-XCorrect (%): 24.8 -> 31.4Helped
Add variable semantics recovery (ablation)StackSight with GPT-3.5 · MBXPCorrect (%): 22.7 -> 29.5Helped
Add natural-language function summary (ablation)StackSight with GPT-3.5 · HumanEval-XCorrect (%): 20.7 -> 31.4Helped
Add natural-language function summary (ablation)StackSight with GPT-3.5 · MBXPCorrect (%): 24.3 -> 29.5Helped

Surprising findings

Limitations

Experimental setup

Datasets: HumanEval-X (C++ split) MBXP (C++ split)

Benchmarks: HumanEval-X MBXP

Metrics: compile rate functional correctness (pass rate) BERTScore SBERT similarity user study correct-answer rate user study win rate

Baselines: few-shot in-context learning (1/3/5/10-shot) wasm2c

Builds on: chain-of-thought prompting HumanEval-X MBXP

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy