-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 [BUG] Equivalent irreps yield different output in FullyConnectedTensorProduct #296
Comments
Hi @RobDHess, |
The current normalization works like that:
where A way to normalize that would solve your problem is to remove the
I choose the first option because I thought is someone splits its irreps in two ( |
A simpler example that shows the difference is (btw thanks for the clean code to make tests)
sidenote: I replaced |
I guess what you propose is this one:
It sounds good to me |
Hi, I agree with your suggestion, it might make it so that the code acts more predictably. However, both ways of normalisation have some merit to them. By the way, there is a slight difference between your example irreps and mine. Your example can be "fixed" by applying a .simplify(), since their order is irrelevant. However, it is more difficult to change "1x0e + 1x1o + 1x0e + 1x1o" into "2x0e + 2x1o", since the order is relevant—even though they are equivalent. The latter arises when e.g. concatenating two steerable vectors. With the current normalisation, I would either need to set path_weights, or permute the resultant vector to sort the irreps. With the suggested normalisation, it would not make a difference. Thank you for the quick replies! |
I created a PR |
Hm, unless I misunderstand, this desired behavior can be achieved by just setting I think by default it makes most sense to understand separated things in irreps as distinct inputs with distinct normalization. Though I'm not sure if I'm actually correctly understanding the 1 vs 2 distinction. |
It's not clear to me if |
0 is not wanted |
Bug
The output of o3.FullyConnectedTensorProduct is dependent on how the irreps are presented. For example:
irreps_in1_a = Irreps("3x0e + 2x1o + 2x2e")
irreps_in2_a = Irreps("1x0e + 1x1o + 1x2e + 1x3o")
irreps_out_a = Irreps("1x0e + 1x1o + 1x2e")
irreps_in1_b = Irreps("1x0e + 1x1o + 1x2e + 1x0e + 1x1o + 1x2e + 1x0e")
irreps_in2_b = Irreps("1x0e + 1x1o + 1x2e + 1x3o")
irreps_out_b = Irreps("1x0e + 1x1o + 1x2e")
Are equivalent, but the same input yields different results. I believe this is due to the normalisation being done "per path", instead of "per unique path". Is there a good reason for them to be different? I have found some mention of this issue here but this is not something .simplify() can solve.
I've included code below to reproduce the issue.
The text was updated successfully, but these errors were encountered: