Election2016:Casestudyinthedifficultlyofsampling
3QuantumMachineLearningforElectionModeling– CopyrightQxBranch 2017
Wheredidthemodelsgowrong?
State-by-statecorrelations
QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017 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– CopyrightQxBranch2017 5
• Evenwithperfectdataoncorrelationsbetweenstates,usingthecorrelationmatrixisdifficultduetothecomputationalcostofsamplingfromfully-connectedgraphs
• Samplingfromfully-connectedgraphsisanalogoustosamplingfromaproperlytrainedBoltzmannmachine• TrainingcoefficientsofBoltzmannmachinesrequires
performingcalculationsonallpossiblestatesofthemodel• Asthisisintractableonlargeproblemsizes,heuristicsor
othermodelsaretypicallyimplementedinstead
Forecastingelectionsonaquantumcomputer
QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017 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).
Step1:MappinganelectiontoaBoltzmannmachine
7QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017
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– CopyrightQxBranch2017 8
• Whatwewouldlike:• Detailedbreakdownsofdemographics• Meticulouslycuratedbiasesandcorrelations• Allofthedatathat538hasspentyearsandthousandsof
dollarscurating
• Whatwehave:• PubliclyavailableresultsofpreviousUSelections• Stateprobabilities,astoldbypolls• Publiclyaccessibledatafrom538
Calculatingthemissingsecondordermoments
QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017 9
• Inlieuofbettercurateddataconcerningsecondordermoments,wecalculatedourowntermsfrompreviousUSelectionresults
• Ourmethodologyshouldnot“break”firstordermoments
• Assumptionsinthismodel:• Ineachpreviouselection,iftwostateshadthesameelectionresult,that
increasedtheircorrelation• Electionsthatweremorerecenthaveahigherweight
Step2:MappingaBoltzmannmachinetotheQC
10QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017
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
11
Exampleofembeddingaproblem(left)intoafixedgraphstructure(right)
QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017
Effectofembedding:Shortqubitchains
QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017 12
• Tovalidatetheapproach,werandomlychosefirstandsecondordertermsforahypothetical5-statenation
• Usingthesmallestembeddingchains,thisnetworkwasunabletoproperlytrain• “Hopfield”likeresults;
optimalsolutionsratherthanprobabilisticresults
• Leadstohugechangesinweights/biases,causingnetworkinstability
Diagonal= !" 1Offdiagonal= !"!2 1
Effectofembedding:Longqubitchains
QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017 13
• Forlargerproblemsizes,theembeddingwillnecessarilyhavelongerqubitchains
• Tosimulatethisforoursmallnetwork,weartificiallyincreasedthequbitchains
• Withthisapproach,arbitraryfirstandsecondordermomentswerelearnedbythenetworks
Diagonal= !" 1Offdiagonal= !"!2 1
Primaryexperiment
QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017 14
• Goal:UsinghistoricaldataandtheQC-trainingmethodologypresentedhere,reproduceelectionforecastsovertime
• Somecaveats:• Multiplemodelsneededformodeling nationalerror;25were
usedhere• LimitedtimewindowsofD-Waveaccess,soresultswere
generatedeverytwoweeksinsteadofdaily• Limitedhardwaresizemadeusomit1stateandprovince
(sorryMarylandandDC…youalwaysvoteDanyway)• Forsimplification,MaineandNebraskawereconsidered
winner-take-all
Results– Trainingerrors
15QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017
Examplestestingextremesofcorrelations:negative,random,&positive
Redlines= !" #Bluelines= !" 1
Results– Trainingerrors
16QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017
Largeerrorsemergewhenpollsareupdatedandlargechangesoccur
Results– Trainingerrors
17QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017
QC=QuantumtrainedTB=NationalTrumpbiasCB=NationalClintonbias
Stateerrors
QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017 18
• 538individualstateerrorsusedat-distributionwith10degreesoffreedom(df)
• ProbabilisticsamplingfromQCnaturallyledtostateerrorswithsimilardistributionandparameters
Summary
QuantumMachineLearningforElectionModeling– CopyrightQxBranch2017 19
• TheQC-trainednetworkswereabletolearnstructureinpollingdatatomakeelectionforecastsinlinewiththemodelsof538
• Trumpwasgivenahigherlikelihoodofvictory,eventhoughthefirstordermomentsremainedunchanged• Ideallyinthefuture,wecouldrerunthismethodusing
correlationsknownwithmoredetailin-housefrom538• Eachiterationofthetrainingmodelquicklyproduced25,000
simulations(oneforeachnationalerrormodel),whicheclipsesthe20,000simulations538performseachtimetheyreruntheirmodels