I too wonder about this, looking at the THNN code ( https://github.com/torch/nn/blob/master/lib/THNN/generic/ClassNLLCriterion.c 3 ; no idea about what happens in other backends) it seems like it literally compares the two signed integers (current class and ignored_index) in C, so any negative number should just never match.
Of course, I could be wrong, so an official answer or note in the docs about negative numbers not begin interpreted as in Python but as in C might be useful