SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1812.02288 · 2018

Adversarially Learned Anomaly Detection

arXiv · PDF · Open in the Atlas

Code that ran

16 of 37 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 15 have no contract verdict; 1 failure of our instrument; 21 no recorded run), measured 2026-11-23; 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/1812.02288.json · badge: /api/ran/1812.02288.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
houssamzenati/Efficient-GAN-Anomaly-Detection canonical (classifier label)
classifier basis: census
6 ran · 6 no recorded run
houssamzenati/Adversarially-Learned-Anomaly-Detection canonical (classifier label)
classifier basis: census
3 ran · 7 no recorded run
zahradehghanian97/rcalad community (classifier label)
classifier basis not recorded on the link
7 ran · 8 no recorded run
FunctionStatusWhere it lives
UnPooling2x2ZeroFilled Ran
ran on a synthesized input
houssamzenati/Adversarially-Learned-Anomaly-Detection/dsebm/arrhythmia_utilities.py
code served (permissive licence) · get_code("16c98f78677d3622")
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 SymbolicTensor. 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 tensorflow as tf

# Create a small test tensor with shape [batch, height, width, channels]
# Using distinct sizes: batch=2, height=4, width=3, channels=5
x = tf.constant([
    [
        [[1.0, 2.0, 3.0, 4.0, 5.0], [1.5, 2.5, 3.5, 4.5, 5.5], [1.2, 2.2, 3.2, 4.2, 5.2]],
        [[1.1, 2.1, 3.1, 4.1, 5.1], [1.3, 2.3, 3.3, 4.3, 5.3], [1.4, 2.4, 3.4, 4.4, 5.4]],
        [[1.6, 2.6, 3.6, 4.6, 5.6], [1.7, 2.7, 3.7, 4.7, 5.7], [1.8, 2.8, 3.8, 4.8, 5.8]],
        [[1.9, 2.9, 3.9, 4.9, 5.9], [2.0, 3.0, 4.0, 5.0, 6.0], [2.1, 3.1, 4.1, 5.1, 6.1]],
    ],
    [
        [[0.1, 0.2, 0.3, 0.4, 0.5], [0.15, 0.25, 0.35, 0.45, 0.55], [0.12, 0.22, 0.32, 0.42, 0.52]],
        [[0.11, 0.21, 0.31, 0.41, 0.51], [0.13, 0.23, 0.33, 0.43, 0.53], [0.14, 0.24, 0.34, 0.44, 0.54]],
        [[0.16, 0.26, 0.36, 0.46, 0.56], [0.17, 0.27, 0.37, 0.47, 0.57], [0.18, 0.28, 0.38, 0.48, 0.58]],
        [[0.19, 0.29, 0.39, 0.49, 0.59], [0.2, 0.3, 0.4, 0.5, 0.6], [0.21, 0.31, 0.41, 0.51, 0.61]],
    ]
], dtype=tf.float32)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is 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
adapt_labels Ran
ran on a synthesized input
houssamzenati/Efficient-GAN-Anomaly-Detection/utils/adapt_data.py
code served (permissive licence) · get_code("ece5146bbcad537c")
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 ndarray, ndim 1, dtype family int, shape (6,) 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 numpy as np

torch.manual_seed(0)

# Analyze the function:
# - true_labels: used with indexing (true_labels == label, true_labels != label)
#   and .shape[0], so it needs to be a numpy array or torch tensor
# - label: an int used for comparison
# The function does boolean indexing and assignment, so numpy array is most appropriate

true_labels = np.array([0, 1, 2, 1, 0, 2], dtype=np.int32)
label = 1

ARGS = {
    "true_labels": true_labels,
    "label": label
}
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 ndarray, ndim 1, dtype family int, shape (6,) — shape (6,) 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
adapt_labels_outlier_task Ran
ran on a synthesized input
zahradehghanian97/rcalad/utils/adapt_data.py
code served (permissive licence) · get_code("8e7d47fb8107c08b")
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 ndarray, ndim 1, dtype family int, shape (6,) 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 numpy as np

