It is noted by several sources (e.g. this paper) that the problem solved by the Deutsch-Jozsa (DJ) algorithm is an instance of the Hidden Subgroup Problem (HSP). However, I fail to see this for $n>2$.
For DJ to be an instance of the HSP, we need the possible oracles to implement functions $ f: G \rightarrow X $ from a group $G$ to a set $X$, such that $f$ "hides" an unknown subgroup $ H \subset G $. The oracles in DJ implement functions from $ \left\{ 0,1 \right\}^n $ to $ \left\{0,1 \right\} $, that are promised to be either constant or balanced (where "balanced" means "yields $0$ on exactly one half of its inputs). Thus, $G$ should be a group with the underlying set $ \left\{ 0,1 \right\}^n $, and we identify $X$ with $ \left\{0,1 \right\} $. Moreover, we can consider only subgroups $H$ with index $1$ or $2$, since a function with codomain of size $m$ cannot hide a subgroup with index larger than $m$.
Now, clearly any constant function hides the subgroup $H = G$; but I cannot think of any group structure for $G$, such that any balanced function on $G$ would hide some subgroup $H$. For this to happen, the fibers $ f^{-1} \left( \left\{0\right\}\right) $ and $ f^{-1} \left( \left\{ 1 \right\}\right) $ must be the cosets of some index-$2$ subgroup $H$, but clearly this is not always the case. For example, consider $n=3$. If $G = (\mathbb{Z}_2)^3$, then the following subset of size $4 = 2^3/2$ that contains the identity element $000$ is a subgroup: $$ H = \left\{ 000, 001, 110, 111 \right\} \tag{1}$$ but the following subset of size $4$ that includes the identity is not a subgroup: $$ H = \left\{ 000, 001, 010, 100 \right\} \tag{2}$$ For $ n \leq 2 $ we do not have this problem, as any subset of $ (\mathbb{Z}_2)^n $ of size $ 2^n/2 $ that contains the identity is indeed a subgroup. Am I missing anything?