Profiling Smart Contracts Interactions Tensor Decomposition and Graph Mining

Jérémy Charlier, Sofiane Lagraa, Radu State, Jérôme FrançoisMIDAS@PKDD/ECML 2017 · OpenReview

Abstract

The Ethereum ecosystem's growth has led to a complex network of smart contract interactions that are notoriously difficult to model due to their discontinuous and "bursty" nature. Traditional graph mining often fails to capture these temporal dynamics. This paper proposes a hybrid approach combining multi-dimensional tensor decomposition with stochastic "jump" processes to predict future interactions. By modeling transactions as a 3D tensor (Sender, Receiver, Time) and applying CP decomposition alongside a Variance-Gamma jump process, the researchers demonstrate superior performance in high-probability link prediction compared to standard graph mining, particularly at interaction thresholds above 61%.

Introduction

As automated protocols on the Ethereum blockchain execute transactions based on predefined conditions, understanding the resulting web of interactions becomes vital for security, auditing, and investment. However, smart contract behavior is often erratic—hyper-active for short periods and silent for months. This study aims to bridge the gap in modeling these "discontinuous" interactions by moving beyond 2D graphs into the realm of multi-dimensional tensors to see if they can accurately predict which contracts will interact next.

Methodology

The proposed pipeline fuses three distinct mathematical areas to model and predict blockchain activity:

  1. Tensor Modeling: Transactions are represented as a 3-way "topological tensor" with dimensions for Senders, Receivers, and Time intervals.
  2. CP Decomposition (CANDECOMP/PARAFAC): This method breaks down the massive, sparse tensor into a sum of simpler, rank-1 tensors, identifying underlying latent patterns across all three dimensions simultaneously.
  3. Stochastic Modeling (Variance-Gamma Process): To account for the "jumpy" nature of contract interactions, the authors employ a Variance-Gamma (VG) process, a pure jump model typically used in quantitative finance. This model is calibrated using tensor decomposition results to simulate future interaction probabilities.
CP Decomposition of the 3D interaction tensor into latent factors for senders, receivers, and time.

Data and Experimental Setup

The study utilized real-world data from the Ethereum blockchain spanning August 2015 to March 2016, encompassing approximately 2 million transactions. To manage the high sparsity of the data (where 60-70% of accounts interact only once), the researchers focused on the top 1% most active contracts. This resulted in a refined dataset of 459 senders and 813 receivers across 52 time intervals. The performance of the tensor-VG hybrid was benchmarked against standard graph mining techniques, including centrality measures, Bi-clique enumeration, and SimRank for link prediction.

Results and Discussion

The research revealed that tensors and graphs offer complementary strengths. While graph mining excels at detecting community structures and "cliques," the tensor-VG hybrid is superior at modeling the specific probability of future transactions.

Key findings include:

  • Threshold Sensitivity: The tensor approach's effectiveness is highly dependent on the "interaction threshold." While graph-based methods performed slightly better at low thresholds (under 20%) using Area Under the Curve (AUC) metrics, the tensor approach became significantly more robust for interaction thresholds higher than 61%.
  • Predictive Validation: The model successfully reproduced "permanent" interactions and correctly predicted the absence of interactions for specific pairs, as cross-validated against blockchain ground truth.
Interaction probability modeling for (a) an active contract pair and (b) a pair with no interactions.

Conclusion

The integration of tensor decomposition and stochastic jump processes provides a powerful framework for profiling smart contract interactions. While the tensor approach is currently less efficient at neighborhood-level community detection than graph algorithms, its predictive accuracy for high-confidence interactions is a significant advancement. Future work will focus on adapting the model for live streaming data and automating the calibration of stochastic parameters to enhance its utility for real-time security monitoring and investment strategies.

Summary updated

BibTeX
@inproceedings{charlier2017profiling,
  author = {Jérémy Charlier and Sofiane Lagraa and Radu State and Jérôme François},
  title = {{Profiling Smart Contracts Interactions Tensor Decomposition and Graph Mining}},
  booktitle = {MIDAS@PKDD/ECML},
  year = {2017},
  url = {https://openreview.net/forum?id=m7aQjoQ6_dRG},
}
Figure