Architecture

Multi-Model
Inference Stack

Our AI engine is not a single model — it is a coordinated ensemble of specialised networks and classical algorithms, each optimised for a specific forensic task. Results from multiple models are fused using Bayesian aggregation for a calibrated final forensic opinion.

Every decision is traceable. SHAP and LIME integration provides feature-level explanations that meet expert witness standards — you always know why a conclusion was reached, with an audit trail that satisfies ISO/IEC 17025 and OSAC requirements.

YOLOS Vision Transformer DETR Bipartite Matching Random Forest Ensemble Score-Based Likelihood Ratio Siamese Neural Networks LSTM / GRU Hidden Markov Models Dynamic Time Warping Bayesian LR Fusion SHAP / LIME Sigma-Lognormal Model Zhang-Suen Thinning Hungarian Algorithm Cosine Similarity Scoring Autoencoder Anti-Spoof SVM Classifier Multi-Head Self-Attention Graph Decomposition
CoreFlowAI
Static HW · SLR
Dynamic HW · Multi-Style
Sig Detection · YOLOS ViT
Sig Comparison · Siamese
Sig Dynamic · LSTM
Reports · ISO 17025
System Architecture Layers
Input
Scanned Image
Tablet Stream
PDF / TIFF
JPEG / PNG
SVC / JSON
Preprocess
Binarisation
Deskew / Warp
Zhang-Suen Thinning
ViT Patch Embedding
ROI Isolation
Features
Graph Decomposition (Static)
YOLOS Self-Attention (Detection)
LSTM Temporal (Dynamic)
Siamese Embedding (Comparison)
Inference
Random Forest SLR
DETR Bounding Box
DTW Alignment
HMM Sequence
Autoencoder Anomaly
Fusion
Bayesian LR Aggregation
Confidence Calibration
SHAP / LIME Explanation
Output
SLR Opinion Score
Bounding Box + Confidence
Feature Heatmap
Confidence Interval
ISO 17025 Report
Algorithm Library

18 Specialised Algorithms

