ReAct#

class scio.scores.ReAct(*, act_norm=None, mode='raw', percentile=90.0, symmetric=False, per_layer=False)[source]#

Bases: BaseScoreClassif

ReAct for classification.

Parameters:
  • percentile (float) – The percentile used to compute the upper threshold. Defaults to 90.0.

  • symmetric (bool) – Whether to apply similar lower clipping. Defaults to False.

  • per_layer (bool) – If True, every recorded layer gets clipped with its own threshold(s) computed independently. If False, the threshold(s) is(are) computed over concatenated layers activations. Irrelevant when only one layer is recorded, as in [SGL21]. Defaults to False.

  • mode – See BaseScoreClassif.

  • act_norm – See BaseScore.

References

[SGL21]

Yiyou Sun, Chuan Guo, and Yixuan Li. ReAct: Out-of-Distribution detection with rectified activations. In Advances in Neural Information Processing Systems, volume 34, 144–157. 2021. URL: https://proceedings.nips.cc/paper_files/paper/2021/file/01894d6f048493d2cacde3c579c315a3-Paper.pdf.