SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2106.02734 · NeurIPS · 2021

Revisiting Hilbert-Schmidt Information Bottleneck for Adversarial Robustness

Zifeng Wang, Tong Jian, Aria Masoomi, Stratis Ioannidis, Jennifer Dy

arXiv · PDF · Open in the Atlas

Code that ran

7 of 16 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; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 5 failures of our instrument; 9 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/2106.02734.json · badge: /api/ran/2106.02734.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
neu-spiral/hbar canonical (classifier label)
classifier basis: census
7 ran · 9 no recorded run
FunctionStatusWhere it lives
conv_layer Ran
ran; our contract draft was wrong, not the code
neu-spiral/hbar/source/hbar/model/vgg.py
code served (permissive licence) · get_code("4aaf1bfa9b5dd486")
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 Sequential. 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

torch.manual_seed(0)

ARGS = {
    "chann_in": 3,
    "chann_out": 16,
    "k_size": 3,
    "p_size": 1
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
distmat Ran
ran, honoured the contract we drafted
neu-spiral/hbar/source/hbar/math/hsic.py
pointer only (licence: MIT); the stored copy get_code serves, from sjyucnel/cauchy-schwarz-information-bottleneck, is pointer only (licence: NONE) · get_code("ca565da6831e8ade")
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 sjyucnel/cauchy-schwarz-information-bottleneck, 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.

kernelmat Ran
ran; our contract draft was wrong, not the code
neu-spiral/hbar/source/hbar/math/hsic.py
code served (permissive licence) · get_code("882769c04ee627eb")
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, 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small tensor input
# The function expects a 2D tensor of shape (batch_size, features)
X = torch.randn(2, 4)  # 2 samples, 4 features

# Test with sigma=None (will trigger sigma_estimation)
sigma = None

# Test with k_type='gaussian'
k_type = 'gaussian'

ARGS = {
    'X': X,
    'sigma': sigma,
    'k_type': k_type
}
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, 2) — shape (2, 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
load_yaml Ran
ran on a synthesized input
neu-spiral/hbar/source/hbar/utils/io.py
code served (permissive licence) · get_code("8ac2b5acb8519f95")
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 dict. 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 yaml
import tempfile
import os

# Create a temporary YAML file for testing
temp_dir = tempfile.mkdtemp()
yaml_filepath = os.path.join(temp_dir, "test.yaml")

# Write a simple valid YAML file
yaml_content = """
key1: value1
key2: 
  nested_key: nested_value
key3:
  - item1
  - item2
"""

with open(yaml_filepath, 'w') as f:
    f.write(yaml_content)

ARGS = {
    'filepath': yaml_filepath
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
sigma_estimation Ran
ran; our contract draft was wrong, not the code
neu-spiral/hbar/source/hbar/math/hsic.py
code served (permissive licence) · get_code("9cb35dd6de9569b7")
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) and returned float32, 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 torch
import numpy as np

torch.manual_seed(0)

# Create small sample tensors
# X: shape (2, 4) - 2 samples, 4 dimensions
X = torch.randn(2, 4)

# Y: shape (3, 4) - 3 samples, 4 dimensions (different from X to make shapes distinct)
Y = torch.randn(3, 4)

ARGS = {
    "X": X,
    "Y": Y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float32, 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
vgg_conv_block Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
neu-spiral/hbar/source/hbar/model/vgg.py
code served (permissive licence) · get_code("a912b0f0007d76e5")
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 Sequential. 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

torch.manual_seed(0)

ARGS = {
    "in_list": [3, 64, 128],
    "out_list": [64, 128, 256],
    "k_list": [3, 3, 3],
    "p_list": [1, 1, 1],
    "pooling_k": 2,
    "pooling_s": 2,
}
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 Sequential — a Sequential 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
vgg_fc_layer Ran
ran; our contract draft was wrong, not the code
neu-spiral/hbar/source/hbar/model/vgg.py
code served (permissive licence) · get_code("d28a2414aed5b400")
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 Sequential. 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

torch.manual_seed(0)

ARGS = {
    "size_in": 64,
    "size_out": 128,
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
activations_extraction Not yet run
unverified (harvested, no recorded run)
neu-spiral/hbar/source/hbar/core/train_misc.py
code served (permissive licence) · get_code("36113cd19ffcf229")
How it ran

no invocation recorded.

get_dataset_from_code Not yet run
unverified (harvested, no recorded run)
neu-spiral/hbar/source/hbar/utils/dataset.py
code served (permissive licence) · get_code("7264e73368f79bbd")
How it ran

no invocation recorded.

get_fasionmnist_data Not yet run
unverified (harvested, no recorded run)
neu-spiral/hbar/source/hbar/utils/dataset.py
code served (permissive licence) · get_code("aa1883dd6b95b8b2")
How it ran

no invocation recorded.

get_mnist_data Not yet run
unverified (harvested, no recorded run)
neu-spiral/hbar/source/hbar/utils/dataset.py
code served (permissive licence) · get_code("2485b6acec0a0d16")
How it ran

no invocation recorded.

hsic_objective Not yet run
unverified (harvested, no recorded run)
neu-spiral/hbar/source/hbar/core/train_misc.py
code served (permissive licence) · get_code("bfffabcb63821aaf")
How it ran

no invocation recorded.

load_logs Not yet run
unverified (harvested, no recorded run)
neu-spiral/hbar/source/hbar/utils/io.py
code served (permissive licence) · get_code("355b1a5db8ec0a0d")
How it ran

no invocation recorded.

load_model Not yet run
unverified (harvested, no recorded run)
neu-spiral/hbar/source/hbar/utils/io.py
code served (permissive licence) · get_code("14ba3f43b8e423c3")
How it ran

no invocation recorded.

set_optimizer Not yet run
unverified (harvested, no recorded run)
neu-spiral/hbar/source/hbar/core/train_misc.py
code served (permissive licence) · get_code("d7cb7faa3d88e623")
How it ran

no invocation recorded.

training_standard Not yet run
unverified (harvested, no recorded run)
neu-spiral/hbar/source/hbar/core/engine.py
code served (permissive licence) · get_code("96487f153da514e6")
How it ran

no invocation recorded.

Also present in other papers' code

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

FunctionAlso present inEarliest-datedOthers named
sigma_estimation 11 other papers
1 dated earlier, 1 the same month, 9 later
1908.01580 (2019-08)
The HSIC Bottleneck: Deep Learning without Back-Propagation
2106.01939 (2021-06)
Causal Effect Inference for Structured Treatments
2210.04311 (2022-10)
Pruning Adversarially Robust Neural Networks without Adversarial Examples
and 8 more not named here
distmat 8 other papers
1 dated earlier, 1 the same month, 6 later · 1 only as an assembly brick
1908.01580 (2019-08)
The HSIC Bottleneck: Deep Learning without Back-Propagation
2106.01939 (2021-06)
Causal Effect Inference for Structured Treatments
2210.04311 (2022-10)
Pruning Adversarially Robust Neural Networks without Adversarial Examples
and 5 more not named here
kernelmat 3 other papers
3 later
2210.04311 (2022-10)
Pruning Adversarially Robust Neural Networks without Adversarial Examples
2510.20627 (2025-10)
H-SPLID: HSIC-based Saliency Preserving Latent Information Decomposition
2606.19679 (2026-06)
LOKI: Memory-Free Null-Space Constrained Lifelong Knowledge Editing
activations_extraction 2 other papers
1 dated earlier, 1 later
1908.01580 (2019-08)
The HSIC Bottleneck: Deep Learning without Back-Propagation
2210.04311 (2022-10)
Pruning Adversarially Robust Neural Networks without Adversarial Examples
conv_layer 2 other papers
2 later
2210.04311 (2022-10)
Pruning Adversarially Robust Neural Networks without Adversarial Examples
2510.07664 (2025-10)
FedQS: Optimizing Gradient and Model Aggregation for Semi-Asynchronous Federated Learning
vgg_conv_block 2 other papers
2 later
2210.04311 (2022-10)
Pruning Adversarially Robust Neural Networks without Adversarial Examples
2510.07664 (2025-10)
FedQS: Optimizing Gradient and Model Aggregation for Semi-Asynchronous Federated Learning
vgg_fc_layer 2 other papers
2 later
2210.04311 (2022-10)
Pruning Adversarially Robust Neural Networks without Adversarial Examples
2510.07664 (2025-10)
FedQS: Optimizing Gradient and Model Aggregation for Semi-Asynchronous Federated Learning
hsic_objective 1 other paper
1 later
2210.04311 (2022-10)
Pruning Adversarially Robust Neural Networks without Adversarial Examples

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

We investigate the HSIC (Hilbert-Schmidt independence criterion) bottleneck as a regularizer for learning an adversarially robust deep neural network classifier. In addition to the usual cross-entropy loss, we add regularization terms for every intermediate layer to ensure that the latent representations retain useful information for output prediction while reducing redundant information. We show that the HSIC bottleneck enhances robustness to adversarial attacks both theoretically and experimentally. In particular, we prove that the HSIC bottleneck regularizer reduces the sensitivity of the classifier to adversarial examples. Our experiments on multiple benchmark datasets and architectures demonstrate that incorporating an HSIC bottleneck regularizer attains competitive natural accuracy and improves adversarial robustness, both with and without adversarial examples during training. Our code and adversarially robust models are publicly available. 2 * Equal contribution.

For agents

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

get_harvested_code_for_paper("2106.02734")
get_code_for_paper("2106.02734")
have("2106.02734")

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

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

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

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

Connect an agent — have() is free.