Source-linked AI summary

AnalogRetriever: Learning Cross-Modal Representations for Analog Circuit Retrieval

Yihan Wang, Lei Li, Yao Lai, Jing Wang, Yan Lu

arXiv:2604.23195v1cs.CVcs.AI

TL;DR

Analog circuit search must bridge heterogeneous representations, while existing automation methods remain limited by domain and topology challenges. AnalogRetriever repairs circuit data and jointly embeds descriptions, schematics, and netlists with modality-specific encoders and curriculum contrastive learning. It reaches 75.2% average Recall@1 across six cross-modal directions and improves AnalogCoder’s functional correctness across evaluated LLMs, within a dataset currently covering 19 canonical topologies.

  • Problem

    Analog-circuit search is difficult because representations span text, schematics, and SPICE netlists, while existing generative methods can hallucinate or produce invalid topologies.

  • Method

    AnalogRetriever repairs MASALA-Chai data and maps descriptions, schematic images, and netlists into a shared space using VLM, port-aware RGCN, and curriculum contrastive learning.

  • Results

    75.2% average Recall@1 across six cross-modal directions, while integration with AnalogCoder improves functional correctness on all eight evaluated LLMs by averaging +5.6% absolute.

  • Takeaways & Limitations

    Retrieval-augmented AnalogCoder benefits across model families and parameter scales, and the code modality improves even Image↔Text retrieval directions.

  • Takeaways & Limitations

    The current dataset covers 19 canonical analog topologies, leaving mixed-signal, RF, and power-management circuits for future extension.

Abstract

from arXiv · show

Analog circuit design relies heavily on reusing existing intellectual property (IP), yet searching across heterogeneous representations such as SPICE netlists, schematics, and functional descriptions remains challenging. Existing methods are largely limited to exact matching within a single modality, failing to capture cross-modal semantic relationships. To bridge this gap, we present AnalogRetriever, a unified tri-modal retrieval framework for analog circuit search. We first build a high-quality dataset on top of Masala-CHAI through a two-stage repair pipeline that raises the netlist compile rate from 22\% to 100\%. Built on this foundation, AnalogRetriever encodes schematics and descriptions with a vision-language model and netlists with a port-aware relational graph convolutional network, mapping all three modalities into a shared embedding space via curriculum contrastive learning. Experiments show that AnalogRetriever achieves an average Recall@1 of 75.2\% across all six cross-modal retrieval directions, significantly outperforming existing baselines. When integrated into the AnalogCoder agentic framework as a retrieval-augmented generation module, it consistently improves functional pass rates and enables previously unsolved tasks to be completed. Our code and dataset will be released.

1 Introduction

AnalogRetriever addresses fragmented, expertise-heavy analog-circuit search by aligning text, schematics, and SPICE netlists in one semantic retrieval space. It combines repaired training data, topology-aware graph encoding, and contrastive learning to support cross-modal retrieval and downstream generation.

  • Existing analog-design automation mainly generates designs or netlists, but can hallucinate, produce invalid topologies, and struggle with domain-specific constraints.
  • Manual keyword search across design manuals, papers, and repositories is time-consuming, expertise-heavy, and difficult for newcomers using heterogeneous circuit representations.
  • AnalogRetriever maps functional descriptions, schematic images, and SPICE netlists into a unified semantic space for flexible cross-modal retrieval.Natural-language, schematic, or netlist queries can return matching or functionally similar designs across the other modalities.
  • The framework addresses domain adaptation and structural discrimination with repaired MASALA-Chai data, a topology-aware graph encoder, and curriculum-guided hard-negative mining.The repair pipeline refines the dataset, while progressively harder negatives distinguish circuits with similar functions but different implementations.
  • 75.2% average R@1 across six cross-modal directions outperforms CROP’s 4.7% average R@1 by over 15×.The evaluation uses 6,354 verified triplets with near-100% compilation and DC pass rate.

2 Related Work

Related work covers dataset construction, analog-circuit generation, and contrastive cross-modal retrieval. AnalogRetriever combines these strands by addressing text, schematic, and netlist retrieval within one framework.

  • Research gap: No existing work addresses text, schematics, and netlists together within a single retrieval framework.
  • Circuit datasets and conversion: Prior circuit-dataset work includes schematic-to-netlist conversion, SPICE generation from schematics, and more diverse paired data.
  • Analog-circuit generation: Existing analog-design systems primarily generate circuits or explore topology spaces, but reported approaches suffer from hallucination and invalid topologies.
  • Cross-modal retrieval: Contrastive vision-language methods align heterogeneous modalities, while graph neural networks recover netlist structure but are typically trained without natural-language alignment.

3 Method

