Can one be liable to bring  a sin offering if he accepts a false god in his heart without saying anything?
This would be practical if it were the case. He could come to the the court of law and say he accepted some god like Allah or Brahman, and asks if he must bring a female goat. And they say "Yes." I could go further, but I think clearly you can't be liable for thoughts of idolatry.
If you were, then why does the Talmud in Sanhedrin bend over backwards to find a way to make liable  someone who said to a false god, "You are my god?" And it has to conclude it is only like R. Akiva, and it obviously is not happy with that fact, because that would push it out of the realm of Jewish Law. [The law we know goes by the majority. But there are many exceptions. Still in this case it is an established principle: The law is like R. Akiva against his friend, but not against his friends.    הלכה כרבי עקיבה כנגד חבירו ולא כנגד חבריו]

Now I have to mention that the Gemara is not involved in the issue of the death penalty for when one does idolatry on purpose. It knows that there is an open verse that one who bows to a false god gets the death penalty. It is only bothered by the question of-- if the guy does it by accident, does he bring a sin offering? And that is where the Talmud is bothered because for a sin offering we need some act with an object. [See the discussion of Prichard of the British school of Intuitionists about what constitutes an act. But in our case here we see the Talmud considers an act to be only something that has an object.- not bowing, and not words.]

Of course, you can imagine this got me thinking about דברים שבלב אינם דברים - קידושין דף מט
ב words in the heart are not words [Kidushin 49 Ketubot 75 and see the Rashba  Shelomo ben Aderet on that Gemara in Kidushin  who has the idea that this is only when the words in the heart contradict some act. (That is his idea. You won't find it in Tosphot.) [Not the same as the Rashba of Tosphot who is Shimshon ben Avraham]  [What I mean is that the thought can make him obligated in a sin offering even if he say nothing. The court can't make him obligated but he knows himself that he is obligated.]

And Rav Elazar  Shach [author of the Avi Ezri] says that applies specifically where one makes an act by means of his words.

In any case, you are obviously thinking about the Gemara at the end of Hulin about guy who was sending off the mother bird from the eggs and fell and got killed, and the Gemara suggest that it was because he might have been thinking thoughts about idolatry.  For thoughts one does have to bring a burnt offering, which can be brought  just like a peace offering. It does not have any conditions attached to it. You get get up in the morning and say "There is  upon me to bring a peace offering" or "a burnt offering." But you can't do this with a sin offering which can be brought only for very specific things.