12. Let the set $M=\{1,2, \cdots, 1000\}$, and for any non-empty subset $X$ of $M$, let $\alpha_{X}$ denote the sum of the largest and smallest numbers in $X$. Then, the arithmetic mean of all such $\alpha_{X}$ is $\qquad$ .
The number of subsets with 1 as the smallest element is $C_{999}^{0}+C_{999}^{1}+\cdots+C_{999}^{999}=2^{999}$;
The number of subsets with 2 as the smallest element is $2^{998}$; $\cdots$; The number of subsets with 1000 as the smallest element is $2^{0}$; The number of subsets with 1 as the largest element is $2^{0}$; The number of subsets with 2 as the largest element is $2^{1}$; $\cdots$; The number of subsets with 1000 as the largest element is $2^{999}$.
Thus, $\sum_{X \subseteq M} \alpha_{X}=1001\left(2^{0}+2^{1}+\cdots+2^{999}\right)=1001\left(2^{1000}-1\right)$.
Therefore, the arithmetic mean of $\alpha_{X}$ is $\frac{\sum_{X \subseteq M} \alpha_{X}}{2^{1000}-1}=1001$.