ApolloResearch / rib

Library for methods related to the Local Interaction Basis (LIB)
MIT License
3 stars 0 forks source link

Tweak edge ablation's handling of constant directions #297

Closed nix-apollo closed 6 months ago

nix-apollo commented 6 months ago

Edge Ablation fix

Description

When performing edge ablations on a centered RIB graph, we no longer keep all incoming edges for the 0th direction in the 2nd layer. We do still keep all outgoing edges for the 0th direction in the first layer.

Related Issue

Motivation and Context

We expect that all edges from a non-constant node to a constant node to be zero, and in fact non-important. So it's not harmful to no longer preserve them automatically.

However, when rotate_final_node_layer is false the 0th direction in the final layer is a real node! We don't want to keep all incoming edges to that for free. With this change we no longer will.

How Has This Been Tested?

Updated tests. Not sure what test we could add to have caught this earlier. The problem was only apparent when starting to use edge ablation results for modularity.

Does this PR introduce a breaking change?

No.