Research ArticleCOMPUTER SCIENCE

AI Feynman: A physics-inspired method for symbolic regression

See allHide authors and affiliations

Science Advances  15 Apr 2020:
Vol. 6, no. 16, eaay2631
DOI: 10.1126/sciadv.aay2631

Figures

  • Fig. 1 Schematic illustration of our AI Feynman algorithm.

    It is iterative as described in the text, with four of the steps capable of generating new mystery datasets that get sent to fresh instantiations of the algorithm, which may or may not return a solution.

  • Fig. 2 Example: How our AI Feynman algorithm discovered mystery Equation 5.

    Given a mystery table with many examples of the gravitational force F together with the nine independent variables G, m1, m2, x1,..., z2, this table was recursively transformed into simpler ones until the correct equation was found. First, dimensional analysis generated a table of six dimensionless independent variables a = m2/m1,..., f = z1/x1 and the dimensionless dependent variable FF÷Gm12/x12. Then, a neural network was trained to fit this function, which revealed two translational symmetries (each eliminating one variable, by defining g ≡ c−d and h ≡ e − f) as well as multiplicative separability, enabling the factorization F(a, b, g, h) = G(a) H (b, g, h), thus splitting the problem into two simpler ones. Both G and H then were solved by polynomial fitting, the latter after applying one of a series of simple transformations (in this case, inversion). For many other mysteries, the final step was instead solved using brute-force symbolic search as described in the text.

