Open zacps opened 3 years ago
Hi @zacps Great to hear from you again! That's correct, the tools of ART are, at the moment, assuming a single input tensor. As you describe this allows multi-input models as long as their inputs can be stacked into a single input tensor. I agree with you about the usefulness of supporting multiple inputs in multi-modal scenarios with different shapes.
Do you have a proposal for a general solution? Would you be interested to work on a solution?
Hi @beat-buesser :)
A general solution might be hard. One approach which could work for attacks which don't assume 2+ dimensional input shapes is:
(None, product of all other dimensions)
(None, product of flattened tensor dimensions)
predict
/etcI think this should work as long as the attack doesn't depend on the shape information, like some of the image/video attacks do(?).
I would be interested in working on a solution, but my time is quite limited at the moment so I'm not sure if I'll get around to it.
Is your feature request related to a problem? Please describe. I have a tensorflow model which utilizes multiple inputs which are of varying shape. Specifically I have a video input of shape
(instances, timesteps, width, height, channels)=(None,45,32,32,3)
and a secondary input of(instances, timesteps, features)=(None, 45, 9)
. As these inputs do not have consistent dimensions it is not possible to reduce them to a single input.Attempting to run DeepFool (and I suspect any other attack) on this model produces the error:
Describe the solution you'd like I would like support for multiple input models to be added to evasion attacks where possible.
Describe alternatives you've considered I am not aware of any possible workarounds.