Can religious or philosophical beliefs be used as a defense against an allegation of adultery?

For a time, the Mormons tried to defend polygamy on grounds of religious freedom. That argument was defeated a century ago.

Polygamy is against the law in the United States. Second, belief in polygamy is not an adequate defense to adultery. No judge will accept this.

The decision to have an "open" marriage is a decision a couple may well make. In the eyes of the law, adultery is an allegation that one spouse makes against the other. So, if one spouse commits adultery, open marriage or no open marriage, it is still adultery. For this couple, adultery becomes adultery only if and when one of them decides to charge it in a divorce.