Ad hominem. The most well known logical fallacy (and probably most used) in the history of everything. Like most logical fallacies, in some instances it might not actually be fallacious; but again, the thing about straightforward logic is that the conclusion has to follow necessarily from the premises. And again, we don't live in a world of deductive certainty but the world of inductive probability.
First I have to distinguish between an ad hominem (ad hom) fallacy and a personal attack. The following is an ad hom:
Bob: All instruments that have strings are made out of wood. My guitar has strings. Therefore it is a wood instrumentThis is a personal attack:
Sue: Your guitar isn't a wood instrument because you are a well known liar
Bob: All instruments that have strings are made out of wood. My guitar has strings. Therefore it is a wood instrumentThe tricky part is that there can be non-fallacious ad hom arguments. This might be seen as a valid ad hom:
Sue: My electric violin has strings but isn't made out of wood. You are a known liar.
Bob: All instruments that have strings are made out of wood. My guitar has strings. Therefore it is a wood instrumentPedantically, an ad hom is fallacious because one is rejecting an argument or the conclusions of an argument based on the qualities of the person presenting it. However, a premise can be accepted or rejected for any reason; it's up to the person presenting the argument to support their premises. The personal attack, however, is simply attacking the person gratuitously.
Sue: You are a known liar so I have no reason for accepting your say-so that all instruments that have strings are made out of wood. Therefore I can't follow you to your conclusion that your guitar is a wood instrument.
It's a pretty good rule of thumb that an untrustworthy source isn't to be trusted. If I read a story in the National Enquirer, there's a high probability that it won't be true. But people confuse themselves when, instead of "National Enquirer" we switch to "Bob from accounting". If Bob was also a well known liar, then it might be perfectly reasonable to not accept a story from Bob as true.
But this is about arguments, not stories. So what if Bob was well known for concocting arguments that sound true but are actually fallacious? What if Bob was well known for his sophistry? Let's say you hear argument E from Bob. The hypothesis, H, is whether Bob's argument is a good one or a shitty, sophist-actic argument. The probability of E given H would be pretty low, since it is basically asking what the probability hearing about Bob's argument given that he made an actual good argument. The converse would be the probability of hearing about Bob's argument given that he is intentionally being tricky.
Let's solidify this example a bit. Let's say you overhear that Bob has recently argued that glutamine makes a good dietary suppliment for bodybuilding. What is the probability that this would be a good argument given that Bob argues for it? This depends on the probability that Bob would posit an argument given that it's good versus the probability that Bob would posit an argument given that it's sophistry. Or:
P(Good Arg) is our prior probability
P(Bob Said | Good Arg) is our success rate
P(Bob Said | Bad Arg) is our false positive rate
P(Good Arg | Bob Said) is what we are trying to find out
So let's say that we are perfectly agnostic about whether glutamine is a good dietary suppliment for bodybuilding. If Bob has almost never presented a good argument for something, then this means that P(Bob Said | Good Arg) would be extremely low. However, knowing that Bob is constantly presenting sophisticated yet false arguments, P(Bob Said | Bad Arg) would be extremely high. So our Bayes Factor in this instance would be P(Bob Said | Good Arg) / P(Bob Said | Bad Arg), which is low / high, which is less than 1.
This means that, given that Bob has presented an argument that we are unsure about the conclusion, it is more likely that glutamine is not a good dietary suppliment for bodybuilding based only on the fact that Bob has argued in the positive. So depending on how disparate Bob's success and false positive rates are for his arguments, an ad hominem argument could be either strong or weak Bayesian evidence against Bob's argument. Maybe Bob has an invalid premise in his argument? Usually that's how sophistry works. And remember, premises can be accepted or rejected for any reason and it's up to the person presenting the argument to support their premises.
So here is the apparent contradiction: It is definitely deductively fallacious to reject an argument based on who says it. But it is not inductively fallacious to reject an argument based on who says it because based on their history, there could be a high probability of them hiding away false premises tucked in the argument (like a complex question). This makes a bit of sense, since induction and deduction are a bit at odds. What's true by induction isn't necessarily true by deduction, and what's true by deduction isn't necessarily true by induction.
But again, this is weak Bayesian evidence. Just like absence of evidence being evidence of absence, it's not enough to rest an entire conclusion on. You would have to continually collect evidence besides the fact that Bob presented an argument to arrive at a definitive conclusion. The most straightforward way to do that would be to deductively check Bob's premises and see if they follow logically to his conclusion.