Giter Site home page Giter Site logo

jxzhangjhu / ldebm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yupeiyu98/latent-diffusion-ebm

0.0 0.0 0.0 101.42 MB

[ICML 2022] Latent Diffusion Energy-Based Model for Interpretable Text Modeling

Python 2.23% Perl 0.01% OpenEdge ABL 48.97% Roff 48.78%

ldebm's Introduction

Latent Diffusion Energy-Based Model for Interpretable Text Modeling

teaser

[Paper] [Code]

The official code repository for ICML 2022 paper "Latent Diffusion Energy-Based Model for Interpretable Text Modeling".

Installation

The implementation is based on python 3.6.13 and depends on the following commonly used packages, most of which can be directly installed via conda.

Package Version
PyTorch 1.11.0
faiss 1.7.0
numpy 1.19.5
nltk 3.6.5
sklearn 0.24.2

Please refer to this repo if you're having trouble installing faiss.

Datasets and Pretrained Models

Pretrained models are available at: https://drive.google.com/drive/folders/1XWu7olAoYbrKmh8Hnu_zROKhhd3TtmhS?usp=sharing

Training

# Run the corresponding task scripts
python <TASK_SCRIPT>.py --gpu <GPU_ID> --max_kl_weight <WEIGHT_OF_KLD> --mutual_weight <WEIGHT_OF_MI> --cls_weight <WEIGHT_OF_CLS_LOSS>

You may specify the value of arguments for training. Please find the available arguments in the corresponding task scripts in the workspace folder.

Testing

# Evaluate the trained model
python <TASK_SCRIPT>.py --gpu <GPU_ID> --forward_only True

Citation

@inproceedings{yu2022latent,
  author = {Yu, Peiyu and Xie, Sirui and Ma, Xiaojian and Jia, Baoxiong and Pang, Bo and Gao, Ruiqi and Zhu, Yixin and Zhu, Song-Chun and Wu, Ying Nian},
  title = {Latent Diffusion Energy-Based Model for Interpretable Text Modeling},
  booktitle = {Proceedings of International Conference on Machine Learning (ICML)},
  month = {July},
  year = {2022}
}

ldebm's People

Contributors

yupeiyu98 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.