Papers › Learning by Abstraction: The Neural State Machine

Learning by Abstraction: The Neural State Machine

9 Jul 2019NeurIPS 2019 12arXiv:1907.03950archive 2025-07-28

Drew A. Hudson, Christopher D. Manning

We introduce the Neural State Machine, seeking to bridge the gap between the neural and symbolic views of AI and integrate their complementary strengths for the task of visual reasoning. Given an image, we first predict a probabilistic graph that represents its underlying semantics and serves as a structured world model. Then, we perform sequential reasoning over the graph, iteratively traversing its nodes to answer a given question or draw a new inference. In contrast to most neural architectures that are designed to closely interact with the raw sensory data, our model operates instead in an abstract latent space, by transforming both the visual and linguistic modalities into semantic concept-based representations, thereby achieving enhanced transparency and modularity. We evaluate our model on VQA-CP and GQA, two recent VQA datasets that involve compositionality, multi-step inference and diverse reasoning skills, achieving state-of-the-art results in both cases. We provide further experiments that illustrate the model's strong generalization capacity across multiple dimensions, including novel compositions of concepts, changes in the answer distribution, and unseen linguistic structures, demonstrating the qualities and efficacy of our approach.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1907.03950")

Code

Syntology Ran 3 of 21 code samples harvested from 4 repositories linked to this paper; 18 have no recorded run. Of those that ran: 2 ran · honoured contract; 1 ran · fixture could not drive it.

By repository: official repository: 8 samples from 1 repository, 0 ran; community (archive-listed): 13 samples from 3 repositories, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

stanfordnlp/mac-network officialtfApache-2.0 report
abwilf/social-iq-2.0-challenge mentioned on GitHubpytorchMIT report
ceyzaguirre4/NSM mentioned on GitHubpytorch report
gchaperon/neural-state-machine mentioned on GitHubpytorchMIT report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

21 samples harvested; 3 ran; 2 honoured the contract we drafted; 18 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
1ran · fixture could not drive it
18unverified

Licence: 2 of the 21 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 4 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

bcolored stanfordnlp/mac-network/preprocess.py official repository unverified Apache-2.0 (permissive) · 8317ab884576997a · report
bold stanfordnlp/mac-network/preprocess.py official repository unverified Apache-2.0 (permissive) · 0c7aaed4c145f580 · report
build_model stanfordnlp/mac-network/extract_features.py official repository unverified Apache-2.0 (permissive) · d90ad06e8aff38ed · report
filter stanfordnlp/mac-network/visualization.py official repository unverified Apache-2.0 (permissive) · 4834aa38d80ec5ee · report
getBias stanfordnlp/mac-network/ops.py official repository unverified Apache-2.0 (permissive) · c58f5331f6d04dc6 · report
getKernel stanfordnlp/mac-network/ops.py official repository unverified Apache-2.0 (permissive) · 278ebc1a30cb3ac5 · report
getWeight stanfordnlp/mac-network/ops.py official repository unverified Apache-2.0 (permissive) · d229950ef10faeee · report
run_batch stanfordnlp/mac-network/extract_features.py official repository unverified Apache-2.0 (permissive) · f9482a830c57d09c · report
count_params abwilf/social-iq-2.0-challenge/baselines/chatgpt/alex_utils.py community (archive-listed) ran · honoured contract MIT (permissive) · 616b5e82dd2a38f9 · report
compute_colors_for_labels ceyzaguirre4/NSM/mrcnn-test.py community (archive-listed) ran · fixture could not drive it no licence file found · pointer only · fe946dd42b320c75 · report
to_glove ceyzaguirre4/NSM/NSM.py community (archive-listed) ran · honoured contract no licence file found · pointer only · d13c6151b26cba67 · report
chatGPT abwilf/social-iq-2.0-challenge/baselines/chatgpt/chatgpt_baseline.py community (archive-listed) unverified MIT (permissive) · 8312fd020fcf129a · report
compute_correctness abwilf/social-iq-2.0-challenge/baselines/chatgpt/chatgpt_baseline.py community (archive-listed) unverified MIT (permissive) · d4ecbe5474146ede · report
compute_correctness abwilf/social-iq-2.0-challenge/baselines/flant5xl/flant5xl_baseline.py community (archive-listed) unverified MIT (permissive) · 877a679a8e0c8e14 · report
fix_cat_grid gchaperon/neural-state-machine/acc_per_cat.py community (archive-listed) unverified MIT (permissive) · 56c215932698a004 · report
n_filters gchaperon/neural-state-machine/compare_model_results.py community (archive-listed) unverified MIT (permissive) · 87b3b6d59b5f6cb0 · report
process_defaults abwilf/social-iq-2.0-challenge/baselines/chatgpt/alex_utils.py community (archive-listed) unverified MIT (permissive) · e7f4ccb81d678b17 · report
read_uploaded_vtt abwilf/social-iq-2.0-challenge/siq2/youtube_utils.py community (archive-listed) unverified MIT (permissive) · 083c67090bc76ac3 · report
sec_to_ts abwilf/social-iq-2.0-challenge/siq2/youtube_utils.py community (archive-listed) unverified MIT (permissive) · cc0eeb809adea837 · report
tens abwilf/social-iq-2.0-challenge/baselines/chatgpt/alex_utils.py community (archive-listed) unverified MIT (permissive) · f1c340b23f7fad32 · report
ts_to_sec abwilf/social-iq-2.0-challenge/siq2/youtube_utils.py community (archive-listed) unverified MIT (permissive) · b50957d3d7d06ece · report

Tasks

Visual Question Answering (VQA)Visual Reasoning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Visual Question Answering (VQA) GQA test-dev NSM Accuracy 62.95 #5 of 17 Archive leaderboard report
Visual Question Answering (VQA) GQA test-std NSM Accuracy 63.17 #2 of 7 Archive leaderboard report
Visual Question Answering (VQA) VQA-CP NSM Score 45.8 #8 of 10 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections