SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2208.07049 · 2022

Self-Supervised Vision Transformers for Malware Detection

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; 2 honoured the contract we drafted, 2 violated it and 3 have no contract verdict; 1 failure 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/2208.07049.json · badge: /api/ran/2208.07049.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
sachith500/sherlock canonical (classifier label)
classifier basis not recorded on the link
8 ran · 0 no recorded run
FunctionStatusWhere it lives
build_transform Ran
ran on a synthesized input
sachith500/sherlock/regenerate_experiment_results.py
code served (permissive licence) · get_code("0d3af604efbb5026")
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 Compose. 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
from timm.data.constants import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD, IMAGENET_INCEPTION_MEAN, IMAGENET_INCEPTION_STD

# Create a minimal args object that satisfies the function's needs
class Args:
    def __init__(self):
        self.input_size = 224
        self.imagenet_default_mean_and_std = True
        self.color_jitter = 0.4
        self.aa = 'rand-m9-mstd0.5'
        self.train_interpolation = 'bicubic'
        self.reprob = 0.25
        self.remode = 'pixel'
        self.recount = 1
        self.crop_pct = None

args_instance = Args()

ARGS = {
    "is_train": True,
    "args": args_instance
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
timm, torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose 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
cosine_scheduler Ran
ran, honoured the contract we drafted
sachith500/sherlock/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from boyazeng/understand_bias, is pointer only (licence: NONE) · get_code("b700fb0a3496b255")
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 boyazeng/understand_bias, 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_confusion_matrix_from_dict Ran
ran on a synthesized input
sachith500/sherlock/evaluation/utils/data_util.py
code served (permissive licence) · get_code("4af06072ea1852af")
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 2, dtype family float, shape (3, 3) 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

# Construct valid arguments for get_confusion_matrix_from_dict

# Create a sample data_dict with structure: {class_index: {predicted_class: count}}
data_dict = {
    "0": {"0": 8, "1": 2, "2": 0},
    "1": {"0": 1, "1": 7, "2": 2},
    "2": {"0": 0, "1": 1, "2": 9}
}

# Number of classes
no_of_classes = 3

# Class summary: total count of samples per class
class_summary = {
    "0": 10,
    "1": 10,
    "2": 10
}

ARGS = {
    "data_dict": data_dict,
    "no_of_classes": no_of_classes,
    "class_summary": class_summary
}
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 2, dtype family float, shape (3, 3) — shape (3, 3) 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_confusion_matrix_from_turple Ran
ran on a synthesized input
sachith500/sherlock/evaluation/utils/data_util.py
code served (permissive licence) · get_code("b9bd3f2cdde658e0")
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 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 numpy as np

# The function takes a tuple of (tp, fp, tn, fn) - true positives, false positives, true negatives, false negatives
# These are scalar numeric values representing counts from a confusion matrix

# Create realistic confusion matrix counts
tp = 85  # true positives
fp = 15  # false positives
tn = 80  # true negatives
fn = 20  # false negatives

data_turple = (tp, fp, tn, fn)

ARGS = {
    "data_turple": data_turple
}
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 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
get_sinusoid_encoding_table Ran
ran, honoured the contract we drafted
sachith500/sherlock/modeling_finetune.py
pointer only (licence: MIT); the stored copy get_code serves, from khu-vll/cast, is pointer only (licence: NOASSERTION) · get_code("9b2250a3d13ed688")
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 khu-vll/cast, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

has_file_allowed_extension Ran
ran, violated the contract we drafted
sachith500/sherlock/dataset_folder.py
pointer only (licence: MIT); the stored copy get_code serves, from dlyuangod/vit-1.58b, is pointer only (licence: NONE) · get_code("18ae3e6ef2cf02ec")
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 dlyuangod/vit-1.58b, 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.

is_image_file Ran
ran, violated the contract we drafted
sachith500/sherlock/dataset_folder.py
pointer only (licence: MIT); the stored copy get_code serves, from dlyuangod/vit-1.58b, is pointer only (licence: NONE) · get_code("8ac50ae8773b9431")
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 dlyuangod/vit-1.58b, 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.

make_dataset Ran
ran; our contract draft was wrong, not the code
sachith500/sherlock/dataset_folder.py
code served (permissive licence) · get_code("fb6aea1653b20bba")
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 os
import os.path
import tempfile
from typing import Tuple, Dict, Optional, Callable, List

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

# Create class subdirectories and some dummy files
class_names = ["cat", "dog"]
for class_name in class_names:
    class_dir = os.path.join(temp_dir, class_name)
    os.makedirs(class_dir, exist_ok=True)
    # Create some dummy files with various extensions
    for i in range(2):
        with open(os.path.join(class_dir, f"image_{i}.jpg"), "w") as f:
            f.write("dummy")
        with open(os.path.join(class_dir, f"image_{i}.png"), "w") as f:
            f.write("dummy")
        with open(os.path.join(class_dir, f"other_{i}.txt"), "w") as f:
            f.write("dummy")

# Define the arguments
directory = temp_dir
class_to_idx = {"cat": 0, "dog": 1}
extensions = (".jpg", ".png")
is_valid_file = None

ARGS = {
    "directory": directory,
    "class_to_idx": class_to_idx,
    "extensions": extensions,
    "is_valid_file": is_valid_file,
}
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 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, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 5 later) and 3 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
cosine_scheduler 26 other papers
2 dated earlier, 22 later, 2 same year, order not determinable
1905.02244 (2019-05)
Searching for MobileNetV3
136810051 (2022 (year only))
AMixer: Adaptive Weight Mixing for Self-Attention Free Vision Transformers
136860514 (2022 (year only))
SLIP: Self-supervision meets Language-Image Pre-training
and 23 more not named here
get_sinusoid_encoding_table 21 other papers
1 dated earlier, 20 later · 1 only as an assembly brick
2111.06377 (2021-11)
Masked Autoencoders Are Scalable Vision Learners
2302.14042 (2023-02)
Knowledge-enhanced Visual-Language Pre-training on Chest Radiology Images
2305.05665 (2023-05)
ImageBind: One Embedding Space To Bind Them All
and 18 more not named here
is_image_file 12 other papers
3 dated earlier, 9 later
2203.14415 (2022-03)
Mugs: A Multi-Granular Self-Supervised Learning Framework
2204.08381 (2022-04)
Multiple-environment Self-adaptive Network for Aerial-view Geo-localization
2205.03892 (2022-05)
ConvMAE: Masked Convolution Meets Masked Autoencoders
and 9 more not named here
has_file_allowed_extension 10 other papers
3 dated earlier, 7 later
2203.14415 (2022-03)
Mugs: A Multi-Granular Self-Supervised Learning Framework
2204.08381 (2022-04)
Multiple-environment Self-adaptive Network for Aerial-view Geo-localization
2205.03892 (2022-05)
ConvMAE: Masked Convolution Meets Masked Autoencoders
and 7 more not named here
make_dataset 6 other papers
1 dated earlier, 5 later
2205.03892 (2022-05)
ConvMAE: Masked Convolution Meets Masked Autoencoders
aaai_25604 (2023 (year only))
One-for-All: Proposal Masked Cross-Class Anomaly Detection
2305.00348 (2023-05)
Modality-invariant Visual Odometry for Embodied Vision
and 3 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-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

Malware detection plays a crucial role in cyber-security with the increase in malware growth and advancements in cyber-attacks. Previously unseen malware which is not determined by security vendors are often used in these attacks and it is becoming inevitable to find a solution that can self-learn from unlabeled sample data. This paper presents SHERLOCK, a self-supervision based deep learning model to detect malware based on the Vision Transformer (ViT) architecture. SHERLOCK is a novel malware detection method which learns unique features to differentiate malware from benign programs with the use of image-based binary representation. Experimental results using 1.2 million Android applications across a hierarchy of 47 types and 696 families, shows that self-supervised learning can achieve an accuracy of 97% for the binary classification of malware which is higher than existing state-of-the-art techniques. Our proposed model is also able to outperform state-of-the-art techniques for multi-class malware classification of types and family with macro-F1 score of .497 and .491 respectively.

For agents

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

get_harvested_code_for_paper("2208.07049")
get_code_for_paper("2208.07049")
have("2208.07049")

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

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

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

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

Connect an agent — have() is free.