SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2010.02986 · EMNLP · 2020

Compositional Demographic Word Embeddings

Rada Mihalcea, Jonathan Kummerfeld, Charles Welch, Verónica Pérez-Rosas

arXiv · PDF · Open in the Atlas

Code that ran

4 of 5 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; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-24; 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/2010.02986.json · badge: /api/ran/2010.02986.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
salesforce/awd-lstm-lm canonical (classifier label)
classifier basis: census
4 ran · 1 no recorded run
FunctionStatusWhere it lives
batchify Ran
ran; our contract draft was wrong, not the code
salesforce/awd-lstm-lm/utils.py
code served (permissive licence) · get_code("6bd10c3dd56c2b8c")
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 (16, 2) as a later run recorded it. 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, 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)

# Create a small tensor for data
# The function calls data.size(0), data.narrow(), data.view(), and data.t()
# So we need a 2D tensor
data = torch.randn(8, 4)  # 8 rows, 4 columns

# Batch size
bsz = 2

# Args object with cuda attribute
class Args:
    def __init__(self, cuda=False):
        self.cuda = cuda

args = Args(cuda=False)

ARGS = {
    "data": data,
    "bsz": bsz,
    "args": args
}
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 (16, 2) — shape (16, 2) 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
get_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
salesforce/awd-lstm-lm/utils.py
code served (permissive licence) · get_code("6f3c8e0b36d76af7")
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 tuple, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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 numpy as np

torch.manual_seed(0)

# Create a simple source tensor
# The function indexes into source with [i:i+seq_len] and [i+1:i+1+seq_len]
# So we need enough elements. Let's make it 1D with 20 elements
source = torch.arange(20, dtype=torch.long)

# Create a simple args object with bptt attribute
class Args:
    def __init__(self):
        self.bptt = 5

args = Args()

# i is an index into source
i = 0

# seq_len can be None or an int
seq_len = None

# evaluation is a boolean flag
evaluation = False

ARGS = {
    "source": source,
    "i": i,
    "args": args,
    "seq_len": seq_len,
    "evaluation": evaluation
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family int — a tuple output has no array shape of its own; none is stated
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
one_hot Ran
ran, honoured the contract we drafted
salesforce/awd-lstm-lm/pointer.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from Asteur/RERITES-AvgWeightDescentLSTM-PoetryGeneration, is pointer only (licence: NONE) · get_code("d38f82da04a3f93e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from Asteur/RERITES-AvgWeightDescentLSTM-PoetryGeneration, and GitHub detected no licence in that repository 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.

repackage_hidden Ran
ran, honoured the contract we drafted
salesforce/awd-lstm-lm/utils.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from mingruiliu-ml-lab/communication-efficient-local-gradient-clipping, is pointer only (licence: GPL-3.0) · get_code("4372bb4533fd1936")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from mingruiliu-ml-lab/communication-efficient-local-gradient-clipping, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

embedded_dropout Not yet run
unverified (harvested, no recorded run)
salesforce/awd-lstm-lm/embed_regularize.py
pointer only (licence: BSD-3-Clause); the stored copy get_code serves, from yx3266/SEN, is pointer only (licence: NONE) · get_code("62d148258bdd054f")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (BSD-3-Clause), but get_code serves the stored copy, first harvested from yx3266/SEN, and GitHub detected no licence in that repository 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. No invocation recorded.

Also present in other papers' code

Of 5 samples lifted from this paper's linked repositories, 5 carry a function identity and 0 do not. Of the 5 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 2 later) and 0 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.

FunctionAlso present inEarliest-datedOthers named
repackage_hidden 15 other papers
9 dated earlier, 2 the same month, 4 later
1609.04309 (2016-09)
Efficient softmax approximation for GPUs
1704.05119 (2017-04)
Exploring Sparsity in Recurrent Neural Networks
1803.08240 (2018-03)
An Analysis of Neural Language Modeling at Multiple Scales
and 12 more not named here
batchify 7 other papers
6 dated earlier, 1 the same month
1803.08240 (2018-03)
An Analysis of Neural Language Modeling at Multiple Scales
1805.04623 (2018-05)
Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Context
1808.09029 (2018-08)
Pyramidal Recurrent Unit for Language Modeling
and 4 more not named here
embedded_dropout 6 other papers
4 dated earlier, 2 later
1803.08240 (2018-03)
An Analysis of Neural Language Modeling at Multiple Scales
1810.09536 (2018-10)
Ordered Neurons: Integrating Tree Structures into Recurrent Neural Networks
1905.11881 (2019-05)
Why gradient clipping accelerates training: A theoretical justification for adaptivity
and 3 more not named here
get_batch 4 other papers
3 dated earlier, 1 the same month
1803.08240 (2018-03)
An Analysis of Neural Language Modeling at Multiple Scales
1810.09536 (2018-10)
Ordered Neurons: Integrating Tree Structures into Recurrent Neural Networks
1905.11881 (2019-05)
Why gradient clipping accelerates training: A theoretical justification for adaptivity
and 1 more not named here
one_hot 4 other papers
4 dated earlier
1708.02182 (2017-08)
Regularizing and Optimizing LSTM Language Models
1803.08240 (2018-03)
An Analysis of Neural Language Modeling at Multiple Scales
1805.04623 (2018-05)
Sharp Nearby, Fuzzy Far Away: How Neural Language Models Use Context
and 1 more not named here

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-24.

Repositories linked to this paper

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

Abstract

Word embeddings are usually derived from corpora containing text from many individuals, thus leading to general purpose representations rather than individually personalized representations. While personalized embeddings can be useful to improve language model performance and other language processing tasks, they can only be computed for people with a large amount of longitudinal data, which is not the case for new users. We propose a new form of personalized word embeddings that use demographic-specific word representations derived compositionally from full or partial demographic information for a user (i.e., gender, age, location, religion). We show that the resulting demographic-aware word representations outperform generic word representations on two tasks for English: language modeling and word associations. We further explore the trade-off between the number of available attributes and their relative effectiveness and discuss the ethical implications of using them.

For agents

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

get_harvested_code_for_paper("2010.02986")
get_code_for_paper("2010.02986")
have("2010.02986")

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

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

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

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

Connect an agent — have() is free.