Papers
Topics
Authors
Recent
Search
2000 character limit reached

Shesha Framework: Stability & Security

Updated 23 January 2026
  • Shesha is a framework that quantifies the stability of high-dimensional representations by assessing the self-consistency of pairwise distances via Spearman's correlation.
  • It offers actionable insights for model debugging, safety monitoring, and neuroscience by differentiating geometric stability from traditional similarity metrics like CKA.
  • A distinct Shesha variant applies particle-swarm optimization to uncover transient microarchitectural leakage paths in modern Intel processors, enhancing hardware security.

The Shesha framework refers to two fundamentally distinct research advances: one in the geometric analysis of learned representations in machine learning (Raju, 14 Jan 2026), and one in automated microarchitectural leakage discovery on modern Intel processors using advanced search techniques (&&&1&&&). Each instantiation of the framework is domain-specific; this entry focuses primarily on the Shesha geometric stability framework for representation auditing, while noting the unrelated security-oriented Shesha methodology for context.

Shesha (Geometric Stability Framework) provides a principled metric and toolkit for quantifying the reliability with which high-dimensional representations preserve their internal geometric structure under perturbations. Unlike similarity metrics such as CKA or Procrustes, Shesha is founded on assessing the self-consistency of pairwise distances within a representation, offering actionable signals for model debugging, safety monitoring, and neuroscience.

1. Formalization and Methodological Foundations

Geometric stability is defined as the preservation of the representational geometry—measured by pairwise distances—of an embedding XRn×dX \in \mathbb{R}^{n \times d} when subjected to controlled perturbations. The core tool is the Representational Dissimilarity Matrix (RDM), computed using the cosine distance:

Dij=1xixjxi2xj2D_{ij} = 1 - \frac{x_i \cdot x_j}{\|x_i\|_2 \|x_j\|_2}

Shesha quantifies geometric stability by splitting XX into two “views” via a perturbation operator Π\Pi, computing the RDMs D(1)D^{(1)}, D(2)D^{(2)} for both, and returning the Spearman's rank correlation coefficient over the vectorized upper-triangular entries:

Shesha(X)=ρs(vec(D(1)),vec(D(2)))\operatorname{Shesha}(X) = \rho_s( \mathrm{vec}(D^{(1)}), \mathrm{vec}(D^{(2)}) )

Multiple variants exist:

  • Feature-Split Shesha (unsupervised): Randomly divides features, compares geometry of the two halves, and averages Spearman correlations over KK random splits.
  • Sample-Split Shesha (unsupervised): Splits samples, correlates geometry for pairs present in both splits.
  • Supervised Shesha: Correlates RDM structure with label information—label-RDM alignment, class-separation ratio, and LDA subspace stability.
  • Domain-specific extensions: E.g., CRISPR-specific Shesha for quantifying perturbation direction coherence.

The algorithm is dominated by the repeated computation of O(n2)O(n^2)-size RDMs for KK splits, yielding a practical runtime complexity of O(Kn2d)O(K n^2 d). Subsampling to nmax=1600n_{max}=1600 samples for large nn is standard.

2. Theoretical Distinctions: Stability vs. Similarity

Shesha disentangles representational stability from traditional similarity:

  • Similarity metrics (CKA, Procrustes) are most sensitive to variance in dominant axes (top principal components).
  • Shesha remains sensitive to manifold structure throughout the spectral tail.

Empirical and theoretical investigations demonstrate:

  • After removing top PCs, similarity metrics (CKA) rapidly decay, while Shesha degrades slowly and remains non-trivial, indicating it integrates over the entire spectrum.
  • Regime analyses across 2,463 encoder configurations confirm the dissociation: aggregate Spearman ρ=0.01\rho = -0.01 (statistically indistinct from zero), with positive correlation in geometry-preserving projections (ρ+0.90\rho \approx +0.90) and inverse correlation under PCA compression (ρ0.47\rho \approx -0.47).

This demonstrates that stability and similarity probe distinct aspects of representational structure.

3. Empirical Validation Across Domains