torch.manual_seed(0)

# The function expects true_labels to be a numpy array or tensor-like object
# that supports indexing with boolean masks and shape attribute
# It also expects a label parameter that is an int

# Create a small numpy array with mixed labels
true_labels = np.array([0, 0, 1, 1, 2, 2], dtype=np.int64)

# The label parameter is an int representing which label is considered inlier
label = 1

ARGS = {
    "true_labels": true_labels,
    "label": label,
}
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 ndarray, ndim 1, dtype family int, shape (6,) — shape (6,) 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
batch_fill Ran
ran on a synthesized input
zahradehghanian97/rcalad/utils/adapt_data.py
code served (permissive licence) · get_code("944987fbbb730364")
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. 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 numpy as np

# Create a small test array with shape (10, 4, 3)
# This represents 10 samples, each with shape (4, 3)
testx = np.random.randn(10, 4, 3)

# Set batch_size to 3
# This will create nr_batches_test = 3, with the last partial batch having 1 sample
batch_size = 3

ARGS = {
    "testx": testx,
    "batch_size": batch_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
create_logdir Ran
ran on a synthesized input
houssamzenati/Efficient-GAN-Anomaly-Detection/gan/run_kdd.py
code served (permissive licence) · get_code("48f5e5db2febd2cd")
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 str. 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

ARGS = {
    'method': 'discriminator_loss',
    'weight': 0.5,
    'rd': 42
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
create_logdir Ran
ran on a synthesized input
houssamzenati/Efficient-GAN-Anomaly-Detection/gan/run_mnist.py
code served (permissive licence) · get_code("63b598466b45fd41")
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 str. 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

torch.manual_seed(0)

ARGS = {
    'method': 'gan',
    'weight': 'weights_v1',
    'label': 'experiment_001',
    'rd': 'run_42'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
create_logdir Ran
ran on a synthesized input
houssamzenati/Efficient-GAN-Anomaly-Detection/bigan/run_kdd.py
code served (permissive licence) · get_code("141272b50496ac09")
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 str. 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 numpy as np

def create_logdir(method, weight, rd):
    """ Directory to save training logs, weights, biases, etc."""
    return 'bigan/train_logs/kdd/{}/{}/{}'.format(weight, method, rd)

ARGS = {
    'method': 'gan',
    'weight': 'standard',
    'rd': 'run_001'
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
do_prc Ran
ran on a synthesized input
houssamzenati/Efficient-GAN-Anomaly-Detection/utils/evaluations.py
code served (permissive licence) · get_code("40cf96e563e1b70c")
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 float, 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 numpy as np
import matplotlib
matplotlib.use('Agg')  # Use non-interactive backend

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

# Create sample scores and true labels
scores = [0.1, 0.4, 0.35, 0.8, 0.9, 0.2, 0.7, 0.6]
true_labels = [0, 0, 0, 1, 1, 0, 1, 1]

# Define ARGS dictionary with all parameters
ARGS = {
    'scores': scores,
    'true_labels': true_labels,
    'file_name': 'test_prc',
    'directory': 'results',
    'plot': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
do_roc Ran
ran on a synthesized input
zahradehghanian97/rcalad/utils/evaluations.py
code served (permissive licence) · get_code("37571eecf35d57d3")
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 float, 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 numpy as np
from sklearn.metrics import roc_curve, auc

# Generate synthetic scores and labels for ROC curve testing
np.random.seed(0)

# Create scores: continuous values between 0 and 1 representing model confidence
scores = np.random.rand(20).tolist()

# Create binary true labels: 0 or 1
true_labels = np.random.randint(0, 2, 20).tolist()

# Define all arguments for the function
ARGS = {
    'scores': scores,
    'true_labels': true_labels,
    'file_name': 'test_',
    'directory': '/tmp/',
    'plot': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
get_getter Ran
ran; our contract draft was wrong, not the code
houssamzenati/Efficient-GAN-Anomaly-Detection/gan/run_kdd.py
pointer only (licence: MIT); the stored copy get_code serves, from bruno-31/gan-manifold-reg, is pointer only (licence: NONE) · get_code("10682b8fe32fba68")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from bruno-31/gan-manifold-reg, 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.

get_percentile Ran
ran on a synthesized input
zahradehghanian97/rcalad/utils/evaluations.py
code served (permissive licence) · get_code("84a71fe751765a4f")
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 float64, ndim 0, 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 numpy as np

# Create small sample scores array
scores = np.array([1.2, 2.3, 3.4, 4.5, 5.6, 6.7, 7.8, 8.9, 9.1, 10.2])

# Test with different datasets
ARGS = {
    'scores': scores,
    'dataset': 'kdd'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
leakyReLu Ran
ran on a synthesized input
houssamzenati/Adversarially-Learned-Anomaly-Detection/alad/arrhythmia_utilities.py
code served (permissive licence) · get_code("9ab9a03c8845e1b6")
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 2, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np

# Create a small tensor for input
# Using shape (2, 4) - batch size 2, dimension 4
x_value = np.array([[-0.5, 0.3, -0.1, 0.8],
                     [0.2, -0.6, 0.4, -0.9]], dtype=np.float32)
x = tf.constant(x_value)

ARGS = {
    'x': x,
    'alpha': 0.2,
    'name': None
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
leakyReLu Ran
ran on a synthesized input
zahradehghanian97/rcalad/model/arrhythmia_utilities.py
code served (permissive licence) · get_code("c791a8b03c10d46f")
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 SymbolicTensor. 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 tensorflow.compat.v1 as tf
import numpy as np

# Disable eager execution for TensorFlow v1 compatibility
tf.disable_eager_execution()

# Create a small tensor input
input_tensor = tf.constant([[-1.0, -0.5, 0.5, 1.0],
                            [-2.0, 0.0, 1.5, 2.0]], dtype=tf.float32)

ARGS = {
    "x": input_tensor,
    "alpha": 0.2,
    "name": None
}
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 SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is 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
predict Ran
ran on a synthesized input
zahradehghanian97/rcalad/utils/evaluations.py
code served (permissive licence) · get_code("3edf8bb21f5c9b3f")
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 (2, 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 numpy as np

torch.manual_seed(0)

# The function predict(scores, threshold) compares scores >= threshold
# scores should be a tensor or array-like
# threshold should be a numeric value

scores = torch.randn(2, 4)
threshold = 0.5

ARGS = {
    "scores": scores,
    "threshold": threshold
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 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
spectral_norm Ran
ran on a synthesized input
zahradehghanian97/rcalad/utils/sn.py
code served (permissive licence) · get_code("dcc62ffe48727dfa")
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 SymbolicTensor. 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 tensorflow.compat.v1 as tf

# Disable eager execution for TF1 compatibility
tf.disable_eager_execution()

# Create a simple weight tensor
# The function expects w to have a shape attribute with as_list() method
# It reshapes to [-1, w_shape[-1]], so we need at least 2D
# Let's use shape [2, 3, 4] - batch-like dims then feature dim
w = tf.constant([
    [[1.0, 2.0, 3.0, 4.0],
     [5.0, 6.0, 7.0, 8.0],
     [9.0, 10.0, 11.0, 12.0]],
    [[13.0, 14.0, 15.0, 16.0],
     [17.0, 18.0, 19.0, 20.0],
     [21.0, 22.0, 23.0, 24.0]]
], dtype=tf.float32)

ARGS = {
    'w': w,
    'iteration': 1,
    'eps': 1e-12
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor output has no array shape of its own; none is 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
tricky_multiply Ran
ran on a synthesized input
houssamzenati/Adversarially-Learned-Anomaly-Detection/dagmm/gmm_utils.py
code served (permissive licence) · get_code("ab2ecca101040c0f")
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 2, dtype family float, shape (2, 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 tensorflow as tf
import numpy as np

# Create small test tensors
# x should be a 2D tensor since we're transposing it
# The function does: tf.transpose(tf.transpose(x) * y)
# tf.transpose(x) will flip dimensions, so if x is (2, 4), transpose is (4, 2)
# Then we multiply by y, so y should be compatible with (4, 2)
# Result will be transposed back to (2, 4)

x = tf.constant([[1.0, 2.0, 3.0, 4.0],
                  [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)  # shape (2, 4)

y = tf.constant([[1.0, 2.0],
                  [3.0, 4.0],
                  [5.0, 6.0],
                  [7.0, 8.0]], dtype=tf.float32)  # shape (4, 2)

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 2, dtype family float, shape (2, 4) — shape (2, 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
compute_energy_and_penalty Not yet run
unverified (harvested, no recorded run)
houssamzenati/Adversarially-Learned-Anomaly-Detection/dagmm/gmm_utils.py
code served (permissive licence) · get_code("0a4c5dfb27ad5613")
How it ran

no invocation recorded.

conv2d Not yet run
unverified (harvested, no recorded run)
zahradehghanian97/rcalad/utils/sn.py
code served (permissive licence) · get_code("fa9320bc97ab15e6")
How it ran

no invocation recorded.

decoder Not yet run
unverified (harvested, no recorded run)
houssamzenati/Adversarially-Learned-Anomaly-Detection/alad/cifar10_utilities.py
code served (permissive licence) · get_code("588ecf2ffb0e1477")
How it ran

no invocation recorded.

decoder Not yet run
unverified (harvested, no recorded run)
houssamzenati/Efficient-GAN-Anomaly-Detection/bigan/mnist_utilities.py
code served (permissive licence) · get_code("0058066f81993565")
How it ran

no invocation recorded.

decoder Not yet run
unverified (harvested, no recorded run)
zahradehghanian97/rcalad/model/arrhythmia_utilities.py
code served (permissive licence) · get_code("1b36ea33f85ba3fe")
How it ran

no invocation recorded.

decoder Not yet run
unverified (harvested, no recorded run)
zahradehghanian97/rcalad/model/cifar10_utilities.py
code served (permissive licence) · get_code("c1811109c9446dfc")
How it ran

no invocation recorded.

decoder Not yet run
unverified (harvested, no recorded run)
zahradehghanian97/rcalad/model/kdd_utilities.py
code served (permissive licence) · get_code("8a7f584ff668f466")
How it ran

no invocation recorded.

dense Not yet run
unverified (harvested, no recorded run)
zahradehghanian97/rcalad/utils/sn.py
code served (permissive licence) · get_code("c49a28c165a5fb0d")
How it ran

no invocation recorded.

discriminator Not yet run
unverified (harvested, no recorded run)
houssamzenati/Adversarially-Learned-Anomaly-Detection/anogan/cifar10_utilities.py
code served (permissive licence) · get_code("290d624498e73e32")
How it ran

no invocation recorded.

discriminator Not yet run
unverified (harvested, no recorded run)
houssamzenati/Efficient-GAN-Anomaly-Detection/gan/mnist_utilities.py
code served (permissive licence) · get_code("df492502964e9039")
How it ran

no invocation recorded.

discriminator Not yet run
unverified (harvested, no recorded run)
houssamzenati/Efficient-GAN-Anomaly-Detection/bigan/mnist_utilities.py
code served (permissive licence) · get_code("245a2a952f2d0e8d")
How it ran

no invocation recorded.

encoder Not yet run
unverified (harvested, no recorded run)
houssamzenati/Efficient-GAN-Anomaly-Detection/bigan/mnist_utilities.py
code served (permissive licence) · get_code("2d5132e520862f91")
How it ran

no invocation recorded.

encoder Not yet run
unverified (harvested, no recorded run)
zahradehghanian97/rcalad/model/arrhythmia_utilities.py
code served (permissive licence) · get_code("c1248523a95b5975")
How it ran

no invocation recorded.

encoder Not yet run
unverified (harvested, no recorded run)
zahradehghanian97/rcalad/model/cifar10_utilities.py
code served (permissive licence) · get_code("8dbc81f0f8961307")
How it ran

no invocation recorded.

encoder Not yet run
unverified (harvested, no recorded run)
zahradehghanian97/rcalad/model/kdd_utilities.py
code served (permissive licence) · get_code("27e033164ba1f735")
How it ran

no invocation recorded.

feature_extractor Not yet run
unverified (harvested, no recorded run)
houssamzenati/Adversarially-Learned-Anomaly-Detection/dagmm/arrhythmia_utilities.py
code served (permissive licence) · get_code("22140fa826526e60")
How it ran

no invocation recorded.

feature_extractor Not yet run
unverified (harvested, no recorded run)
houssamzenati/Adversarially-Learned-Anomaly-Detection/dagmm/kdd_utilities.py
code served (permissive licence) · get_code("6a940e179e24a433")
How it ran

no invocation recorded.

generator Not yet run
unverified (harvested, no recorded run)
houssamzenati/Adversarially-Learned-Anomaly-Detection/anogan/cifar10_utilities.py
code served (permissive licence) · get_code("0364d049bacaa4ba")
How it ran

no invocation recorded.

generator Not yet run
unverified (harvested, no recorded run)
houssamzenati/Efficient-GAN-Anomaly-Detection/gan/mnist_utilities.py
code served (permissive licence) · get_code("c8be7d36155861a7")
How it ran

no invocation recorded.

leakyReLu Not yet run
unverified (harvested, no recorded run)
houssamzenati/Efficient-GAN-Anomaly-Detection/gan/kdd_utilities.py
code served (permissive licence) · get_code("0068a65e1a1fd1cc")
How it ran

no invocation recorded.

tricky_divide Not yet run
unverified (harvested, no recorded run)
houssamzenati/Adversarially-Learned-Anomaly-Detection/dagmm/gmm_utils.py
code served (permissive licence) · get_code("e7c882e9489249ef")
How it ran

no invocation recorded.

Also present in other papers' code

Of 37 samples lifted from this paper's linked repositories, 37 carry a function identity and 0 do not. Of the 35 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 31 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
get_getter 2 other papers
2 dated earlier
1802.06222 (2018-02)
Efficient GAN-Based Anomaly Detection
1807.04307 (2018-07)
Manifold regularization with GANs for semi-supervised learning
adapt_labels 1 other paper
1 dated earlier
1802.06222 (2018-02)
Efficient GAN-Based Anomaly Detection
create_logdir 1 other paper
1 dated earlier
1802.06222 (2018-02)
Efficient GAN-Based Anomaly Detection
do_prc 1 other paper
1 dated earlier
1802.06222 (2018-02)
Efficient GAN-Based Anomaly Detection

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

Repositories linked to this paper

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

Abstract

Anomaly detection is a significant and hence well-studied problem. However, developing effective anomaly detection methods for complex and high-dimensional data remains a challenge. As Generative Adversarial Networks (GANs) are able to model the complex high-dimensional distributions of real-world data, they offer a promising approach to address this challenge. In this work, we propose an anomaly detection method, Adversarially Learned Anomaly Detection (ALAD) based on bi-directional GANs, that derives adversarially learned features for the anomaly detection task. ALAD then uses reconstruction errors based on these adversarially learned features to determine if a data sample is anomalous. ALAD builds on recent advances to ensure data-space and latent-space cycle-consistencies and stabilize GAN training, which results in significantly improved anomaly detection performance. ALAD achieves state-of-the-art performance on a range of image and tabular datasets while being several hundred-fold faster at test time than the only published GAN-based method.

For agents

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

get_harvested_code_for_paper("1812.02288")
get_code_for_paper("1812.02288")
have("1812.02288")

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

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

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

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

Connect an agent — have() is free.