PatternMiner: A Hybrid Deep Learning Framework for Fragment Classification and Pattern Recognition in Digital Forensics
Abstract
1. Introduction
1.1. Contributions
- Principled hybrid architecture design: We propose a hybrid deep learning framework that integrates complementary modeling components to capture local (CNN), sequential (LSTM), and global (Transformer) dependencies within fragmented digital evidence.
- Inductive bias decomposition for fragmented data: We present a conceptual formulation that decomposes forensic pattern recognition into three complementary components: local byte-level structure, contextual sequential relationships, and non-contiguous global dependencies, and associates each component with an appropriate neural modeling strategy.
- Multimodal representation of forensic evidence: We develop a unified encoding strategy that integrates raw byte-level content with contextual metadata (e.g., timestamps and permissions), enabling joint learning from structural and contextual forensic signals.
- Pattern recognition under incomplete and corrupted inputs: We demonstrate that combining complementary modeling components improves performance and generalization under fragmented and partially degraded conditions, including missing, disordered, truncated, shifted, and partially corrupted fragments.
- Comprehensive empirical evaluation and analysis: We provide an extensive evaluation of the proposed framework, including ablation studies and comparisons with traditional machine learning baselines, as well as analyses of each architectural component’s contribution to overall performance.
1.2. Paper Organization
2. Background and Related Work
2.1. Digital Forensics and Fragmentation
2.2. Pattern Recognition in Forensics
3. System Architecture and Methodology
- Metadata: Temporal and structural attributes, including access and modification timestamps, file size, and permission indicators.
- Content fragments: Raw byte sequences extracted from partial, corrupted, or disjoint file segments.
3.1. Data Representation
3.1.1. Metadata Encoding
- denotes the normalized last access timestamp;
- denotes the normalized last modification timestamp;
- s represents the normalized file size;
- is a binary-encoded permission vector (e.g., read, write, execute).
3.1.2. Content Encoding
3.1.3. Combined Input Representation
Fusion Strategy Rationale
3.2. Model Selection
- CNNs: CNNs extract localized spatial patterns from byte-level representations. These include structural signatures such as headers, compression markers, and encoding artifacts. Given an input , convolutional feature extraction is defined as:This operation captures fine-grained patterns that are essential for distinguishing between fragment types.
- (LSTMs): The LSTM component is used to model ordered dependencies within the combined fragment representation rather than long-horizon temporal event sequences across multiple forensic artifacts. In the proposed framework, each sample consists of a single content fragment together with its associated metadata attributes. Consequently, the LSTM operates on the sequential structure of the encoded feature representation, capturing dependencies among embedded byte-level and metadata-derived patterns.More specifically, the LSTM processes the ordered latent feature embeddings generated after content encoding and feature fusion, thereby preserving contextual relationships across neighboring dimensions of the representation. This mechanism improves the modeling of structured dependencies that may not be fully captured by convolutional filters alone.Formally, the recurrent representation is computed as:where denotes the sequentially processed latent feature vector at step t, while and represent the hidden and cell states, respectively.Importantly, the proposed framework does not model full forensic event timelines or multi-fragment temporal sessions. Instead, the LSTM component serves as an intermediate learner of sequential dependencies within the hybrid representation pipeline.
- Transformer Encoder: Transformer encoders capture long-range dependencies and global relationships across fragmented and multimodal inputs. The self-attention mechanism dynamically weighs the importance of different features:where:This allows the model to reason across disjoint fragments and heterogeneous feature spaces.
Pretraining Configuration
| Algorithm 1 PatternMiner: Explicit-Leakage-Controlled Hybrid Deep Learning Pipeline |
| Require: Fragmented dataset where is the content fragment, is metadata, is the ground truth label, and is the group identifier (file or disk source) Ensure: Predicted class probabilities
|
3.3. Architectural Rationale and Theoretical Justification
3.3.1. Structural Characteristics of Fragmented Forensic Data
- Local Structural Patterns: Digital files contain low-level byte signatures such as headers, magic numbers, delimiters, and compression markers. These patterns are localized within short contiguous regions and provide intrinsic structural cues independent of explicit class labels.
- Sequential Dependency Structures: Metadata attributes and embedded feature representations exhibit ordered structural relationships that may provide contextual information relevant to fragment classification. Although the proposed framework does not model complete forensic timelines across multiple artifacts, preserving ordered dependencies within latent representations remains beneficial for capturing contextual correlations between content-derived and metadata-derived features.
- Non-Contiguous Global Relationships: In fragmented storage environments, logically related data segments may be physically separated, reordered, or partially missing. This introduces long-range dependencies across disjoint fragments, requiring global context modeling beyond local or sequential proximity.
3.3.2. Limitations of Single-Model Approaches
- CNN-based models are limited to local feature extraction and cannot model temporal or long-range dependencies across disjoint fragments.
- LSTM-based models are effective for sequential reasoning but assume ordered inputs and struggle with non-contiguous or irregularly structured data.
- Transformer-based models, while powerful for capturing global dependencies, typically require large-scale datasets to implicitly learn locality and fine-grained structural patterns. In forensic settings, where data is limited and noisy, this can lead to suboptimal learning of byte-level structures.
3.3.3. Inductive Bias Decomposition and Hybrid Design
- CNN for Local Pattern Extraction: CNN layers introduce a strong locality bias, enabling the detection of short-range, position-invariant patterns in byte sequences. This is critical for identifying structural signatures such as file headers and encoding markers.
- LSTM for Sequential Modeling: LSTM networks capture temporal dependencies within metadata and ordered signals. Their gated memory mechanism enables the retention of relevant contextual information across time steps, facilitating temporal reasoning in fragmented datasets.
- Transformer for Global Context Modeling: Transformer encoders employ self-attention mechanisms to model long-range dependencies across non-contiguous inputs. This allows the model to infer relationships between disjoint fragments and heterogeneous features.
3.3.4. Collaborative Local-Sequential-Global Modeling
- CNN layers mitigate the loss of global continuity by focusing on preserved local signatures;
- LSTM layers preserve temporal and contextual relationships under partial disorder;
- Transformer layers recover non-local dependencies across disjoint fragments.
3.3.5. Novelty of the Proposed Integration
- Localized byte-level structural signatures;
- Sequential contextual relationships;
- Long-range non-contiguous dependencies.
- Leakage-aware learning protocol: Explicit removal of label-derived metadata, automated leakage auditing, and source-level group-aware partitioning are incorporated to prevent trivial class inference and cross-set contamination.
- Multimodal forensic reasoning: Unlike content-only fragment classifiers, PatternMiner jointly models byte-level fragment structures and contextual forensic metadata, enabling integration of both structural and behavioral evidence signals.
- Fragmentation-aware robustness modeling: The framework is evaluated under multiple degradation scenarios, including truncation, byte removal, shifting, and fragment disordering, to simulate realistic forensic recovery conditions.
- Generalizable forensic representation learning: Synthetic pretraining on fragmented AFF4-derived data enables the model to learn transferable structural priors prior to adaptation on real-world forensic datasets.
3.3.6. Implications for Fragmented Forensic Analysis
3.4. Training Procedure
Dataset Selection and Preparation
- A content fragment of length n bytes, potentially truncated, corrupted, or partially overwritten.
- Metadata attributes, including access and modification timestamps, file size, and permission indicators.
- A ground truth label corresponding to the fragment class (e.g., file type or reconstruction category).
- Random byte removal to emulate deletion or overwrite;
- Byte-shifted fragments to represent format-preserving corruption;
- Out-of-order fragments across distributed AFF4 streams.
3.5. Role of PatternMiner Within the Forensic Workflow
- Low-level fragment extraction;
- Fragment boundary identification;
- Block adjacency estimation;
- Exact file reassembly.
- Fragment-type prioritization;
- Corrupted-fragment classification;
- Confidence-guided carving;
- Reconstruction candidate ranking;
- Contextual forensic triage.
3.5.1. Preprocessing
- Metadata Normalization
- 2.
- Categorical Encoding
- 3.
- Byte-Level Embedding
- 4.
- Input Construction
3.5.2. Training Configuration
- Dropout: Applied to fully connected layers with a probability of .
- Batch Normalization: Applied after convolutional and dense layers to stabilize training and accelerate convergence.
Optimizer
Training Schedule
3.5.3. Loss Function
3.6. Implementation Details and Reproducibility
3.6.1. CNN Configuration
- Convolutional layers: 3;
- Filter sizes: {64, 128, 256};
- Kernel sizes: {3, 5, 7};
- Activation function: ReLU;
- Padding strategy: same padding;
- Pooling: max pooling after each convolutional block;
- Batch normalization: applied after each convolutional layer;
- Dropout rate: 0.3.
3.6.2. LSTM Configuration
- Number of LSTM layers: 2;
- Hidden dimension: 128;
- Bidirectionality: disabled;
- Dropout between layers: 0.3.
3.6.3. Transformer Configuration
- Number of Transformer encoder layers: 2;
- Attention heads: 8;
- Embedding dimension: 128;
- Feed-forward hidden dimension: 512;
- Positional encoding: sinusoidal positional encoding;
- Attention dropout: 0.1.
3.6.4. Training Configuration
- Optimizer: Adam;
- Initial learning rate: ;
- Batch size: 64;
- Maximum epochs: 50;
- Early stopping patience: 7 epochs;
- Weight initialization: Xavier initialization;
- Loss function: categorical cross-entropy.
3.6.5. Data Partitioning and Split Reproducibility
- 70% training groups;
- 15% validation groups;
- 15% testing groups.
3.7. Leakage Prevention Strategy
- Feature-Level Isolation
- Strict Input–Label Separation
- Group-Aware Data Partitioning
- Implications for Model Validity
3.8. Group Hierarchy and Content-Overlap Control
- For the Digital Corpora dataset, grouping was performed at the disk-image level.
- For AFF4 forensic containers, grouping was performed at the container level.
3.9. Leakage Elimination and Verification Procedure
3.9.1. Metadata Sanitization
- Filenames and partial filename strings;
- File extensions (e.g., .jpg, .pdf, .exe);
- MIME types and content descriptors;
- Directory and filesystem paths;
- Application-specific identifiers;
- Container object names and semantic labels;
- Any categorical field explicitly describing file type or content category.
- Access timestamps;
- Modification timestamps;
- File size;
- Permission indicators (read, write, execute).
3.9.2. Automated Leakage Auditing
3.9.3. Mutual-Information-Based Leakage Audit
3.9.4. Group-Aware Partitioning
- G represents the complete set of source-level groups;
- denotes the k-th group corresponding to a single source origin;
- K is the total number of source-level groups in the dataset.
- and denote any two distinct dataset groups;
- ∩ represents the set intersection operator;
- ∅ denotes the empty set;
- indicates that the condition holds for all distinct group pairs.
3.9.5. Leakage Verification Experiments
Indirect Leakage Sensitivity Analysis
- Normalized file size;
- Permission indicators;
- Its combined representation.
3.9.6. Evaluation Metrics
- Accuracy
- N is the total number of samples;
- is the predicted label for sample i;
- is the ground truth label;
- is the indicator function (1 if true, 0 otherwise).
- 2.
- Precision
- 3.
- Recall
- 4.
- F1-Score
- 5.
- Macro and Weighted Averages
- Macro-Averaged F1: Averaged equally over all classes, highlighting per-class performance.
- Weighted-Averaged F1: Accounts for class imbalance by weighting each class’s F1-score by its support (sample count).
- 6.
- Robustness Evaluation
- Ablation accuracy: Performance when only content or only metadata is available.
- Noise resilience: Accuracy under increasing fragment corruption or byte substitution.
- 7.
- Computational Efficiency
- Inference Time: The average time to process a single input fragment (content + metadata). This reflects the model’s responsiveness during live or batch investigations.
- FLOPS (Floating Point Operations per Second): An estimate of the model’s computational complexity, helpful in comparing the efficiency of different architectural configurations (e.g., CNN vs. CNN + LSTM + Transformer).
3.9.7. Illustrative Forensic Scenario
- Identify the likely type or category of fragmented artifacts;
- Detect suspicious or anomalous fragments;
- Prioritize relevant evidence for further investigation.
4. Dataset and Implementation
4.1. Dataset Collection
- Digital Corpora Dataset [27]:
- -
- Contains realistic disk images derived from forensic training scenarios, including the “EVIDENCE_OF” series (e.g., EVIDENCE_OF_IM, EVIDENCE_OF_TOR).
- -
- Source files span multiple categories (e.g., documents, images, executables, logs), reflecting real-world forensic diversity.
- -
- Fragmentation arises naturally due to deletion, reallocation, overwriting, and file system behavior.
- -
- Fragments are extracted using standard file-carving and byte-level segmentation techniques (Section 4.6.1), preserving authentic artifact distributions.
- -
- The dataset exhibits moderate class imbalance, consistent with practical forensic environments.
- AFF4 Synthetic Dataset [28]:
- -
- A synthetically constructed dataset based on the AFF4 (Advanced Forensics File Format) framework, designed to simulate realistic fragmentation scenarios under controlled conditions.
- -
- Source files are drawn from diverse categories (e.g., documents, multimedia, executables) and segmented into fixed-length fragments (512 bytes) using a sliding-window approach.
- -
- Controlled fragmentation is introduced through stochastic transformations, including:
- ∗
- Random byte removal (typically 10–30% of fragment length);
- ∗
- Truncation at random offsets to simulate partial recovery;
- ∗
- Byte shifting to emulate misaligned storage blocks;
- ∗
- Out-of-order reassembly across AFF4 streams to replicate non-contiguous storage.
- -
- Metadata attributes (timestamps, file size, permissions) are derived from source files and normalized; no label-derived features are included.
- -
- Class distributions are constructed to be approximately balanced across categories to enable controlled evaluation.
- -
- All generation procedures are performed using a fixed random seed () to ensure deterministic behavior and reproducibility.
- -
- The dataset generation pipeline, including transformation parameters and configuration settings, will be made publicly available to facilitate replication.
4.2. Data Representation and Feature Construction
- Content Fragment:
- -
- Each instance consists of a fixed-length fragment of 512 bytes.
- -
- Fragments are extracted using forensic carving and partial-byte-recovery techniques.
Fragments are standardized to a fixed length of 512 bytes in our experiments. This value was selected based on both empirical evaluation and practical considerations. Specifically, we conducted experiments with fragment sizes of 256, 512, and 1024 bytes. Smaller fragments (256 bytes) were found to contain insufficient contextual and structural information, leading to reduced classification performance. Larger fragments (1024 bytes) provided only marginal performance gains while increasing computational cost and memory requirements.The 512-byte configuration provided an effective balance between representational richness and efficiency. Additionally, while modern storage devices often use larger sector sizes (e.g., 4096 bytes), fragmented data recovered from unallocated space is frequently non-contiguous and does not align with physical sector boundaries. As a result, models must operate on partial and arbitrarily sized fragments rather than full-sector inputs. - Metadata Features:
- -
- Access and modification timestamps, normalized to the range .
- -
- File size, scaled using min-max normalization.
- -
- File permissions, encoded as binary indicators (e.g., read, write, execute).
- Excluded Attributes:
- -
- File type is explicitly excluded from the input representation, as it constitutes the prediction target.
- -
- Any feature that directly encodes or strongly correlates with the ground truth label is not included.
- Ground Truth Labels:
- -
- Each fragment is assigned a label corresponding to its class (e.g., file type or reconstruction category).
- -
- Labels are used exclusively for supervision during training and evaluation.
4.3. Fragment Extraction and Grouping
- All fragments originating from the same source are treated as a single group.
- This grouping is preserved throughout dataset construction and partitioning.
4.4. Dataset Partitioning
- Each fragment is associated with a source-level identifier corresponding to its origin (i.e., a file in Digital Corpora or a stream/container object in AFF4).
- All fragments derived from the same source are assigned exclusively to a single subset (training, validation, or testing).
- No fragments from the same source appear across multiple subsets.
- This prevents near-duplicate samples and shared contextual information from introducing data leakage.
- 70% training set;
- 15% validation set;
- 15% test set.
Explicit Split Construction Procedure
- across subsets;
- Each group is assigned to exactly one subset;
- All fragments within a group remain in the same subset.
4.5. Realistic Fragmentation Validation
4.6. Implementation Details
- Input Representation:
- -
- Content fragments are embedded into a continuous vector space.
- -
- Metadata features are normalized and concatenated with content embeddings.
- -
- No label-derived features are included in the input representation.
- Model Architecture:
- -
- Hybrid architecture combining CNN, LSTM, and Transformer components.
- -
- Designed to capture local, sequential, and global dependencies across fragmented inputs.
- Training Setup:
- -
- Optimized using the Adam optimizer with a learning rate of .
- -
- Early stopping is applied based on validation loss to prevent overfitting.
- -
- Regularization techniques include dropout and batch normalization.
- Evaluation Protocol:
- -
- Performance is evaluated on a held-out test set with no shared source-level overlap.
- -
- Metrics include accuracy, precision, recall, and F1-score.
- -
- Additional robustness evaluation is conducted under varying levels of fragment corruption and metadata degradation.
4.6.1. Fragment Generation and Simulation Pipeline
Fragment Extraction
Fragmentation Simulation
- Random byte removal: A proportion of bytes (typically 10–30%) is removed to simulate deletion or overwrite events.
- Truncation: Fragments are truncated at random offsets to represent incomplete recovery from damaged storage sectors.
- Byte shifting: Fragments are misaligned to simulate block-level corruption or offset inconsistencies.
- Out-of-order arrangement: In AFF4-based data, fragments belonging to the same source are randomly reordered to replicate non-contiguous storage across distributed streams.
Metadata Association
- Access and modification timestamps;
- File size;
- Permission attributes.
Dataset Construction and Fragment Generation Procedure
- Random byte removal affecting 10–30% of fragment bytes;
- Random truncation at variable offsets;
- Byte shifting to simulate block misalignment;
- Out-of-order fragment rearrangement for AFF4 stream simulation.
- More than 70% of bytes were removed or corrupted;
- The fragment contained insufficient non-zero content after preprocessing;
- Associated metadata fields were incomplete or invalid;
- Duplicate fragments generated from repeated extraction windows were detected.
Label Assignment
Determinism and Reproducibility
4.6.2. Dataset Statistics
- All fragments originating from the same source (file or disk image) are assigned exclusively to a single subset.
- No fragments from the same logical unit appear across multiple splits.
- This prevents near-duplicate samples and shared contextual information from introducing data leakage or artificially inflating performance.
4.7. Implementation Configurations and Requirements
- Pretraining on synthetically generated fragments to learn generalized structural representations.
- Fine-tuning on real-world forensic datasets (Digital Corpora and AFF4) to adapt to realistic noise patterns.
- Input features exclude any direct encoding of the target label.
- Dataset partitioning is performed at the source level to prevent cross-set contamination.
- Performance is evaluated on strictly unseen data.
- CNN layers for localized feature extraction;
- LSTM layers for sequential modeling;
- Transformer encoders for global context modeling;
- Pretraining followed by domain-specific fine-tuning.
Training and Inference Pipeline (Pseudocode)
| Algorithm 2 PatternMiner: Reproducible Training and Inference Pipeline |
| Require: Dataset : content fragment, : metadata, : label, : group identifier Ensure: Predicted probabilities
|
5. Experimental Evaluation
5.1. Input Modality Comparison
5.2. Effect of Neural Architecture
5.3. Evaluation of PatternMiner
5.3.1. Class-Wise Performance
5.3.2. Error Analysis
- DOCX and PDF: Occasional mutual misclassification is observed, likely due to structural similarities in compressed and container-based formats, which produce overlapping byte-level patterns.
- LOG and TXT: Moderate confusion exists between these classes, reflecting their shared plain-text characteristics and limited structural differentiation at the fragment level.
- ZIP and EXE: Some ZIP fragments are misclassified as EXE, consistent with scenarios where compressed archives contain executable components or share header-like patterns.
- EXE: While slightly more variable, classification remains stable overall, with errors primarily linked to structurally ambiguous fragments.
5.3.3. Comparison with Transformer-Only Baseline
5.3.4. Analytical Comparison with Transformer-Only Approaches
Limited Data Availability
Byte-Level Structural Characteristics
Fragmentation and Non-Contiguity
5.3.5. Robustness Under Controlled Perturbations
Perturbation Protocol
- Random Byte Flips: A percentage of bytes within each fragment are randomly modified to simulate noise or bit-level corruption.
- Byte Removal (Truncation): A portion of the fragment is removed at random positions to emulate partial data recovery or overwrite scenarios.
- Header Removal: The initial segment of the fragment (e.g., first 10–20% of bytes) is removed to simulate the loss of structural signatures such as file headers.
5.4. Ablation Study
- Effect of Fine-Tuning
- Impact of Fragment Length
- The validity of the hybrid CNN–LSTM–Transformer architecture;
- The contribution of multimodal forensic fusion;
- The impact of synthetic pretraining and domain-specific fine-tuning;
- The effect of fragment granularity on forensic representation quality.
5.4.1. Validation of Hybrid Architectural Design
- CNN only: Captures localized byte-level structural signatures.
- LSTM only: Models sequential and contextual metadata relationships.
- Transformer only: Captures long-range global dependencies across fragments.
- CNN + LSTM: Combines local structural modeling with sequential reasoning.
- CNN + Transformer: Combines local and global dependency modeling.
- LSTM + Transformer: Combines sequential contextual modeling with global reasoning.
- Full Model (CNN + LSTM + Transformer): Proposed hybrid architecture integrating local, sequential, and global dependency modeling simultaneously.
5.4.2. Contribution of Multimodal Fusion
5.4.3. Effect of Pretraining and Fine-Tuning
5.4.4. Impact of Fragment Granularity
5.4.5. Complexity-Performance Trade-Off
5.5. Comparison with Baselines
5.5.1. Baseline Models and Implementation Details
- Support Vector Machine (SVM): RBF kernel with hyperparameters (C, ) tuned via grid search.
- Random Forest: 100 trees with maximum depth tuned on the validation set.
- XGBoost: Gradient boosting model with learning rate, number of estimators, and tree depth optimized using validation-based tuning.
- LightGBM: Gradient boosting framework with leaf-wise tree growth and tuned hyperparameters.
- Multi-Layer Perceptron (MLP): Fully connected neural network with two hidden layers and ReLU activations.
- CNN-based model: 1D convolutional network operating on byte-level embeddings.
- LSTM-based model: Sequential model capturing temporal dependencies in metadata and embedded inputs.
- Transformer-only model: Stacked Transformer encoder layers operating on the combined input representation.
5.5.2. Statistical Significance of Performance Improvements
5.6. Metadata Influence
- Feature Importance Estimation
- Interpretation of Timestamp Dominance
5.6.1. Model Complexity and Computational Efficiency
5.6.2. Model Explainability Through Visual Interpretation
Attention Heatmaps
Saliency Maps
Metadata Influence
5.7. Efficiency Analysis: Runtime, Resource Utilization, and Scalability
5.7.1. CPU Runtime Performance
5.7.2. GPU Resource–Performance Trade-Off
5.7.3. Latency–Performance Trade-Off
5.7.4. Scaling with Fragment Length
5.7.5. Computational Complexity and Convergence
5.7.6. Memory and Energy Efficiency
6. Discussion
6.1. Strengths of Deep Learning for Fragmented Forensic Evidence
6.2. Limitations
6.3. Robustness to Obfuscation and Degraded Inputs
6.4. Limitations Under Anti-Forensic Manipulation
7. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Patel, B.; Mann, P.S. A survey on mobile digital forensic: Taxonomy, tools, and challenges. Secur. Priv. 2025, 8, e470. [Google Scholar] [CrossRef] [Scilit]
- Almuqren, A.; Alsuwaelim, H.; Rahman, M.H.; Ibrahim, A.A. A systematic literature review on digital forensic investigation on Android devices. Procedia Comput. Sci. 2024, 235, 1332–1352. [Google Scholar] [CrossRef] [Scilit]
- Alshabibi, M.M.; Bu dookhi, A.K.; Hafizur Rahman, M. Forensic investigation, challenges, and issues of cloud data: A systematic literature review. Computers 2024, 13, 213. [Google Scholar] [CrossRef] [Scilit]
- Kishore, N.; Raina, P. Digital Forensics in Mobile Phones: An Overview of Data Acquisition Techniques and its Challenges. In The Future of Computing: Ubiquitous Applications and Technologies; Bentham Science Publishers: Sharjah, United Arab Emirates, 2024; pp. 108–125. [Google Scholar] [CrossRef] [Scilit]
- Fakiha, B. Unlocking Digital Evidence: Recent Challenges and Strategies in Mobile Device Forensic Analysis. J. Internet Serv. Inf. Secur. 2024, 14, 68–84. [Google Scholar] [CrossRef] [Scilit]
- Anbalagan, P.; Joo, Y.H. Memory sampled-data control for interval type-2 fuzzy networked systems subjected to deception attacks via dynamic fragmentation approach. J. Frankl. Inst. 2024, 361, 106680. [Google Scholar] [CrossRef] [Scilit]
- Mary, T.; Sreeja, C. File Fragment Classification: A Comprehensive Survey of Research Advances. In Quantum Computing Models for Cybersecurity and Wireless Communications; Wiley: Hoboken, NJ, USA, 2025; pp. 201–218. [Google Scholar] [CrossRef] [Scilit]
- Odeh, A.; Taleb, A.A.; Alhajahjeh, T.; Navarro, F. Advanced memory forensics for malware classification with deep learning algorithms. Clust. Comput. 2025, 28, 353. [Google Scholar] [CrossRef] [Scilit]
- Azahari, A.; Balzarotti, D. On the inadequacy of open-source application logs for digital forensics. Forensic Sci. Int. Digit. Investig. 2024, 49, 301750. [Google Scholar] [CrossRef] [Scilit]
- Durán, J.M.; van der Vloed, D.; Ruifrok, A.; Ypma, R.J. From understanding to justifying: Computational reliabilism for AI-based forensic evidence evaluation. Forensic Sci. Int. Synerg. 2024, 9, 100554. [Google Scholar] [CrossRef] [Scilit]
- Tyagi, A.K.; Balogun, B.F.; Tiwari, S. Role of blockchain in digital forensics: A systematic study. In Global Perspectives on the Applications of Computer Vision in Cybersecurity; IGI Global Scientific Publishing: Hershey, PA, USA, 2024; pp. 197–222. [Google Scholar] [CrossRef] [Scilit]
- Mehrjardi, F.Z.; Latif, A.M.; Zarchi, M.S.; Sheikhpour, R. A survey on deep learning-based image forgery detection. Pattern Recognit. 2023, 144, 109778. [Google Scholar] [CrossRef] [Scilit]
- Bai, N.; Wang, X.; Han, R.; Hou, J.; Wang, Y.; Pang, S. PIM-Net: Progressive inconsistency mining network for image manipulation localization. Pattern Recognit. 2025, 159, 111136. [Google Scholar] [CrossRef] [Scilit]
- Stoykova, R.A. A new right to procedural accuracy: A governance model for digital evidence in criminal proceedings. Comput. Law Secur. Rev. 2024, 55, 106040. [Google Scholar] [CrossRef] [Scilit]
- Park, J.; Eom, Y.I. Filesystem fragmentation on modern storage systems. ACM Trans. Comput. Syst. 2023, 41, 3. [Google Scholar] [CrossRef] [Scilit]
- van der Meer, V.; van den Bos, J.; Jonker, H.; Dassen, L. Problem solved: A reliable, deterministic method for JPEG fragmentation point detection. Forensic Sci. Int. Digit. Investig. 2024, 48, 301687. [Google Scholar] [CrossRef] [Scilit]
- Dunsin, D.; Ghanem, M.C.; Ouazzane, K.; Vassilev, V. A comprehensive analysis of the role of artificial intelligence and machine learning in modern digital forensics and incident response. Forensic Sci. Int. Digit. Investig. 2024, 48, 301675. [Google Scholar] [CrossRef] [Scilit]
- Oh, J.; Lee, S.; Hwang, H. Forensic recovery of file system metadata for digital forensic investigation. IEEE Access 2022, 10, 111591–111606. [Google Scholar] [CrossRef] [Scilit]
- Alzaabi, M.; Al Shibli, A. A Review of JPEG File Carving: Challenges, Techniques, and Future Directions. Appl. Comput. J. 2025, 5, 372–385. [Google Scholar] [CrossRef] [Scilit]
- Iyengar, S.; Nabavirazavi, S.; Hariprasad, Y.; Prasad , H.B.; Mohan, C.K. Future of AI-Driven Digital Forensics. In Artificial Intelligence in Practice: Theory and Application for Cyber Security and Forensics; Springer: Berlin/Heidelberg, Germany, 2025; pp. 335–364. [Google Scholar] [CrossRef] [Scilit]
- Ali, W.; Din, I.U.; Almogren, A.; Altameem, A.; Rodrigues, J.J. Machine Learning-Based Digital Forensics for Trust Assessment in Smart Grid IoT Using Blockchain. IEEE Trans. Consum. Electron. 2025, 71, 8246–8253. [Google Scholar] [CrossRef] [Scilit]
- Bergmann, S.; Moussa, D.; Brand, F.; Kaup, A.; Riess, C. Forensic analysis of AI-compression traces in spatial and frequency domain. Pattern Recognit. Lett. 2024, 180, 41–47. [Google Scholar] [CrossRef] [Scilit]
- Arthanari, A.; Raj, S.S.; Ravindran, V. A Narrative Review in Application of Artificial Intelligence in Forensic Science: Enhancing Accuracy in Crime Scene Analysis and Evidence Interpretation. J. Int. Oral Health 2025, 17, 15–22. [Google Scholar] [CrossRef] [Scilit]
- Zhao, H.; Li, C.; Li, X.; Yao, L. TPFormer: Robust Wildfire Segmentation via Thermal Prior Integration and Dual-Decoder Supervision. IEEE Access 2026, 14, 50375–50395. [Google Scholar] [CrossRef] [Scilit]
- Sester, J.; Hayes, D.; Scanlon, M.; Le-Khac, N.A. A comparative study of support vector machine and neural networks for file type identification using n-gram analysis. Forensic Sci. Int. Digit. Investig. 2021, 36, 301121. [Google Scholar] [CrossRef] [Scilit]
- Toma, I.S.; Tonmoy, A.H.; Bhowmik, A.; Sarker, S. A Multi-Task Hybrid Deep Learning Based Framework for Robust File Fragment Classification in Digital Forensics. In Proceedings of the 2025 6th International Conference for Emerging Technology (INCET); IEEE: New York, NY, USA, 2025; pp. 1–6. [Google Scholar]
- Garfinkel, S. Digital Corpora. 2009. Available online: https://digitalcorpora.org/ (accessed on 15 July 2025).
- Schatz, B.L. AFF4-L: A scalable open logical evidence container. Digit. Investig. 2019, 29, S143–S149. [Google Scholar] [CrossRef] [Scilit]

















