You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am really excited to use your tool in my project! This bug happens on an operation that is very common on language and time series models, it would be very appreciated if you can take a look at it!
Describe the bug
Error happens in the final backward pass of CROWN if a model contains indexing along the sequence dimension. i.e. new_hidden = old_hidden[:, -1, :] # (batch, seq, channel)
Traceback (most recent call last):
File "/home/zjc/temp/bug_report/minimum_error.py", line 23, in <module>
lb, ub = lirpa_model.compute_bounds(x=(bounded_x,), method='CROWN')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zjc/.cache/pypoetry/virtualenvs/bug-report-jF5ToeBy-py3.11/lib/python3.11/site-packages/auto_LiRPA/bound_general.py", line 1316, in compute_bounds
return self._compute_bounds_main(C=C,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zjc/.cache/pypoetry/virtualenvs/bug-report-jF5ToeBy-py3.11/lib/python3.11/site-packages/auto_LiRPA/bound_general.py", line 1422, in _compute_bounds_main
ret = self.backward_general(
^^^^^^^^^^^^^^^^^^^^^^
File "/home/zjc/.cache/pypoetry/virtualenvs/bug-report-jF5ToeBy-py3.11/lib/python3.11/site-packages/auto_LiRPA/backward_bound.py", line 337, in backward_general
A, lower_b, upper_b = l.bound_backward(
^^^^^^^^^^^^^^^^^
File "/home/zjc/.cache/pypoetry/virtualenvs/bug-report-jF5ToeBy-py3.11/lib/python3.11/site-packages/auto_LiRPA/operators/add_sub.py", line 44, in bound_backward
uA_y = _bound_oneside(last_uA, y)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zjc/.cache/pypoetry/virtualenvs/bug-report-jF5ToeBy-py3.11/lib/python3.11/site-packages/auto_LiRPA/operators/add_sub.py", line 41, in _bound_oneside
return self.broadcast_backward(last_A, w)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zjc/.cache/pypoetry/virtualenvs/bug-report-jF5ToeBy-py3.11/lib/python3.11/site-packages/auto_LiRPA/operators/base.py", line 451, in broadcast_backward
assert A.shape[2:] == shape[1:] # skip the spec and batch dimension.
^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError
node under question (the target of Bound.bound_backward()) was node /11
System configuration:
OS: Ubuntu 22.04
Python version: 3.11
Pytorch Version: 2.2.2
Hardware: Error persists across GPU(RTX Titan) and CPU-only
Have you tried to reproduce the problem in a cleanly created conda/virtualenv environment using official installation instructions and the latest code on the main branch?: Yes, clean Poetry environment with only auto_LiRPA and its dependencies installed, poetry config and lock file attached.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Hi, I am really excited to use your tool in my project! This bug happens on an operation that is very common on language and time series models, it would be very appreciated if you can take a look at it!
Describe the bug
Error happens in the final backward pass of CROWN if a model contains indexing along the sequence dimension. i.e.
new_hidden = old_hidden[:, -1, :] # (batch, seq, channel)
To Reproduce
minimal error case
Full script outputs are shown below
Captured computation graph
Node 12 and 13 are the result of indexing op.
Remarks
A.shape == (4, 1, 3, 4)
andshape == (1, 2, 4)
Bound.bound_backward()
) was node/11
System configuration:
auto_LiRPA
and its dependencies installed, poetry config and lock file attached.Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: