quantum machine learning for election modeling - max henderson... · title: 2018-04-04 - max...

24
Quantum Machine Learning for Election Modeling April 4, 2018 Max Henderson, Ph.D.

Upload: duongdien

Post on 03-Jun-2019

215 views

Category:

Documents


0 download

TRANSCRIPT

QuantumMachineLearningforElectionModeling

April4,2018MaxHenderson,Ph.D.

DataAnalytics|QuantumComputing|SystemsEngineering

Established2014inWashingtonD.C./London/AdelaideTeamof~20softwareandsystemsengineers,datascientistsClients:

GlobalInvestmentBanksAssetManagementFirms

TechnologyCompaniesGovernmentEnergyPharmaceutical

QxBranchOverview

2

QxBranchdeliversrevolutionarydataanalyticssoftwareenabledbyclassicalandemergingquantum

computingcapabilitiesthatdrivebusinessvalue

ApplydataanalyticsexpertiseandsoftwarecapabilitiestomanagecomplexdataandprovideactionableinsightsacrossmultipleverticalsBusinessdomainexpertiseinfinance,aerospace,defence,andtechnologydomainsResearch&Developmentpartnershipswithclientsandacademiatoidentifybusinesschallengesthatcanbesolvedthroughcutting-edgeapplicationsofquantumcomputing(universalandadiabatic)andadvanceddataanalytics

QxBranch,Inc.2018

Election2016:Casestudyinthedifficultlyofsampling

3QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018

Wheredidthemodelsgowrong?

State-by-statecorrelations

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 4

• Majorissue:failuretomodelcorrelations1-3betweenstates

• Mostmodelsassumedindependencebetweenresultsofeachstate

• Anaccuratecorrelationmatrixcancapturehigher-level,richerstructureinthedataandaccountforsystemicerrorsinpolls

1. http://www.independent.co.uk/news/world/americas/sam-wang-princeton-election-consortium-poll-hillary-clinton-donald-trump-victory-a7399671.html2. http://elections.huffingtonpost.com/2016/forecast/president3. http://money.cnn.com/2016/11/01/news/economy/hillary-clinton-win-forecast-moodys-analytics/index.html4. http://fivethirtyeight.com/

Difficultyofsamplingfromcorrelatedgraphs

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 5

• Evenwithperfectdataoncorrelationsbetweenstates,usingthecorrelationmatrixisdifficultduetothecomputationalcostofsamplingfromfully-connectedgraphs

• Samplingfromfully-connectedgraphsisanalogoustosamplingfromaproperlytrainedBoltzmannmachine• TrainingcoefficientsofBoltzmannmachinesrequires

performingcalculationsonallpossiblestatesofthemodel• Asthisisintractableonlargeproblemsizes,heuristicsor

othermodelsaretypicallyimplementedinstead

Forecastingelectionsonaquantumcomputer

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 6

• Quantumcomputing(QC)researchhasshownpotentialspeedupsintrainingdeepneuralnetworks1-3

• Coreidea:ByusingQC-trainedmodelstosimulateelectionresultswecanachieve:• Moreefficientsampling/training• Intrinsic,tuneablestatecorrelations• Inclusionofadditionalerrormodels

1. Adachi,StevenH.,andMaxwellP.Henderson."Applicationofquantumannealingtotrainingofdeepneuralnetworks." arXiv preprintarXiv:1510.06356 (2015).2. Benedetti,Marcello,etal."Estimationofeffectivetemperaturesinquantumannealers forsamplingapplications:Acasestudywithpossibleapplicationsindeep

learning." PhysicalReviewA 94.2(2016):022308.3. Benedetti,Marcello,etal."Quantum-assistedlearningofgraphicalmodelswitharbitrarypairwiseconnectivity." arXiv preprintarXiv:1609.02542 (2016).

WhatweAREdoingvs.whatweAREN’T

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 7

SubjectMatterExpertiseModel(s) SimulationModel(s)

DatatoModel

1. Individualstatepredictions

2.StateCorrelations

SimulationResults

WhatweAREdoingvs.whatweAREN’T

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 8

SubjectMatterExpertiseModel(s)

PreviousVotingresults

Currentstatepollingresults

Race

Gender

Urbanvsruralpopulationdistribution

Totalstatepopulation

Voterexcitability

Education

NumberofRussianbotsonTwitter

WhatweAREdoingvs.whatweAREN’T

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 9

SubjectMatterExpertiseModel(s) SimulationModel(s)

DatatoModel

1. Individualstatepredictions

2.StateCorrelations

SimulationResults

Step1:MappinganelectiontoaBoltzmannmachine

10QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018

1. http://www.fivethirtyeight.com

Figure 2. (A) Example map of 538 state-by-state voting probabilities and the resulting national probability. (B) State

probabilities are formed from a time series averaging technique, and (C) the candidates lead translates into an overall probability.

A B

C

Figure 2. (A) Example map of 538 state-by-state voting probabilities and the resulting national probability. (B) State

probabilities are formed from a time series averaging technique, and (C) the candidates lead translates into an overall probability.

A B

C

Figure 2. (A) Example map of 538 state-by-state voting probabilities and the resulting national probability. (B) State

probabilities are formed from a time series averaging technique, and (C) the candidates lead translates into an overall probability.

A B

C

Figure 2. (A) Example map of 538 state-by-state voting probabilities and the resulting national probability. (B) State

probabilities are formed from a time series averaging technique, and (C) the candidates lead translates into an overall probability.