AnalogRetriever maps netlists, schematics, and text into one shared embedding space for six cross-modal retrieval directions. Its architecture combines modality-specific encoders, tri-modal contrastive learning, topology supervision, and a staged curriculum that increases training difficulty.

  • Tri-Modal Retrieval: AnalogRetriever learns shared embeddings for SPICE netlists, schematic images, and text, enabling retrieval across all six cross-modal directions.Netlists, text, and schematics are encoded separately and compared through cosine similarity in a shared space.
  • Vision-Language Encoding: Schematic images and descriptions use CLIP’s ViT and Transformer encoders, with the bottom 16 of 24 ViT blocks frozen during adaptation.Freezing preserves pretrained visual-semantic alignment while the upper blocks adapt to circuit drawings.
  • Netlist Encoding: Netlists are encoded with a port-aware RGCN that distinguishes electrical roles such as MOSFET drain, gate, source, and bulk connections.The graph represents components as nodes and terminal-specific relationships as typed edges.
  • Netlist Encoding: Attention pooling aggregates node embeddings into graph-level vectors before an MLP projection maps them into the CLIP space.The pooling can emphasize functionally critical devices and down-weight boilerplate components.
  • Curriculum Training: The three-phase curriculum warms up the graph encoder, enables full contrastive learning, and then increases hard negatives to separate topologically similar circuits.Hard-negative sampling progresses from coarse functional distinctions toward structurally distinct circuits with similar functions.

4 Experiments

Experiments establish a refined, verifiable tri-modal dataset and evaluate AnalogRetriever through retrieval benchmarks, ablations, and AnalogCoder integration. The framework improves cross-modal retrieval and consistently raises functional correctness across language models, with qualitative cases showing retrieved topologies correcting invalid circuit generation.

  • Dataset Curation: 6,354 verified triplets are produced through two-stage LLM repair, raising compilation to 100.0% and DC pass rate to 99.7%.Stage 1 raises compilation from 22.0% to 99.2% and DC pass rate from 11.4% to 74.1%; Stage 2 iteratively repairs remaining failures using Ngspice feedback for up to K_max=5 iterations.
  • Experimental Settings: The evaluation reports Recall@K across all six cross-modal directions against external baselines and internal ablations on a 1,000-triplet test set.The comparison includes CLIP, CROP, ChatLS, and NetTAG, while Table 2 distinguishes TI, TIC, and the full AnalogRetriever model.
  • Main Results and Ablation: Adding the code modality increases T→I R@1 from 70.5% to 78.2% and I→T R@1 from 69.8% to 78.5%.The reported gains are +7.7 and +8.7, respectively, despite using the same CLIP backbone and identical image–text data.
  • Main Results and Ablation: 75.2% average R@1 results from curriculum learning, improving over 67.7% without curriculum and adding +1.6 average R@1 for port-aware RGCN over edge-agnostic GCN.The curriculum improves all six directions, while every direction exceeds 94% at R@5 and 97% at R@10.
  • Retrieval-Augmented Generation: AnalogRetriever raises AnalogCoder functional correctness from 62.0% to 67.6% on average across eight LLMs, an absolute gain of +5.6%.The largest gain is +10.0% on GPT-4o-mini, while Claude Sonnet 4.6 reaches 86.7%.
  • Retrieval-Augmented Generation: Retrieved circuit references convert representative failures into functional circuits, improving Task 9 from 0/5 to 5/5 and Task 17 from 0/5 to 4/5.The cases attribute improvement to retrieved topological guidance, including a Miller amplifier topology and a closed Wien-bridge feedback loop.

5 Conclusion

AnalogRetriever combines tri-modal alignment, repaired circuit data, and graph-aware curriculum training to improve cross-modal retrieval and downstream analog design generation. Its benefits extend across evaluated language models, while current applicability remains bounded by dataset coverage, relation design, and retrieval scale.

  • 5 Conclusion: 75.2% average Recall@1 across six cross-modal directions outperformed the best prior baseline by over an order of magnitude.The model aligns natural-language descriptions, schematic images, and SPICE netlists in a shared embedding space.
  • 5 Conclusion: +5.6% absolute functional-correctness gain across all eight evaluated LLMs, with Claude Sonnet 4.6 reaching 86.7%.The benefit generalized across model families and parameter scales.
  • 5 Conclusion: Tri-modal training improved Image↔Text retrieval by up to +8.7 R@1, while curriculum training added +7.5 Avg R@1 over the non-curriculum variant.The reported findings attribute these gains to graph-derived topological cues and stable joint optimization.
  • 5 Conclusion: The dataset covers 19 canonical analog topologies, and the RGCN uses 20 hand-defined port types.Future work also identifies efficient nearest-neighbor search as necessary for industrial-scale circuit databases.
Loading 2604.23195v1…