tl;dr: the formal notation for this is:$~~~~\neg\square(a=b)$
Explanation:
Modal logic formally defines the following dual operators:
- Operator "$\square$" meaning "it is necessary", and
- Operator "$\lozenge$" meaning "it is possible".
For any proposition P, the following are true:
- $\square P \leftrightarrow \neg \lozenge \neg P~~~~~~~~$, i.e. : "P is necessarily true" is equivalent to "P cannot possibly be false"
- $\lozenge P \leftrightarrow \neg \square \neg P~~~~~~~~$, i.e. : "P may be true" is equivalent to saying "P is not necessarily false"
Therefore, if you're happy to concede that your 'equality' is a logical statement, then you can express such statements formally as follows:
$$ \lozenge(A = B) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\text{(i.e. $A$ can be a $B$)}$$
or
$$ \lozenge(A \neq B) ~~~~~~~~~\text{(i.e. $A$ can be something other than $B$)}$$
depending where you want to place the emphasis.
Or if you really want to express it in terms of necessity:
$$ \neg\square(a = b) ~~~~~~~~~\text{(i.e. it is not necessary that a = b)}$$
etc.
PS. I suppose, if you preferred a "one-symbol-only" binary operator, like your $\overset?=$, you could define in your article the symbols $\overset{\square}=$, $\overset{\lozenge}=$, $\overset{\square}\neq$, and $\overset{\lozenge}\neq$ respectively in terms of the modal operator syntax stated above, and I'm sure these would be straightforward to follow in your text.
Having said that, if a strict logical statement is not needed in context, my preferred alternative answer here is the one given below by Dragon (i.e. \not\equiv: $\not\equiv$ ); to me this is fairly straightforward and intuitive, without requiring further explanation: stating that two quantities are not equivalent implies that they are independent variables that could nonetheless simply happen to take on an equal value.