| Aspect | Toma et al. [26] | PatternMiner |
|---|---|---|
| Primary Input | Byte-level fragments only | Byte-level fragments + metadata |
| Architecture | CNN + LSTM + Attention | CNN + LSTM + Transformer |
| Learning Strategy | Multi-task learning + generative modeling | Multimodal hybrid representation learning |
| Fragment Length | 4096 bytes | 512 bytes |
| Metadata Integration | No | Yes |
| Global Dependency Modeling | Limited attention-based weighting | Transformer-based global context modeling |
| Leakage Prevention | Not explicitly discussed | Explicit metadata sanitization and group-aware partitioning |
| Corruption Simulation | Limited discussion | Byte removal, truncation, shifting, and reordering |
| Datasets | GovDocs1 subsets | Digital Corpora + AFF4 |
| Evaluation Focus | Fragment categorization | Fragment classification and forensic pattern recognition |
| Reference | Modality Handled | Fragmentation-Aware | Model Type | Performance Metrics | Key Limitations |
|---|---|---|---|---|---|
| [20] | Metadata only | No | Rule-based, heuristic | Not reported | Limited to logical files; no content-level insight |
| [8] | Content (memory dumps) | Yes | Deep Learning (LLaMA-7B) | Precision ≈ 88% | Specific to ransomware; metadata not used |
| [22] | Physical (IR spectra) | No | Rule-based, cross-correlation | Improved accuracy (qualitative) | Non-digital context; not applicable to content fragmentation |
| [23] | Mixed forensic domains | No | General AI survey | Qualitative | High-level review; lacks implementation or benchmarking |
| [25] | Content (byte-level fragments) | Partial | ML (SVM, NN with n-grams) | Accuracy-based comparison (dataset-dependent) | Limited scalability; lacks deep multimodal modeling |
| [24] | Multimodal (RGB + TIR imagery) | No | Hybrid DL (CNN + Transformer) | IoU: 79.72%, F1: 88.72% | Not designed for forensic data; no fragmentation handling |
| [26] | Content (byte-level fragments) | Yes | Hybrid DL (multi-task learning) | Improved classification accuracy (reported) | Content-only modeling; lacks metadata integration and multimodal reasoning |
| PatternMiner (the proposed) | Content + Metadata | Yes | Hybrid DL (CNN + LSTM + Transformer) | Accuracy: 92.1%, F1: 92.1% | Interpretability under development |
| Model Type | Strengths | Limitations |
|---|---|---|
| Transformer-only | Strong global context modeling; effective for long-range dependencies | Requires large-scale data; lacks explicit locality bias; computationally intensive |
| CNN + LSTM | Captures local patterns and sequential dependencies; efficient with smaller datasets | Limited ability to model non-contiguous global relationships across fragments |
| Proposed (PatternMiner) | Simultaneously captures local, sequential, and global dependencies; robust to fragmentation and missing data | Higher architectural complexity; increased computational requirements compared to shallow models |
| Hyperparameter | Value |
|---|---|
| Fragment length | 512 bytes |
| Embedding dimension | 128 |
| CNN layers | 3 |
| CNN filters | {64, 128, 256} |
| CNN kernel sizes | {3, 5, 7} |
| LSTM layers | 2 |
| LSTM hidden dimension | 128 |
| Transformer layers | 2 |
| Transformer heads | 8 |
| Feed-forward dimension | 512 |
| Dropout rate | 0.3 |
| Batch size | 64 |
| Learning rate | |
| Maximum epochs | 50 |
| Optimizer | Adam |
| Early stopping patience | 7 |
| Partitioning Strategy | Accuracy (%) | Macro F1 (%) |
|---|---|---|
| Standard group-aware split | 92.1 | 91.8 |
| Overlap-restricted split | 89.4 | 88.9 |
| Metadata Feature | Mutual Information with Class Label |
|---|---|
| File size | 0.184 |
| Last access timestamp | 0.071 |
| Last modification timestamp | 0.083 |
| Read permission | 0.026 |
| Write permission | 0.031 |
| Execute permission | 0.044 |
| Input Features | Accuracy (%) | Macro F1 (%) |
|---|---|---|
| File size only | 47.6 | 45.9 |
| Permissions only | 24.8 | 22.7 |
| File size + permissions | 54.3 | 52.1 |
| PatternMiner (full model) | 92.1 | 91.8 |
| File Category | Fragments | Percentage |
|---|---|---|
| Document Files | 10,200 | 13.6% |
| Image Files | 11,500 | 15.3% |
| Video Files | 8700 | 11.6% |
| Audio Files | 7900 | 10.5% |
| Executable Files | 9600 | 12.8% |
| Compressed Archives | 8100 | 10.8% |
| Database Files | 9200 | 12.3% |
| Other Structured Files | 9800 | 13.1% |
| Total | 75,000 | 100% |
| Scenario | Number of Disk Images | Number of Fragments |
|---|---|---|
| EVIDENCE_OF_IM | 4 | 9200 |
| EVIDENCE_OF_TOR | 3 | 8500 |
| EVIDENCE_OF_USB | 3 | 7300 |
| M57 | 5 | 12,400 |
| Other Scenarios | 2 | 7600 |
| Total | 17 | 45,000 |
| Fragmentation Setting | Accuracy (%) | Macro F1 (%) |
|---|---|---|
| Fixed-seed random AFF4 fragmentation | 92.1 | 91.8 |
| File-system-aware simulated fragmentation | 90.3 | 89.7 |
| Naturally fragmented disk-image validation | 88.9 | 88.2 |
| Dataset | Fragments | Classes | Avg. Size | Fragmentation Types | Class Balance |
|---|---|---|---|---|---|
| Digital Corpora | 45,000 | Document, media, and executable classes (e.g., PDF, DOCX, JPG, EXE) | 512 bytes | Deletion, truncation, overwrite | Moderately imbalanced |
| AFF4 (Synthetic) | 30,000 | Structured and unstructured classes | 512 bytes | Out-of-order, split streams, truncation | Approximately balanced |
| Subset | Groups | Fragments | Class Balance Deviation (%) |
|---|---|---|---|
| Training | 42 | 52,500 | 2.8 |
| Validation | 9 | 11,250 | 3.1 |
| Testing | 9 | 11,250 | 3.4 |
| Component | Specification |
|---|---|
| Software Environment | |
| Programming Language | Python 3.10 |
| Deep Learning Framework | PyTorch 2.1 |
| Supporting Libraries | NumPy 1.24, Scikit-learn 1.3.2, Matplotlib 3.8 |
| Hardware Setup | |
| CPU | AMD Ryzen 9 7950X, 16-core, 4.5 GHz |
| RAM | 64 GB DDR5 |
| GPU | NVIDIA GeForce RTX 4090, 24 GB VRAM |
| Operating System | Ubuntu 22.04 LTS |
| Training Configuration | |
| Batch Size | 64 |
| Learning Rate | (Adam optimizer) |
| Dropout Rate | 0.3 (fully connected layers) |
| Fragment Length | 512 bytes |
| Embedding Dimension | 16 (byte-level encoding) |
| Data Split Strategy | Group-aware (file/disk-level partitioning) |
| Training Epochs | Up to 50 with early stopping (patience = 7) |
| Loss Function | Categorical cross-entropy |
| Input Condition | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Macro F1 (%) | Weighted F1 (%) |
|---|---|---|---|---|---|---|
| Metadata + Content | 92.1 | 91.5 | 92.8 | 92.1 | 91.8 | 92.3 |
| Content Only | 84.3 | 83.2 | 84.0 | 83.6 | 82.9 | 83.9 |
| Metadata Only | 73.7 | 70.1 | 71.8 | 70.9 | 70.4 | 71.2 |
| Corrupted Input (20%) | 75.2 | 73.4 | 76.0 | 74.7 | 74.1 | 75.0 |
| File Type | Precision (%) | Recall (%) | F1-Score (%) |
|---|---|---|---|
| DOCX | 94.1 | 93.0 | 93.5 |
| 95.6 | 94.8 | 95.2 | |
| JPG | 92.0 | 92.6 | 92.3 |
| EXE | 90.8 | 89.9 | 90.3 |
| MP4 | 93.2 | 93.8 | 93.5 |
| LOG | 90.5 | 89.8 | 90.1 |
| ZIP | 90.9 | 90.0 | 90.4 |
| TXT | 93.1 | 92.5 | 92.8 |
| Macro Average | 92.5 | 92.0 | 92.1 |
| Model | Accuracy (%) | F1-Score (%) | Key Observations |
|---|---|---|---|
| Transformer-only | 87.4 | 86.9 | Strong global modeling; limited explicit locality and sequential bias |
| PatternMiner (Proposed) | 92.1 | 92.1 | Integrated modeling of local, sequential, and global dependencies |
| Model | Accuracy (%) | Macro F1 (%) |
|---|---|---|
| SVM | 81.4 | 80.2 |
| SVM + PCA | 84.7 | 83.5 |
| Random Forest | 79.8 | 78.6 |
| Random Forest + PCA | 82.9 | 81.7 |
| MLP | 87.6 | 86.9 |
| PatternMiner (full model) | 92.1 | 91.8 |
| Corruption Level | Accuracy (%) | F1-Score (%) |
|---|---|---|
| 0% | 92.1 | 92.1 |
| 10% | 85.4 | 84.9 |
| 20% | 75.2 | 74.7 |
| 30% | 66.8 | 66.1 |
| Model | Accuracy (%) | Macro-F1 (%) | Parameters in Million | FLOPs in Giga |
|---|---|---|---|---|
| CNN only | 81.6 | 80.9 | ∼0.6 M | ∼0.4 G |
| LSTM only | 78.4 | 77.6 | ∼0.5 M | ∼0.3 G |
| Transformer only | 87.4 | 86.9 | ∼1.5 M | ∼1.1 G |
| CNN + LSTM | 85.7 | 85.0 | ∼1.1 M | ∼0.8 G |
| CNN + Transformer | 87.2 | 88.6 | ∼1.8 M | ∼1.2 G |
| LSTM + Transformer | 88.5 | 87.9 | ∼1.7 M | ∼1.2 G |
| Full Model | 92.1 | 92.1 | ∼2.1M | ∼1.4 G |
| Input Configuration | Accuracy (%) | Macro-F1 (%) |
|---|---|---|
| Metadata only | 73.7 | 72.9 |
| Content only | 84.3 | 83.6 |
| Multimodal (Content + Metadata) | 92.1 | 92.1 |
| Training Strategy | Accuracy (%) | Macro-F1 (%) |
|---|---|---|
| Without fine-tuning | 86.8 | 86.1 |
| With fine-tuning | 92.1 | 92.1 |
| Fragment Length | Accuracy (%) | Macro-F1 (%) |
|---|---|---|
| 256 bytes | 87.5 | 86.9 |
| 512 bytes | 92.1 | 92.1 |
| 1024 bytes | 92.8 | 92.3 |
| Model | Category | Accuracy (%) | F1-Score (%) |
|---|---|---|---|
| PatternMiner (Proposed) | Hybrid DL | 92.1 | 92.1 |
| Transformer-only | Deep Learning | 87.4 | 86.9 |
| ByteBERT-like | Deep Learning | 86.5 | 86.0 |
| Multimodal Transformer | Deep Learning | 88.2 | 87.8 |
| BiLSTM + Attention | Deep Learning | 85.0 | 84.3 |
| CharCNN | Deep Learning | 84.0 | 83.5 |
| LightGBM | Classical ML | 83.5 | 83.0 |
| XGBoost | Classical ML | 83.0 | 82.5 |
| Gradient Boosting | Classical ML | 81.4 | 80.6 |
| Random Forest | Classical ML | 82.3 | 81.5 |
| SVM (RBF) | Classical ML | 77.3 | 76.1 |
| KNN (k = 5) | Classical ML | 72.8 | 71.7 |
| Logistic Regression | Classical ML | 74.6 | 73.0 |
| Naive Bayes | Classical ML | 65.4 | 63.8 |
| DBSCAN | Unsupervised | 58.6 | 57.3 |
| K-Means | Unsupervised | 60.3 | 59.0 |
| Model 1 | Model 2 | Mean Diff | P-Adj | Lower | Upper | Reject |
|---|---|---|---|---|---|---|
| PatternMiner | XGBoost | 8.92 | <0.001 | 8.64 | 9.20 | True |
| PatternMiner | Random Forest | 11.04 | <0.001 | 10.76 | 11.32 | True |
| PatternMiner | SVM | 13.60 | <0.001 | 13.32 | 13.88 | True |
| XGBoost | Random Forest | 2.12 | <0.001 | 1.84 | 2.40 | True |
| XGBoost | SVM | 4.68 | <0.001 | 4.40 | 4.96 | True |
| Random Forest | SVM | 2.56 | <0.001 | 2.28 | 2.84 | True |
| Model | Parameter Count | FLOPs per Inference |
|---|---|---|
| PatternMiner (CNN + LSTM + Transformer) | ~2.1 million | ~1.4 GFLOPs |
| XGBoost | ~100,000 | ~5 MFLOPs |
| Random Forest (100 trees, depth = 10) | ~50,000 | ~8 MFLOPs |
| SVM (RBF Kernel) | Varies with support vectors | ~15 MFLOPs |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Sanjalawe, Y.; Allehyani, B.; Makhadmeh, S.N.; Al-E’mari, S.; Surakhi, O.; Suleiman, D. PatternMiner: A Hybrid Deep Learning Framework for Fragment Classification and Pattern Recognition in Digital Forensics. Computers 2026, 15, 354. https://doi.org/10.3390/computers15060354
Sanjalawe Y, Allehyani B, Makhadmeh SN, Al-E’mari S, Surakhi O, Suleiman D. PatternMiner: A Hybrid Deep Learning Framework for Fragment Classification and Pattern Recognition in Digital Forensics. Computers. 2026; 15(6):354. https://doi.org/10.3390/computers15060354
Chicago/Turabian StyleSanjalawe, Yousef, Budoor Allehyani, Sharif Naser Makhadmeh, Salam Al-E’mari, Ola Surakhi, and Dima Suleiman. 2026. "PatternMiner: A Hybrid Deep Learning Framework for Fragment Classification and Pattern Recognition in Digital Forensics" Computers 15, no. 6: 354. https://doi.org/10.3390/computers15060354
APA StyleSanjalawe, Y., Allehyani, B., Makhadmeh, S. N., Al-E’mari, S., Surakhi, O., & Suleiman, D. (2026). PatternMiner: A Hybrid Deep Learning Framework for Fragment Classification and Pattern Recognition in Digital Forensics. Computers, 15(6), 354. https://doi.org/10.3390/computers15060354

