atlas

Research map / Large language models / Agents, code and math

Dataflow-Guided Neuro-Symbolic Language Models for Type Inference

ICML 2025 · Large language models › Agents, code and math · approach: Code generation benchmarks

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 NESTER, a neuro-symbolic framework that decomposes Python type inference into a high-level program of dataflow/control-flow API calls, executed by an interpreter that mixes static analysis with small local LMs (Code Llama 7B, Llama 3 8B).

Problem

Type inference with small locally deployable LMs struggles to reason about control and data flow in code, limiting accuracy for Python type annotations.

Approach

Generate a high-level program of modular API calls (condition evaluation and type inference entry points) from the code via LM prompting, then interpret it with a program interpreter that traverses a coarse-grained dataflow graph, using a type recognizer for static types and LMs for the rest, without increasing model size.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use NESTER-CL instead of TypeGen-CLCode Llama 7B for type inference · ManyTypes4PyTop-1 Exact Match (All): 67.1 -> 70.7Helped
use NESTER-CL instead of TypeGen-CLCode Llama 7B for type inference · ManyTypes4PyTop-1 Match to Parametric (All): 79.0 -> 81.5Helped
use NESTER-CL instead of Type4Pytype inference for arguments · ManyTypes4Py argumentsTop-1 Exact Match: 66.5 -> 70.3Helped
use NESTER-CL instead of Type4Pytype inference for return types · ManyTypes4Py return typesTop-1 Exact Match: 56.1 -> 60.0Helped
replace matching-type demonstrations with similar examples having different type answers (ablation)TypeGen with Code Llama 7B · ManyTypes4Pyaccuracy: 72.5% -> 64%Hurt
remove demonstration examples (ablation)TypeGen with Code Llama 7B · ManyTypes4Pyaccuracy: 72.5% -> 57.2%Hurt

Surprising findings

Limitations

Experimental setup

Datasets: ManyTypes4Py

Benchmarks: ManyTypes4Py

Metrics: Top-1 Exact Match Top-3 Exact Match Top-5 Exact Match Match to Parametric human evaluation (correctness, explainability, factuality, c

Baselines: HiTyper TypeBERT TypeWriter UniXcoder Type4Py InCoder CodeT5 TypeGen Code Llama 7B Llama 3 8B

Builds on: TypeGen VISPROG Type4Py

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