SPATA: Systematic Pattern Analysis
- SPATA is a deterministic method that transforms tabular datasets into a domain-independent discrete pattern space, capturing feature distributions without exposing raw values.
- It employs a recursive binning approach that discretizes both continuous and categorical features into hierarchical codes, preserving essential statistical properties.
- Empirical evaluations on network intrusion datasets demonstrate that SPATA supports robust model performance and adversarial analysis while enhancing data privacy.
to=arxiv_search 乐亚ని 红鼎json? {"query":"(Vitorino et al., 30 Sep 2025) SPATA: Systematic Pattern Analysis for Detailed and Transparent Data Cards", "max_results": 5} to=arxiv_search 天天中彩票微信 彩神争霸app 天天中彩票不中返json {"query":"(Vitorino et al., 30 Sep 2025)", "max_results": 5} to=arxiv_search code {"query":"(Vitorino et al., 30 Sep 2025)", "max_results": 5} to=arxiv_search {"query":"(Vitorino et al., 30 Sep 2025)", "max_results":5} Systematic Pattern Analysis (SPATA) is a deterministic method that converts any tabular dataset to a discrete, domain-independent representation of its statistical patterns, with the explicit aim of supporting detailed and transparent data cards without disclosing the original data. It was introduced to address a specific tension in robustness evaluation: external verification of machine-learning behavior often requires access to training and testing data, yet in domains such as cybersecurity, finance, and healthcare those data may be confidential or regulated. SPATA projects each instance into a shared discrete space that preserves how feature values are distributed, how they co-occur across features, and how they relate to class labels, while discarding the original numeric or categorical values (Vitorino et al., 30 Sep 2025).
1. Problem setting and design objective
SPATA is motivated by the observation that modern machine-learning models, including tree ensembles and neural networks, are susceptible to adversarial examples, and that a thorough robustness evaluation typically requires direct access to the underlying data. That access is needed to inspect the data distribution, define realistic perturbation regimes, and generate adversarial examples around real instances. In many high-stakes settings, however, sharing raw datasets is often impossible because of privacy, confidentiality, or regulatory constraints, including AI Act requirements (Vitorino et al., 30 Sep 2025).
Within that context, SPATA targets a gap in existing dataset documentation. Conventional data cards usually record feature types and descriptions, class labels, and basic statistics, but typically do not systematize detailed pattern information in a form that supports robustness evaluation or adversarial analysis without exposing the raw data. SPATA’s stated goal is therefore to allow external parties to study dataset structure and model robustness without access to original values, by sharing a domain-independent representation that still captures how values are distributed and co-occur (Vitorino et al., 30 Sep 2025).
A central design commitment is determinism. Given a dataset and a configuration such as the number of bins and recursion depth, the projection is completely determined and reproducible. No randomness is involved in defining bins, mapping values to bins, or identifying recursive subdomains. This determinism matters because external auditors must be able to re-derive the same projection, comparisons across time or organizations require stable representations, and randomization could itself encode data-dependent noise patterns.
2. Deterministic projection of tabular data
SPATA is defined for a tabular dataset with rows and columns, where row is and column is the feature vector . For a continuous feature , its domain is the interval between the empirical minimum and maximum:
The method estimates feature distribution through the empirical mean and the population standard deviation 0. Each continuous feature is then discretized into an odd number 1 of bins, with center index 2. The center bin is defined to contain values around the mean, specifically from 3 to 4. The edge bins are truncated to remain inside the empirical minimum and maximum, and the intermediate bins partition the remaining space into intervals positioned relative to the mean and standard deviation (Vitorino et al., 30 Sep 2025).
This construction yields a standardized first-level discretization. The center bin always denotes values close to the mean; bins with indices below 5 denote lower-than-mean regions, and bins above 6 denote higher-than-mean regions. Because the placement of bins is defined relative to 7 and 8, features with similar distributional shape but different scales can map corresponding regions to the same bin indices.
A value 9 in feature 0 is assigned a first-level code through
1
If 2 falls outside the empirical domain, it is mapped to 3 and effectively ignored. SPATA then refines this first-level assignment recursively. Within the bin that contains 4, it restricts attention to the corresponding subvector of feature values, recomputes mean and standard deviation on that subvector, re-bins that restricted domain, and maps 5 again. Repeated application produces a hierarchical code such as 6, written as 463. The recursive mapping is formalized as 7, where recursion stops when no further subdivision is possible or meaningful. In practice, recursion depth is a hyperparameter; the experiments use 3–8 levels, and with 8 and 3 levels the code space ranges from 111 to 999 (Vitorino et al., 30 Sep 2025).
Categorical features are not given explicit formulas in the method description, but in practice they are encoded, for example by one-hot encoding or grouping, and their domain is mapped directly to discrete codes, often without recursive subdivision.
3. Pattern representation in the projected space
For each instance 9, SPATA computes a code for every feature and represents the instance as an ordered tuple:
0
The collection of all such tuples forms the projected dataset 1, which has the same 2 structure as the original dataset but lives in a discrete code space. If the original dataset is labeled, the label 3 is carried over unchanged. These tuples of feature codes are SPATA’s fundamental notion of patterns: combinations of feature subdomains that recur across instances and classes (Vitorino et al., 30 Sep 2025).
The projected space supports class-conditional pattern analysis. For class 4, SPATA defines 5 as the multiset of projected instances with 6, and 7 as the set of unique projected tuples in that class. It further defines counts for individual feature codes and full combinations: 8 counts how many instances in class 9 contain a given code 0 in feature 1; 2 counts in how many classes that code appears; 3 counts the frequency of a specific projected combination; and 4 counts in how many classes that same combination occurs. Low overlap denotes class-specific regions of the discrete space, whereas high overlap denotes shared or ambiguous regions.
This representation is domain-independent in a precise sense. It retains only bin indices and code combinations; raw values, measurement units, and feature semantics are removed. The standardized binning procedure makes corresponding relative regions comparable across features and datasets. Information kept includes empirical distribution shape through means and standard deviations at each recursion level, density structure through finer coding in dense regions, and class-conditional structure through code and combination occurrence. Information discarded includes exact numeric values, exact ranges of bins, and domain context such as what a particular feature name means (Vitorino et al., 30 Sep 2025).
Algorithmically, the workflow proceeds feature by feature and instance by instance: compute summary statistics, build first-level bins, implement map and Rmap, project each feature value to a code, collect the projected tuples into 5, and then compute class-conditioned pattern statistics such as 6, 7, 8, 9, 0, and 1.
4. Robustness analysis, interpretability, and documentation
SPATA’s projected space is intended to support robustness evaluation even when original data cannot be shared. The experimental workflow begins from an original labeled dataset 2, constructs the SPATA projection 3, trains classifiers on both 4 and 5 using identical model types and hyperparameter search procedures, and compares generalization and robustness. The reported metrics are accuracy and macro F1, with macro F1 emphasized because it averages precision and recall equally across classes and is therefore critical in imbalanced settings such as cybersecurity (Vitorino et al., 30 Sep 2025).
Feature-wise robustness analysis is supported by examining which codes or subdomains are associated with misclassifications, by measuring code overlaps across classes, and by counting how many unique combinations per class are involved in errors. The method description explicitly notes that SPATA does not introduce a formal robustness-score formula in the projected space. Instead, the pattern counts provide a basis for such measures, for example through the proportion of class-specific versus shared combinations. This suggests that SPATA is primarily a representational and analytical substrate rather than a complete robustness metric.
Interpretability is built into the coding scheme. Bin indices encode the relative position of a feature value within its distribution—left tail, center, right tail, and finer subdivisions at deeper recursion levels. A pattern such as feature A: code 463, feature B: code 374, feature C: code 854 can therefore be interpreted as a specific combination of around-mean, higher, and lower regions across features. In the paper’s formulation, one can express explanations such as: instances where one feature lies in a far-right subdomain while another lies in a central subdomain are prone to misclassification into a given class (Vitorino et al., 30 Sep 2025).
These projected patterns can be summarized in data cards that go beyond conventional metadata. The proposed documentation includes pattern coverage, such as the number of unique combinations per class and the density distribution of combinations; overlap structure, including code overlaps per feature and combination overlaps across classes; and error statistics per pattern, including the fraction of misclassified instances per combination and patterns with high misclassification density. The paper also describes visualizations in which each class is plotted with a different color, combination frequency is indicated via opacity, and overlapping regions are visually identifiable. When combined with model predictions, the same pattern spaces can serve as model cards.
5. Empirical validation on network intrusion detection
The reported empirical study evaluates SPATA on two network intrusion detection datasets, CICIDS and IoT23. After preprocessing, including one-hot encoding with category aggregation, CICIDS contains 77 features, of which 65 are numerical and 12 categorical, and IoT23 contains 24 features, of which 4 are numerical and 20 categorical. Both datasets are described as highly imbalanced. The experiments use three models: XGB, LGBM, and MLP. Hyperparameters are tuned by grid search with 5-fold cross-validation on the training set, and the train/test split is 70%/30% with stratification (Vitorino et al., 30 Sep 2025).
SPATA is applied with up to 8 levels of granularity using an optimized C-backed Python implementation. The reported timing is 229.61 seconds for full analysis and projection on CICIDS and 9.92 seconds on IoT23. Robustness evaluation uses targeted adversarial evasion attacks, specifically HopSkipJump and A2PM, where attack-class instances are perturbed so that the model misclassifies them as benign. The adversarial test set size matches the original test set size.
On CICIDS, the clean-data results for XGB and LGBM are essentially unchanged under projection. For XGB, original versus SPATA accuracy is 99.97 vs 99.97 and macro F1 is 99.92 vs 99.92; under attack, accuracy is 84.29 vs 84.11 and macro F1 is 34.03 vs 30.94. For LGBM, original versus SPATA accuracy is 99.97 vs 99.97 and macro F1 is 99.91 vs 99.91; under attack, accuracy is 85.10 vs 84.26 and macro F1 is 35.62 vs 31.58. For MLP, the projected representation improves both clean and attacked performance: accuracy changes from 97.06 to 97.65 and macro F1 from 92.61 to 98.59 in the clean setting, while under attack accuracy changes from 85.52 to 93.04 and macro F1 from 53.74 to 74.07. The paper explicitly states that this suggests SPATA’s discretization sometimes acts as a beneficial regularization or feature engineering step for neural networks.
On IoT23, clean performance remains similar, with small decreases in most cases. For XGB, original versus SPATA clean accuracy is 95.54 vs 95.49 and macro F1 is 92.05 vs 91.69; under attack, accuracy improves from 46.24 to 59.98 and macro F1 from 36.13 to 45.73. For LGBM, clean accuracy is 95.55 vs 95.51 and macro F1 is 92.03 vs 91.96; under attack, accuracy improves from 53.10 to 61.70 and macro F1 from 41.75 to 43.74. For MLP, clean accuracy changes from 95.29 to 93.64 and macro F1 from 82.63 to 78.34; under attack, accuracy changes from 51.95 to 50.86 and macro F1 from 33.95 to 26.68. Overall, the reported conclusion is that SPATA preserves enough structure for meaningful training and robustness evaluation, and in some cases improves robustness (Vitorino et al., 30 Sep 2025).
The paper also reports SHAP-based feature-importance comparisons between original and projected datasets. Across both datasets and all models, most of the originally top-10 features remain highly ranked after projection, although some move a few ranks up or down. These rank shifts are interpreted as reflecting minor changes in decision boundaries due to discretization. In some cases the shifts appear beneficial; for example, in CICIDS with MLP, flow_duration becomes more important in SPATA space and aids detection of certain attack types.
6. Privacy properties, limitations, and relation to adjacent work
SPATA is designed to reduce leakage risk by sharing only bin indices, pattern counts, and optionally model behavior in the projected space, while omitting original values and domain semantics. Its privacy argument is qualitative rather than formal. The method relies on many-to-one mapping, because each bin covers a broad interval; hierarchical aggregation, because the codes remain aggregates over multiple values; and removal of units and scale, because outside parties know only relative position within a feature distribution. The paper does not provide formal privacy guarantees such as differential privacy bounds. Instead, it argues conceptually and empirically that reconstruction of original values is difficult or infeasible in general, particularly if absolute ranges or distributions are withheld. It also states an explicit trade-off: more bins and deeper recursion yield higher fidelity but smaller subdomains, whereas fewer bins and shallower recursion produce coarser patterns with greater privacy and more information loss (Vitorino et al., 30 Sep 2025).
Several limitations are identified. SPATA is defined for tabular data and continuous or categorical features, so extending it to images, text, or graphs would require additional design. Discretization necessarily loses information and can alter feature importance, decision boundaries, or performance. Because the bins are defined using mean and standard deviation, heavy-tailed or multimodal distributions may be imperfectly captured. In addition, the number of possible feature-code combinations grows exponentially with the number of features and recursion depth, even though in practice only observed combinations are analyzed. The future directions listed for the framework include model cards in SPATA space, adversarial example generation directly over codes, comparison of projected data with projected predictions to identify vulnerable regions, synthetic data generation from pattern statistics, correlation analysis and data-quality assessment, and integration with stronger privacy frameworks such as differential privacy mechanisms or secure multiparty computation.
In the literature, SPATA is positioned as distinct from conventional data-card frameworks, robustness-analysis tools, privacy-preserving machine learning, and traditional discretization or pattern-mining methods. Existing data cards are described as focusing on provenance, feature descriptions and types, basic distribution statistics, ethical considerations, and known biases, but not on joint patterns across features and classes in a reusable machine-interpretable form. Robustness tools and adversarial-attack libraries usually require direct access to the original input space. Privacy-preserving machine learning methods such as differential privacy, federated learning, and homomorphic encryption protect data during training or inference but do not directly address documentation and external validation through dataset-pattern sharing. Traditional discretization methods such as equal-width, equal-frequency, or entropy-based schemes, and traditional pattern-mining methods, are characterized in the paper as being less directly oriented toward domain-independent comparison and privacy-aware sharing.
A common terminological confusion is to associate SPATA with the earlier “SP theory of intelligence.” The latter is a compression-centered framework in which knowledge is represented as patterns and analyzed through multiple alignment, and it can be seen as a formal, implementable core for a broad notion of systematic pattern analysis. However, it is conceptually distinct from the 2025 SPATA framework for tabular data cards, and the 2013 paper does not use the term “SPATA” (Wolff, 2013).