SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1906.04569 · 2019

DropConnect Is Effective in Modeling Uncertainty of Bayesian Deep Networks

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 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 4 have no contract verdict; 0 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/1906.04569.json · badge: /api/ran/1906.04569.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
hula-ai/mc_dropconnect community (classifier label)
classifier basis not recorded on the link
4 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_uncertainty_metrics Ran
ran on a synthesized input
hula-ai/mc_dropconnect/classification/models/base_model.py
code served (permissive licence) · get_code("147b7cec12af6e84")
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 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 numpy as np

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

# Create small sample data
batch_size = 2
num_classes = 4

# y_ohe: one-hot encoded ground truth labels (batch_size, num_classes)
y_ohe = np.zeros((batch_size, num_classes))
y_ohe[0, 1] = 1  # First sample is class 1
y_ohe[1, 3] = 1  # Second sample is class 3

# y_pred_ohe: one-hot encoded predictions (batch_size, num_classes)
y_pred_ohe = np.zeros((batch_size, num_classes))
y_pred_ohe[0, 1] = 1  # First prediction is class 1 (correct)
y_pred_ohe[1, 2] = 1  # Second prediction is class 2 (incorrect, true is 3)

# y_var: uncertainty/variance values (batch_size,)
y_var = np.array([0.2, 0.8])

# desired_threshold: threshold in range [0, 1] for uncertainty
desired_threshold = 0.5

ARGS = {
    'y_ohe': y_ohe,
    'y_pred_ohe': y_pred_ohe,
    'y_var': y_var,
    'desired_threshold': desired_threshold,
}
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, ndim 1, dtype family float — 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
get_num_channels Ran
ran on a synthesized input
hula-ai/mc_dropconnect/classification/ops.py
code served (permissive licence) · get_code("2b1d23a5e31f6d98")
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 int, ndim 0, dtype family int, 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 torch
import tensorflow as tf
import numpy as np

torch.manual_seed(0)

# The function calls x.get_shape().as_list()[-1]
# This is TensorFlow syntax, so x should be a TensorFlow tensor
x = tf.constant(np.random.randn(2, 4, 3).astype(np.float32))

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, 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
mutual_info Ran
ran on a synthesized input
hula-ai/mc_dropconnect/classification/models/base_model.py
code served (permissive licence) · get_code("b1acaf534318814f")
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 float, shape (2,) 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

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

# Create small valid arguments for mutual_info function
batch_size = 2
num_cls = 4

# mean_prob: average MC probabilities of shape [batch_size, num_cls]
# Must be valid probabilities (sum to 1 along classes)
mean_prob = np.array([
    [0.4, 0.3, 0.2, 0.1],
    [0.25, 0.25, 0.25, 0.25]
], dtype=np.float32)

# mc_prob: List of MC probabilities, each of shape [batch_size, num_cls]
# Create 3 MC simulation samples
mc_simulations = 3
mc_prob = []
for _ in range(mc_simulations):
    prob_sample = np.random.dirichlet([1, 1, 1, 1], size=batch_size).astype(np.float32)
    mc_prob.append(prob_sample)

ARGS = {
    "mean_prob": mean_prob,
    "mc_prob": mc_prob
}
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 ndarray, ndim 1, dtype family float, shape (2,) — shape (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
predictive_entropy Ran
ran on a synthesized input
hula-ai/mc_dropconnect/classification/models/base_model.py
code served (permissive licence) · get_code("627515adfa6535c2")
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 float, shape (2,) 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

# Create a small batch of probability distributions
batch_size = 2
num_classes = 4

# Generate valid probability distributions (sum to 1 along class dimension)
np.random.seed(0)
raw_probs = np.random.dirichlet(np.ones(num_classes), size=batch_size)
prob = raw_probs.astype(np.float32)

ARGS = {
    "prob": prob
}
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 ndarray, ndim 1, dtype family float, shape (2,) — shape (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
bias_variable Not yet run
unverified (harvested, no recorded run)
hula-ai/mc_dropconnect/classification/ops.py
code served (permissive licence) · get_code("9fdd8216a2990a2b")
How it ran

no invocation recorded.

cross_entropy Not yet run
unverified (harvested, no recorded run)
hula-ai/mc_dropconnect/classification/utils/loss_utils.py
code served (permissive licence) · get_code("44ac9d5605856657")
How it ran

no invocation recorded.

weight_variable Not yet run
unverified (harvested, no recorded run)
hula-ai/mc_dropconnect/classification/ops.py
code served (permissive licence) · get_code("bdbb15cd5c6c501a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 1 later) and 6 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
bias_variable 3 other papers
2 dated earlier, 1 later
1607.07539 (2016-07)
Semantic Image Inpainting with Deep Generative Models
1809.00888 (2018-09)
MesoNet: a Compact Facial Video Forgery Detection Network
2008.05770 (2020-08)
Weakly Supervised Generative Network for Multiple 3D Human Pose Hypotheses

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

Deep neural networks (DNNs) have achieved state-of-the-art performances in many important domains, including medical diagnosis, security, and autonomous driving. In these domains where safety is highly critical, an erroneous decision can result in serious consequences. While a perfect prediction accuracy is not always achievable, recent work on Bayesian deep networks shows that it is possible to know when DNNs are more likely to make mistakes. Knowing what DNNs do not know is desirable to increase the safety of deep learning technology in sensitive applications. Bayesian neural networks attempt to address this challenge. However, traditional approaches are computationally intractable and do not scale well to large, complex neural network architectures. In this paper, we develop a theoretical framework to approximate Bayesian inference for DNNs by imposing a Bernoulli distribution on the model weights. This method, called MC-DropConnect, gives us a tool to represent the model uncertainty with little change in the overall model structure or computational cost. We extensively validate the proposed algorithm on multiple network architectures and datasets for classification and semantic segmentation tasks. We also propose new metrics to quantify the uncertainty estimates. This enables an objective comparison between MC-DropConnect and prior approaches. Our empirical results demonstrate that the proposed framework yields significant improvement in both prediction accuracy and uncertainty estimation quality compared to the state of the art.

For agents

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

get_harvested_code_for_paper("1906.04569")
get_code_for_paper("1906.04569")
have("1906.04569")

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

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

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

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

Connect an agent — have() is free.