Contrastive Learning for Efficient Transaction Validation in UTXO-based Blockchains

Hamid Attar, Luigi Lunardon, Alessio Pagani
6/2/2025
cs.LGcs.AI
contrastive-ssl

No confident code implementation found for this paper.

Abstract

This paper introduces a Machine Learning (ML) approach for scalability of UTXO-based blockchains, such as Bitcoin. Prior approaches to UTXO set sharding struggle with distributing UTXOs effectively across validators, creating substantial communication overhead due to child-parent transaction dependencies.

Show full abstract

This overhead, which arises from the need to locate parent UTXOs, significantly hampers transaction processing speeds. Our solution uses ML to optimize not only UTXO set sharding but also the routing of incoming transactions, ensuring that transactions are directed to shards containing their parent UTXOs. At the heart of our approach is a framework that combines contrastive and unsupervised learning to create an embedding space for transaction outputs. This embedding allows the model to group transaction outputs based on spending relationships, making it possible to route transactions efficiently to the correct validation microservices. Trained on historical transaction data with triplet loss and online semi-hard negative mining, the model embeds parent-child spending patterns directly into its parameters, thus eliminating the need for costly, real-time parent transaction lookups. This significantly reduces cross-shard communication overhead, boosting throughput and scalability.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{attar2025contrastive,
  title  = {Contrastive Learning for Efficient Transaction Validation in UTXO-based Blockchains},
  author = {Hamid Attar and Luigi Lunardon and Alessio Pagani},
  year   = {2025},
  eprint = {2506.01614},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.01614v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.01614.svg)](https://codeofpaper.com/paper/2506.01614)

Discussion