Introduction
Introduction
Every machine learning project I’ve undertaken so far has consumed data. However, this time, I wanted to invert the direction. The task is generative -- to teach a machine the joint statistical structure of the known exoplanet population well enough that it can manufacture new, synthetic planets that never existed, yet are statistically indistinguishable from the real ones. With this, survey teams could inject synthetic catalogs into their detection pipelines to measure completeness, and the synthetic worlds would be useful for data augmentation.
The plan uses Wolfram's built-in ExoplanetData catalog. After extracting four quantities per planet (orbital period, semi-major axis, planet mass, and eccentricity), LearnDistribution fits a generative model over the four-dimensional population, and RandomVariate draws a forged catalog of equal size. Validation then proceeds in three escalating stages: the forged marginal distributions must overlay the real ones, the forged correlation structure must match the real correlation matrix, and -- the decisive test -- the forged planets must obey Kepler's third law. The real population traces a tight ridge of slope 3/2 in the log period versus log semi-major axis plane, a law of gravity the model is never told. If the slope of the synthetic ridge matches, the generative model has absorbed a piece of celestial mechanics purely from the shape of a point cloud.
The plan uses Wolfram's built-in ExoplanetData catalog. After extracting four quantities per planet (orbital period, semi-major axis, planet mass, and eccentricity), LearnDistribution fits a generative model over the four-dimensional population, and RandomVariate draws a forged catalog of equal size. Validation then proceeds in three escalating stages: the forged marginal distributions must overlay the real ones, the forged correlation structure must match the real correlation matrix, and -- the decisive test -- the forged planets must obey Kepler's third law. The real population traces a tight ridge of slope 3/2 in the log period versus log semi-major axis plane, a law of gravity the model is never told. If the slope of the synthetic ridge matches, the generative model has absorbed a piece of celestial mechanics purely from the shape of a point cloud.
Data Extraction
Data Extraction
The property names are resolved against the Exoplanet entity type's actual property list at runtime; values are unwrapped from units, uncertainty objects, and intervals by the toNum normalizer; and every stage prints a diagnostic so nothing can fail silently. Because the four quantities span wildly different unit conventions, the column medians are printed and used to normalize: periods to days, semi-major axes to astronomical units, masses to Jupiter masses.
In[]:=
available=CanonicalName/@EntityValue["Exoplanet","Properties"];candidateMap=<|"OrbitalPeriod"->{"OrbitalPeriod","OrbitPeriod","Period"},"SemimajorAxis"->{"SemimajorAxis","SemiMajorAxis","AverageOrbitDistance"},"PlanetMass"->{"PlanetMass","Mass"},"Eccentricity"->{"OrbitalEccentricity","Eccentricity","OrbitEccentricity"}|>;resolve[cands_List]:=SelectFirst[cands,MemberQ[available,#]&,Missing["None"]];resolved=DeleteMissing[Map[resolve,candidateMap]];Print["Resolved properties: ",resolved];ents=ExoplanetData[];If[!(ListQ[ents]&&Length[ents]>0&&MatchQ[First[ents],_Entity]),ents=EntityList[EntityClass["Exoplanet",All]]];Print["Entities found: ",Length[ents]];allProps=Map[EntityProperty["Exoplanet",#]&,Values[resolved]];rawMatrix=EntityValue[ents,allProps];Print["Catalog entries: ",Length[rawMatrix]]
Resolved properties: OrbitalPeriodOrbitPeriod,SemimajorAxisSemimajorAxis,PlanetMassMass,EccentricityEccentricity
Entities found: 6157
Catalog entries: 6157
In[]:=
toNum[v_]:=Which[NumericQ[v],N[v],QuantityQ[v],toNum[QuantityMagnitude[v]],Head[v]===Around,toNum[v["Value"]],Head[v]===Interval,toNum[Mean[First[v]]],ListQ[v]&&Length[v]>=1,toNum[First[v]],True,Missing["NotAvailable"]];numMatrix=Map[toNum,rawMatrix,{2}];good=Select[numMatrix,VectorQ[#,NumericQ]&];Print["Planets with all four quantities: ",Length[good]];p=good[[All,1]];a=good[[All,2]];mass=good[[All,3]];ecc=good[[All,4]];Print["Median raw values (P, a, M): ",{Median[p],Median[a],Median[mass]}];If[Median[p]>10^5,p=p/86400.];If[Median[a]>100,a=a/1.495978707*^8];If[Median[mass]>10^20,mass=mass/1.898*^27];okIdx=Select[Range[Length[p]],Function[j,p[[j]]>0&&a[[j]]>0&&mass[[j]]>0&&0<=ecc[[j]]<1]];p=p[[okIdx]];a=a[[okIdx]];mass=mass[[okIdx]];ecc=ecc[[okIdx]];Print["Planets in final sample: ",Length[p]]
Planets with all four quantities: 2020
Median raw values (P, a, M): {48.3172,0.154,1.47322×}
27
10
Planets in final sample: 2017
Generative models learn best in coordinates where the data are roughly unimodal and comparably scaled. Period, semi-major axis, and mass each span several orders of magnitude, so all three are moved to base-10 logarithms; eccentricity already lives comfortably in the unit interval and is left alone.
In[]:=
X=Transpose[{Log10[p],Log10[a],Log10[mass],ecc}];coordNames={"log10 Period (d)","log10 a (AU)","log10 Mass (MJ)","Eccentricity"};Dimensions[X]
Out[]=
{2017,4}
Exploratory Data Analysis
Exploratory Data Analysis
The four marginal histograms map the population the model must learn: the pile-up of hot Jupiters at short periods, the broad sweep of semi-major axes, the giant-dominated mass function carved by detection bias, and the eccentricity distribution crowding toward circular orbits. The scatter plot alongside is the Kepler plane itself -- the tight diagonal ridge in log period versus log semi-major axis that any faithful forgery must reproduce.
GraphicsGridPartitionTableHistogramX[[All,j]],,{j,4},2,Spacings->{0.6,0.8}
Out[]=
ListPlotTranspose[{X[[All,2]],X[[All,1]]}],
Out[]=
Learning the Population
Learning the Population
LearnDistribution fits a generative model to the four-dimensional cloud. The returned LearnedDistribution behaves like any built-in distribution: it can be sampled, queried for densities, and -- the part that matters here -- asked to produce as many synthetic planets as desired. The seed is pinned so the forged catalog is reproducible.
In[]:=
SeedRandom[12];dist=LearnDistribution[X];synth=RandomVariate[dist,Length[X]];Print["Forged planets: ",Length[synth]]
Forged planets: 2017
Forging the Catalog: Statistical Validation
Forging the Catalog: Statistical Validation
The first validation stage overlays the forged marginals on the real ones. A competent forgery should be hard to spot by eye in any single coordinate.
GraphicsGridPartitionTableHistogram{X[[All,j]],synth[[All,j]]},,{j,4},2,Spacings->{0.6,0.8}
Out[]=
Matching marginals is necessary but nowhere near sufficient -- four perfect histograms can hide a complete failure to capture how the quantities move together. The second stage compares the full correlation matrices of the real and forged catalogs entry by entry.
The Kepler Test
The Kepler Test
The final stage is the one with physics in it. For planets orbiting stars of roughly solar mass, Kepler's third law fixes the slope of log period against log semi-major axis at exactly 3/2; the scatter of host-star masses blurs the ridge but not its slope. Fitting a line to each catalog gives a single number per catalog that the generative model was never told and cannot fake by matching histograms alone, because the slope lives entirely in the joint structure.
Conclusion
Conclusion
This project asked a generative model to do something superficially impossible: invent planets. Judged statistically, it succeeds. The forged marginals overlay the real ones closely enough that no single histogram gives the forgery away, the means, spreads, and correlation matrices agree entry by entry, and -- most tellingly -- the synthetic catalog reproduces the Kepler ridge with a slope close to both the real catalog's and the theoretical 3/2. That last result deserves emphasis: Kepler's third law was never encoded in the model; it entered only as the geometry of a point cloud, and the model preserved it because faithfully learning the joint distribution means inheriting every law that shapes it. The forgery is good precisely to the extent that the physics is statistical.
It is humbling to think that a generative model absorbed Kepler's third law well enough to forge worlds that obey it. Every time, the interpretation came from confronting the machine's output with physics that has been true all along.
It is humbling to think that a generative model absorbed Kepler's third law well enough to forge worlds that obey it. Every time, the interpretation came from confronting the machine's output with physics that has been true all along.
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Forging worlds: a generative model of the exoplanet population
by Lim Lee
Wolfram Community, STAFF PICKS, June 12, 2026
https://community.wolfram.com/groups/-/m/t/3732807
by Lim Lee
Wolfram Community, STAFF PICKS, June 12, 2026
https://community.wolfram.com/groups/-/m/t/3732807