SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1807.11176 · 2018

Human Motion Analysis with Deep Metric Learning

arXiv · PDF · Open in the Atlas

Code that ran

8 of 8 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 8 have no contract verdict; 0 failures of our instrument; 0 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/1807.11176.json · badge: /api/ran/1807.11176.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
dhesenkamp/attentive-lstm community (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
FunctionStatusWhere it lives
create_batch Ran
ran on a synthesized input
dhesenkamp/attentive-lstm/util.py
code served (permissive licence) · get_code("dbe995781db97e28")
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 EagerTensor, ndim 3, dtype family float, shape (7, 25, 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 numpy as np
import tensorflow as tf

# Create a dataframe-like dict structure with multiple classes
# Each class contains at least 2 samples (required by the function's while loops)
# Each sample is a small array (feature vector)

np.random.seed(0)

df = {
    'class_0': [np.random.randn(4).astype(np.float32) for _ in range(30)],
    'class_1': [np.random.randn(4).astype(np.float32) for _ in range(28)],
    'class_2': [np.random.randn(4).astype(np.float32) for _ in range(26)],
    'class_3': [np.random.randn(4).astype(np.float32) for _ in range(25)],
    'class_4': [np.random.randn(4).astype(np.float32) for _ in range(27)],
    'class_5': [np.random.randn(4).astype(np.float32) for _ in range(29)],
}

ARGS = {
    'df': df,
    'num_classes': 5,
    'samples': 25,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float, shape (7, 25, 4) — shape (7, 25, 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
cut_sequences Ran
ran on a synthesized input
dhesenkamp/attentive-lstm/preprocessing.py
code served (permissive licence) · get_code("d5630fd28e883eb9")
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 list, 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

torch.manual_seed(0)

# The function expects `data` to be an iterable of sequences (each with a len())
# and `length` to be an int specifying the target length
data = [
    [1, 2, 3, 4, 5, 6],
    [7, 8, 9, 10, 11],
    [12, 13, 14, 15, 16, 17, 18]
]

length = 4

ARGS = {
    "data": data,
    "length": length
}
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 list, ndim 2, dtype family int — a list 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
downsample_data Ran
ran on a synthesized input
dhesenkamp/attentive-lstm/preprocessing.py
code served (permissive licence) · get_code("ca2392922acf9318")
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 list, ndim 3, 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)

# The function expects:
# - data: an array-like object (list or sequence) that can be indexed
#         where each element data[i] supports slicing with [::factor]
# - factor: an integer for downsampling

# Create sample data as a list of sequences (numpy arrays or lists)
# Each sequence will be downsampled by keeping every factor-th element
sequence1 = np.arange(12).reshape(3, 4)  # shape (3, 4) - 12 frames
sequence2 = np.arange(20, 32).reshape(3, 4)  # shape (3, 4) - 12 frames

data = [sequence1, sequence2]

# Downsampling factor
factor = 3

ARGS = {
    "data": data,
    "factor": factor
}
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 list, ndim 3, dtype family int — a list 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
get_paths Ran
ran on a synthesized input
dhesenkamp/attentive-lstm/util.py
code served (permissive licence) · get_code("224ff12b736dcb86")
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 list, ndim 1, dtype family float; 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 os
import tempfile
import shutil

# Create a temporary directory structure for testing
temp_dir = tempfile.mkdtemp()

# Create some nested directories with files
os.makedirs(os.path.join(temp_dir, "subdir1"), exist_ok=True)
os.makedirs(os.path.join(temp_dir, "subdir2", "nested"), exist_ok=True)

# Create some test files with the target format
with open(os.path.join(temp_dir, "file1.txt"), "w") as f:
    f.write("test")
with open(os.path.join(temp_dir, "file2.txt"), "w") as f:
    f.write("test")
with open(os.path.join(temp_dir, "subdir1", "file3.txt"), "w") as f:
    f.write("test")
with open(os.path.join(temp_dir, "subdir2", "nested", "file4.txt"), "w") as f:
    f.write("test")

# Create some files with different formats
with open(os.path.join(temp_dir, "other.csv"), "w") as f:
    f.write("test")

ARGS = {
    "path": temp_dir,
    "file_format": ".txt"
}
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 list, ndim 1, dtype family float — a list 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
kernel_function Ran
ran on a synthesized input
dhesenkamp/attentive-lstm/loss.py
code served (permissive licence) · get_code("2ef10c89fefd5c31")
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 EagerTensor, ndim 0, dtype family float, shape () 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 tensorflow as tf
import numpy as np

# Create sample tensors for x and x_prime
# The function expects tensors that support subtraction and power operations
x = tf.constant(1.5, dtype=tf.float32)
x_prime = tf.constant(2.3, dtype=tf.float32)

# Define sigma as a list of kernel parameters
sigma = [1, 2, 4, 8, 16]

ARGS = {
    "x": x,
    "x_prime": x_prime,
    "sigma": sigma
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 0, dtype family float, shape () — shape () 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
mmd Ran
ran on a synthesized input
dhesenkamp/attentive-lstm/loss.py
code served (permissive licence) · get_code("36f20b488dfdc730")
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 EagerTensor, ndim 0, dtype family float, shape () 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create small sample distributions
# X: 2 samples, each of dimension 4
X = tf.constant([
    [1.0, 2.0, 3.0, 4.0],
    [1.5, 2.5, 3.5, 4.5]
], dtype=tf.float32)

# Y: 2 samples, each of dimension 4
Y = tf.constant([
    [2.0, 3.0, 4.0, 5.0],
    [2.5, 3.5, 4.5, 5.5]
], dtype=tf.float32)

ARGS = {
    "X": X,
    "Y": Y
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 0, dtype family float, shape () — shape () 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
mmd_nca_loss Ran
ran on a synthesized input
dhesenkamp/attentive-lstm/loss.py
code served (permissive licence) · get_code("0cbbf3782585a4f8")
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 EagerTensor, ndim 0, dtype family float, shape () 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create small sample embeddings as TensorFlow tensors
# Each embedding has dimension 4, we'll create 3 samples (anchor, positive, negative)
anchor = tf.constant([[0.1, 0.2, 0.3, 0.4]], dtype=tf.float32)
positive = tf.constant([[0.15, 0.25, 0.35, 0.45]], dtype=tf.float32)
negative_1 = tf.constant([[0.5, 0.6, 0.7, 0.8]], dtype=tf.float32)
negative_2 = tf.constant([[0.9, 1.0, 1.1, 1.2]], dtype=tf.float32)

# Create input list with anchor, positive, and negative embeddings
# Format: [anchor, positive, negative_1, negative_2, ...]
input_embeddings = [anchor, positive, negative_1, negative_2]

ARGS = {
    'input': input_embeddings
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 0, dtype family float, shape () — shape () 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
normalize_data Ran
ran on a synthesized input
dhesenkamp/attentive-lstm/preprocessing.py
code served (permissive licence) · get_code("f05297cf22e98849")
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 list, ndim 2, dtype family float; 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
from sklearn.preprocessing import minmax_scale

torch.manual_seed(0)

# The function expects data to be an iterable of sequences
# Each sequence will be passed to minmax_scale, which expects array-like input
# We'll create a list of numpy arrays (sequences)

data = [
    np.array([1.0, 2.0, 3.0, 4.0]),
    np.array([5.0, 6.0, 7.0, 8.0]),
    np.array([0.5, 1.5, 2.5, 3.5])
]

ARGS = {
    "data": data
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 2, dtype family float — a list 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

Also present in other papers' code

Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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 8 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

Effectively measuring the similarity between two human motions is necessary for several computer vision tasks such as gait analysis, person identi- fication and action retrieval. Nevertheless, we believe that traditional approaches such as L2 distance or Dynamic Time Warping based on hand-crafted local pose metrics fail to appropriately capture the semantic relationship across motions and, as such, are not suitable for being employed as metrics within these tasks. This work addresses this limitation by means of a triplet-based deep metric learning specifically tailored to deal with human motion data, in particular with the prob- lem of varying input size and computationally expensive hard negative mining due to motion pair alignment. Specifically, we propose (1) a novel metric learn- ing objective based on a triplet architecture and Maximum Mean Discrepancy; as well as, (2) a novel deep architecture based on attentive recurrent neural networks. One benefit of our objective function is that it enforces a better separation within the learned embedding space of the different motion categories by means of the associated distribution moments. At the same time, our attentive recurrent neural network allows processing varying input sizes to a fixed size of embedding while learning to focus on those motion parts that are semantically distinctive. Our ex- periments on two different datasets demonstrate significant improvements over conventional human motion metrics.

For agents

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

get_harvested_code_for_paper("1807.11176")
get_code_for_paper("1807.11176")
have("1807.11176")

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

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

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

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

Connect an agent — have() is free.