Handwriting Static Analysis — Graph-Based Decomposition & Score-Based Likelihood Ratio
Random Forest Ensemble
Hundreds of decision trees trained on bootstrap samples of the CSAFE Handwriting Database produce a stable similarity score between two handwriting feature vectors. The forest aggregates cluster-frequency differences extracted from the skeletal graph representation of each sample, yielding a score calibrated into a Score-Based Likelihood Ratio (SLR) aligned with ENFSI and OSAC guidelines.
Static · SLR
Zhang-Suen Stroke Thinning
The Zhang-Suen parallel thinning algorithm reduces binary handwriting images to a single-pixel-width skeleton — the motor pathway of each stroke — without changing the topology of letterforms. This centerline representation eliminates pen-width variation and enables reliable graph decomposition into nodes and edges.
Static · Preprocess
Graph Decomposition into Loops & Edges
The thinned skeleton is parsed into a hierarchical graph: terminal nodes (endpoints), junction nodes (branch points), and connecting edges. Each letter cluster is represented as a set of graph components. The frequency distribution of cluster membership is the primary feature vector used for the Random Forest comparison.
Static · Features
Bootstrap Calibration & SLR Scoring
The Random Forest similarity score is calibrated against empirical same-writer and different-writer score distributions using kernel density estimation, producing a Score-Based Likelihood Ratio. The SLR is the formal evidential output, expressed using the ENFSI verbal scale from "strong support for same writer" to "strong support for different writer."
Static · LR
Gabor Filter Bank
Multi-orientation, multi-scale Gabor filters characterise texture and directional patterns in the handwriting image — capturing pen pressure inference from stroke width modulation and directional consistency of letter formations across the sample.
Static
SVM Classifier
A Support Vector Machine trained with an RBF kernel provides a secondary classification layer over the extracted graph feature space, offering margin-based authorship decisions that complement the probabilistic Random Forest output — particularly useful for smaller reference samples.
Static
Signature Detection — Vision Transformer & DETR
YOLOS Vision Transformer (ViT)
You Only Look at One Sequence (YOLOS) treats the entire document image as a sequence of fixed-size non-overlapping patch embeddings processed by a multi-layer transformer encoder. Global multi-head self-attention enables each detection token to attend to every image patch simultaneously — detecting handwritten signatures regardless of position or surrounding context. The base model (127.73M parameters) achieves mAP50 = 0.887 on the held-out forensic document test set.
Detection · ViT
DETR Bipartite Matching Loss
The Detection Transformer (DETR) loss uses the Hungarian algorithm for one-to-one bipartite matching between predicted and ground-truth bounding boxes during training. This eliminates the need for non-maximum suppression post-processing. Each detection token independently predicts a bounding box in normalised coordinates and a class confidence score for the signature category.
Detection · DETR
Hungarian Algorithm (Optimal Assignment)
The Hungarian algorithm solves the assignment problem in polynomial time — during DETR training, it finds the globally optimal one-to-one matching between N predicted boxes and M ground-truth annotations. This ensures that each signature instance is predicted exactly once, providing stable and unambiguous gradient signals during fine-tuning.
Detection · Matching
Dynamic & Temporal Analysis — Sequence Modelling
Cosine Similarity Multi-Style Scoring
For the concurrent multi-style handwriting comparison engine, a cosine similarity measure in normalised feature space computes the angular distance between the query sample's feature vector and every enrolled reference style vector simultaneously — enabling full-population ranking in a single pass without sequential pairwise comparison.
Dynamic · Multi-Style
LSTM / GRU Temporal Network
Long Short-Term Memory and Gated Recurrent Unit networks model the temporal evolution of dynamic writing strokes — capturing velocity profiles, pressure transitions, pen-lift intervals, and rhythm across the full signing event. The LSTM's gating mechanism retains long-range temporal dependencies critical for discriminating habitual from non-habitual writing execution.
Dynamic
Hidden Markov Models (HMM)
HMMs model the latent pen states (stroke-down, stroke-up, pause) as a Markov chain with observable pressure and velocity emissions. The Viterbi algorithm decodes the most likely state sequence — revealing hesitation patterns and stroke-order anomalies that are characteristic of forged or disguised signatures.
Dynamic
Dynamic Time Warping (DTW)
DTW provides elastic alignment between two temporal sequences, allowing comparison of strokes executed at different speeds without penalising natural intra-writer speed variation. Combined with K-Nearest Neighbour classification (DTW-KNN), it underpins the online signature verification engine's ability to match genuine specimens against a reference enrolment set.
Dynamic
Sigma-Lognormal Kinematic Model
The Delta-Lognormal and Sigma-Lognormal models reconstruct the ideal neuromuscular velocity trajectory for each stroke based on the principle of superposition of lognormal velocity profiles. Deviations from the reconstructed ideal reveal non-habitual execution — a reliable discriminator between genuine and simulated signatures regardless of visual appearance.
Dynamic
Autoencoder Anomaly Detection
An LSTM autoencoder is trained on genuine signing event sequences. At inference, the reconstruction error for a new signing event signals anomaly — detecting replay attacks (pre-recorded genuine sequences injected into the system) at 99.8% accuracy, and identifying atypical execution patterns characteristic of forged or coached signatures.
Dynamic · Anti-Spoof
Signature Comparison, Fusion & Explainability
Siamese Neural Network
A twin-network architecture with shared weights learns a metric embedding space where genuine signature pairs cluster together and forgery pairs are separated. The network is trained using contrastive loss on a balanced set of genuine and forged signature pairs, producing a similarity embedding that enables 1:1 and 1:N comparison without retraining for new writers.
Comparison
Bayesian LR Score Fusion
Multi-model outputs are aggregated using Bayesian probability theory — computing the joint likelihood ratio from the product of independent evidential contributions across modules. The final LR is calibrated using logistic regression on a held-out validation set, satisfying the ENFSI requirement for calibrated probabilistic evidence reporting.
Fusion · LR
Multi-Head Self-Attention (Transformer)
Transformer self-attention identifies which regions, strokes, and letterforms within a handwriting sample are most discriminative for the authorship determination. Attention weight visualisations are directly interpretable by human examiners as heatmaps of evidential weight — meeting the explainability standard for expert witness testimony.
Hybrid
SHAP (SHapley Additive exPlanations)
SHAP values decompose each model prediction into feature-level contributions using the Shapley value framework from cooperative game theory. Every forensic conclusion is accompanied by a SHAP explanation quantifying how much each handwriting characteristic contributed to the decision — providing the interpretability required for expert witness examination and cross-examination.
Explainability
LIME (Local Interpretable Model-agnostic Explanations)
LIME constructs local surrogate models around each prediction — perturbing the input and fitting a simple linear model to the neighbourhood of the prediction in feature space. This generates human-readable explanations for individual decisions that are model-agnostic, enabling consistent explainability across all modules regardless of underlying architecture.
Explainability
Graph Neural Network (GNN)
Graph Neural Networks model the relational structure of handwriting — letter connectivity, stroke adjacency, and spatial co-occurrence — as a graph where nodes are letterform components and edges encode their spatial relationships. GNNs enable comparison of handwriting topology that is invariant to absolute scale and position.
Hybrid
Explainability

AI You Can
Defend in Court

Every AI decision produced by ForensicsFlow is traceable, reproducible, and interpretable. The engine satisfies the explainability requirements of ENFSI, OSAC, and ISO/IEC 17025 — ensuring that forensic conclusions can be defended under expert witness examination and cross-examination.

Score-Based Likelihood Ratio Output

The primary output for handwriting authorship determination is a Score-Based Likelihood Ratio (SLR) — the international standard for expressing forensic evidence strength endorsed by ENFSI and OSAC. The SLR is calibrated against known same-writer and different-writer score distributions and reported with a verbal scale from "strong support for same writer" to "strong support for different writer."

SHAP Feature Attribution Maps

Every analysis produces visual heatmaps — derived from SHAP values — highlighting which specific strokes, letterforms, regions, and temporal features drove the AI's conclusion. Examiners can review, annotate, and include these maps as court exhibits. SHAP attribution satisfies the Daubert standard requirement for transparent, auditable scientific methodology.

Full Methodology Audit Trail

Every API call, model version, parameter setting, preprocessing step, and intermediate result is logged immutably with timestamps and SHA-256 verification. Full reproducibility of any forensic conclusion is guaranteed indefinitely — satisfying the chain-of-custody and auditability requirements of ISO/IEC 17025:2017 and SWGDOC STD-01.

Calibrated Uncertainty Quantification

Confidence intervals and epistemic uncertainty are reported alongside every conclusion. The system quantifies not just what it concluded, but how certain that conclusion is and what sample characteristics limit confidence — providing the epistemic transparency required by ENFSI guidelines for probabilistic evidence evaluation.

ISO/IEC 17025
Lab Competence
ENFSI BFI-GUI
LR Reporting
OSAC FDX-1
SWGDOC Method
ISO/IEC 19794-7
Dynamic Biometrics

The Most Transparent
Forensic AI Available

Request technical documentation or a live walkthrough of our explainability framework.