I suspect others are taking the wide view but I wanted to point out this direct answer to your question.
p.s the use of "torture" is intended in contrast to the neutrality of clinical language on this topic, not as a hint at my judgement on the matter.
IMO Utilitarianism is a particularly dangerous ethical framework when wielded by narcissists who have a difficult time imagining that they might catastrophically fail (looking at you Sam Bankman-Fried), or might not be delivering salvation to the world (looking at you Elon, lol).
If you tell yourself it's for "the good of humanity", or the alternative is destruction / widespread death, you can justify any action.
Here's one deontological perspective you could take:
It is always wrong to cause unecessary suffering to others.
Now, the subjective traits to be considered here are "unecessary" and "suffering."
It used to be a common belief that animals lacked the capacity to suffer as humans do. They could feel pain, nocioception sure, but whether it caused complex psychological suffering (torment) used to be contenious.
Today, this is certainly not contentious for our closest relatives. All primates possess a theory of mind, long memory, emotional states, complex social behavior like lasting bonds and altruism, and other traits necessary to suffer in significant ways.
So the focus (as long as we are considering primates, obviously nobody cares about model species like drosophilia as they have a greatly dimished capacity to suffer (edit: although I should mention that ranking things based on capacity to suffer leads to pretty awful territories too. Eg, if a human is severely mentally disabled, is more permissible to experiment on them? I think most of us would say no, which raises the question why it's okay to do so for other species)) shifts to whether causing them immense physical pain and torture is necessary.
And this is where I think things get pretty murky, and I will leave the rest up to you! I wish more people were curious about moral philosophy and creating their own consistent ethical framework for the world... I think it's especially important in science and engineering.
Of course, you could use a different model like utilitarianism, but utilitarianism still requires some level of deontological principles or you end up with a pretty extremist moral philosophy (same goes for just having Kantian deontology with no room for utilitarianism, IMO).
edit 2: come to think of it, Jainists would certainly have an issue with experimentation even on drosophilia, so I take that back that "nobody" cares. IIRC they even have a mouth covering to prevent swallowing and killing any insects that might accidentally fly into their mouths, as well as a specialized stick to gently move things like spiders and other insects out of the way. I know most people would scoff at that, but I think their deep respect for all forms of life is beautiful.
Re Jainism, adherents practice lacto-vegetarianism, but they, for example, don't eat tubers because they consider them too advanced, if I understand correctly. A deep respect for all forms of life is hard to get right in a world where every living thing eats some other living thing, or dies.
edit: there are also just SO many ways moral philosophies start to diverge at that point. Like we're talking about what is "necessary" animal experimentation. It's an important question, and one that really does boil down to a personal exercise.
Like... Personally I have no idea how to answer it. If you remove animal experimentation, well there goes a bunch of carcinogen studies which could result in a lot of human suffering. I also would need to do a ton of research to figure out if BCI research is at a level where primate brains are necessary instead of simpler organisms.
I also need to examine my own lifestyle, since hypocrisy severely undermines moral positions and having integrity/cogent beliefs and actions is essential if we are to engage with these subjects honestly.
For example, personally I have sometimes consumed meat in the last year (although I generally avoid it). Supporting factory farming absolutely violates my deontological moral imperative that "it is wrong to cause unnecessary suffering to others", in a ton of different ways. So who am I to espouse views on how people should behave with regards to animal research, when my own behaviour is in such a state of disarray?
Anyways... Getting pretty long again lol. Hope that response is helpful I know it's a bit rambling.