<p><a href="https://arxiv.org/pdf/1211.0906v2.pdf" rel="nofollow noreferrer">This paper</a> proposes a kernel for Hamming distances measured between categorical features. It's simply a matter of replacing the Euclidean distance in the standard exponential kernel with Hamming.</p>

<p><a href="https://i.stack.imgur.com/ES3Jh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ES3Jh.png" alt="enter image description here"></a></p>

<p>It is also possible to combine Euclidean and Hamming distances into one kernel, which would be good for datasets with a mix of continuous and discrete variables.</p>

<p><a href="https://i.stack.imgur.com/35fCk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/35fCk.png" alt="enter image description here"></a></p>

<p>The good news is that they also prove that this kernel is indeed positive definite (on page 14). </p>
svm for binary data with hamming distance
<p>I have a standard {-1,+1} machine learning problem. The main difference is that the data points are binary strings, so their prooximity is measured by Hamming distance. 
Can SVM be applied in this case? What SVM library is suited better for this task? </p>