An $n\times n$ exponential affinity matrix $W$ is defined as:
$w_{ij}=e^{-d^2(x_i, x_j)}$,
where $d(x_i, x_j)$ is the distance between $x_i\in \mathbb R^m$ and $x_j\in \mathbb R^m$, which measures the similarity between $x_i$ and $x_j$. For example, using L2 norm: $d(x_i, x_j)=||x_i -x_j||$.
Is $W$ positive definite or positive semidefinite or neither? How to prove it?
It is well-known that the Gaussian kernel $\Phi(x)=\exp(-\alpha\|x\|_2^2)$ is strictly positive for all $\alpha>0$ (see the example on p.12 of this handout for instance). Therefore the answer to your question is "yes" when $d(x,y)=\|x-y\|_2$.
However, the answer is negative for a general distance function $d$. Here is a random counterexample: let the distance matrix between four points $x_1,x_2,x_3$ and $x_4$ be $$ D=\left(d(x_i,x_j)\right)_{i,j\in\{1,2,3,4\}}=\pmatrix{0&1&0.7&0.7\\ 1&0&0.3&0.7\\ 0.7&0.3&0&1\\ 0.7&0.7&1&0}. $$ One may verify that the $d$ defined above does satisfy the triangle inequality. However, numerically we have $\det\left(\exp\left(-D\circ D\right)\right)=-0.056442<0$. Therefore $\exp\left(-D\circ D\right)$ is not positive semidefinite.