Closed ToheartZhang closed 10 months ago
sorry for this, this is a typo in our paper, and I will update it in arxiv. But we also tried first to apply abs and then use grad.sum(1), the results are similar. (so this choice is just arbitary)
Thanks for the explanation!
Thanks for your great work! I notice that the gradient is first summed across the head dimension, and then applied to absolute calculation, which may not be consistent with Formula (1) in the paper. Is it intended?
https://github.com/lancopku/label-words-are-anchors/blob/eba87afbd5115f7e70df31de9821254e3d74421f/icl/analysis/attentioner_for_attribution.py#L94-L99