Residual Pathway Priors for Soft Equivariance Constraints

Overview

Residual Pathway Priors for Soft Equivariance Constraints

This repo contains the implementation and the experiments for the paper

Residual Pathway Priors for Soft Equivariance Constraints

Installation instructions

To run the scripts you will instead need to clone the repo and install it locally which you can do with

git clone https://github.com/mfinzi/residual-pathway-priors.git
cd residual-pathway-priors
pip install -e .

Experimental results

  • To reproduce the reinforcment learning results from the paper, see the RL/ directory.
  • To reproduce the results in cases with exact symmetries (Figure 2a), see experiments/perfect-symmetry/
  • To reproduce the results in cases with approximate symmetries (Figures 2b & 7), see experiments/prior-var-ablation/
  • To reproduce the results in cases with mis-specified symmetries (Figure 2c), see experiments/misspec-symmetry/
  • To reproduce the UCI results in Table 1, see experiments/UCI/
  • To reproduce the CIFAR-10 resultsin Table 1, see experiments/cifar/

If you find our work helpful, cite it with

@inproceedings{finzi2021residual,
  title={Residual Pathway Priors for Soft Equivariance Constraints},
  author={Finzi, Marc and Benton, Gregory and Wilson, Andrew G},
  booktitle={Advances in Neural Information Processing Systems},
  volume={34},
  year={2021}
}
You might also like...
[WACV 2020] Reducing Footskate in Human Motion Reconstruction with Ground Contact Constraints

Reducing Footskate in Human Motion Reconstruction with Ground Contact Constraints Official implementation for Reducing Footskate in Human Motion Recon

PyTorch reimplementation of hand-biomechanical-constraints (ECCV2020)
PyTorch reimplementation of hand-biomechanical-constraints (ECCV2020)

Hand Biomechanical Constraints Pytorch Unofficial PyTorch reimplementation of Hand-Biomechanical-Constraints (ECCV2020). This project reimplement foll

Angora is a mutation-based fuzzer. The main goal of Angora is to increase branch coverage by solving path constraints without symbolic execution.

Angora Angora is a mutation-based coverage guided fuzzer. The main goal of Angora is to increase branch coverage by solving path constraints without s

Paper: Cross-View Kernel Similarity Metric Learning Using Pairwise Constraints for Person Re-identification

Cross-View Kernel Similarity Metric Learning Using Pairwise Constraints for Person Re-identification T M Feroz Ali, Subhasis Chaudhuri, ICVGIP-20-21

Prototypical python implementation of the trust-region algorithm presented in Sequential Linearization Method for Bound-Constrained Mathematical Programs with Complementarity Constraints by Larson, Leyffer, Kirches, and Manns.

Prototypical python implementation of the trust-region algorithm presented in Sequential Linearization Method for Bound-Constrained Mathematical Programs with Complementarity Constraints by Larson, Leyffer, Kirches, and Manns.

FindFunc is an IDA PRO plugin to find code functions that contain a certain assembly or byte pattern, reference a certain name or string, or conform to various other constraints.
FindFunc is an IDA PRO plugin to find code functions that contain a certain assembly or byte pattern, reference a certain name or string, or conform to various other constraints.

FindFunc: Advanced Filtering/Finding of Functions in IDA Pro FindFunc is an IDA Pro plugin to find code functions that contain a certain assembly or b

Custom TensorFlow2 implementations of forward and backward computation of soft-DTW algorithm in batch mode.

Batch Soft-DTW(Dynamic Time Warping) in TensorFlow2 including forward and backward computation Custom TensorFlow2 implementations of forward and backw

PyTorch implementation of Soft-DTW: a Differentiable Loss Function for Time-Series in CUDA
PyTorch implementation of Soft-DTW: a Differentiable Loss Function for Time-Series in CUDA

Soft DTW Loss Function for PyTorch in CUDA This is a Pytorch Implementation of Soft-DTW: a Differentiable Loss Function for Time-Series which is batch

Official implementation of "DSP: Dual Soft-Paste for Unsupervised Domain Adaptive Semantic Segmentation"

DSP Official implementation of "DSP: Dual Soft-Paste for Unsupervised Domain Adaptive Semantic Segmentation". Accepted by ACM Multimedia 2021. Authors