A B

C

𝒔𝒊 𝑫

Availabledataislimited

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 11

• Whatwewouldlike:• Detailedbreakdownsofdemographics• Meticulouslycuratedbiasesandcorrelations• Allofthedatathat538hasspentyearsandthousandsof

dollarscurating

• Whatwehave:• PubliclyavailableresultsofpreviousUSelections• Stateprobabilities,astoldbypolls• Publiclyaccessibledatafrom538

Calculatingthemissingsecondordermoments

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 12

• Inlieuofbettercurateddataconcerningsecondordermoments,wecalculatedourowntermsfrompreviousUSelectionresults

• Ourmethodologyshouldnot“break”firstordermoments

• Assumptionsinthismodel:• Ineachpreviouselection,iftwostateshadthesameelectionresult,that

increasedtheircorrelation• Electionsthatweremorerecenthaveahigherweight

Step2:MappingaBoltzmannmachinetotheQC

13QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018

Figure 2. (A) Example map of 538 state-by-state voting probabilities and the resulting national probability. (B) State

probabilities are formed from a time series averaging technique, and (C) the candidates lead translates into an overall probability.

A B

C

Figure 2. (A) Example map of 538 state-by-state voting probabilities and the resulting national probability. (B) State

probabilities are formed from a time series averaging technique, and (C) the candidates lead translates into an overall probability.

A B

C

Figure 2. (A) Example map of 538 state-by-state voting probabilities and the resulting national probability. (B) State

probabilities are formed from a time series averaging technique, and (C) the candidates lead translates into an overall probability.

A B

C

Figure 2. (A) Example map of 538 state-by-state voting probabilities and the resulting national probability. (B) State

probabilities are formed from a time series averaging technique, and (C) the candidates lead translates into an overall probability.

A B

C

jxix

The update equations for training the model:

∆𝑤&' = −1𝜂 𝑠&𝑠' - − 𝑠&𝑠' . ∆𝜃& = −

1𝜂 𝑠& - − 𝑠& .

Potential quantum advantage

Graphembedding– Qubitchains

14

Exampleofembeddingaproblem(left)intoafixedgraphstructure(right)1

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018

1. Choi,Vicky."Minor-embeddinginadiabaticquantumcomputation:II.Minor-universalgraphdesign." arXiv preprinthttps://arxiv.org/pdf/1001.3116v2.pdf(2010).

Effectofembedding:Shortqubitchains

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 15

• Tovalidatetheapproach,werandomlychosefirstandsecondordertermsforahypothetical5-statenation

• Usingthesmallestembeddingchains,thisnetworkwasunabletoproperlytrain• “Hopfield”likeresults;

optimalsolutionsratherthanprobabilisticresults

• Leadstohugechangesinweights/biases,causingnetworkinstability

Diagonal= 𝒔𝒊 𝑴Offdiagonal= 𝒔𝒊𝒔𝒋 𝑴

Effectofembedding:Longqubitchains

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 16

• Forlargerproblemsizes,theembeddingwillnecessarilyhavelongerqubitchains

• Tosimulatethisforoursmallnetwork,weartificiallyincreasedthequbitchains

• Withthisapproach,arbitraryfirstandsecondordermomentswerelearnedbythenetworks

Diagonal= 𝒔𝒊 𝑴Offdiagonal= 𝒔𝒊𝒔𝒋 𝑴

Primaryexperiment

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 17

• Goal:UsinghistoricaldataandtheQC-trainingmethodologypresentedhere,reproduceelectionforecastsovertime

• Somecaveats:• Multiplemodelsneededformodeling nationalerror;25were

usedhere• LimitedtimewindowsofD-Waveaccess,soresultswere

generatedeverytwoweeksinsteadofdaily• Limitedhardwaresizemadeusomit1stateandprovince

(sorryMarylandandDC…youalwaysvoteDanyway)• Forsimplification,MaineandNebraskawereconsidered

winner-take-all

Results– Trainingerrors

18QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018

Examplestestingextremesofcorrelations:negative,random,&positive

Redlines= 𝒔𝒊 𝑫Bluelines= 𝒔𝒊 𝑴

Results– Trainingerrors

19QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017

Largeerrorsemergewhenpollsareupdatedandlargechangesoccur

Results– Trainingerrors

20QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017

QC=QuantumtrainedTB=NationalTrumpbiasCB=NationalClintonbias

Themost“impactful”states

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 21

• Pearsoncorrelationcoefficientsforthe10statesmost(top)andleast(bottom)correlatedwiththeelectionforecastingresults

Ourmodels 538

Stateerrors

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 22

• Individualstateserrordistributionswashighlydependentonifthestatewasahardred,blue,orpurplestate

• Differentwaysofdealingwitherrorsofthisform:• Shimming• Multiplegauges

Summary

QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2018 23

• TheQC-trainednetworkswereabletolearnstructureinpollingdatatomakeelectionforecastsinlinewiththemodelsof538

• Trumpwasgivenahigherlikelihoodofvictory(comparedtootherpollsters),eventhoughthefirstordermomentsremainedunchanged• Ideallyinthefuture,wecouldrerunthismethodusing

correlationsknownwithmoredetailin-housefrom538• Eachiterationofthetrainingmodelquicklyproduced25,000

simulations(oneforeachnationalerrormodel),whicheclipsesthe20,000simulations538performseachtimetheyreruntheirmodels

www.qxbranch.com|@qxbranch