Verified-Intelligence / auto_LiRPA

auto_LiRPA: An Automatic Linear Relaxation based Perturbation Analysis Library for Neural Networks and General Computational Graphs
https://arxiv.org/pdf/2002.12920
Other
269 stars 67 forks source link

How is BoundedModule.split_nodes initialized? #69

Closed nhamlv-55 closed 1 month ago

nhamlv-55 commented 3 months ago

I am trying to understand this function https://github.com/Verified-Intelligence/auto_LiRPA/blob/2553832b5a5bbfe643b694458867ebd1dbdece65/auto_LiRPA/beta_crown.py#L80

The code is iterating over self.split_nodes, which is not initialized anywhere. I noticed that because when I run auto-LiRPA on my code, the code crashes and says that split_nodes does not exist. The only other places where I can see it is in https://github.com/Verified-Intelligence/auto_LiRPA/blob/2553832b5a5bbfe643b694458867ebd1dbdece65/auto_LiRPA/beta_crown.py#L45 , but the function get_split_nodes() is not called anywhere.

Could someone please explain how it works?

shizhouxing commented 2 months ago

Hi @nhamlv-55 , it is supposed to be used by alpha-beta-CROWN. If you want to use beta-CROWN, you need to enter the code from the alpha-beta-CROWN repository, not just auto_LiRPA.