AnalogRetriever: Learning Cross-Modal Representations for Analog Circuit Retrieval
Listen
Radio episode about this paper
Transcript
Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.
Tom: We're looking at the paper: "AnalogRetriever: Learning Cross-Modal Representations for Analog Circuit Retrieval".
Jane: Here's the gist of the paper. AnalogRetriever presents a unified trimodal retrieval framework that maps functional descriptions, schematics, and SPICE netlists into a shared semantic space via contrastive learning This enables flexible cross-modal retrieval: a natural-language query such as “a two-stage op-amp with Miller compensation” returns matching schematics and netlists, and a schematic or netlist query returns functionally similar designs with their specifications The framework 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.
Tom: Dataset Construction and Refinement The foundation of the work involves building 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% This process involves Stage 1, which uses a base LLM for initial netlist repair with Ngspice validation, and Stage 2, which applies iterative feedback-guided refinement using a teacher model until convergence.
Jane: The final high-quality dataset consists of 6,354 verified triplets after filtering unrecoverable samples.
Tom: Encoding Architecture Details The system employs three modality-specific encoders to map SPICE netlists (port-aware RGCN), schematic images (ViT), and text descriptions (Transformer) into a shared embedding space The Vision Encoder uses a Vision Transformer (ViT)-L/14 image encoder and the Text Encoder utilizes a Transformer.
Paper summary: Lu: So, wrapping up the AnalogRetriever paper, the main contribution is this unified trimodal retrieval framework that maps functional descriptions, schematics, and SPICE netlists into a single semantic space using contrastive learning.
Tom: It’s about creating a system where you can query it with text and get back matching schematics or netlists, or you can input an image or a netlist and get functionally similar designs back.
Jane: The authors are trying to solve the cross-modal alignment challenge that no existing method has addressed before, which is how to bridge the gap between graph-structured code, images, and text.
Meng: For someone shipping models in production like myself, I see the implication for RAG integration—it grounds LLM outputs with verified circuit examples to reduce hallucination when we use these tools in generation tasks.
Lalam: They showed that by using this retrieval component with AnalogCoder, they lifted functional correctness on all eight of the LLMs used, setting a new state of the art recall at one of eighty-six point seven percent on Claude Sonnet four point six.
Tom: The title itself reflects what it does: learning these cross-modal representations for analog circuit retrieval. It’s about making circuit search much more intuitive for engineers who work with descriptions instead of just file formats.
Jane: In simple terms, it means you can describe a complex analog circuit in plain English and reliably find the exact hardware implementation that matches your functional requirements.
Conclusion: Tom: So, AnalogRetriever is just this framework that maps circuit descriptions, schematics, and netlists into one shared space using contrastive learning.
Jane: It’s about getting a unified way to look at analog circuits so you can query them with text and get the right physical design back.
Lu: The authors are showing how they used three different encoders—a graph network for the netlists, a vision transformer for images, and a standard transformer for the text—to build these mappings.
Meng: I’m interested in how they handled that graph part because those netlists are usually super complex structures at scale.
Lalam: They used a port-aware relational graph convolutional network that defines twenty edge types to handle all the different terminal connections across the circuit structure.
Tom: That sounds like it handles the physical layout details, which is crucial when you’re trying to match a functional description to a real circuit.
Jane: Exactly, and what they did with the training was a three-phase curriculum, starting simple and getting harder by adding more difficult examples at the end.
Lu: They used that curriculum to ensure the joint optimization didn't get stuck in some messy local minimums during training.
Meng: That sounds like a necessary evil when you’re trying to train models on such diverse data types; you gotta make sure it doesn't just learn one thing well.
Lalam: Their final results show an average recall at one of seventy-five point two percent across all six different ways you can look up these things.
Tom: Seventy-five point two percent is a big number when you compare it to the older baselines they tested, which were much lower.
Jane: And when they put this into their AnalogCoder agent, it actually lifts the functional correctness on all eight of those underlying large language models used.
Lu: That suggests that having that retrieval component acts like a strong anchor for the generation process itself.
Meng: If it really improves the functional pass rates, then deploying something like this in a production setting could cut down on rework significantly.
Tom: It seems they are focusing less on just getting one perfect answer and more on making sure the search mechanism is robust across all formats.
Jane: So, this isn't just about finding one circuit; it’s about creating a reliable bridge between what we describe and what we build in hardware.
Lu: The implication is that engineers might eventually be able to use natural language to specify complex analog behavior and have the system reliably pull up the exact schematic for it.
Meng: If that works consistently, then the cost of debugging those initial design choices drops because you're starting from a much more accurate retrieval point.
Tom: It sounds like they’ve built a solid foundation for using these multimodal inputs in any generative task involving analog components.
Jane: The next thing we need to look at is how this specific dataset was built, because getting that high quality data was clearly the biggest hurdle before they could get these impressive retrieval numbers.
Yihan Wang, Lei Li, Yao Lai, Jing Wang, Yan Lu
Tsinghua University · The University of Hong Kong · University of Cambridge
cs.CV, cs.AI
Submitted: 2026-04-25
Updated: 2026-11-10
Comments: ICCAD Camera Ready Version, Code and data: \url{https://github.com/yihan-wa/AnalogRetriever_ICCAD}
License: http://creativecommons.org/licenses/by/4.0/
Importance score: 100/100
The gist: AnalogRetriever presents a unified trimodal retrieval framework that maps functional descriptions, schematics…
Key concepts
- Contrastive Learning
- This is a training method where the model learns to pull similar items closer together in its mathematical space while pushing dissimilar items further apart. In this case, it teaches the system to understand that a text description of an op-amp is semantically close to its corresponding schematic and netlist.
- Port-Aware RGCN
- This is a specific type of neural network used to encode SPICE netlists. It treats the circuit like a graph where nodes are components and edges represent connections, specifically paying attention to the 'ports' or terminals on each component to understand how they are wired.
- Curriculum Hard Negative Mining
- This is a training strategy where the model is intentionally shown harder examples during training. By increasing the ratio of difficult negative samples, the system becomes more robust and better at distinguishing between very similar but incorrect circuit representations.
Terminology
Summary
AnalogRetriever presents a unified trimodal retrieval framework that maps functional descriptions, schematics, and SPICE netlists into a shared semantic space via contrastive learning This enables flexible cross-modal retrieval: a natural-language query such as “a two-stage op-amp with Miller compensation” returns matching schematics and netlists, and a schematic or netlist query returns functionally similar designs with their specifications The framework achieves an average Recall@1 of 75. p. 1 To address this gap, we propose AnalogRetriever, a trimodal retrieval framework that maps functional descriptions, schematics, and SPICE netlists into a unified semantic space via contrastive learning [12]. This enables flexible
cross-modal retrieval: a natural-language query such as “a
two-stage op-amp with Miller compensation” returns matching schematics and netlists, and a schematic or netlist query
returns functionally similar designs with their specifications. 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.Where the paper says it
Where the paper says it
Dataset Construction and Refinement
The foundation of the work involves building 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% This process involves Stage 1, which uses a base LLM for initial netlist repair with Ngspice validation, and Stage 2, which applies iterative feedback-guided refinement using a teacher model until convergence. The final high-quality dataset consists of 6,354 verified triplets after filtering unrecoverable samples. p. 5 A before/after
example appears in Fig. After filtering unrecoverable samples, we retain 6,354 high-quality triplets.Where the paper says it
Encoding Architecture Details
The system employs three modality-specific encoders to map SPICE netlists (port-aware RGCN), schematic images (ViT), and text descriptions (Transformer) into a shared embedding space The Vision Encoder uses a Vision Transformer (ViT)-L/14 image encoder and the Text Encoder utilizes a Transformer. For netlists, the Port-Aware Relational Graph Convolutional Network (RGCN) is used, which incorporates port-level semantics by defining 20 edge types covering all device terminals. p. 2 4 on T→C), precisely where port-level
semantics matter most. Each netlist 𝑐𝑖
is parsed into a graph 𝐺𝑖=(V𝑖
, E𝑖
, R) with
|R|=20 edge types covering all device terminals: MOSFET
(drain/gate/source/bulk), BJT (collector/base/emitter), source
(±), diode (anode/cathode), passive R/C/L terminals, four
controlled-source ports, shared_net for device–device connections on the same electrical net, and subckt_terminal for
subcircuit interfaces. Standard Graph
Convolutional Networks (GCNs) [21] with a single shared
edge weight cannot distinguish these port-level differences,
confusing functionally distinct circuits that share the same
topology. We therefore adopt a Relational GCN (RGCN) [22]
with a separate learnable weight matrix per edge type.Where the paper says it
Where the paper says it
Training Strategy and Curriculum
The training process utilizes a three-phase curriculum to ensure stable joint optimization, starting with Phase 1 where only the RGCN is trained with frozen CLIP weights. Phase 2 transitions to full six-way contrastive learning using random sampling after unfreezing CLIP, establishing a stable joint-optimization trajectory. p. 4 We unfreeze CLIP and switch to the
full 6-way loss Ltri while still using random sampling, so
the model is not simultaneously asked to handle newly
unfrozen parameters and hard negatives. The optimizer
is rebuilt with fresh Adam state and an independent
linear-warmup-then-cosine-decay schedule, establishing a
stable joint-optimisation trajectory before hard negatives
are introduced. The hard-negative
ratio increases linearly:
𝛼𝑚 = min𝛼max, 𝛼0 +
𝑚−1
𝑀−1
(𝛼max − 𝛼0)
, (7)
where 𝑚 is the current training epoch within Phase 3, 𝑀
is the total number of Phase-3 epochs, 𝛼0=0. 05 is the initial hard-negative ratio, and 𝛼max=0. 05 is the initial hard-negative ratio, and 𝛼max=0. 3 is the maximum ratio.Where the paper says it
Where the paper says it
Where the paper says it
Performance Gains and Utility
AnalogRetriever achieves an average R@1 of 75.2% across all six cross-modal directions, outperforming the strongest baseline by over an order of magnitude Introducing the code modality yields mutual enhancement, with even Text↔Image directions improving by up to +8. p. 1 6% R@1 versus
9. Introducing the code modality yields
mutual enhancement: even Text↔Image directions improve
by up to +8. When integrated with AnalogCoder
via RAG, it lifts functional correctness on all eight LLMs
(averaging +5. 6%) and sets a new state of the art of 86. 6%) and sets a new state of the art of 86. 7% on
Claude Sonnet 4. 5 Avg R@1 over the non-curriculum variant). Third, our
qualitative case studies show that a single high-quality retrieved reference is often enough to re-anchor a generation
that would otherwise commit to a topologically invalid circuit family, turning complete failures into reliable successes,
suggesting that retrieval and generation are complementary
rather than competing paradigms for analog design automation.Where the paper says it
Where the paper says it
Where the paper says it
Where the paper says it
Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.
Improvements for AI systems
-
Tri-modal TopologyAware Retrieval enables cross-modal search across text, schematics, and SPICE netlists via a unified embedding space. This allows users to query in natural language to retrieve matching schematics or netlists, accelerating design exploration and IP reuse.
-
Port-aware Relational Graph Netlist Encoding distinguishes between different electrical semantics of device terminals using a relational graph convolutional network (RGCN). This improves the encoding of SPICE netlists by capturing port-level differences, which is crucial for distinguishing functionally distinct circuits with similar topologies.
-
Curriculum Guided Hard Negative Mining sharpens discrimination among structurally distinct circuits sharing similar functionality. This training strategy progressively increases intra-cluster negatives based on functional category, enabling the model to better differentiate between circuits like
common-source versus common-gate amplifiers.
-
Integrating AnalogRetriever into the AnalogCoder agentic framework as a retrieval-augmented generation module consistently improves functional pass rates and enables previously unsolved tasks to be completed. This provides grounding for LLM outputs, mitigating hallucination and leading to a new state of the art of 86.7% on Claude Sonnet 4.6 for analog circuit design.
Abstract
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.0% to 99.97%. 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.
Sources
- Principle-Guided Verilog Optimization: IP-Safe Knowledge Transfer via Local-Cloud Collaboration
- Representation Learning with Contrastive Predictive Coding
- Semi-Supervised Classification with Graph Convolutional Networks
Related papers
- TEA: Text Encoder Alignment for Robust Concept Erasure in Text-to-Image Models
- Do Egocentric Video-Language Models Capture Both Hand- and Object-Centric Cues?
- Aura: Consistent Multi-Subject Video Generation via VLM-Grounded Semantic Alignment
- PVRF: All-in-one Adverse Weather Removal via Prior-modulated and Velocity-constrained Rectified Flow
- DLWM: Diverse Latent World Models for Efficient Multimodal Reasoning
- Out of Sight, Still in Mind: Token Compression for Omni-LLMs