Practical Computation of Graph VC-Dimension
David Coudert, Mónika Csikós, Guillaume Ducoffe, Laurent Viennot
TL;DR
This work tackles the practical computation of the graph $\mathrm{VCdim}$, defined as the VC-dimension of the closed-neighborhood set system $\{N_G[v]:v\in V\}$ in a graph $G$. It presents a practical exact algorithm that incrementally tightens a lower bound on $\mathrm{VCdim}$ and prunes the search using degree-based bounds, traces via bitmasks, and partition-refinement-based reductions, achieving computation on graphs with millions of nodes where $\mathrm{VCdim}$ typically lies in the small range $3$ to $8$. The authors prove $W[1]$-hardness of the problem under the natural parameterization by the dimension, and they derive several sharp, linear bounds relating $\mathrm{VCdim}$ to standard graph parameters like maximum degree, degeneracy, and matching number. Empirically, the method performs well across diverse real networks and synthetic graphs, with a publicly available implementation, and the experiments reveal insightful patterns for random graphs and power-law networks regarding the onset of high VC-dimension. Overall, the paper provides both theoretical hardness results and a practical toolkit for estimating and computing graph VC-dimension, highlighting its potential as a useful graph parameter in algorithm design and analysis.
Abstract
For any set system $H=(V,R), \ R \subseteq 2^V$, a subset $S \subseteq V$ is called \emph{shattered} if every $S' \subseteq S$ results from the intersection of $S$ with some set in $\R$. The \emph{VC-dimension} of $H$ is the size of a largest shattered set in $V$. In this paper, we focus on the problem of computing the VC-dimension of graphs. In particular, given a graph $G=(V,E)$, the VC-dimension of $G$ is defined as the VC-dimension of $(V, \mathcal N)$, where $\mathcal N$ contains each subset of $V$ that can be obtained as the closed neighborhood of some vertex $v \in V$ in $G$. Our main contribution is an algorithm for computing the VC-dimension of any graph, whose effectiveness is shown through experiments on various types of practical graphs, including graphs with millions of vertices. A key aspect of its efficiency resides in the fact that practical graphs have small VC-dimension, up to 8 in our experiments. As a side-product, we present several new bounds relating the graph VC-dimension to other classical graph theoretical notions. We also establish the $W[1]$-hardness of the graph VC-dimension problem by extending a previous result for arbitrary set systems.
