/CirGPS

Few-shot Learning on AMS Circuits and Its Application to Parasitic Capacitance Prediction

Primary LanguagePythonMIT LicenseMIT

CirGPS

Few-shot Learning on AMS Circuits and Its Application to Parasitic Capacitance Prediction

Note:

  • This is a initail version of CirGPS for doulbe-blind review.
  • The full datasets will be released as a individual work soon.

Graph representation learning is a powerful method to extract features from graph-structured data, such as analog/mixed-signal (AMS) circuits. However, training deep learning models for AMS designs is severely limited by the scarcity of integrated circuit design data. This is the repository of CirGPS, a few-shot learning method for parasitic effect prediction in AMS circuits.

The proposed method contains five steps:

  1. AMS netlist conversion,
  2. enclosing subgraph extraction,
  3. position encoding,
  4. model pre-training/fine-tuning.

CirGPS is built on the top of GraphGPS, which is using PyG and GraphGym from PyG2. Specifically PyG v2.2 is required.

Instructions

Python environment setup with Conda

These codes are tested on our platform with pytorch=1.13.1, cuda=11.7.

Firstly, you need to install Git Large File Storage LFS.

Then, you can directly use our conda config file.

conda env create -f environment.yml

If you get error when installing pyg_lib/torch_scatter/torch_sparse, please delete those packages in environment.yml, and install them manually.

pip install pyg-lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-1.13.1+cu117.html

You can also try pip instead,

conda create -n cirgps
pip install -r requirements.txt

or use the oringal environment of GraphGPS.

Running an experiment with CirGPS

In the 'configs/sram' floder, the files starting with 'sram-' are for the link-prediction task, those starting with 'reg-' are for the edge-regression task.

conda activate cirgps

To conduct training, type

# Running an arbitrary config file in the `configs` folder
python main.py --cfg configs/sram/<config_file>.yaml 

We provide the config files necessary to reproduce our experiments under configs/ (see more below).

Other Details

The major modifications of GraphGPS are in the folder graphgps/loader, where we define a new type of dataset SealSramDataset. Other supportive updates include default configs in the config folder, 'DSPD' encoder in the encoder folder, the task-specific head in the head folder, and PE computation in the transform folder.