Precision and Recall for Distributions (P&R) is a two-dimensional evaluation metric that separately quantifies the quality (precision) and diversity/coverage (recall) of a synthetic dataset relative to a real data distribution. Unlike single-score metrics, it decomposes performance: precision measures how much of the generated distribution is realistic, while recall measures how much of the real distribution is covered by the generated samples. This framework, formalized by Sajjadi et al. (2018), directly addresses common generative model failures like mode collapse (low recall) and the generation of unrealistic artifacts (low precision).
Glossary
Precision and Recall for Distributions (P&R)

What is Precision and Recall for Distributions (P&R)?
A two-dimensional metric for evaluating generative models by separately measuring the quality and coverage of their outputs.
The metric is calculated by treating the real and generated distributions as manifolds in a feature space, often using a pre-trained network like Inception-v3. Precision is the proportion of the synthetic manifold that lies within the real manifold, and recall is the proportion of the real manifold covered by the synthetic one. This provides a more nuanced diagnostic tool than metrics like Fréchet Inception Distance (FID), helping practitioners balance the privacy-utility trade-off and optimize models for specific downstream tasks where either fidelity or coverage may be prioritized.
Key Components of the P&R Metric
Precision and Recall for Distributions (P&R) is a two-dimensional metric that separately quantifies the quality (precision) and diversity/coverage (recall) of a generative model's output relative to the real data distribution. It provides a more nuanced evaluation than single-score metrics like FID.
Precision (Quality)
Precision measures the quality or authenticity of generated samples. A high precision score indicates that most synthetic samples are realistic and lie within the support of the real data distribution.
- Mechanism: It is calculated as the proportion of synthetic samples that fall within a defined neighborhood of real data points in a feature space (e.g., from a pre-trained network like Inception-v3).
- Interpretation: High precision, low recall indicates a model that generates a few high-quality, 'safe' modes but lacks diversity.
- Analogy: In information retrieval, it's the fraction of retrieved documents that are relevant. Here, it's the fraction of generated samples that are realistic.
Recall (Coverage)
Recall measures the diversity and coverage of the real data distribution by the synthetic data. A high recall score indicates that the generative model captures most of the modes and variations present in the real data.
- Mechanism: It is calculated as the proportion of real data samples that have at least one synthetic sample within a defined neighborhood in the feature space.
- Interpretation: Low precision, high recall indicates a model that generates diverse but often unrealistic or noisy samples.
- Analogy: In information retrieval, it's the fraction of relevant documents that are retrieved. Here, it's the fraction of real data modes that are reproduced.
Manifold Approximation
P&R operates by approximating the manifolds of the real and synthetic data distributions in a feature space. This is a critical conceptual step.
- Feature Extraction: Samples are passed through a pre-trained feature extractor (e.g., Inception-v3 for images, a BERT encoder for text). This projects data into a semantically meaningful space.
- Manifold Construction: The sets of feature vectors for real and synthetic data are treated as discrete approximations of their underlying continuous manifolds.
- Neighborhood Calculation: Precision and recall are computed by measuring the overlap between these manifolds using nearest-neighbor searches in this feature space.
The Precision-Recall Curve
Unlike a single number, P&R can be visualized as a curve by varying the neighborhood size, providing a comprehensive view of the trade-off.
- Varying Epsilon: The calculation depends on a threshold distance (epsilon) defining a 'match' between real and synthetic samples. Sweeping epsilon creates a curve.
- Area Under the Curve (AUC): The area under the Precision-Recall curve can be used as a single-figure summary, but the curve itself is more informative.
- Diagnostic Power: The shape of the curve reveals specific failure modes. A curve that hugs the top-right corner represents an ideal generator with both high quality and high coverage.
Comparison to FID and KID
P&R addresses key limitations of popular metrics like Fréchet Inception Distance (FID) and Kernel Inception Distance (KID).
- FID/KID Shortcoming: They are single scalar metrics that conflate quality and diversity. A good FID can mask mode collapse (good average quality, no diversity) or mode dropping (diverse but poor quality).
- P&R Advantage: By decoupling the two axes, P&R explicitly reveals if a model suffers from low diversity (low recall) or poor sample quality (low precision). It can diagnose that a model with a decent FID actually has terrible recall.
Practical Implementation & Thresholds
Implementing P&R requires careful choices for feature extraction and thresholding.
- Feature Space: The choice of feature extractor is crucial and domain-dependent (Inception for natural images, ResNet for medical imagery, CLIP for text-image alignment).
- Nearest Neighbor Search: Efficient k-NN algorithms are used to find matches between the two sets of feature vectors.
- Threshold (ε) Selection: There is no universally 'correct' epsilon. It is often defined as the k-th nearest neighbor distance within the real data manifold itself, making it data-dependent. Common practice is to generate the full curve.
How is Precision and Recall for Distributions Calculated?
Precision and Recall for Distributions (P&R) is a two-dimensional metric that separately quantifies the quality (precision) and diversity/coverage (recall) of a generative model's output relative to the real data distribution.
Precision and Recall for Distributions (P&R) is calculated by comparing the manifolds of real and generated data in a feature space. Precision measures the proportion of synthetic samples that lie within the real data manifold, indicating quality and realism. Recall measures the proportion of the real data manifold covered by synthetic samples, indicating diversity and mode coverage. The calculation typically involves constructing a nearest neighbor graph in a shared embedding space, such as the features from a pre-trained network, to estimate these manifold relationships.
The metric provides a more nuanced evaluation than single-score measures like Fréchet Inception Distance (FID), directly diagnosing failures like mode collapse (low recall) or the generation of unrealistic artifacts (low precision). It is implemented by measuring the likelihood that a synthetic sample has a real sample as its nearest neighbor (for precision) and vice-versa (for recall). This makes P&R a critical tool in the synthetic data validation pipeline for assessing the privacy-utility frontier and ensuring generated data supports robust downstream task performance.
P&R vs. Other Synthetic Data Evaluation Metrics
A comparison of Precision and Recall for Distributions (P&R) against other common metrics for evaluating the quality of synthetic data, highlighting their primary focus, strengths, and limitations.
| Metric / Feature | Precision & Recall for Distributions (P&R) | Fréchet Inception Distance (FID) | Train-on-Synthetic Test-on-Real (TSTR) | Maximum Mean Discrepancy (MMD) |
|---|---|---|---|---|
Primary Objective | Separately quantify quality (precision) and coverage/diversity (recall) of the synthetic distribution. | Provide a single scalar score for overall image quality and fidelity. | Measure the downstream utility of synthetic data for training predictive models. | Perform a statistical two-sample test to determine if two distributions are identical. |
Dimensionality | Two-dimensional metric (Precision, Recall). | One-dimensional scalar. | One-dimensional (e.g., accuracy, F1-score). | One-dimensional scalar (test statistic). |
Interpretability | High. Clear, separate scores for mode dropping (low recall) and mode invention (low precision). | Moderate. Lower score is better, but does not diagnose specific failure modes. | High. Directly measures practical utility for a target task. | Moderate. A low p-value indicates distributions are different, but not how. |
Requires a Task-Specific Model | ||||
Sensitive to Mode Collapse | Partially. Score degrades but cannot isolate collapse from poor quality. | |||
Sensitive to Out-of-Distribution Samples | ||||
Common Application Domain | General purpose (images, tabular, etc.). | Primarily image generation. | General purpose, but defined by the chosen downstream task. | General purpose statistical testing. |
Computational Cost | Moderate (requires nearest-neighbor searches in feature space). | Low (requires passing data through a pre-trained network). | High (requires training an evaluation model). | Moderate to High (depends on kernel and sample size). |
Diagnostic Use Cases for P&R
Precision and Recall for Distributions (P&R) is a core diagnostic tool for synthetic data. It decomposes generative model performance into two independent axes, allowing engineers to pinpoint specific failure modes and guide model improvement.
Detecting Mode Collapse
Mode collapse is a critical failure where a generator produces limited diversity. P&R isolates this issue via the recall metric. A high precision with low recall indicates the model captures a few modes of the real distribution with high quality but fails to cover others.
- Diagnostic Signal: High Precision, Low Recall.
- Example: A face generator that only produces images of young adults, ignoring children and elderly faces, despite each image being photorealistic.
- Action: Engineers can then focus on improving the generator's coverage, e.g., by adjusting the loss function or incorporating diversity-promoting techniques.
Identifying Low-Fidelity Samples
Poor sample quality, where generated data looks unrealistic or contains artifacts, is diagnosed by the precision metric. Low precision indicates that a significant portion of the synthetic distribution does not align with the real data manifold, even if coverage is good.
- Diagnostic Signal: Low Precision, High Recall.
- Example: A tabular data generator that produces all possible combinations of patient age and diagnosis (good coverage) but includes biologically impossible combinations like a 2-year-old with Alzheimer's (poor quality).
- Action: This directs efforts toward improving the generator's fidelity, such as refining the architecture or training with more real data.
Balancing the Privacy-Utility Trade-off
When applying privacy-preserving techniques like differential privacy, there is an inherent trade-off. P&R quantifies this trade-off precisely.
- A strong privacy guarantee (low epsilon) often reduces both precision and recall.
- Monitoring the P&R curve as privacy noise increases shows how utility degrades.
- Use Case: Determining the maximum acceptable privacy budget (epsilon) that keeps precision and recall above a defined utility threshold for a downstream task.
Benchmarking Model Iterations
P&R provides a stable, two-dimensional benchmark for A/B testing different generative models or training configurations. It offers more nuanced insight than a single-score metric like FID.
- Process: Plot P&R scores for Model A, Model B, and a baseline on the same real data reference.
- Interpretation: A model with superior recall is better for data augmentation where coverage is key. A model with superior precision is better for creating high-fidelity exemplars.
- This allows for objective, goal-oriented model selection.
Validating Conditional Generation
For conditional generative models (e.g., generating images of a specific class), P&R can be computed per condition. This diagnoses whether the model has learned all conditions equally well.
- Procedure: Calculate precision and recall separately for samples conditioned on 'cat', 'dog', 'car', etc.
- Diagnostic: A low recall for the 'cat' class indicates the model cannot generate the full diversity of cat images present in the real data, even if the cats it does generate look real (high precision).
- This enables targeted retraining on underperforming conditions.
Assessing Support Coverage for Safety
In safety-critical domains like autonomous driving or healthcare, ensuring synthetic data covers edge cases is vital. Recall directly measures support coverage.
- Low recall signals that the synthetic data lacks rare but critical scenarios (e.g., pedestrians at night, rare medical conditions).
- Use Case: Before training a perception model on synthetic data, engineers can verify recall is sufficiently high across all semantically segmented categories (vehicles, pedestrians, signage).
- This assessment helps prevent the deployment of models blind to dangerous real-world situations.
Frequently Asked Questions
Precision and Recall for Distributions (P&R) is a two-dimensional metric for evaluating generative models. It separately quantifies the quality and diversity of synthetic data relative to a real data distribution. This FAQ addresses its mechanics, calculation, and role in synthetic data validation.
Precision and Recall for Distributions (P&R) is a two-dimensional evaluation metric that separately quantifies the quality (precision) and diversity/coverage (recall) of a synthetic dataset relative to a real data distribution. Unlike single-score metrics like Fréchet Inception Distance (FID), P&R provides a more nuanced diagnostic by measuring whether generated samples are realistic (precision) and whether the generator captures the full diversity of the real data modes (recall). It is calculated by treating the real and synthetic distributions as sets in a feature space and measuring their mutual coverage using manifold estimation or nearest neighbor methods.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Precision and Recall for Distributions (P&R) is a core metric for generative models, but it exists within a broader ecosystem of statistical tests, evaluation protocols, and failure modes used to validate synthetic data. These related concepts are essential for a complete assessment.
Fréchet Inception Distance (FID)
Fréchet Inception Distance (FID) is a seminal metric for evaluating the quality of generated images. It calculates the Wasserstein-2 distance between the multivariate Gaussian distributions fitted to the feature activations of real and synthetic images, as extracted by a pre-trained Inception-v3 network. A lower FID score indicates the synthetic data distribution is closer to the real one. Unlike P&R, FID is a single scalar that conflates quality and diversity, whereas P&R separates these dimensions.
- Key Use: Standard benchmark for image generation models like GANs and diffusion models.
- Limitation: Assumes features are Gaussian-distributed and is sensitive to sample size.
Maximum Mean Discrepancy (MMD)
Maximum Mean Discrepancy (MMD) is a kernel-based statistical test for determining if two samples are drawn from the same distribution. It computes the distance between the mean embeddings of the real and synthetic datasets in a Reproducing Kernel Hilbert Space (RKHS). A low MMD indicates the distributions are similar. Kernel Inception Distance (KID) is a specific, unbiased variant of MMD used for images.
- Relation to P&R: Like P&R, MMD is a distribution-level metric, but it provides a single score. P&R's two-dimensional analysis offers more diagnostic insight into how the distributions differ (coverage vs. quality).
- Application: Used in two-sample testing and as a loss function for generative models.
Train-on-Synthetic Test-on-Real (TSTR)
Train-on-Synthetic Test-on-Real (TSTR) is a utility-focused evaluation protocol. It measures the practical value of synthetic data by training a downstream machine learning model (e.g., a classifier) entirely on the generated dataset and then evaluating its performance on a held-out set of real data. High performance indicates the synthetic data preserved the statistical patterns necessary for the task.
- Core Purpose: Answers the question, "Can I use this synthetic data to train a useful model?"
- Contrast with P&R: P&R is a fidelity metric assessing distributional match. TSTR is a task-specific utility metric. High P&R scores often correlate with good TSTR performance, but not always.
Mode Collapse
Mode collapse is a critical failure mode in generative adversarial networks (GANs) where the generator produces a very limited diversity of outputs. It captures only one or a few modes (high-density regions) of the true data distribution while ignoring others. For example, a generator for digit images might only produce the number '7'.
- Detection with P&R: This failure is directly measurable with P&R. A model suffering from mode collapse will have high precision (the few things it generates look real) but very low recall (it fails to cover most of the real data distribution).
- Impact: Renders synthetic data useless for training robust models, as it lacks the diversity of the real world.
Two-Sample Test
A two-sample test is a statistical hypothesis test used to determine whether two sets of observations (e.g., a real dataset and a synthetic dataset) are drawn from the same underlying probability distribution. The null hypothesis is that the samples are from the same distribution. MMD and Kernel Two-Sample Tests are modern, powerful non-parametric methods for this.
- Role in Validation: It is the foundational statistical question behind most synthetic data fidelity metrics. P&R, FID, and MMD all provide quantitative answers to this test.
- Diagnostic Limit: A two-sample test may reject the null (distributions are different) but doesn't explain how they differ. P&R provides this diagnostic breakdown into precision and recall components.
Support Coverage
Support coverage is a geometric and statistical concept that evaluates the extent to which a synthetic dataset spans the entire range of possibilities—the support—present in the real data distribution. Good coverage means the synthetic data contains examples from all regions, including low-density "edge cases," not just the common modes.
- Direct Link to Recall: The recall dimension of P&R is a formal, likelihood-based measure of support coverage. High recall indicates the generative model has high probability mass over the real data support.
- Engineering Importance: For safety-critical applications (e.g., autonomous driving), generating data that covers rare edge cases is as important as generating high-fidelity common cases.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us