Statistical inference on black-box generative models in the data kernel perspective space (2025)

Abstract: Generative models are capable of producing human-expert level content across a variety of topics and domains. As the impact of generative models grows, it is necessary to develop statistical methods to understand collections of available models. These methods are particularly important in settings where the user may not have access to information related to a model’s pre-training data, weights, or other relevant model-level covariates. In this paper we extend recent results on representations of black-box generative models to model-level statistical inference tasks. We demonstrate that the model-level representations are effective for multiple inference tasks.

## introduction generative models have recently met or surpassed human-level standards on benchmarks across a range of tasks @xcite @xcite . while these claims warrant skepticism and further robustness evaluation @xcite , the impressive capabilities have created a competitive environment for training stateof-the-art models and have inspired the development of complementary methods to adapt models to particular use cases. for example, quantizing the weights of a neural model enables a trade-off of model precision with vram and disk space @xcite while methods such as low rank adaptation (lora) @xcite and prompt-tuning @xcite enable computeand data-efficient model adaptation. other methods such as retrieval-augmented generation @xcite , model merging @xcite , constrained decoding @xcite , etc. @xcite , have similarly contributed to the rapid development of a large population of diverse and accessible models. each model in the population has an accompanying set of covariates -scores on benchmarks, training mixture proportions, model safety scores, etc. -that are a function of the model, the training set, the architecture, the retrieval database, or derivatives thereof. for a given model, the covariate of interest may not be available to the user or it may be too expensive to calculate. for example, it may not be known if a proprietary model has been trained on copyrighted data. or, it may be too resource intensive to directly evaluate the toxicity of every model. methods for predicting model-level covariates are necessary in these settings, and others, to fully understand the behavior and properties of a model. in this paper we extend recent theoretical results for vector representations of black-box generative models @xcite to model-level statistical inference settings. our results show that the embeddings of the responses from a collection of generative models can be used for consistent inference for a wide class of inference problems. we demonstrate the effectiveness of the representations for three downstream inference tasks, including predicting the presence of sensitive information in a model's training mixture and predicting a model's safety. we include empirical investigations of performance sensitivity to hyperparameters required to generate the model-level vector representations. contribution. our contribution is the theoretical and empirical validation for using vector representations of black-box generative models for modellevel inference tasks. the representations that we study herein are based on the embeddings of their responses. the theoretical results apply to any generic, well-behaved embedding function. given the representations, any vector-based method can be used for inference on the models. ## the data kernel perspective space before we present our results related to statistical inference on black-box generative models, we first describe how to obtain finite-dimensional vector representations of the models. the particular method for obtaining vector representations for generative models that we study herein has previously been discussed in @xcite and @xcite . let f : @xmath0. given @xmath1, we assume that f (q) produces a random element in x . in our setting there are n models f 1 , . . . f n and m queries q 1 , . . . , q m with q @xmath2. we assume that each model responds to every query r independent times and let f i (q j ) k be the k-th response to q j from f i . we let g : @xmath3. further, we let and note that d ii ′ captures the difference in empirical average model behavior between f i and f i ′ with respect to {q 1 , . . . , q m } and g. with the form described by eq. ( 1 ), d is a rescaled euclidean distance matrix. hence, multidimensional scaling (mds) of d yields ddimensional euclidean representations of the matrices xi (and thereby of the models f i ) with respect to {q 1 , . . . , q m } and g @xcite . letting ψ := mds(d) ∈ r n×d , we refer to ψ as the data kernel perspective space (dkps). we emphasize that the i-th row of the dkpsψ i -is a ddimensional vector representation of the generative model f i . ## experiments we next consider two experiments with more realistic model-level covariates: predicting whether or not a model has had access to sensitive information and predicting model safety. for all experiments we fix @xmath4. we use the mds implementation from graspologic @xcite throughout. we use the profile likelihood of the singular values of d to determine the dimensionality of the dkps @xcite and note that this may be larger than two. we show only the first two dimensions for visualization purposes. ## discussion we have demonstrated -both theoretically and empirically -that embedding-based representations of generative models can be used for various modellevel inference tasks. while the results we presented show the potential of our approach, there are choices throughout the collection-of-models-tocovariate-prediction pipeline that can affect performance and implementation practicality. we outline these choices in the limitations section. ## limitations as mentioned in section 2.2.1, one major decision is the collection of queries q 1 , , . . . , q m used to induce the perspective space. in particular, the representations of the models that the query set in-duces may or may not be relevant to a particular inference task. we demonstrate this phenomenon in section 3.1 where the queries from the "sensitiveonly" query distribution can induce representations of similar discriminative ability as queries from the "orthogonal-only" query distribution with 1/5 of the queries. we expect a similar but less dramatic effect within the distributions of "sensitive-only" queries and anticipate that curating an "optimal" set of queries for a given g and for a fixed number of queries will soon be a highly active research area. another decision is the distance function used to define d. the mds of the distance matrix studied herein (eq. ( 1 )) produces representations of the models that are consistent for objects that capture the true mean discrepancy geometry of the model responses. for model-level covariates that cannot naturally be described as a function of the mean discrepancy geometry, we do not expect that information-theoretic optimal performance is possible for any n, m, and r, even where the queries are from an "optimal" query distribution. instead, for representations of the models that can be used generally without information loss, it may be necessary to replace the frobenius norm of the differences of the average embedded response with a more expressive distance such as one defined directly on the cumulative distributions of responses or with a taskspecific distance @xcite . related theoretical work @xcite suggests that our results will hold for more expressive distances. we do not expect the naïve replacement of the frobenius norm with a more expressive distance function to be universally better for model-level inference tasks in practice as there are likely computational and query set quality trade-offs to consider. as with the active curation of an optimal query set, we expect these trade-offs to be important future research topics. in the experiments above we have access to n models and n ′ < n corresponding model-level covariates. we induce a dkps with the entire collection of models and use the n ′ labeled models to predict a label for the remaining nn ′ models. in practice an unlabeled model may not be available when inducing the dkps or, if n is large, it may be too expensive to induce a dkps whenever a prediction for a new unlabeled model is required. outof-sample techniques @xcite can be used to meet these imposed constraints at the cost of a slight degradation in representation quality and, hence, inference performance. implementation of inference in dkps in practice will require an upfront, one-time cost of generating responses from a subset of models in the collection and scoring their outputs. since this is required to compare the models with respect to the covariates anyway we followed the timing paradigm presented in @xcite and did not include this cost when comparing the methods in figure 5 . once the models in the initial subset are scored we expect the relative time efficiency (and implied relative computational efficiency) of inference in dkps to be worthwhile to practitioners. we fixed @xmath5. for theorems 1 and 2 to hold, both m and r must grow. in practice, the trade-off between getting responses for more queries or getting more responses for the same queries depends on the distributions f ij . for example, if f ij is a point mass then @xmath6. conversely, if f ij is a complicated distribution on r p then more responses are necessary to properly estimate it and, hence, to properly capture the difference between average model responses. lastly, we note that the data kernel perspective space could be used to extend the statistical turing test framework presented in @xcite by comparing the conditional distributions of populations of humans and populations of machines in low-dimensional euclidean space.