Abstract
Motivation
Recent advances in DNA and RNA sequencing technologies and the gradual decrease in costs have allowed to design serial experiments with timestamps, even at single cell resolution. This possibility unlocks a finer level of detail, as well as a huge amount of noisy information to decode. Tools inferring regulatory networks, or patterns, from this type of data often focus on trajectories, disregarding local shapes and fundamental time series primitives. Moreover, they fail to target the analysis on a few meaningful results, reporting large and noisy outputs that need further downstream analysis.
Results
We describe SHISMA, a novel tool to infer significant cell type-specific co-dynamic gene subnetworks, from time series transcriptomic data, with strong statistical guarantees in terms of P value. SHISMA leverages isolated cell populations thanks to single-cell resolution, constructing cell type-specific pseudobulk time-series datasets. It then exploits a recently proposed time series primitive, the Bag-of-Receptive-Fields, adapted to discretize shorter temporal data and retain local shapes. SHISMA extracts significant groups of genes by performing a random walk approach on a protein–protein interaction network, with nodes identified by genes and scores derived from the shape-induced representation of the data, while properly validating via permutation and correcting for multiple hypothesis testing. Our extensive experimental evaluation on synthetic data shows that our tool is able to retrieve specific and significant subnetworks from time series transcriptomic data. Moreover, the subnetworks identified by SHISMA on real-world data confirm its ability to retrieve known cell type-specific processes, as well as potentially novel patterns and co-dynamic mechanisms.
Availability and implementation
1. Introduction
In the last 15 years, the continuous advances in DNA and RNA sequencing technologies allowed both the collection of huge amounts of data and the development of methods to tackle an increasingly higher level of heterogeneity and resolution. Initially, the prohibitive costs forced researchers to model the temporal dimension through heterogeneity in static and observational datasets. This constraint led to the advancement of now-established bioinformatics fields, such as, among others, subclonal reconstruction (Caravagna et al. 2020, Tarabichi et al. 2021) and causal inference (Lecca 2021, Mansouri et al. 2022, Simionato et al. 2024), primarily for genomic variant data. The rise of single-cell RNA sequencing (scRNA-seq) technology enabled the possibility of revealing the transcriptional information at the cell level, with unprecedented resolution. To incorporate the time variable in scRNA-seq, the pseudo-temporal ordering (Reid and Wernisch 2016, Trapnell et al. 2014) was developed as a particularly novel approach. This computational method infers temporal trajectories (e.g. differentiation and development) by ordering cells on a maturation scale based on the expression of key genes. Concurrently, RNA velocity frameworks (La Manno et al. 2018, Bergen et al. 2020) emerged to infer directional single-cell dynamics over shorter timescales by modeling the mathematical kinetics of unspliced and spliced mRNA transcripts directly from individual unsynchronized cellular states. More recently, the gradual decrease in sequencing costs has unlocked the possibility to design serial scRNA-seq experiments over time to monitor transcriptional dynamics of samples (e.g. patients’ response to treatments) or evolution dynamics of cell cultures. This enabled the emergence of a novel data type called scRNA-seq time series, incorporating real, rather than pseudo-estimated, temporal information. In this context, two main trends emerged with the integration of the temporal label: refinement of trajectory reconstruction (Ding et al. 2022, Macnair et al. 2022), and inference of gene regulatory networks (GRNs) (Marku and Pancaldi 2023). Nevertheless, while trajectory algorithms build on the established concept of pseudotime, now being informed by the actual time label to refine the ordering of cells, GRN methods instead aim at reconstructing complex networks and cause-effect relationships between genes given their temporal dynamic. Within the latter field, algorithms such as Cardamom (Ventre 2021) and WASABI (Bonnaffoux et al. 2019) stand out by explicitly modeling transcriptional dynamics, regulatory waves, and causal propagation delays directly from real-time stamped scRNA-seq data matrices. Although the two approaches present interesting standpoints and challenges, they share two main limitations. First, they build upon established biological frameworks (i.e. pseudotime) rather than focusing on purely time-dependent inference. Second, they offer a holistic approach, usually computationally expensive, unable by design to produce targeted results, which is a critical aspect to translate computational findings into biological insights.
This work bypasses these limitations by introducing a different paradigm centered on co-dynamic subnetwork inference, leveraging core principles from pattern mining and time series learning theory. Rather than attempting to map complete directional causal circuits, like Cardamom and WASABI, SHISMA isolates localized, topologically connected functional groups of genes (subnetworks) within a protein–protein interaction (PPI) network that exhibit highly synchronized, identical temporal expression shapes across an absolute timeline. To achieve this, our workflow aggregates single-cell data upstream into cell type-specific pseudobulk profiles per timepoint, exploiting single-cell resolution to isolate cell populations without cellular composition biases. Crucially, we acknowledge that systemic discordance between mRNA and functional protein levels (often estimated to impact approximately 50% of genes due to complex post-transcriptional regulation) prevents direct linear abundance mapping. Therefore, SHISMA leverages the PPI database strictly as a topological structural constraint, narrowing the high-dimensional search space and suppressing spurious transcriptomic false positives by evaluating only elements with a topological constraint, offered by the PPI link. In Section 3.1, we present the procedure to obtain the absolute time series dataset from which SHISMA mines the shape-induced significant subnetworks. Methodologically, our algorithm leverages a promising but overlooked primitive in time series analysis: the Bag-of-Receptive-Fields (BoRF) transformation (Spinnato et al. 2024), derived from the more traditional Bag-of-Patterns (Baydogan et al. 2013). Analogous to the Bag-of-Words model in text analysis, the BoRF encodes a time series by counting the occurrences of discretized patterns. These patterns are extracted using a sliding window and capture local temporal structures, or shapes, within the time series. A further challenge we address is a chronic issue when working with large omics datasets: false positives. In our scenario, a false positive is a non-relevant subnetwork whose estimated P value is less than a confidence threshold . This problem becomes more severe when performing inference from numerous parallel, short time series, requiring strict control of the family-wise error rate (FWER), which is the probability of outputting at least one false positive. In summary, our contributions are threefold. (i) We design SHISMA, a novel, translational algorithm to identify a list of significant gene subnetworks, guided by the local shape of time series subsequences specific to a cell type of interest, while controlling the FWER below a user-defined threshold. (ii) We show the need to correct for multiple hypothesis testing via network node permutation testing, as their associated SHAP scores serve as critical input to identify significant subnetworks. (iii) We perform an extensive evaluation on both synthetic and real-world scRNA-seq data in the specific biological domain of human immune response, to demonstrate the validity and robustness of our approach.
2 Methods
2.1 Background
Our algorithm integrates mathematical principles coming from a wide set of domains. For the sake of comprehension, we identified three main areas needing formalization and unification of their scientific notation. In the Supplementary Material we provide a summary of the terms used throughout the article to improve readability.
2.1.1 Time series and BoRF s primitive
Definition 1 (Time Series Dataset).
A time series, , is a sequence of T real-valued observations sampled over time, . A time series dataset, , is a collection of N time series.
Definition 2 (Time Series Classification).
Given a time series dataset and an associated label vector , where G denotes the number of distinct classes, the objective of Time Series Classification (TSC) is to learn a function f that assigns a predicted label to each input time series , i.e. for all . The resulting predictions form the vector .
Time series datasets can be used in a variety of tasks. This work exploits supervised learning, particularly TSC. In this setting, the central aim is to train a model f that generates predictions that are as close as possible to the ground truth labels . Many classification models additionally produce a probabilistic output , representing class likelihoods, from which the final prediction is obtained by selecting the most probable class for each instance. While achieving an acceptable level of classification accuracy is typically central, this work relies primarily on generating interpretable predictions that can provide insights into the model’s decision-making process, and concurrently unveil class-feature relationships. Since explanations are intended to clarify the behavior of the learned model, their practical usefulness depends both on the predictive reliability of the model and on the faithfulness and robustness of the explanations themselves (Crabbé and van der Schaar 2023). While recent work focuses on counterfactuals explainability (Wang et al. 2024), we leverage SHAP to attribute importance. To enable interpretability, time series can be transformed into tabular representations (Theissler et al. 2022). Among existing interpretable approaches, such as shapelets, interval-based, and dictionary-based, we focus on the latter, specifically on symbolic representations. Prominent methods include MrSEQL (Le Nguyen et al. 2019), MrSQM (Nguyen and Ifrim 2021), SCALE-BOSS-MR (Glenis and Vouros 2024), and BoRF (Spinnato et al. 2024), which achieves superior accuracy both in regular and irregular scenarios (Spinnato and Landi 2026). The BoRF extends the Bag-of-Patterns (Baydogan et al. 2013) by sliding strided, dilated windows over a time series to extract fields of length , potentially containing gaps. These patterns are standardized and discretized using SAX (Lin et al. 2007), which applies PAA (Keogh et al. 2001) to compute segment means, then quantizes them using Gaussian-distributed breakpoints into symbols.
Definition 3 (BoRF).
Given and H patterns, a BoRF is a matrix , where counts occurrences of hashed SAX pattern h in time series i.
2.1.2 Shapley values
The Shapley values, derived initially from the game theory domain (Shapley 1951), have gained significant popularity in explainable artificial intelligence research, since their modern formalization (Lundberg and Lee 2017). They offer a principled approach to feature attribution, aiming to fairly distribute a model’s prediction across its input features. The general formula to obtain feature attribution scores is provided by SHAP (SHapley Additive exPlanations), that extends Shapley values to model-agnostic explanation by using an additive surrogate model. More details can be found in Supplementary Material. Let f be the predictive model, h be the individual feature, and H be the set of input features. Then, the SHAP value for feature h is given by:
| (1) |
This equation captures the expected marginal contribution of feature h across all subsets of the other features. Generally, computing exact SHAP values requires the investigation of, at least, subsets, resulting in exponential complexity, and therefore making it an Hard problem, or even Complete in some domains (Matsui and Matsui 2001). However, recent work focuses on model-constrained approximations to make SHAP computation polynomial in time, thus feasible in practice. For instance, in the tree-based models domains which is relevant to our work, it is sufficient to calculate SHAP values on a single tree, since the SHAP values of tree ensembles equal the sums of SHAP values of its individual trees, according to their additivity property (Lundberg et al. 2018). In this context, TreeSHAP (Lundberg et al. 2020) was developed as bottom-up Shapley value approximation method designed for tree-based models such as decision trees, random forests, and gradient-boosting trees. More recently, an even faster implementation has been developed, FastTreeSHAP (Yang, 2021), which achieves quicker calculations by optimizing the number of explored paths across the tree splits up to the leaf nodes. This is crucial when calculating contributions from an input dataset consisting of a high number of observations.
2.1.3 Random walk with restart and hierarchical clustering
Biological processes are driven by intricate molecular interactions, often represented by networks such as PPI networks. In computational biology, they are typically modeled as network graphs , where vertices, or nodes, correspond to biologically relevant entities (e.g. genes or proteins), edges represent directed or undirected interactions between vertices, and weights encode statistical or experimental evidence, in the form of scores. Hierarchical HotNet (Reyna et al. 2018) is a method designed to discover hierarchies of significantly altered subnetworks in a vertex-weighted biological network. The objective is to infer groups of genes, modeled as vertices in a PPI network, that are both highly altered and topologically connected in the underlying interaction network. To integrate the a priori knowledge, Hierarchical HotNet calculates a joint similarity matrix based on a random walk with restart. Given an adjacency matrix and diagonal degree matrix , the random walk transition matrix is , where is the restart probability within the random walk. The result is a similarity matrix incorporating both topological information and vertex scores, defined as . This approach penalizes high-degree nodes, while capturing indirect relationships through multi-step paths in the network. Exploiting the similarity matrix , a family of directed graphs is subsequently defined by setting a threshold : . By clustering strongly connected components (SCCs) of , at each , a dendrogram is produced to capture relationships between clusters. This hierarchical approach allows the detection of subnetworks of different sizes. To compute the significance of the detected subnetworks, the algorithm compares the dendrogram to a null distribution generated by permutations of the node weights, while keeping their degree to preserve the network structure. Finally, a subnetwork is deemed altered if its cluster size exceeds what is expected under the null. For an in-depth description of the method, please refer to the original paper (Reyna et al. 2018). While SHISMA inherits this network propagation framework, we implemented a upgraded version that substitutes the directed SCC dendrogram assembly with a multi-scale percentile edge sweep, dense local topological weighting, and a direct permutation significance test (detailed in Section 2.2 and in supplementary data at Bioinformatics Advances online).
2.2 Algorithm
In this section, we present SHISMA, a novel method that identifies subnetworks of genes specific to a cell type of interest, driven by shapes, or subsequences, and significant (in terms of the P value), from scRNA-seq data, integrating biological domain knowledge through a PPI network. While doing so, we still control the FWER, given the high number of observations offered by scRNA-seq and a consequently higher amount of possible spurious links. Specifically, SHISMA takes in input a normalized dataset , a genetic identity vector , a cell type of interest , a PPI-induced network , and optionally a confidence level , pattern length (), and an alphabet size a. Additionally, the user can choose the number of permutations and the dilation parameter d, which allows to control the spacing of the timepoints by skipping them and looking at broader structural patterns. In output, SHISMA produces a list of clusters, or subnetworks, ordered by their P-value, and pertaining to a specific pattern, or temporal shape. SHISMA’s pseudocode is available in Algorithm 1. Given the definitions in Section 2.1, our setting receives the following inputs: is a list of N single cell transcriptomic time series, sampled at T timepoints, thus is the observed expression of gene at timestamp t; is the cell type related to time series ; is the induced graph with genes representing the nodes and interactions derived from a PPI database representing the edges. SHISMA, whose graphical representation is shown in Fig. 1, and notation summary available in Supplementary, works in three steps, expanded in the following paragraphs.
Algorithm 1.
SHISMA
Input: dataset , genes , cell types , cell type of interest , network , pattern length , alphabet size a, dilation d, confidence level , permutations , correction K
Output: ranked list of significant subnetworks , with related shape pattern h and
1:
2:
3:
4:
5: for Every pattern h in do
6: fitTreeModel
7: for Every gene y do
8:
9: end for
10: end for
11: , output
12: for every pattern h and score list do
13:
14:
15:
16:
17: end for
18: returnoutput
Figure 1.

