Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Computer Vision

Multi-Level Malware Subfamily Attribution from Executable Images: What RGB and Attention Add

By Freedom251 Team · · 4 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Short answer: Deep-learning models can classify Windows executable files from images made from their bytes, and a single model can predict benign versus malicious status, malware family, and subfamily. In the closest 2026 hierarchical benchmark, grayscale PE images reached 93–94% subfamily accuracy, below binary and family accuracy. A related RGB approach adds binary, assembly, and API-derived channels and uses multi-head attention, but it is separate evidence—not proof that RGB is better or that attention guarantees reliable attribution on unknown malware.

What the 2026 hierarchical study actually tested

Saxena and Das’s 2026 Scientific Reports study treats each Windows Portable Executable (PE) file as an image rather than feeding a detector handcrafted runtime features. The bytes are converted into a normalized 224×224 grayscale image, then passed through a shared deep-learning model with three outputs:

As an Amazon Associate I earn from qualifying purchases.

  1. Benign or malware
  2. One of five malware families
  3. One of 33 malware subfamilies

That design is hierarchical and multi-output: one forward pass produces all three predictions. The authors describe the result as evidence that subfamily classification from grayscale PE images is feasible, not as a guarantee of universal performance against future samples.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How the data were organized

The benchmark combined publicly available malware repositories with curated benign executables. For every malware subfamily, the study reports 300 training images, 50 validation images, and 50 test images. Benign files were divided in the same proportions. This creates a controlled benchmark, but it is not the same as a naturally imbalanced enterprise stream in which some families are rare and near-duplicate samples can appear over time.

Results: finer labels are harder

The three compared model heads produced the following held-out test accuracies:

Model Benign/malware Family Subfamily
CNN + Temporal Convolutional Network (TCN) 99% 98% 94%
CNN + Capsule Network (CapsNet) 100% 97% 93%
CNN + Bidirectional LSTM (BiLSTM) 100% 98% 94%

The pattern matters more than the top-line number. Broad family differences can be visible in shared structural features, while subfamily attribution must distinguish closely related variants that may reuse loaders, encryption routines, persistence code, or large portions of the same codebase. A 93–94% benchmark score therefore does not mean that one in every 14 real-world samples will be correctly attributed; the error rate can change substantially with different malware sources, class imbalance, packing, or time periods.

Training configuration

  • TensorFlow/Keras implementation
  • Adam optimizer with a 0.0001 learning rate
  • Mini-batches of 32
  • Up to 50 training epochs
  • Dropout, early stopping, and checkpointing
  • NVIDIA A100 GPU reported for training

Where RGB and attention fit

The title’s RGB-and-attention wording refers to related work, not the grayscale hierarchical benchmark above. An Applied Intelligence paper, Tri-channel visualised malicious code classification based on improved ResNet, builds an RGB representation intended to carry three kinds of information: binary content, assembly details, and API data. Its hybrid multi-head attention mechanism models relationships across channels and spatial locations.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Grayscale versus RGB representations

Aspect Hierarchical benchmark Related RGB approach
Input Normalized 224×224 grayscale image derived from PE bytes RGB image combining binary, assembly, and API information
Outputs Benign/malware, five families, and 33 subfamilies Classification task described by the RGB study; the supplied evidence does not establish the same three-level benchmark
Feature weighting No claim that attention maps drive the reported results Hybrid multi-head attention for channel and spatial relationships
Evidence status Direct 2026 hierarchical attribution results Related context; not a head-to-head RGB-versus-grayscale test

RGB can provide more than a visual restatement of raw bytes when its channels encode genuinely different evidence. It also introduces more preprocessing choices: how assembly and API information are extracted, how missing data are represented, and whether those channels leak labels or depend on tools unavailable in deployment. Without a controlled comparison using the same files and splits, RGB superiority remains unproven.

What attention can—and cannot—tell an analyst

Attention weights can help a model emphasize particular channel combinations or image regions. They may support exploratory inspection of recurring byte or metadata patterns, but an attention map is not automatically a causal explanation. To treat it as a security explanation, researchers would need to test whether highlighted regions correspond to known PE structures or malicious behaviors and whether perturbing those regions changes the prediction in a meaningful, repeatable way.

How the image pipeline works

  1. Collect PE files and labels. Separate benign files from malware and assign family and subfamily labels with documented provenance.
  2. Convert bytes to pixels. Arrange executable bytes into an image tensor and normalize it to the model’s required dimensions. The hierarchical study uses 224×224 grayscale inputs.
  3. Construct optional RGB channels. In the related approach, channels represent binary, assembly, and API information rather than three arbitrary color values.
  4. Train a shared backbone and task heads. The model learns common visual features while producing predictions at each label level.
  5. Evaluate with a genuinely separated test set. Keep near-duplicates, variants, and samples from the same campaign from crossing the train/test boundary where possible.

Why benchmark accuracy may fall in production

  • Packing and obfuscation: Compression, encryption, and metamorphic changes can alter the image while preserving behavior.
  • Temporal drift: A model trained on older families may encounter new loaders, APIs, or compiler toolchains.
  • Label ambiguity: Malware-family naming conventions differ, and a sample can share code with several related families.
  • Data leakage: Randomly splitting near-identical variants can inflate results compared with time-based or campaign-based splits.
  • Class balance: Equal per-subfamily counts simplify evaluation but do not reflect most operational telemetry.
  • Format variation: PE sections, overlays, certificates, and build settings can change image patterns without changing malicious intent.

For a deployment decision, report confusion matrices, per-class precision and recall, calibration, and performance on time-split and family-held-out data—not accuracy alone. A detector can still be useful when it routes uncertain samples to sandboxing or analyst review, but the confidence threshold should be chosen from operational costs rather than copied from a research benchmark.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What it takes to reproduce the reported work

Reproduction requires the exact file-selection rules, label taxonomy, byte-to-image conversion, normalization, and train/validation/test split. The published setup uses TensorFlow/Keras, Adam at 0.0001, batches of 32, a maximum of 50 epochs, dropout, early stopping, checkpointing, and an NVIDIA A100. Matching those settings without matching the data pipeline will not reproduce the reported percentages.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The most defensible conclusion is narrow: executable-image models can perform multi-level malware attribution on a curated benchmark, with subfamily accuracy lower than coarse detection and family classification. RGB channels and attention are promising ways to add and weight information, but they require direct, leakage-resistant comparisons before claims about better generalization or trustworthy explanations are justified.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Computer VisioncybersecurityDeep LearningMachine LearningMalware Analysismalware classification

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.