SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1503.00075 · 2015

Improved Semantic Representations From Tree-Structured Long Short-Term Memory Networks

arXiv · PDF · Open in the Atlas

Code that ran

12 of 15 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 6 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1503.00075.json · badge: /api/ran/1503.00075.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Vivswan/Sentiment-Analysis-TreeLSTM reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
ttpro1995/TreeLSTMSentiment community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
EmilReinert/DeepLearningPipelines reimplementation (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
tomekkorbak/treehopper community (classifier label)
classifier basis not recorded on the link
2 ran · 2 no recorded run
dasguptar/treelstm.pytorch community (classifier label)
classifier basis not recorded on the link
1 ran · 1 no recorded run
FunctionStatusWhere it lives
choose_optimizer Ran
ran on a synthesized input
tomekkorbak/treehopper/treehopper/model/training.py
code served (permissive licence) · get_code("0f1a6ead94a1ebe2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Adam. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.optim as optim

torch.manual_seed(0)

# Create a minimal model with some parameters
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear1 = nn.Linear(4, 3)
        self.linear2 = nn.Linear(3, 2)
    
    def forward(self, x):
        x = self.linear1(x)
        x = self.linear2(x)
        return x

model = SimpleModel()

# Create args object with all required attributes
class Args:
    def __init__(self):
        self.optim = 'adam'
        self.lr = 0.001
        self.wd = 1e-5

args = Args()

ARGS = {
    'args': args,
    'model': model
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Adam — a Adam output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Adam output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_constituency_tree Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Vivswan/Sentiment-Analysis-TreeLSTM/scripts/preprocess-sst.py
pointer only (licence: NOASSERTION) · get_code("fd3e77b45ce34195")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Vivswan/Sentiment-Analysis-TreeLSTM (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_dependency_tree Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Vivswan/Sentiment-Analysis-TreeLSTM/scripts/preprocess-sst.py
pointer only (licence: NOASSERTION) · get_code("48a87dac90a7d495")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Vivswan/Sentiment-Analysis-TreeLSTM (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_trees Ran
ran; our contract draft was wrong, not the code
Vivswan/Sentiment-Analysis-TreeLSTM/scripts/preprocess-sst.py
pointer only (licence: NOASSERTION) · get_code("8817e369ca9baf24")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, Vivswan/Sentiment-Analysis-TreeLSTM (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

map_label_to_target Ran
ran on a synthesized input
dasguptar/treelstm.pytorch/treelstm/utils.py
code served (permissive licence) · get_code("04bd7091604bee59")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (1, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import math
import torch

torch.manual_seed(0)

# Analyzing the function:
# - label: a numeric value (int or float) that gets ceil/floor'd
# - num_classes: an int used to create a tensor of shape (1, num_classes)
# The function creates a target tensor and distributes the label across class indices

ARGS = {
    "label": 2.5,
    "num_classes": 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (1, 4) — shape (1, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
map_label_to_target Ran
ran on a synthesized input
ttpro1995/TreeLSTMSentiment/utils.py
code served (permissive licence) · get_code("f55e0209ce694729")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (1, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import math

torch.manual_seed(0)

# Analyzing the function:
# - label: a numeric value (int or float) that gets ceil/floor operations
# - num_classes: an integer used to create tensor dimensions

ARGS = {
    "label": 2.5,
    "num_classes": 4
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (1, 4) — shape (1, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
map_label_to_target_sentiment Ran
ran on a synthesized input
ttpro1995/TreeLSTMSentiment/utils.py
code served (permissive licence) · get_code("2c8d4f6f1b8eb9a3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 1, dtype family int, shape (1,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    "label": 2,
    "num_classes": 5,
    "fine_grain": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family int, shape (1,) — shape (1,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_args Ran
ran on a synthesized input
ttpro1995/TreeLSTMSentiment/config.py
code served (permissive licence) · get_code("816c1241731833a0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Namespace. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse
import sys
from io import StringIO

def parse_args(type=0):
    if type == 0:
        parser = argparse.ArgumentParser(description='PyTorch TreeLSTM for Sentence Similarity on Dependency Trees')
        parser.add_argument('--data', default='data/sick/', help='path to dataset')
        parser.add_argument('--glove', default='data/glove/', help='directory with GLOVE embeddings')
        parser.add_argument('--batchsize', default=25, type=int, help='batchsize for optimizer updates')
        parser.add_argument('--epochs', default=15, type=int, help='number of total epochs to run')
        parser.add_argument('--lr', default=0.01, type=float, metavar='LR', help='initial learning rate')
        parser.add_argument('--wd', default=0.0001, type=float, help='weight decay (default: 1e-4)')
        parser.add_argument('--optim', default='adam', help='optimizer (default: adam)')
        parser.add_argument('--seed', default=123, type=int, help='random seed (default: 123)')
        cuda_parser = parser.add_mutually_exclusive_group(required=False)
        cuda_parser.add_argument('--cuda', dest='cuda', action='store_true')
        cuda_parser.add_argument('--no-cuda', dest='cuda', action='store_false')
        parser.set_defaults(cuda=True)
        args = parser.parse_args()
        return args
    else:
        parser = argparse.ArgumentParser(description='PyTorch TreeLSTM for Sentiment Analysis Trees')
        parser.add_argument('--name', default='default_name', help='name for log and saved models')
        parser.add_argument('--saved', default='saved_model', help='name for log and saved models')
        parser.add_argument('--model_name', default='constituency', help='model name constituency or dependency')
        parser.add_argument('--data', default='data/sst/', help='path to dataset')
        parser.add_argument('--glove', default='data/glove/', help='directory with GLOVE embeddings')
        parser.add_argument('--batchsize', default=25, type=int, help='batchsize for optimizer updates')
        parser.add_argument('--epochs', default=10, type=int, help='number of total epochs to run')
        parser.add_argument('--lr', default=0.05, type=float, metavar='LR', help='initial learning rate')
        parser.add_argument('--emblr', default=0.1, type=float, metavar='EMLR', help='initial embedding learning rate')
        parser.add_argument('--wd', default=0.0001, type=float, help='weight decay (default: 1e-4)')
        parser.add_argument('--reg', default=0.0001, type=float, help='l2 regularization (default: 1e-4)')
        parser.add_argument('--optim', default='adagrad', help='optimizer (default: adagrad)')
        parser.add_argument('--seed', default=123, type=int, help='random seed (default: 123)')
        parser.add_argument('--fine_grain', default=0, type=int, help='fine grained (default 0 - binary mode)')
        cuda_parser = parser.add_mutually_exclusive_group(required=False)
        cuda_parser.add_argument('--cuda', dest='cuda', action='store_true')
        cuda_parser.add_argument('--no-cuda', dest='cuda', action='store_false')
        cuda_parser.add_argument('--lower', dest='cuda', action='store_true')
        parser.set_defaults(cuda=True)
        parser.set_defaults(lower=True)
        args = parser.parse_args()
        return args

# Save original argv
original_argv = sys.argv.copy()

# Test with type=0
sys.argv = ['test_script']
try:
    result_type_0 = parse_args(type=0)
except SystemExit:
    pass

# Test with type=1
sys.argv = ['test_script']
try:
    result_type_1 = parse_args(type=1)
except SystemExit:
    pass

# Restore original argv
sys.argv = original_argv

ARGS = {
    'type': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_args_train Ran
ran on a synthesized input
tomekkorbak/treehopper/treehopper/config.py
code served (permissive licence) · get_code("bcabec498122625d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Namespace. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import argparse
from datetime import datetime
import torch
import torch.nn as nn

torch.manual_seed(0)

# Create a minimal parser to understand the function's structure
parser = argparse.ArgumentParser(description='PyTorch TreeLSTM for Sentiment Analysis Trees')

# Build ARGS dict with all parameters that parse_args_train uses
ARGS = {
    'parser': None,  # Function accepts parser=None and creates its own
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_data Ran
ran; our contract draft was wrong, not the code
EmilReinert/DeepLearningPipelines/workspace/pipelines/defect_prediction.py
pointer only (licence: NONE) · get_code("55a0de7b0b6428f0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EmilReinert/DeepLearningPipelines when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_file Ran
ran; our contract draft was wrong, not the code
EmilReinert/DeepLearningPipelines/workspace/pipelines/defect_prediction.py
pointer only (licence: NONE) · get_code("33e96662baea2bc4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EmilReinert/DeepLearningPipelines when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

tidy Ran
ran; our contract draft was wrong, not the code
EmilReinert/DeepLearningPipelines/workspace/pipelines/defect_prediction.py
pointer only (licence: NONE) · get_code("8041e074f5f2c31b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, EmilReinert/DeepLearningPipelines when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_word_vectors Not yet run
unverified (harvested, no recorded run)
dasguptar/treelstm.pytorch/treelstm/utils.py
code served (permissive licence) · get_code("bc4891355c566a35")
How it ran

no invocation recorded.

set_arguments Not yet run
unverified (harvested, no recorded run)
tomekkorbak/treehopper/treehopper/config.py
code served (permissive licence) · get_code("83e2ff5af6039f69")
How it ran

no invocation recorded.

zoneout Not yet run
unverified (harvested, no recorded run)
tomekkorbak/treehopper/treehopper/model/zoneout.py
code served (permissive licence) · get_code("d4a62a05dc3b8ff4")
How it ran

no invocation recorded.

Also present in other papers' code

Of 15 samples lifted from this paper's linked repositories, 15 carry a function identity and 0 do not. Of the 15 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 15 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Because of their superior ability to preserve sequence information over time, Long Short-Term Memory (LSTM) networks, a type of recurrent neural network with a more complex computational unit, have obtained strong results on a variety of sequence modeling tasks. The only underlying LSTM structure that has been explored so far is a linear chain. However, natural language exhibits syntactic properties that would naturally combine words to phrases. We introduce the Tree-LSTM, a generalization of LSTMs to tree-structured network topologies. Tree-LSTMs outperform all existing systems and strong LSTM baselines on two tasks: predicting the semantic relatedness of two sentences (SemEval 2014, Task 1) and sentiment classification (Stanford Sentiment Treebank).

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1503.00075")
get_code_for_paper("1503.00075")
have("1503.00075")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1503.00075.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1503.00075.svg)](https://syntology.ai/paper/1503.00075)

Connect an agent — have() is free.