Comprehensive experiments over seven domains and 2,463 configurations yield several applications:

  • Controllability/Steerability: Supervised Shesha robustly predicts linear steerability (SST-2: ρsup=0.962\rho_\mathrm{sup}=0.962; MNLI: ρsup=0.956\rho_\mathrm{sup}=0.956).
  • Safety Monitoring/Drift Detection: Shesha detects structural drift nearly 2×\times more sensitively than CKA. In early-warning settings, Shesha produces fewer false alarms (7.3%) than Procrustes (44%).
  • Model Selection/Transferability: Stability measures dissociate from standard transferability scores (LogME); e.g., DINOv2 models show “geometric tax” with top LogME but bottom Shesha rank.
  • Architectural Trends: Contrastive models (CLIP) and hierarchical vision architectures (Swin, PVT) exhibit higher Shesha scores than SSL and columnar (ViT, DeiT) architectures.

These empirical results underline Shesha’s capacity to offer orthogonal, actionable signals for model assessment relative to similarity analysis.

4. Applications in Life Sciences and Neuroscience

Extensions of Shesha go beyond machine learning:

  • CRISPR Perturbation Analysis: On 4 datasets (422 perturbations), magnitude-stability correlations of $0.746-0.963$ highlight that Shesha coherently tracks the effects of genetic perturbations, independent of sample size or variance.
  • Neurobehavioral Coupling: Analysis on Steinmetz Neuropixels datasets shows significant correlations (Shesha vs. neural-behavioral coupling: ρ=0.18\rho = 0.18, p=0.005p=0.005), with regional stability rankings (Striatum >> Motor >> Visual >> Hippocampus) and discernable hierarchies in temporal drift.

These examples demonstrate the generality and utility of geometric stability as a measure for representational consistency in both biological and computational systems.

5. Limitations, Implementation, and Open Questions

Several caveats and implementation notes accompany the Shesha framework:

  • Shesha assesses global RDM stability and may be insensitive to localized (token- or neuron-level) instabilities.
  • Comparative interpretation is most reliable within model families due to potential cross-family confounds.
  • Computational cost scales as O(Kn2d)O(K n^2 d) and typically requires subsampling for tractability.
  • Results are robust to alternative distance metrics (Euclidean, Mahalanobis, k-NN) and moderate KK; standard choice is K30K \approx 30.
  • Open questions include reconciliation of local/global stability, modality effects in supervised vs. unsupervised metrics, and integration with adversarial or continual-learning paradigms.

Reference code and tutorials are available at https://github.com/prashantcraju/geometric-stability, with a Python package pip install shesha-geometry (Raju, 14 Jan 2026).

6. Shesha in Microarchitectural Security

An entirely distinct Shesha framework exists in the domain of microarchitectural leakage analysis (Chakraborty et al., 2024). This Shesha employs a particle-swarm optimization (PSO) approach to automatically discover transient execution paths (“bad speculation”) in x86 ISA extensions on new-generation Intel processors. It leverages equivalence-class partitioning of the bad speculation space and a two-phase PSO algorithm (cognitive and mixed phases), rapidly identifying new attack primitives that expose previously invisible microarchitectural leaks. This variant provides exact event-trigger counts (via performance-monitoring counters) and has led to the discovery of novel leakage paths in SIMD, FMA, and AES/IFMA operations, with direct cryptographic implications.

7. Synthesis and Impact

Shesha, whether as a framework for representation auditing or for automated microarchitectural leakage discovery, denotes a set of rigorous, domain-adapted methodologies for uncovering latent structure and vulnerabilities in complex systems. In geometric stability, Shesha enables the quantification of robust structural consistency in high-dimensional spaces, providing an indispensable complement to similarity-based analyses and uncovering axes of model reliability, safety, and biological coherence previously overlooked by existing measures (Raju, 14 Jan 2026). In microarchitectural security, Shesha automates the identification of intricate transient side-channel paths in contemporary processor architectures, augmenting the state-of-the-art in hardware security auditing (Chakraborty et al., 2024).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Shesha Framework.