Broken Survey Rules

Which software are you using? (SDV Community or SDV Enterprise?): SDV Community

Software Details (What is your SDV version? Python version?): 3.13

Description

My survey data has some rules. For example, If ‘Female’ coded in ‘Gender’ variable, then synthetic data should generate data for variable ’ Are you Pregnant?’ , If ‘Male’ coded in ‘Gender’ synthetic data generates should have ‘NA’ or missing value for such cases. Currently, Synthetic data generated is not following this logic, even though Input data is clean. Please help me to provide solution on this.

For additional resources see the API Docs.

Hi @kpatgaonkar, nice to meet you. This would be achievable using SDV Enterprise functionality + the CAG add-on bundle. Providing some details below.

Synthesizers are probabilistic by default

The main goal of SDV’s synthesizers (and synthetic data AI models in general) is: Learn statistical patterns from your real data and then emulate them in the synthetic data.

These statistical patterns are probabilistic in nature. So by default, a synthesizer is designed to learn a correlation such as: “If Gender is Male, then Are you Pregnant is more likely to be NA,” but the probabilistic nature of AI means that it will not generate this 100% of the time.

Use Constraint-Augmented Generation to capture rules

We recognize that in many domains, probabilistic correlations are not good enough and that specific rules must be followed 100% of the time. For that reason, we built Constraint-Augmented Generation (CAG) into the SDV platform. Constraints are a way to tell your synthesizer about the rules that should be followed 100% of the time.

  • In SDV Community, we have some limited support for basic constraints such as when column A < B (eg. checkin_date < checkout_date)
  • SDV Enterprise customers may purchase the CAG bundle which contains (a) additional, complex constraints, (b) support from us for adding new constraints, and (c) auto-detection of constraints based on your data.

Survey Data Functionality

Our team is actively implementing a few constraints that would be useful for survey data. This includes:

  • Skip Patterns (I believe this would resolve your problem), and
  • Question-based constraints. For example, we have an experimental constraint out right now for MultiSelectQuestion.

If you are interested in this functionality, I would recommend checking out SDV Enterprise + with the CAG bundle add-on.

Additional Resources

Thank for detailed reply you Neha, this is clear.

1 Like