Comments
  • Product group Implementation in RL tasks

    Product group Implementation in RL tasks

    Hello,

    Thanks for helping with the last issue about the Humanoid-v2 task. I got another issue while reproducing the RL experiments in the paper. I noticed that you mentioned in the paper that you used some product groups as the approximate symmetry groups such as Z2 x Z2 (Swimmer), D4 x O(2) (Ant), and Z2 x O(2) (Humanoid). However, "RL/representations.py" doesn't seem to include such product groups, while I was able to only find Z2 or Z4.

    I want to apply the product groups for the corresponding RL tasks. I wish to know the hidden implementation that I haven't found or any advice to implement such product groups in the RL tasks. Only one example would be enough like Z2 x O(2) (Humanoid).

    opened by kim-hyunsu 2
  • Humanoid-v2 task of RL experiment doesn't work.

    Humanoid-v2 task of RL experiment doesn't work.

    Hi, I tried the following command to test the Humanoid-v2 task python train_rpp.py --env_name=Humanoid-v2 --save_dir=./tmp/rpp --rpp_value=False However, it didn't work and raised those error messages

    Warning: Flow failed to import. Set the environment variable D4RL_SUPPRESS_IMPORT_ERROR=1 to suppress this message.
    No module named 'flow'
    /mnt/gsai/hyunsu/residual-pathway-priors/.venv/lib/python3.8/site-packages/glfw/__init__.py:906: GLFWError: (65544) b'X11: The DISPLAY environment variable is missing'
      warnings.warn(message, GLFWError)
    Warning: CARLA failed to import. Set the environment variable D4RL_SUPPRESS_IMPORT_ERROR=1 to suppress this message.
    No module named 'carla'
    pybullet build time: Apr 26 2022 03:12:14
    /mnt/gsai/hyunsu/residual-pathway-priors/.venv/lib/python3.8/site-packages/jax/_src/numpy/lax_numpy.py:5406: UserWarning: 'kind' argument to argsort is ignored; only 'stable' sorts are supported.
      warnings.warn("'kind' argument to argsort is ignored; only 'stable' sorts "
    CWD =  /workspace/siml/hyunsu/temp/RL
    /mnt/gsai/hyunsu/residual-pathway-priors/.venv/lib/python3.8/site-packages/gym/envs/registration.py:505: UserWarning: WARN: The environment Humanoid-v2 is out of date. You should consider upgrading to version `v3` with the environment ID `Humanoid-v3`.
      logger.warn(
    /mnt/gsai/hyunsu/residual-pathway-priors/.venv/lib/python3.8/site-packages/gym/core.py:172: DeprecationWarning: WARN: Function `env.seed(seed)` is marked as deprecated and will be removed in the future. Please use `env.reset(seed=seed) instead.
      deprecation(
    tau =  0.005
    rpp policy is True
    Traceback (most recent call last):
      File "train_rpp.py", line 187, in <module>
        app.run(main)
      File "/mnt/gsai/hyunsu/residual-pathway-priors/.venv/lib/python3.8/site-packages/absl/app.py", line 312, in run
        _run_main(main, args)
      File "/mnt/gsai/hyunsu/residual-pathway-priors/.venv/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main
        sys.exit(main(argv))
      File "train_rpp.py", line 105, in main
        agent = SACLearner(FLAGS.seed,
      File "/workspace/siml/hyunsu/temp/RL/jax_rl/agents/sac/sac_learner.py", line 126, in __init__
        actor_def = policies.RPPNormalTanhPolicy(state_rep,action_rep,action_std_rep,symmetry_group,ch,
      File "/workspace/siml/hyunsu/temp/RL/jax_rl/networks/policies.py", line 25, in RPPNormalTanhPolicy
        state_rep = state_rep(G)
      File "/mnt/gsai/hyunsu/residual-pathway-priors/.venv/lib/python3.8/site-packages/emlp/reps/product_sum_reps.py", line 69, in __call__
        return SumRepFromCollection({rep(G):c for rep,c in self.reps.items()},perm=self.perm)
      File "/mnt/gsai/hyunsu/residual-pathway-priors/.venv/lib/python3.8/site-packages/emlp/reps/product_sum_reps.py", line 69, in <dictcomp>
        return SumRepFromCollection({rep(G):c for rep,c in self.reps.items()},perm=self.perm)
      File "/mnt/gsai/hyunsu/residual-pathway-priors/.venv/lib/python3.8/site-packages/emlp/reps/representation.py", line 49, in __call__
        raise NotImplementedError
    NotImplementedError
    

    The error doesn't look an issue of wrong package versions. Could you help me to resolve it? For reference, the only two things I modified in the code were

    1. Converting every "@jax.partial" to "@partial" of functools.
    2. Revising the PseudoScalar class from
    class PseudoScalar(Rep):
        is_regular=False
        def __init__(self,G=None):
            self.G=G
            self.concrete = (self.G is not None)
    

    to

    class PseudoScalar(Rep):
        is_regular=False
        def __init__(self,G=None):
            self.G=G
            # self.concrete = (self.G is not None)
        @property
        def concrete(self):
            return self.G is not None
    

    as in the Rep class, and here are the versions of related packages

    • python 3.8
    • jax==0.3.1
    • jaxlib==0.3.0+cuda11.cudnn805
    • flax==0.3.6
    • emlp==1.0.3
    • gym==0.23.1
    • mujoco==2.1.5
    • gdown==4.4.0
    opened by kim-hyunsu 2
Owner
Marc Finzi
Machine learning researcher studying at NYU.
Marc Finzi
Official implementation of "Accelerating Reinforcement Learning with Learned Skill Priors", Pertsch et al., CoRL 2020

Accelerating Reinforcement Learning with Learned Skill Priors [Project Website] [Paper] Karl Pertsch1, Youngwoon Lee1, Joseph Lim1 1CLVR Lab, Universi

Cognitive Learning for Vision and Robotics (CLVR) lab @ USC 134 Dec 6, 2022
Geometry-Free View Synthesis: Transformers and no 3D Priors

Geometry-Free View Synthesis: Transformers and no 3D Priors Geometry-Free View Synthesis: Transformers and no 3D Priors Robin Rombach*, Patrick Esser*

CompVis Heidelberg 293 Dec 22, 2022
DETReg: Unsupervised Pretraining with Region Priors for Object Detection

DETReg: Unsupervised Pretraining with Region Priors for Object Detection Amir Bar, Xin Wang, Vadim Kantorov, Colorado J Reed, Roei Herzig, Gal Chechik

Amir Bar 283 Dec 27, 2022
This repository contains the data and code for the paper "Diverse Text Generation via Variational Encoder-Decoder Models with Gaussian Process Priors" (SPNLP@ACL2022)

GP-VAE This repository provides datasets and code for preprocessing, training and testing models for the paper: Diverse Text Generation via Variationa

Wanyu Du 18 Dec 29, 2022
Forecasting for knowable future events using Bayesian informative priors (forecasting with judgmental-adjustment).

What is judgyprophet? judgyprophet is a Bayesian forecasting algorithm based on Prophet, that enables forecasting while using information known by the

AstraZeneca 56 Oct 26, 2022
Pytorch implementation of Make-A-Scene: Scene-Based Text-to-Image Generation with Human Priors

Make-A-Scene - PyTorch Pytorch implementation (inofficial) of Make-A-Scene: Scene-Based Text-to-Image Generation with Human Priors (https://arxiv.org/

Casual GAN Papers 259 Dec 28, 2022
Implementation of CVPR'2022:Reconstructing Surfaces for Sparse Point Clouds with On-Surface Priors

Reconstructing Surfaces for Sparse Point Clouds with On-Surface Priors (CVPR 2022) Personal Web Pages | Paper | Project Page This repository contains

null 151 Dec 26, 2022
Implementation of CVPR'2022:Surface Reconstruction from Point Clouds by Learning Predictive Context Priors

Surface Reconstruction from Point Clouds by Learning Predictive Context Priors (CVPR 2022) Personal Web Pages | Paper | Project Page This repository c

null 136 Dec 12, 2022
DC3: A Learning Method for Optimization with Hard Constraints

DC3: A learning method for optimization with hard constraints This repository is by Priya L. Donti, David Rolnick, and J. Zico Kolter and contains the

CMU Locus Lab 57 Dec 26, 2022
Source code for the Paper: CombOptNet: Fit the Right NP-Hard Problem by Learning Integer Programming Constraints}

CombOptNet: Fit the Right NP-Hard Problem by Learning Integer Programming Constraints Installation Run pipenv install (at your own risk with --skip-lo

Autonomous Learning Group 65 Dec 27, 2022