Tables

  • Table 1 Functions optionally included in brute-force search.

    The following three subsets are tried in turn: “+−*/><~SPLICER”, “+−*/> 0~” and “+−*/><~REPLICANTS0”.

    SymbolMeaningArguments
    +Add2
    *Multiply2
    Subtract2
    /Divide2
    >Increment1
    <Decrement1
    Negate1
    000
    110
    Rsqrt1
    Eexp1
    Pπ0
    Lln1
    Iinvert1
    Ccos1
    Aabs1
    Narcsin1
    Tarctan1
    Ssin1
  • Table 2 Hyperparameters in our algorithm and the setting we use in this paper.

    SymbolMeaningSetting
    ϵbrTolerance in brute-force
    module
    10−5
    ϵpolTolerance in polynomial
    fit module
    10−4
    ϵNN0Validation error
    tolerance for neural
    network use
    10−2
    ϵsepTolerance for
    separability
    10 ϵNN
    ϵsymTolerance for symmetry7 ϵNN
    ϵbfsepTolerance in brute-force
    module after
    separability
    10 ϵNN
    ϵpolsepTolerance in polynomial
    fit module after
    separability
    10 ϵNN
    λImportance of accuracy
    relative to complexity
    Nd1/2
  • Table 3 Unit table used for our automated dimensional analysis.

    VariablesUnitsmskgTV
    a, gAcceleration1−2000
    h, ℏ, L, JzAngular momentum2−1100
    AArea20000
    kbBoltzmann constant2−21−10
    CCapacitance2−210−2
    q, q1, q2Charge2−210−1
    jCurrent density0−310−1
    I, I0Current Intensity2−310−1
    ρ, ρ0Density−30100
    θ, θ1, θ2, σ, nDimensionless00000
    g_, kf, γ, χ, β, αDimensionless00000
    pγ, n0, δ, f, μDimensionless00000
    n0, δ, f, μ, Z1, Z2Dimensionless00000
    DDiffusion coefficient2−1000
    μdriftDrift velocity constant0−1100
    pdElectric dipole moment3−210−1
    EfElectric field−10001
    ϵElectric permitivity1−210−2
    E, K, UEnergy2−2100
    EdenEnergy density−1−2100
    FEEnergy flux0−3100
    F, NnForce1−2100
    ω, ω0Frequency0−1000
    kGGrav. coupling (Gm1m2)3−2100
    HHubble constant0−1000
    LindInductance−24−102
    nrhoInverse volume−30000
    x, x1, x2, x3Length10000
    y, y1, y2, y3Length10000
    z, z1, z2, r, r1, r2Length10000
    λ, d1, d2, d, ff, afLength10000
    I1, I2, I*, I*0Light intensity0−3100
    B, Bx, By, BzMagnetic field−21001
    μmMagnetic moment4−310−1
    MMagnetization1−310−1
    m, m0, m1, m2Mass00100
    μeMobility01−100
    pMomentum1−1100
    GNewton’s constant3−2−100
    P*Polarization0−210−1
    PPower2−3100
    pFPressure−1−2100
    RResistance−23−102
    μSShear modulus−1−2100
    LradSpectral radiance0−2100
    kspringSpring constant0−2100
    σdenSurface charge density0−210−1
    T, T1, T2Temperature00010
    κThermal conductivity1−31−10
    t, t1Time01000
    τTorque2−2100
    AvecVector potential−11001
    u, v, v1, c, wVelocity1−1000
    V, V1, V2Volume30000
    ρc, ρc0Volume charge density−1−210−1
    VeVoltage00001
    kWave number−10000
    YYoung modulus−1−2100
  • Table 4 Tested Feynman equations, part 1.

    Abbreviations in the “Methods used” column: da, dimensional analysis; bf, brute force; pf, polyfit; ev, set two variables equal; sym, symmetry; sep, separability. Suffixes denote the type of symmetry or separability (sym–, translational symmetry; sep*, multiplicative separability; etc.) or the preprocessing before brute force (e.g., bf-inverse means inverting the mystery function before bf).

    Feynman Eq.EquationSolution Time (s)Methods UsedData NeededSolved By EureqaSolved W/o
    da
    Noise
    Tolerance
    I.6.20af=eθ2/2/2π16bf10NoYes10−2
    I.6.20f=eθ22σ2/2πσ22992ev, bf-log102NoYes10−4
    I.6.20bf=e(θθ1)22σ2/2πσ24792sym–, ev, bf-log103NoYes10−4
    I.8.14d=(x2x1)2+(y2y1)2544da, pf-squared102NoYes10−4
    I.9.18F=Gm1m2(x2x1)2+(y2y1)2+(z2z1)25975da, sym–, sym–, sep∗, pf-inv106NoYes10−5
    I.10.7m=m01v2c214da, bf10NoYes10−4
    I.11.19A = x1y1 + x2y2 + x3y3184da, pf102YesYes10−3
    I.12.1F = μNn12da, bf10YesYes10−3
    I.12.2F=q1q24πϵr217da, bf10YesYes10−2
    I.12.4Ef=q14πϵr212da10YesYes10−2
    I.12.5F = q2Ef8da10YesYes10−2
    I.12.11F = q(Ef + Bv sin θ)19da, bf10YesYes10−3
    I.13.4K=12m(v2+u2+w2)22da, bf10YesYes10−4
    I.13.12U=Gm1m2(1r21r1)20da, bf10YesYes10−4
    I.14.3U = mgz12da10YesYes10−2
    I.14.4U=kspringx229da10YesYes10−2
    I.15.3xx1=xut1u2/c222da, bf10NoNo10−3
    I.15.3tt1=tux/c21u2/c220da, bf102NoNo10−4
    I.15.10p=m0v1v2/c213da, bf10NoYes10−4
    I.16.6v1=u+v1+uv/c218da, bf10NoYes10−3
    I.18.4r=m1r1+m2r2m1+m217da, bf10YesYes10−2
    I.18.12τ = rF sin θ15da, bf10YesYes10−3
    I.18.16L = mrv sin θ17da, bf10YesYes10−3
    I.24.6E=14m(ω2+ω02)x222da, bf10YesYes10−4
    I.25.13Ve=qC10da10YesYes10−2
    I.26.2θ1 = arcsin (n sin θ2)530da, bf-sin102YesYes10−2
    I.27.6ff=11d1+nd214da, bf10YesYes10−2
    I.29.4k=ωc8da10YesYes10−2
    I.29.16x=x12+x222x1x2cos(θ1θ2)2135da, sym–, bf-squared103NoNo10−4
    I.30.3I*=I*0sin2(nθ/2)sin2(θ/2)118da, bf102YesYes10−3
    I.30.5θ=arcsin(λnd)529da, bf-sin102YesYes10−3
    I.32.5P=q2a26πϵc313da10YesYes10−2
    I.32.17P=(12ϵcEf2)(8πr2/3)(ω4/(ω2ω02)2)698da, bf-sqrt10NoYes10−4
    I.34.8ω=qvBp13da10YesYes10−2
    I.34.10ω=ω01v/c13da, bf10NoYes10−3
    I.34.14ω=1+v/c1v2/c2ω014da, bf10NoYes10−3
    I.34.27E = ℏω8da10YesYes10−2
    I.37.4I*=I1+I2+2I1I2cosδ7032da, bf102YesNo10−3
    I.38.12r=4πϵ2mq213da10YesYes10−2
    I.39.10E=32pFV8da10YesYes10−2
    I.39.11E=1γ1pFV13da, bf10YesYes10−3
    I.39.22PF=nkbTV16da, bf10YesYes10−4
    I.40.1n=n0emgxkbT20da, bf10NoYes10−2
    I.41.16Lrad=ω3π2c2(eωkbT1)22da, bf10NoNo10−5
    I.43.16v=μdriftqVed14da10YesYes10−2
    I.43.31D = μekbT11da10YesYes10−2
    I.43.43κ=1γ1kbvA16da, bf10YesYes10−3
    I.44.4E=nkbTln(V2V1)18da, bf10YesYes10−3
    I.47.23c=γprρ14da, bf10YesYes10−2
    I.48.20E=mc21v2/c2108da, bf102NoNo10−5
    I.50.26x = x1[ cos (ωt) + α cos (ωt)2]29da bf10YesYes10−2
  • Table 5 Tested Feynman equations, part 2 (same notation as in Table 4).

    Feynman Eq.EquationSolution Time
    (s)
    Methods UsedData NeededSolved By
    Eureqa
    Solved W/o daNoise
    Tolerance
    II.2.42P=κ(T2T1)Ad54da, bf10YesYes10−3
    II.3.24FE=P4πr28da10YesYes10−2
    II.4.23Ve=q4πϵr10da10YesYes10−2
    II.6.11Ve=14πϵpdcos θr218da, bf10YesYes10−3
    II.6.15aEf=34πϵpdzr5x2+y22801da, sm, bf104NoYes10−3
    II.6.15bEf=34πϵpdr3cos θsin θ23da, bf10YesYes10−2
    II.8.7E=35q24πϵd10da10YesYes10−2
    II.8.31Eden=ϵEf228da10YesYes10−2
    II.10.9Ef=σdenϵ11+χ13da, bf10YesYes10−2
    II.11.3x=qEfm(ω02ω2)25da, bf10YesYes10−3
    II.11.17n=n0(1+pdEfcos θkbT)28da, bf10YesYes10−2
    II.11.20P*=nρpd2Ef3kbT18da, bf10YesYes10−3
    II.11.27P*=nα1nα/3ϵEf337da bf-inverse102NoYes10−3
    II.11.28θ=1+nα1(nα/3)1708da, sym*, bf102NoYes10−4
    II.13.17B=14πϵc22Ir13da10YesYes10−2
    II.13.23ρc=ρc01v2/c213da, bf102NoYes10−4
    II.13.34j=ρc0v1v2/c214da, bf10NoYes10−4
    II.15.4E = − μMB cos θ14da, bf10YesYes10−3
    II.15.5E = − pdEf cos θ14da, bf10YesYes10−3
    II.21.32Ve=q4πϵr(1v/c)21da, bf10YesYes10−3
    II.24.17k=ω2c2π2d262da bf10NoYes10−5
    II.27.16FE=ϵcEf213da10YesYes10−2
    II.27.18Eden=ϵEf29da10YesYes10−2
    II.34.2aI=qv2πr11da10YesYes10−2
    II.34.2μM=qvr211da10YesYes10−2
    II.34.11ω=g_qB2m16da, bf10YesYes10−4
    II.34.29aμM=qh4πm12da10YesYes10−2
    II.34.29bE=g_μMBJz18da, bf10YesYes10−4
    II.35.18n=n0exp(μmB/(kbT))+exp(μmB/(kbT))30da, bf10NoYes10−2
    II.35.21M=nρμMtanh(μMBkbT)1597da, halve-input, bf10YesNo10−4
    II.36.38f=μmBkbT+μmαMϵc2kbT77da bf10YesYes10−2
    II.37.1E = μM(1 + χ)B15da, bf10YesYes10−3
    II.38.3F=YAxd47da, bf10YesYes10−3
    II.38.14μS=Y2(1+σ)13da, bf10YesYes10−3
    III.4.32n=1eωkbT120da, bf10NoYes10−3
    III.4.33E=ωeωkbT119da, bf10NoYes10−3
    III.7.38ω=2μMB13da10YesYes10−2
    III.8.54pγ=sin(Et)239da, bf10NoYes10−3
    III.9.52pγ=pdEftsin((ωω0)t/2)2((ωω0)t/2)23162da, sym–, sm, bf103NoYes10−3
    III.10.19E=μMBx2+By2+Bz2410da, bf-squared102YesYes10−4
    III.12.43L = nℏ11da, bf10YesYes10−3
    III.13.18v=2Ed2k16da, bf10YesYes10−4
    III.14.14I=I0(eqVekbT1)18da, bf10NoYes10−3
    III.15.12E = 2U(1 − cos (kd))14da, bf10YesYes10−4
    III.15.14m=22Ed210da10YesYes10−2
    III.15.27k=2παnd14da, bf10YesYes10−3
    III.17.37f = β(1 + αcos θ)27bf10YesYes10−3
    III.19.51E=mq42(4πϵ)221n218da, bf10YesYes10−5
    III.21.20j=ρc0qAvecm13da10YesYes10−2
  • Table 6 Tested bonus equations.

    Goldstein 8.56 is for the special case where the vectors p and A are parallel.

    SourceEquationSolvedSolved by EureqaMethods used
    Rutherford scatteringA=(Z1Z2αc4Esin2(θ2))2YesNoda, bf-sqrt
    Friedman equationH=8πG3ρkfc2af2YesNoda, bf-squared
    Compton scatteringU=E1+Emc2(1cos θ)YesNoda, bf
    Radiated gravitational wave powerP=325G4c5(m1m2)2(m1+m2)r5NoNo
    Relativistic aberrationθ1=arccos(cos θ2vc1vccos θ2)YesNoda, bf-cos
    N-slit diffractionI=I0[sin(α/2)α/2sin(Nδ/2)sin(δ/2)]2YesNoda, sm, bf
    Goldstein 3.16v=2m(EUL22mr2)YesNoda, bf-squared
    Goldstein 3.55k=mkGL2(1+1+2EL2mkG2cos(θ1θ2))YesNoda, sym–, bf
    Goldstein 3.64 (ellipse)r=d(1α2)1+αcos(θ1θ2)YesNoda, sym–, bf
    Goldstein 3.74 (Kepler)t=2πd3/2G(m1+m2)YesNoda, bf
    Goldstein 3.99α=1+2ϵ2EL2m(Z1Z2q2)2YesNoda, sym*, bf
    Goldstein 8.56E=(pqAvec)2c2+m2c4+qVeYesNoda, sep+, bf-squared
    Goldstein 12.80E=12m[p2+m2ω2x2(1+αxy)]YesYesda, bf
    Jackson 2.11F=q4πϵy2[4πϵVedqdy3(y2d2)2]NoNo
    Jackson 3.45Ve=q(r2+d22drcos α)12YesNoda, bf-inv
    Jackson 4.60Ve=Efcos θ(α1α+2d3r2r)YesNoda, sep*, bf
    Jackson 11.38 (Doppler)ω0=1v2c21+vccos θωYesNoda, cos-input, bf
    Weinberg 15.2.1ρ=38πG(c2kfaf2+H2)YesYesda, bf
    Weinberg 15.2.2pf=18πG[c4kfaf2+c2H2(12α)]YesYesda, bf
    Schwarz 13.132 (Klein-Nishina)A=πα22m2c2(ω0ω)2[ω0ω+ωω0sin2θ]YesNoda, sym/, sep*, sin-input, bf

Stay Connected to Science Advances

Navigate This Article