EXPERIMENTAL: Separate task ids for different inference tasks. Currently only for backward inference.