Learning Library Cell Representations in Vector Space
Rongjian Liang, Yi-Chen Lu, Wen-Hao Liu, Haoxing Ren
TL;DR
Lib2Vec addresses the challenge of learning meaningful vector representations for library cells to enable ML-driven circuit analysis, by proposing a self-supervised framework that derives training data from Liberty files and evaluates semantics with automated regularity tests. The approach combines an attention-based model with separate functional and electrical branches to produce property- and arc-aware embeddings, validated through tests that reveal functional and electrical relationships such as $vector(BUF) - vector(INV) + vector(AND) \,\approx \, vector(NAND)$. Empirical results show Lib2Vec captures functional/electrical properties and provides significant gains in downstream circuit tasks, especially under limited labeled data, highlighting potential for circuit foundation models and cross-library transfer. This work thus enables data-efficient, transferable circuit representations and sets the stage for broader adoption in ML-assisted circuit design and optimization.
Abstract
We propose Lib2Vec, a novel self-supervised framework to efficiently learn meaningful vector representations of library cells, enabling ML models to capture essential cell semantics. The framework comprises three key components: (1) an automated method for generating regularity tests to quantitatively evaluate how well cell representations reflect inter-cell relationships; (2) a self-supervised learning scheme that systematically extracts training data from Liberty files, removing the need for costly labeling; and (3) an attention-based model architecture that accommodates various pin counts and enables the creation of property-specific cell and arc embeddings. Experimental results demonstrate that Lib2Vec effectively captures functional and electrical similarities. Moreover, linear algebraic operations on cell vectors reveal meaningful relationships, such as vector(BUF) - vector(INV) + vector(NAND) ~ vector(AND), showcasing the framework's nuanced representation capabilities. Lib2Vec also enhances downstream circuit learning applications, especially when labeled data is scarce.