Graphical representation of our algorithm, SHISMA. At the top of the image, the main data inputs are described, including the time series dataset , the gene identity array , the cell identity array , and the PPI-derived network . In the box, the standard three-step workflow of SHISMA is described for cell type of interest represented by the color purple. At the bottom of the image, the results for are depicted in non-tabular form, with the main attributes being: pattern h, genes in the subnetwork, and corresponding P value.
2.3 Time series primitive transformation
The first step of our method consists in applying the BoRF function (Algorithm 1, line 1). As described in Section 2.1.1, the original dataset of time series is converted into a representation space . In , features are represented by patterns H: informally, we can refer to these patterns as temporal shapes, since their main contribution is to characterize fixed-length trends of gene expression over time. The number of patterns depends on both the length and the alphabet size a used to encode the expression levels. Subsequently, we binarize to catch only the presence or absence of a specific pattern within the time series, and filter the information that is relevant to the cell type of interest , thus yielding . As preparatory step to the following paragraph, we one-hot-encode the gene vector into a matrix .
2.4 Model fitting and score calculation
The second step consists of calculating gene score values via SHAP, as described in Section 2.1.2, for each pattern in . The feature attribution can only be achieved by fitting a compatible tree-based model for every h. The response variable is modeled with the following formula , where is fitted as a binary class classification problem. Informally, at every iteration of the loop (Algorithm 1, lines 5–10), each gene’s contribution toward the prediction of the pattern’s presence is calculated, just as a feature’s importance is calculated in relation to an outcome of interest in traditional machine learning modeling. Thus, a cell type-specific dataset is yielded, corresponding to SHAP-based gene-pattern contribution scores.
2.5 Subnetworks computation
Finally, the last step consists in discovering cell type-specific, shape-induced subnetworks within and determining their statistical significance. To do so, we significantly adapt and optimize the network propagation framework of Hierarchical HotNet (Reyna et al. 2018). Instead of evaluating system-wide directed graph component hierarchies, our framework exploits an undirected setting (given the undirected nature of the PPI edges) in synergy with a local topological density upgrade. First, edges in are dynamically weighted based on the Jaccard similarity coefficient of their local neighborhoods to favor exchange within highly communicative communities. Second, rather than constructing a conventional dendrogram, SHISMA executes a multi-scale percentile search sweep (, , , , , percentile) over an edge-score matrix computed via the outer product of the network-propagated gene scores. SCCs that emerge within strict biological size boundaries are collected as unique candidate subnetworks. To evaluate significance, we employ a non-parametric network permutation framework, generating randomized null networks by shuffling edge connections while preserving the degree distribution of the original graph. For each candidate subnetwork, discovered in the real graph, an empirical P value is calculated as the proportion of permuted iterations yielding a subnetwork of equal or greater statistical significance. Additionally, the algorithm is iterated for as many pattern lists H of scores are available, performing independent random walks with restart on the same network . Thus, to address the severe multiple hypothesis testing burden, raw P values are adjusted using either false discovery rate (FDR) (Haynes 2013) or the more conservative Bonferroni. Finally, a cell type-based specificity filter, based on fold-change, is applied to retain subnetworks that are statistically relevant to the population under investigation. An in-depth description of this filter is available in Supplementary. The results are then parsed into a final report, indicating the shape, target cell type, subnetwork composition, and corrected P value.
3 Results
This section offers a deeper look at the results we obtained by deploying SHISMA. Section 3.1 introduces the real-world dataset and presents in silico findings by comparing with relevant biological literature. Section 3.2 assesses SHISMA’s stability under different circumstances by performing a set of tests on synthetic data. Section 3.3, finally, shows general performances related to runtime and justifies design choices in our pipeline.
3.1 Real-world experiments
We tested SHISMA on real-world data and evaluated the relevance of its findings. In the following paragraphs we will describe dataset preparation and the most significant results within the cell types of choice. Our findings highlight several biological processes reflecting responses to signals coming from both the exogenous stimuli provided to the culture system and the endogenous factors released from other immune populations.
3.1.1 Experimental protocol and single-cell sequencing
The longitudinal single-cell dataset was generated from peripheral blood mononuclear cells isolated from eight healthy donors. Cells were initially primed with 1000 IU/ml of recombinant human interferon- (hIFN-), followed 24 hours later by activation with 50 ng/ml of functional-grade anti-CD3 antibody and 500 IU/ml of recombinant human interleukin-2 (rhIL-2). The culture medium was sequentially replenished with rhIL-2 at days 5, 9, and 12. To track the transcriptomic kinetics, scRNA-seq was performed across six distinct timepoints (days 0, 1, 2, 5, 9, and 15; ) spanning 48 total samples. Extended documentation regarding technical execution and downstream quality control filters is provided in Supplementary.
3.1.2 Final dataset and experimental setup
Cell types were inferred with Azimuth (Hao et al. 2021), and subsequently manually refined by domain experts. As of interest, we chose to evaluate B cells: their role in the immune response is well-ascertained; therefore, they offer a good comparison baseline for our results. As a plus, their dynamics over time are transversal, offering a complete perspective on the immunological spectrum. Additionally, in Supplementary, we present insights on CD4 memory activated cells and CIK cells to offer a wider perspective on the immune landscape. To build the input list of time series , we averaged expression across same cell types for each timepoint, and pivoted the gene-cell type matrix into a one-column array. We then joined timepoints by considering common gene-cell type-patient keys, thus recreating the T-timepoint time series. In our experimental setup, , therefore the maximum length of patterns is shorter than T. As PPI-induced , we consider two curated immunitary PPIs, Reactome and KW-0391 (https://string-db.org/), filtering out interactions with confidence score lower than 70% to ensure robustness. As additional input parameters, we then set pattern length spanning from 2 to 4 timepoints, alphabet size a = 3 (i.e. low, medium, high expression), = 1000, and dilation d = 1. Other hyperparameters are set as default, as BoRF relies on an internal heuristic that automatically defines a set of configurations from the characteristics of the dataset, in order to build a multi-resolution representation of the data. We report the most significant results in Table 1, obtained by correcting with Bonferroni.
Table 1.
Subnetworks discovered by SHISMA on real-world datasets, focusing on B cells as .a
| ID | Pattern | Subnetwork | |
|---|---|---|---|
| 2a | HMLH | RNF111, UBC, UBE2D1, UBE2D2, UBE2N, ZNRF2 | .002 |
| 2b | MHML | ADA2, AMPD3, APRT, BTN3A1, BTN3A2, BTN3A3, CANT1, IL1F10, IL2, IMPDH1, IMPDH2, KPNA7, NME2, PKM, PNP, XDH | .002 |
| 2c | HLHH | CLTC, EEA1, GDI2, PIK3C3, RAB10, RAB14, RAB5B, RAB5C, RAB7A, RBSN, VAMP2 | .003 |
| 2d | HHML | CALM3, CAMK2A, CAMK2B, CAMK2D, CAMK2G | .011 |
| 2e | LMHM | EIF4A3, PPIE, SNRPA1 | .016 |
| 2f | HMLM | ARMC8, UBA1, UBA7, UBE2H, UBE2W, YPEL5 | .028 |
| 2g | MHL | TRIM17, TRIM39, TRIM9, UBE2D1 | .029 |
| 2h | LHLH | EEA1, GDI2, RAB5B, RAB5C | .035 |
| 2i | LHML | PJA1, UBE2D2, ZNRF2 | .035 |
| 2j | LHMM | GDI2, LNPEP, RAB10, RAB14, RAB5B, RAB5C, RBSN, SEC22B, SNAP23, SNAP25, SNAP29, STX1A, STX3, STX4, VAMP2, VAMP3, VAMP7, VAMP8 | .039 |
| 2k | HHML | ARMC8, UBE2H, YPEL5 | .042 |
| 2l | HLHL | GDI2, RAB10, RAB14, RAB5B, RAB5C, RAB7A | .048 |
Each resulting subnetwork is complemented with relative temporal pattern and sorted by statistical significance. The letters indicate low (L), medium (M), and high (H) expression. We report only the results with -value .
3.1.3 Results on B cells
Time-series analysis of the B-cell population revealed a temporal modulation across distinct subnetworks, reflecting a regulation of cell growth and aborted differentiation, antigen processing, and progressive population contraction. Cell growth and discouraged differentiation are reflected in subnets 2e, 2b, and 2d. In subnet 2d (Fig. 2), CAMK2D, involved in the maturation of B cells into plasma cells (Li et al. 2021), is progressively downregulated, suggesting unfavorable culture conditions for this cell type to promote differentiation. In the same subnet, CALM3 (Schmalzigaug et al. 2001) initially increases, advising a protective role of the cells from death, followed by a downregulation phase matching the progressive disappearing of B cells at later time points. In the initial survival phase, cell growth is supported also by genes involved in (i) mRNA splicing (SNRPA1, EIF4A3 and PPIE, subnet 2e), that are constantly increasing over time, (ii) nucleotide metabolism (ADA2, AMPD3, APRT, CANT1, IMPDH1/2, NME2, PNP, XDH, subnet 2b), and (iii) glycolysis (PKM, subnet 2b) (Yang et al. 2026). Antigen processing and class switching functions are actively regulated throughout the culture, captured by overlapping subnets (subnets 2c, 2h, 2j, and 2l). This functional maintenance is evidenced by a steady temporal increase in RAB GTPases (e.g. RAB7) (Runsala et al. 2023) and a fluctuating pattern driven by their regulator GDI2 (He et al. 2026), indicating an active control mechanism. Finally, progressive population contraction becomes dominant at later timepoints, as demonstrated by the robust upregulation of the ubiquitin-proteasome and protein catabolism machinery (subnets 2a, 2f, 2g, 2i, and 2k). The delayed peaking of these networks, driven by UBC (Bianchi et al. 2019), UBE2D1, E3 ubiquitin ligases of the TRIM family (Jawed et al. 2026), and the senescence regulator YPEL5 (Wu et al. 2025), indicates the onset of ubiquitin-mediated senescence, cellular degradation, and the ultimate competitive attrition of the B cells.
Figure 2.

This graph serves as a representative example of the output generated for each significant subnetwork. Specifically, for subnetwork 2d, introduced in Section 3.1, the left panel displays the log-normalized expression of the component genes over the absolute timeline: mean value across patients is shown, with variance bounds. The right panel, instead, highlights the underlying driving pattern, where discrete values 0, 1, and 2 correspond to standardized low, medium, and high expression levels, respectively.
3.1.4 Pathway enrichment and comparison with standard approaches
Since SHISMA’s perspective links unsupervised pattern mining with structural network propagation, it occupies a distinct niche from traditional active subnetwork discovery tools (Beisser et al. 2010, List et al. 2016). Therefore, a direct head-to-head architectural comparison is not feasible. Nonetheless, we performed a test to highlight differences between SHISMA and standard pathway enrichment methods applied to our real-world dataset. We compared the pathway enrichment profiles of our resulting subnetworks from B cell, CD4 memory activated T cell, and CIK cell data against a standard baseline bulk enrichment approach, relying on longitudinal differential expression via Analysis of Variance (ANOVA) to highlight highly-varying genes. Regarding B cells, the standard approach returned mostly systemic pathways (e.g. adaptive immune system and cytokine signaling) characterized by large gene sets, exhibiting significant background noise, and by the widespread presence of housekeeping genes, such as proteasome and ubiquitin-related subunits. In contrast, SHISMA effectively deconvoluted the larger network into highly specific, localized functional patterns with an average size of 7 genes, compared to 78 with the baseline method. By filtering out background noise, our method identified dynamic expression trends related to energetic adaptation (R-HSA-983712, R-HSA-382551), a progressive temporal increase in antigen processing (R-HSA-983168, R-HSA-983169, R-HSA-392499, R-HSA-8876198, R-HSA-9007101), and a gradual increase in lipid metabolism supporting cell maintenance (R-HSA-556833). These modules maintained robust statistical significance, demonstrating that our method provides a finer, and more complex resolution compared to traditional enrichment techniques. To quantitatively assess the agreement between SHISMA and the standard ANOVA approach in B cells, we computed the Jaccard similarity index (J) across both gene and pathway levels. Globally, the two methods exhibited modest overlap, sharing 84 significant pathways (). Notably, SHISMA identified 358 unique pathways completely missed by standard enrichment, while ANOVA uniquely captured 107. When examining the top 100 pathways, ranked by significance, only nine pathways overlapped (), including basic maintenance and immune cascades. Coherently, gene-level comparisons of the top 100 targets present . Agreement metrics in B cells are mirrored by results in CIK cells, with extremely low J (0.07 for top 100 genes, 0.01 for top 100 pathways). Concerning CD4 memory activated T cells, ANOVA did not produce any significant result, confirming the limitations of its approach. Together, these overlap statistics quantitatively demonstrate that SHISMA provides extremely complementary insights. Rather than simply reproducing the broad transcriptomic patterns captured by ANOVA, SHISMA instead is able to successfully isolate specific, dynamic subnetwork interactions that otherwise remain invisible to standard pipelines.
Additionally, we decided to test a relevant tool working with single cell time series to infer GRN, LEAP (Specht and Li 2017). LEAP returns correlations between genes, considering potential gaps in the time series, with intent similar to the dilation parameter present in BoRF. Our test was designed not to serve as direct comparison with SHISMA, rather to pose a provocative challenge to GRN inference algorithms. LEAP was given a B cell-filtered real-world dataset, a subset of the dataset that we described in Section 3.1. The results present couples with an absolute correlation value over 99.5%; the most highly correlated couples fall above 93%. It appears evident how such an amount of relevant information poses a challenge in terms of follow up.
3.2 Synthetic evaluation
We assessed SHISMA’s performances in multiple ways. First, we tested the effectiveness of the multiple hypothesis testing correction employed by our algorithm to bound the FWER. To do so, we sampled datasets of variable size (), with an increasing number of time points (), and with 5 or 10 patients, from a random distribution. For each experiment, a PPI with random edges was generated, still guaranteeing a minimum number of edges for each node to avoid a disconnected graph. This sampling ensures that no known relationships are present in the simulated datasets. The number of synthetic datasets for this experiment was 18, summing up to 1332 tested patterns (, ). We then ran SHISMA with standard parameters: our algorithm reports only two patterns as significant, consisting of a 0.15% failure rate. It is worth mentioning that both patterns were connected to the same synthetic dataset. The experiment states the importance of the multiple hypothesis correction routine, certifying the robustness against false positives. To submit additional proof, we ran the same experiment on a modified version of SHISMA, skipping the correction: for every tested dataset, at least one pattern was wrongly reported as significant.
Second, we confirmed the ability to mine gene-cell type hotspot relationships planted in a noisy dataset. In fact, a synthetic dataset drawn from a random distribution is fairly unrealistic, but served as mandatory sanity check. To prove SHISMA’s capabilities in a more practical scenario, we simulated log normalized pseudobulk data, planting an association between a group of selected genes (from G000 to G030) and a selected cell type (CT0). We tested SHISMA’s ability to retrieve the selected genes as significant output. We acknowledged that the resulting recovered subnetworks corresponded exactly to the planted genes. This highlights SHISMA’s specificity, suggesting the production of reliable gene-cell type SHAP scores.
Lastly, exploiting the latter experimental setup, we performed an ablation study to justify the choice of the Decision Tree within SHISMA’s framework. We compared both performances and ability to retrieve the planted subnetworks of five models: the results are shown in Table 2. All models score high in terms of accuracy, but the metric we are particularly interested in is precision: in fact, the main objective is to retrieve true positives (i.e. genes associated with a pattern, and classified as such) with respect to false positives (i.e. genes wrongly classified as associated with a pattern). Decision Tree model stands out in terms of precision, while retaining a reasonable runtime and acceptable accuracy. However, the main discriminant is represented by its ability to retrieve exactly the planted genes as significant subnetwork, while other models fail to agree with the Decision Tree. The concordance between models in terms of top-scored genes is measured via Kendall coefficient (Kendall 1938) and presented in Supplementary.
Table 2.
Comparison of classification models on accuracy, precision, recall, and runtime.a
| Model | Accuracy | Precision | Recall | Time(s) |
|---|---|---|---|---|
| Decision Tree | 0.83 | 0.65 | 0.16 | 3.46 |
| Random Forest | 0.86 | 0.61 | 0.37 | 9783.44 |
| Extra Trees | 0.86 | 0.59 | 0.29 | 13038.16 |
| Ridge | 0.86 | 0.59 | 0.29 | 5.45 |
| Logistic | 0.84 | 0.59 | 0.19 | 1.99 |
The best result per individual metric is in bold.
3.3 Runtime and performance testing
We tested our method’s runtime under different inputs and parameters. We generated synthetic datasets as in Section 3.2, with the following characteristics: genes , timepoints , permutations , and planted timeseries equal to 10% of the total number of time series N. A constant number of cell types was considered (). On the one hand, Fig. 3a shows the test outcome: an exponential increase in runtime can be noticed on datasets with thousands of genes. Premising that 5000 genes and 10 cell types yields a runtime of less than 10 minutes, the use of a less rich PPI (most of the ones publicly available are in the order of hundreds of genes) significantly reduces the runtime. Instead, the impact of timepoints does not affect runtime. On the other hand, Fig. 3b reiterates that the number of input genes constitutes the primary driver of execution time. Crucially, the runtime curves remain flat across the permutation axis: this near-constant behavior showcases the high efficiency of the underlying parallelized permutation framework. Both plots present the 95% confidence intervals, revealing that variance across varied patient and timepoint dimensions remains tightly bound, suggesting operational stability even under high dimensional stress.
Figure 3.

Runtime performance analysis of our method. (a) The top plot shows the effect of dataset size, linearly correlated with the number of genes, colored by number of timepoints. Execution time increases with the number of evaluated genes. (b) The bottom plot presents the effect of the number of permutations on runtime, colored by number of genes. Execution time remains unaltered by the number of permutations. Both plots offer error bars with 95% confidence intervals.
4 Discussion
In summary, the availability of time-resolved scRNA-seq data is a powerful instrument to potentially tackle the diversity and complexity of the immune landscape. Thanks to this technological evolution, we developed SHISMA, a robust framework for identifying cell type-specific subnetworks with coordinated temporal dynamics in longitudinal scRNA-seq data. By leveraging the BoRF representation, SHISMA captures local temporal shapes, while the integration of a tree-based feature attribution scoring and network topology analysis via random walk with restart, enables the discovery of statistically grounded gene modules.
Our design choice to exploit a shape-driven representation through BoRF allows for a degree of temporal awareness. However, SHISMA primarily detects changes in expression states rather than propagation delays, like WASABI or Cardamom. Moreover, while the underlying BoRF framework demonstrates state-of-the-art performance on irregular intervals without explicit temporal alignment, we acknowledge that treating highly irregular gaps as equidistant steps represents a simplification. Thus, a weighting framework to account for this remains an active area for future improvement. Another architectural constraint is our reliance on a Decision Tree. Although this restricts the model pool, it remains a necessary design choice to ensure the accuracy of our synthetic benchmarks, as discussed in Supplementary. Regarding statistical robustness, our algorithm employs an FWER-controlled framework by default to provide the highest confidence in discovered patterns. However, we also support flexibility in this regard: FDR-based correction suits real-world experimental settings, where the biological signal-to-noise ratio necessitates a balance between strict error control and sensitivity, while Bonferroni allows a more conservative approach. We provide this as a user-defined parameter to accommodate the diverse requirements of longitudinal datasets.
Nonetheless, pattern discovery on short time series comes with limitations. In fact, moral, feasibility and availability reasons preclude the possibility to have a reasonable number of time points: for instance, repeated biopsies in living patients need approval from an ethical committee. Thus, a current and arguably permanent shortcoming is posed by datasets with extremely short time series, such as . By design, SHISMA slides a window of length for each subsequence across the time series, therefore it must hold to make the pattern discovery meaningful. Therefore, our algorithm is explicitly not recommended for minimal clinical designs restricted to simple pre- and post-treatment points where . Instead, SHISMA is optimized as a specialized framework for complex longitudinal monitoring projects. In our experiments, we were able to sample the cell culture 6 times over 15 days; therefore, we pushed the discovery up to and evaluated a richer set of patterns in our result section.
Additionally, we acknowledge that SHISMA exploits cell type assignments thanks to single-cell resolution, but methodologically operates on pseudobulk expression profiles. While this averaging step acts as a robust filter against single-cell stochasticity and dropout noise, it assumes a degree of unimodality within each cell type and may eventually mask intra-cluster heterogeneity or divergent sub-populations. We are working on an upgraded iteration of the framework that incorporates single-cell resolution directly, to resolve bifurcations and multi-stability. Consequently, the tool is best suited for identifying co-dynamic modules, rather than inferring directed interaction logic in a strictly causal manner.
Currently SHISMA exploits a cell type specificity filter that works similarly to differential expression analysis. However, this filter does not fully address another current limitation and possible extension: the possibility to recover differentially significant patterns, by comparing datasets sampled under diverse conditions. It could be extremely informative to evaluate the dynamics of a disease or a treatment, with respect to a control status. In fact, the final aim of our tool is not only to describe biological mechanisms, but also, and most importantly, to unveil potential treatment targets.
To this end, a future perspective sees the application of SHISMA to time series datasets of human tumors, as we believe it is robust enough to disentangle meaningful processes in such an intricate context. This would enhance knowledge and offer a novel therapeutic focus to tackle the disease with an unprecedented level of detail.
Supplementary Material
Acknowledgements
We acknowledge Prof. Antonio Rosato for funding the real-world experiments whose data we exploited in this work.
Contributor Information
Antonio Collesei, Biostatistics and Bioinformatics, Veneto Institute of Oncology IOV-IRCCS, via Gattamelata 64, Padua, 35128, Italy.
Pierangela Palmerini, Immunology and Molecular Oncology Diagnostics, Veneto Institute of Oncology IOV-IRCCS, via Gattamelata 64, Padua, 35128, Italy.
Emilia Vigolo, Immunology and Molecular Oncology Diagnostics, Veneto Institute of Oncology IOV-IRCCS, via Gattamelata 64, Padua, 35128, Italy.
Francesco Spinnato, Department of Computer Science, University of Pisa, Largo Bruno Pontecorvo 3, Pisa, 56127, Italy.
Author contributions
Antonio Collesei (Conceptualization [lead], Data curation [lead], Formal analysis [lead], Investigation [lead], Methodology [lead], Project administration [lead], Software [lead], Writing—original draft [lead], Writing—review & editing [lead]), Pierangela Palmerini (Data curation [supporting], Resources [supporting], Validation [lead], Writing—original draft [supporting], Writing—review & editing [supporting]), Emilia Vigolo (Validation [supporting], Writing—original draft [supporting], Writing—review & editing [supporting]), and Francesco Spinnato (Conceptualization [equal], Methodology [equal], Supervision [lead], Validation [supporting], Writing—original draft [supporting], Writing—review & editing [supporting])
Supplementary material
Supplementary material is available at Bioinformatics Advances online.
Conflicts of interest
The authors do not declare any conflict of interest.
Funding
This research was supported by Italian Ministry of Health—Ricerca Corrente.
Data availability
Code, instructions and data are available at GitHub https://github.com/antoniocollesei/SHISMA.
References
- Baydogan MG, Runger G, Tuv E. A bag-of-features framework to classify time series. IEEE Trans Pattern Anal Mach Intell 2013;35:2796–802. 10.1109/TPAMI.2013.72 [DOI] [PubMed] [Google Scholar]
- Beisser D, Klau GW, Dandekar T et al. Bionet: an R-package for the functional analysis of biological networks. Bioinformatics 2010;26:1129–30. 10.1093/bioinformatics/btq089 [DOI] [PubMed] [Google Scholar]
- Bergen V, Lange M, Peidli S et al. Generalizing RNA velocity to transient cell states through dynamical modeling. Nat Biotechnol 2020;38:1408–14. 10.1038/s41587-020-0591-3 [DOI] [PubMed] [Google Scholar]
- Bianchi M, Crinelli R, Giacomini E et al. A negative feedback mechanism links ubc gene expression to ubiquitin levels by affecting RNA splicing rather than transcription. Sci Rep 2019;9:18556. 10.1038/s41598-019-54973-7 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bonnaffoux A, Herbach U, Richard A et al. Wasabi: a dynamic iterative framework for gene regulatory network inference. BMC Bioinformatics 2019;20:220. 10.1186/s12859-019-2798-1 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Caravagna G, Heide T, Williams MJ et al. Subclonal reconstruction of tumors by using machine learning and population genetics. Nat Genet 2020;52:898–907. 10.1038/s41588-020-0675-5 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Crabbé J, van der Schaar M. Evaluating the robustness of interpretability methods through explanation invariance and equivariance. Adv Neural Inf Process Syst 2023;36:71393–429. [Google Scholar]
- Ding J, Sharon N, Bar-Joseph Z. Temporal modelling using single-cell transcriptomics. Nat Rev Genet 2022;23:355–68. 10.1038/s41576-021-00444-7 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Glenis A, Vouros G. Scale-boss-mr: scalable time series classification using multiple symbolic representations. Appl Sci 2024;14:689. 10.3390/app14020689 [DOI] [Google Scholar]
- Hao Y, Hao S, Andersen-Nissen E et al. Integrated analysis of multimodal single-cell data. Cell 2021;184:3573–87.e29. 10.1016/j.cell.2021.04.048 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Haynes W. Bonferroni Correction. New York, NY: Springer, 2013, 154. 10.1007/978-1-4419-9863-7_1213 [DOI] [Google Scholar]
- He C, He T, Zuo Z et al. Gdi2 protein: research progress and its mechanisms in diseases. Front Cell Dev Biol 2026;14:1848213. 10.3389/fcell.2026.1848213 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jawed B, Kanwal R, Zakir SK et al. Trim proteins as emerging regulators of immune pathways: potential therapeutic targets in immune-related disorders. Front Immunol 2026;17:1764253. 10.3389/fimmu.2026.1764253 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Jin S, Chin J, Seeber S, et al. Tl1a/tnfsf15 directly induces proinflammatory cytokines, including tnf, from cd3+ cd161+ t cells to exacerbate gut inflammation. Mucosal Immunol 2013;6:886–99. [DOI] [PubMed] [Google Scholar]
- Kendall MG. A new measure of rank correlation. Biometrika 1938;30:81–93. 10.1093/biomet/30.1-2.81 [DOI] [Google Scholar]
- Keogh E, Chakrabarti K, Pazzani M et al. Dimensionality reduction for fast similarity search in large time series databases. Knowl Inf Syst 2001;3:263–86. 10.1007/PL00011669 [DOI] [Google Scholar]
- La Manno G, Soldatov R, Zeisel A et al. RNA velocity of single cells. Nature 2018;560:494–8. 10.1038/s41586-018-0414-6 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Le Nguyen T, Gsponer S, Ilie I et al. Interpretable time series classification using linear models and multi-resolution multi-domain symbolic representations. Data Min Knowl Disc 2019;33:1183–222. 10.1007/s10618-019-00633-3 [DOI] [Google Scholar]
- Lecca P. Machine learning for causal inference in biological networks: perspectives of this challenge. Front Bioinform 2021;1:746712. 10.3389/fbinf.2021.746712 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Li X, Zeng Q, Wang S et al. Crac channel controls the differentiation of pathogenic b cells in lupus nephritis. Front Immunol 2021;12:779560. 10.3389/fimmu.2021.779560 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lin J, Keogh E, Wei L et al. Experiencing sax: a novel symbolic representation of time series. Data Min Knowl Disc 2007;15:107–44. 10.1007/s10618-007-0064-z [DOI] [Google Scholar]
- List M, Alcaraz N, Dissing-Hansen M et al. Keypathwayminerweb: online multi-omics network enrichment. Nucleic Acids Res 2016;44:W98–W104. 10.1093/nar/gkw373 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lundberg SM, Erion G, Chen H et al. From local explanations to global understanding with explainable ai for trees. Nat Mach Intell 2020;2:56–67. 10.1038/s42256-019-0138-9 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lundberg SM, Erion GG, Lee S-I et al. Consistent individualized feature attribution for tree ensembles. arXiv, arXiv:1802.03888, 1802.03888, 2018, preprint: not peer reviewed. [Google Scholar]
- Lundberg SM, Lee S-I. A unified approach to interpreting model predictions. Adv Neural Inform Process Syst 2017;30. [Google Scholar]
- Macnair W, Gupta R, Claassen M. Psupertime: supervised pseudotime analysis for time-series single-cell rna-seq data. Bioinformatics 2022;38:i290–98. 10.1093/bioinformatics/btac227 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Mansouri M, Khakabimamaghani S, Chindelevitch L et al. Aristotle: stratified causal discovery for omics data. BMC Bioinformatics 2022;23:42. 10.1186/s12859-021-04521-w [DOI] [PMC free article] [PubMed] [Google Scholar]
- Marku M, Pancaldi V. From time-series transcriptomics to gene regulatory networks: a review on inference methods. PLoS Comput Biol 2023;19:e1011254. 10.1371/journal.pcbi.1011254 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Matsui Y, Matsui T. Np-completeness for calculating power indices of weighted majority games. Theoretical Computer Science 2001;263:305–10. 10.1016/S0304-3975(00)00251-6 [DOI] [Google Scholar]
- Nguyen TL, Ifrim G. Mrsqm: fast time series classification with symbolic representations, arXiv, arXiv:2109.01036, 2109.01036, 2021, preprint: not peer reviewed. [Google Scholar]
- Reid JE, Wernisch L. Pseudotime estimation: deconfounding single cell time series. Bioinformatics 2016;32:2973–80. 10.1093/bioinformatics/btw372 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Reyna MA, Leiserson MDM, Raphael BJ. Hierarchical hotnet: identifying hierarchies of altered subnetworks. Bioinformatics 2018;34:i972–80. 10.1093/bioinformatics/bty613 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Richard AC, Ferdinand JR, Francoise M et al. The tnf-family cytokine tl1a: from lymphocyte costimulator to disease co-conspirator. J Leucocyte Biol 2015;98:333–45. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Runsala M, Kuokkanen E, Uski E et al. The small gtpase rab7 regulates antigen processing in b cells in a possible interplay with autophagy machinery. Cells 2023;12:2566. 10.3390/cells12212566 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Schmalzigaug R, Ye Q, Berchtold MW. Calmodulin protects cells from death under normal growth conditions and mitogenic starvation but plays a mediating role in cell death upon b-cell receptor stimulation. Immunology 2001;103:332–42. 10.1046/j.1365-2567.2001.01259.x [DOI] [PMC free article] [PubMed] [Google Scholar]
- Shapley LS. Notes on the n-person game—II: The Value of an n-Person Game. 1951.
- Simionato D, Collesei A, Miglietta F et al. Allstar : inference of causal rules between somatic mutations and cancer phenotypes. Bioinformatics 2024;40:btae449. 10.1093/bioinformatics/btae449 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Specht AT, Li J. Leap: constructing gene co-expression networks for single-cell rna-sequencing data using pseudotime ordering. Bioinformatics March 2017;33:764–6. 10.1093/bioinformatics/btw729 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Spinnato F, Guidotti R, Monreale A et al. Fast, interpretable, and deterministic time series classification with a bag-of-receptive-fields. IEEE Access 2024;12:137893–912. 10.1109/ACCESS.2024.3464743 [DOI] [Google Scholar]
- Spinnato F, Landi C. PYRREGULAR: a unified framework for irregular time series, with classification benchmarks. Proceedings: The Fourteenth International Conference on Learning Representations (ICLR), Rio de Janeiro (Brazil), 2026. https://openreview.net/forum? id=qetBM8nLkf.
- Tarabichi M, Salcedo A, Deshwar AG et al. A practical guide to cancer subclonal reconstruction from DNA sequencing. Nat Methods 2021;18:144–55. 10.1038/s41592-020-01013-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Theissler A, Spinnato F, Schlegel U et al. Explainable AI for time series classification: a review, taxonomy and research directions. Ieee Access 2022;10:100700–24. 10.1109/ACCESS.2022.3207765 [DOI] [Google Scholar]
- Trapnell C, Cacchiarelli D, Grimsby J et al. Pseudo-temporal ordering of individual cells reveals dynamics and regulators of cell fate decisions. Nat Biotechnol 2014;32:381. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ventre E. Reverse engineering of a mechanistic model of gene expression using metastability and temporal dynamics. In Silico Biol 2021;14:89–113. 10.3233/ISB-210226 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wang Z, Samsten I, Miliou I et al. Glacier: guided locally constrained counterfactual explanations for time series classification. Mach Learn 2024;113:4639–69. 10.1007/s10994-023-06502-x [DOI] [Google Scholar]
- Whitmire JK. Not all Roads to T Cell Memory Go Through stat4 and tbet. 2014. [DOI] [PubMed]
- Wu X, Zhang M, Moon J-S et al. Senescent activated naive b cells promote anti-citrullinated antigen t cell responses and the transition to clinical rheumatoid arthritis. bioRxiv, 10.1101/2025.10.14.682430, 2025, preprint: not peer reviewed. https://www.biorxiv.org/content/early/2025/10/15/2025.10.14.682430 [DOI] [Google Scholar]
- Yang J. Fast treeshap: accelerating shap value computation for trees. arXiv, 210909847, 2021, preprint: not peer reviewed. [Google Scholar]
- Yang X, Tang H, Lan C et al. Single-cell analysis reveals multi-faceted features of b cell development, together with age-associated b cell subpopulations. Commun Biol 2026;9:240. 10.1038/s42003-026-09515-z [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
Code, instructions and data are available at GitHub https://github.com/antoniocollesei/SHISMA.
