版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
arXiv:2308.06235v1[cs.CL]11Aug2023
KETM:AKnowledge-EnhancedTextMatchingmethod
KexinJiang1,YahuiZhao1,*,GuozheJin1,ZhenguoZhang1,RongyiCui1
1Inst.ofintelligentinformationprocessing,YanbianUniversity,Yanji133002,China
*Correspondingauthor
email:jiangkexin1997@,(yhzhao,jinguozhe,zgzhang,cuirongyi)@
Abstract—Textmatchingisthetaskofmatchingtwotextsanddeterminingtherelationshipbetweenthem,whichhasextensiveapplicationsinnaturallanguageprocessingtaskssuchasreadingcomprehension,andQuestion-Answeringsystems.Themain-streamapproachistocomputetextrepresentationsortointeractwiththetextthroughattentionmechanism,whichiseffectiveintextmatchingtasks.However,theperformanceofthesemodelsisinsufficientfortextsthatrequirecommonsenseknowledge-basedreasoning.Tothisend,inthispaper,WeintroduceanewmodelfortextmatchingcalledtheKnowledgeEnhancedTextMatchingmodel(KETM),toenrichcontextualrepresentationswithreal-worldcommon-senseknowledgefromexternalknowledgesourcestoenhanceourmodelunderstandingandreasoning.First,weuseWiktionarytoretrievethetextworddefinitionsasourexternalknowledge.Secondly,wefeedtextandknowledgetothetextmatchingmoduletoextracttheirfeaturevectors.Thetextmatchingmoduleisusedasaninteractionmodulebyintegratingtheencoderlayer,theco-attentionlayer,andtheaggregationlayer.Specifically,theinteractionprocessisiteratedseveraltimestoobtainin-depthinteractioninformationandextractthefeaturevectorsoftextandknowledgebymulti-anglepooling.Then,wefusetextandknowledgeusingagatingmechanismtolearntheratiooftextandknowledgefusionbyaneuralnetworkthatpreventsnoisegeneratedbyknowledge.Afterthat,experimentalvalidationonfourdatasetsarecarriedout,andtheexperimentalresultsshowthatourproposedmodelperformswellonallfourdatasets,andtheperformanceofourmethodisimprovedcomparedtothebasemodelwithoutaddingexternalknowledge,whichvalidatestheeffectivenessofourproposedmethod.Thecodeisavailableat/1094701018/KETM
I.INTRODUCTION
Textmatchingreferstotakingtwotextsasinputandde-terminingtheirrelationshipbyunderstandingtheirrespectivesemantics,whichisanimportanttaskinnaturallanguageprocessing[
1
].Itisafundamentaltechniqueforvarioustasksandhasbeensuccessfullyappliedinmanyareasofnaturallanguageprocessing.Forexample,readingcomprehension[
2
],questionandanswersystems[
3
],andmachinetranslation[
4
].Theexistingtextmatchingmodelscanbegroupedintotwomaincategories:traditionalmethodsanddeeplearning.Thetraditionaltextmatchingmethodsmainlyrelyonmanuallydefinedfeaturestocalculatethesimilaritybetweentexts.Itisdifficulttoextractdeepsemanticinformationwiththesemethods.Inrecentyears,duetotherapiddevelopmentofdeeplearningandthereleaseofrelatedlarge-scaledatasetswithannotations,suchasSnli[
5
]andMultiNLI[
6
],deeplearning-basedmethodsarereceivingincreasingattentionfortextmatchingproblems.Themainideaistoencodetwosentences
intovectorsbydeeplearningmethods[
7
][
8
]ortointeractwithtwosentencesusingattentionmechanisms[
9
][
10
][
11
].Inordertoenablethemodeltolearnbasedonabetterinitialstateandthusbeabletoachievebetterperformance.Inrecentyears,pre-trainedlanguagemodelshavebecomethedominantapproachnowadays.ELMo[
12
]usesbi-directionalLSTMtoextractcontextualsemanticfeatures.BERT[
13
]andRoBERTa[
14
]useTransformer[
15
]asthebasicencoderandtheyachievedgoodresultsonmultipletasksinNLP.Allthesemethodscanextractsentencesemanticinformationeffectively,sotheirperformanceishigherthantextmatchingbasedontraditionalmethods.
Theabovemodelshaveachievedverygoodresultsintextmatching,buttheperformanceofthesemodelsisnotperfectwhenthesizeofthedataissparseorincasesthatrequiresomecommonsenseknowledgetojudge,becausethesemodelsrarelyintroduceexternalknowledge,notwithstandingthegreatsignificanceitpossessesintextmatching.Externalknowledgeplaysasignificantroleintextmatching,forexample,addingsomecommonsenseknowledgeenablesthecomputertoinfertherelationshipbetweentextsquickly,andtheintroductionofexternalknowledgecanmakethemodelachievebetterresultsinthecaseofinsufficientdatavolume.Therefore,inthispaper,weproposeaknowledge-enhancedtextmatchingmethodabbreviatedasKETM,whichtakesWiktionaryastheexternalknowledgesourceandadoptswordparaphrasesastheexternalknowledge.Weaddthemtothetext-matchingmodel.Table
I
showsasamplecaseontheSnlidatasetweselected,andtheredpartistheaddedexternalknowledge.AscanbeseenfromTable
I
,withoutaddingtheknowledge,itisdifficultforthemodeltoinferthatthesaxophonebelongstoamusicalinstrument,however,addingthedefinitionofsaxophone,whichstatesthatitisamusicalinstrument,enablesthemodeltoreasoncorrectlyabouttheirrelationship.Weconductexperimentsonseveraldatasetsandverifytheeffectivenessofthemethodonthetextmatchingtask.Ourcontributionscanbesummarizedasfollows:
•Weproposeaknowledge-enhancedtextmatchingmethod——KETM,whichaddstheinterpretationofwordstothemodelandfusesthemwiththetextin-formationusingafusionofgatingmechanisms,Withthismethod,themodelwillbeabletofocusonthesemanticinformationoftextpairswhilealsopouncing
onthesemanticinformationofthewordsinthemandeffectivelyfusingtheinformationoftextandknowledge.
•Ourproposedmethodhasgoodgeneralityandcanbeappliedtoothertext-matchingmodelstoimprovetheperformanceofthemodelwithoutaddingtoomanyadditionalmodelparameters.
•Weexperimentonseveralwell-knowndatasets.Ourproposedtext-matchingmodelachievesverygoodper-formance,andtheexperimentalresultsareallimprovedcomparedtothebaselinemodelonthesedatasets.
II.RELATEDWORK
Thedeeplearning-basedtextmatchingmodelsaredividedintotwocategories;(1)Representation-basedtextmatchingmodels,themainpurposeofwhichistorepresentasentenceasavector.(2)Interaction-basedtextmatchingmodels,whichaimtoobtaincomplexinteractioninformationbetweensen-tences.
A.Representation-basedtextmatchingmodel
Representation-basedtextmatchingmodelsfocusoncon-structingarepresentationvectorofsentences.Thetraditionalmethodsfortextmatchingincludethefollowing:similarity-basedmethods[
16
],rule-basedmethods[
17
],alignmentfeature-basedmachinelearningmethods[
18
],etc.Inrecentyears,deeplearning-basedapproacheshavebeensignificantlyeffectiveinsemanticmodelingandhaveachievedgoodresultsinmanytasksinNLP.Therefore,onthetaskoftextmatching,theperformanceofdeeplearning-basedmethodshassurpassedtheearliermethodsandhasbecomethemainstreamtextmatchingmethod.Forexample,Bowmanetal.[
5
]firstappliedLSTMsentencemodelstothetaskbyencodingpremisesandhypothesesthroughLSTMtoobtainsentencevectors.FacebookproposedtheInfersent[
19
]modelforsentenceem-bedding,andtheauthorscametotheconclusionthatthebestresultswereobtainedusingBiLSTMcombinedwithmaximumpoolingbycomparingseveralCNNandRNN-basedencoders.
Reimersetal.[
20
]proposedtheSBERTmodelbasedonitstwo-towerstructure.ThemodelusesBERTforsentenceencodingtoobtainthesentencevectors.TheconclusionshowsasubstantialimprovementbyusingthefusionstrategyoverthedirectsplicingoftheoutputusingBERT.Gaoetal.[
21
]proposedtheSimCSEmodel,whichalsosolvesthesentenceembeddingproblem.ItusesBERTtoobtainsentenceembed-dingsandusestheideaofcontrastlearningtoenlargethespacingofunrelatedsamples.
B.Interaction-basedtextmatchingmodel
Themainfocusofthetwo-towermodelisontheop-timizationoftheencoder.Thecoreideaoftheinteractivemodelistwo-by-twointeraction,thatis,allwordsintwotextsequencesinteractwithinformationonebyone.Mostofthecurrentchoicesareattentionmechanisms,andtheefficiencyofthetwo-twointeractionwilldecreasewhiletheaccuracyrateincreases.Itispossibletoaddencodersbeforeandafter
theinteraction,andthenletthevectorsbespliced,differenced,anddottedtoimprovetheeffect.
PARIKHetal.[
22
]proposedalightweightinteractionmodelDecAtt,whichallowsindividualwordsinasequenceofsentencestobecomparedwitheachothertoobtainword-levelsynonymyandantonymy.Thecomputationallightweighthasbetterresultsatthesametime,butitispronetotheproblemofexcessivegradientifthesequenceistoolong.Heetal..[
23
]proposedthefine-grainedinteraction-orientedmodelPWIM,whichusedBiLSTMtocompletetheencodingofinputsequenceswithadeepmodelstructureandproposedfunctionsconsistingofcosine,dotproduct,andEuclideandistanceforvectorcomparison,buttheoverallcomputationalcomplexityofthemodelwastoolargeandwasovertakenbythelaterproposedESIM.[
24
].ESIMmodelthatusesatwo-layerbidirectionalLSTMandaself-attentivemechanismforcoding,andthenextractingfeaturesthroughtheaveragepoolinglayerandthemaximumpoolinglayer,andfinallyperformsclassification.Meanwhile,Wangetal.[
25
]proposedtheBIMPMmodel,whichfirstencodessentencepairsthroughabidirectionalLSTM,andthenmatchesencodingresultsfrommultipleperspectivesintwodirections.ComparedtoESIMwithlargerdimensionalvectors,Tayetal.[
26
]proposed
theCAFE´model,whichcompressedthefeaturevectorsandachievedalightweightmodel.Previousmodelshavemostlyadoptedinteraction,butthenumberofinteractionsissmall.
Therefore,Yangetal.[
9
]proposedasimpleandefficienttextmatchingmodel,Themodelhasasignificantimprovementbasedonmultipleinteractionswiththemostoriginalencodingvectorspelledouteachtime.
III.METHOD
A.knowledgeretrieval
Inthispaper,wechooseWiktionary
1
,anonlinedictionary,tobetheexternalknowledgesource.Wiktionarycontains999,614entitydescriptions,andforeachentityofourtext,wechooseitsfirstentitydescriptioninWiktionaryasourexternalknowledge.WelookeduptheclosestmatchofeachwordinWiktionarybyusingthelemmaformbySpacy.Forexample,theword“singing”doesnotappearinitsoriginalforminWiktionary,butitslemmaform“sing”isinWiktionaryandwegetitsdescriptiontext:“Toproducemusicalorharmonioussoundswithone’svoice”.Inthisway,wefinddescriptionsofallentitiesinourexperiments.WeassumethattheinputsentencepairsareAandB.WeretrievetheparaphrasesofthewordsinWiktionaryandsplicethemtogether.WegettheknowledgetextKA,andKBrespectively.
B.Model
Inthissubsection,wewilldescribeourmodelindetail.AsshowninFigure
1
,ourmodelmainlyconsistsofanembeddinglayer,atextmatchinglayer,aknowledgefusionlayer,andanoutputlayer.
1/
Add
LinearLayer
×
1-g
Sigmoid
+
KH
H
KH
H*KH
Tanh
H-KH
H
g
×
KnowledgeFusionLayer
HKH
TextMatchingLayer
M×
Embedding
Embedding
TextA,TextBTextKA,TextKB
Output
TABLEI
SNLIPREMISE(P)ANDHYPOTHESIS(H)ANDWORDDEFINITION(RED)FROMWIKTIONARY.
P:Themanisholdingasaxophone.
‘saxophone’:“Asingle-reedinstrumentmusicalinstrumentofthewoodwind
family,usuallymadeofbrassandwithadistinctiveloopbringingthebellupwards.”
H:Themanisholdinganinstrument
‘instrument’:“Adeviceusedtoproducemusic.”
MultiHeadAttention
MultiHeadAttention
MaxPooling&&MeanPooling
Co-Attention
Add&Norm
Add&Norm
CNN
Bi-Attention
Add&Norm
Add&Norm
Matcher
Matcher
CNN
M×
×N
×N
Fig.1.OverviewofthearchitectureofourproposedKETMmodel.Themiddleshowstheoverallmodelframeworkproposedinthispaper,theleftsideshowstheflowchartoftheknowledgefusionlayer,andtherightsideshowsthetextmatchinglayerproposedinthispaper,whichcanbeanarbitrarytextmatchingmodel
1)EmbeddingLayer:FortheabovetextsA,BandfortheknowledgetextsKA,KB,weusethepre-trainedlanguagemodelFforwordembedding,theprocessisshowninEq.
1
:
X=F(A)∈Rm*k
Y=F(B)∈Rn*k
(1)
whereFisdenotedasapre-trainedlanguagemodel,andinthispaper,wechooseELMoandBERTbase.m,narethenumberofwordsoftextAandtextB,respectively,andkisthehiddenlayerdimension.WhenFisELMo,thevalueofkis1024,andwhenFisBERT,kis768.
WeperformthesameprocessontheknowledgetexttoobtainitswordvectorKX,KY.
2)textmatchingLayer:Inourmodelframework,thelayercanbeanytext-matchingmodelM.ItsoutputcanbedefinedformallyasH=M(X,Y)∈Rd,wheredisthehiddenlayerdimension.Similarly,forknowledgetext,thereisKH=M(KX,KY)∈Rd.
Inthissection,weproposeaneffectivetextmatchingmodelfordeepencodingandinteraction,whichincludesanencodinglayer,across-attentionlayer,anaggregationlayer,abidirectionalattentionlayer,andapoolinglayer
a)encodinglayer:Thepurposeoftheencoderlayeristofullyexploitthecontextualrelationshipfeaturesofthesentences.Generally,mostexistingmodelsusebidirectionalLSTMforencoding[
25
][
24
],whichcanextractthecontextualrelationshipfeaturesofthesentence,buttherestillexiststheproblemofgradientdisappearanceforlongsentencesequences.Meanwhile,sincetheLSTMadoptsthearchitectureofRNN,itmayaffecttheefficiencyoftheencodingprocess.Therefore,weuseCNNandmulti-headattentionforencoding.
LocalfeaturesarefirstextractedusingmultipleCNNsintheencodinglayer,andthenglobalfeaturesareobtainedusingmulti-headattention.WetaketextAasanexample,anditsformulaisshowninEq.
2
:
Ac=Conv(X)
Am=MultiHead([Ac:X])(2)
P=[Ac:Am]∈Rm*d
whereAcandAmaretheoutputoftheconvolutionlayerandmulti-headattentionlayer,respectively;[Ac:X]and[Ac:Am]representtheconcatenationoperation.Inthesameway,fortextB,weobtaintheoutputmatrix,namelyH∈Rn*d.
b)co-attentionlayer:AfterobtainingtheencodingPandHoftextAaswellastextB,weusecross-attentionforthefirstinteraction.Thisisdoneasfollows:First,thesimilaritymatrixSbetweenPandHiscalculated,thenitisnormalizedtoobtaintheattentionweights,andfinally,itisweightedandaveragedtoobtainthetextrepresentationsXandY,theprocessisshowninEq.
3
:
S=relu(WcPT)Trelu(WqHT)
a=softmax(S)
(3)
\
P=a.H
H\=aT.P
whereWcandWqarethelearnableparameters.c)aggregationlayer:Theaggregationlayeristheag-
gregationofthethreeperspectivesbeforeandaftercross-
attention,andwetaketextAasanexample,theprocessisshowninEq.
4
:
(4)
a1=G1([P;P\])
a2=G2([P;P−P\])
a3=G3([P;P⊙P\])
C=G([a1;a2;a3])
whereG1,G2,G3,Gisaforwardneuralnetwork,⊙istheelement-levelmultiplication,thesubtractionoperatorreflectsthedifferencebetweentwovectors,andthemultiplicationoperatorreflectsthesimilarityoftwovectors.Similarly,therepresentationQoftextBcanbeobtained.
d)BidirectionalAttentionLayer:Thepurposeofthebidirectionalattentionlayeristobetterintegratethechar-acteristicsofthetwoaspects.WecalculatethebidirectionalattentionofCandQthatistheattentionofC→QandQ→C[
27
].TheattentionoriginatesfromthesimilaritymatrixT,wheretijdenotesthesimilaritybetweenthei-thwordofCandthej-thwordofQ.
C→Q:TheattentiondescribeswhichwordsinthetextCaremostrelevanttoQ.Thecalculationprocessissimilartothatoftheco-attentionlayer,WecanobtaintheattentionmatrixU∈Rd*n,whichiscalculatedasshowninEq.
5
.
(5)
αt=softmax(Tt:)∈Rn
u:t=之αtjQ:j
j
whereTt:isthet-thrawofT,andu:tisthet-thcolumnof
U
.
Q→C:TheattentionindicateswhichwordsinQaremostsimilartoC.Thecalculationprocessisasfollows:first,thecolumnwiththelargestvalueinthesimilaritymatrixTistakentoobtaintheattentionweight,thentheweightedsumofCisexpandedbyntimestepstoobtainV∈Rd*n,whichiscalculatedasshowninEq.
6
.
b=softmax(max(T))∈Rm
col
v=之btHt:∈Rd(6)
t
AfterweobtainUandV,westitchtheattentioninthesetwodirectionsbyamultilayerperceptrontoobtainthecontextualrepresentationG∈R4d*n,whichiscalculatedasshowninEq.
7
.
G:t=β(V:t,C:t,U:t)
β(v,c,u)=[c;v;c⊙v;c⊙u]∈R4d
(7)
e)PoolingLayer:Thepurposeofthepoolinglayeristoextractthekeyinformationofthetext.Inthispaper,averagepoolingandmaximumpoolingareused.Theiroutputsaredirectlyspliced,whichiscalculatedasshowninEq.
8
.
Gmax=Max(G)
Gmean=Mean(G)(8)
H=[Gmax;Gmean]
whereMaxdenotesmaximumpooling,Meandenotesaver-agepooling,andHdenotesthepooledvector
C.KnowledgeFusionLayer
AfterthetextmatchingmodelM,weobtainthetextrepresentationHaswellastheknowledgerepresentationKH.Toreducetheinfluenceofnoiseintroducedbythefusionmodule,weuseagatingmechanisminourfusionlayer.
Weuseaneuralnetworktocontrolthefusionratiooftext
andknowledgevectors.WefuseHandKHtoobtainthetextrepresentationZ=fusion(H,KH),wherethefusionfunctionisdefinedasshowninEq.
9
:
=tanh(W1[H;KH;H⊙KH;H−KH])
g=sigmoid(W2[H;KH;H⊙KH;H−KH])(9)
z=g⊙+(1−g)⊙x
WhereW1andW2areweightmatrices,andgisagatingmechanismtocontroltheweightoftheintermediatevectorsintheoutputvector.
D.OutputLayer
Thepurposeoftheoutputlayeristooutputtheresults.Inthispaper,weusealinearlayertogettheresultsoftextmatching.TheprocessisshowninEq.
10
.
y=softmax(tanh(ZW+b))(10)
wherebothWandbaretrainableparameters.
Finally,weusethecross-entropyfunctiontocalculatetheloss,thecross-entropylossfunctioncanbechosenasshown
inEq.
11
.
NK
(11)
loss=−之之y(i,k)logyˆ(i,k)
i=1k=1
whereNisthenumberofsamples,Kisthetotalnumberofcategories,andyˆ(i,k)isthetruelabelofthei-thsample.
IV.EXPERIMENTS
Inthissection,wefirstpresentsomedetailsoftheexperi-mentimplementation,andsecondly,weshowtheexperimentalresultsonthedataset.Finally,weanalyzeanddiscusstheexperimentalresults.
A.Experimentaldetails
1)Dataset:Inthispaper,weusethetext-matchingdatasetsSnli,SciTail,Quora,andSicktovalidateourmodel.Amongthem,theSnlidatasetincludes570Kmanuallylabeledandcategoricallybalancedpremiseandhypothesispairs.TheSci-Taildatasetincludes27kpairsofpremiseandhypothesisthatcontainanentailedorneutralrelationship.TheQuoraquestionpairdatasetincludesover400kpairsofdatathateachwithbinaryannotations,with1beingaduplicateand0beinganon-duplicate.TheSickdatasetcontains10Ksentencepairsinvolvingknowledgeofmorphology,includingimplication,neutrality,andcontradictionlabels.ThestatisticaldescriptionsofSnli,SciTail,Quora,andSickdataareshowninTable
II
.
TABLEII
THESTATISTICALDESCRIPTIONSOFSNLI,SCITAIL,QUORA,ANDSICK
dataset
train
validation
test
Snli
550152
10000
10000
SciTail
23596
1304
2126
Quora
384290
10000
10000
Sick
4500
500
4927
2)Baselinemethodsandparametersettings:Wecompareninebaselinemethodsonthedataset,includingrepresentation-basedmodels(i.e.,SWEM(Shenetal.2018),HBMP(Tal-manetal.2018)),andinteraction-basedmodels(i.e.,RE2(Yangetal.2019),DITM(Yuetal.2021),DRr-Net(Zhangetal.2019),BIMPM(Wangetal.2017),ESIM(Chenetal.2017)),andpre-trainingbasedmodels(i.e.,BERT(Devlinetal.2019),MFAE(Zhangetal.2020)).
ThisexperimentisconductedinahardwareenvironmentwithagraphicscardRTX5000and16Gofvideomemory.ThesystemisUbuntu20.04,withthedevelopmentlanguagePython3.7andthedeeplearningframeworkPytorch1.8.
Inthemodeltrainingprocess,themaximumlengthofthetextissetto128,andthehiddenlayerdimensionissetto200.ThespecifichyperparametersettingsareshowninTable
III
.
TABLEIII
VALUESOFHYPERPARAMETERS
HyperParameters
Values
hiddendimension
200
convolutionkernelsize
3
learningrate
0.00005
Optimizer
Adam
Dropout
0.2
activationfunction
ReLU
Epoch
30
Batchsize
48
B.Experimentalresults
Wecomparetheexperimentalresultsofourmodelonthesedatasetswithotherpublishedmodels.Theevaluationmetricweuseistheaccuracyrate.TheresultsareshowninTable
IV
.whereKETMdenotesweuseELMoforwordembedding.KETM(BERT)denoteswordembeddingusingBERTandsplicingclsvectorsafterthetextmatchinglayer.KETM-KBdenotesthatourmodeldoesnotuseexternalknowledge,indicatingthatthemodelhasonlytheembeddinglayerandthetext-matchinglayer.*denotesourimplementationresults. AscanbeseenfromTable
IV
,ourmodelachieves90.6%,92.6%,91.0%,and87.1%accuracyontheSnli,Scitail,Quora,andSicktestsets,respectively,whichisbestamongthelistedmethods.Overall,theperformanceoftherepresentation-basedtextmatchingmodelisslightlyweakerthanthatoftheinteraction-basedmodel,Andtheslightweaknessmayresultfromtheignoranceofthecomplexinteractioninformation
betweentextsoftherepresentation-basedapproach,whichonlyfocusesontheinformationofthetextitself.
Comparedtotherepresentation-basedmatchingmodels,ourmodelsallshowsubstantialimprovementsinresults.Onthethreedatasets(Snli,Scitail,andQuora),theaccuracyisimprovedby4.0,6.6,and7.0percentagepoints,respectively,overthebest-performingmodel.Comparedtotheinteraction-basedmodel,ourmodelimprovestheaccuracyby1.9,6.0,1.6,and7.3percentagepointsoverthehigher-performingRE2modelonthefourdatasets,respectively.Itisthebestamongthelistedmethods.Comparedtothepre-trainedlanguage
modelBERTbaseandtheMFAEmodelthatuseBERTasan
encoder.Ourmodelisalsothebestonthefourdatasetswith0.6,0.6,0.5,and1.7percentagepointshigher,respectively.
Comparedtomodelswithoutexternalknowledge,theaccu-racyofourmodelimprovesby0.6,0.9,0.2,and3.9percentagepointsonthefourdatasetswhenweuseELMoasthewordvector,respectively.TheimprovementontheSnlidatasetandQuoradatasetisnotsignificant,probablybecausetheirdatavolumeisalreadylargeandtheaccuracyrateishigherwithoutaddingknowledge,andaddingexternalknowledgewon’thavemuchbigeffect.However,theimprovementresultontheSickdatasetissignificant.Itshowsthattheadditionofexternalknowledgehasapositiveeffectontheoverallperformanceofthemodel.Weconductexperimentsfrommultipleperspectives,andtheexperimentalresultsverifytheeffectivenessofourmodel
TABLEIV
THEACCURACY(%)OFTHEMODELONTHESNLI,SCITAIL,QUORA,AND
SICKTESTSETS.BOLDBLACKISTHEBESTPERFORMANCEOFTHELISTEDMETHODS
Model
Snli
Scitail
Quora
Sick
SWEM
[28
]
HBMP
[29
]
83.8
86.6
-
86.0
83.0
-
-
-
DITM
[30
]
-
89.2
86.1
-
DRr-Net
[31
]
87.7
87.4
89.8
-
BIMPM*
[25
]
879
753
882
766
ESIM*
[24
]
88.0
82.4
85.4
76.4
RE2*
[9
]
88.7
86.6
89.4
79.8
MFAE
[32
]BERTbase*
[13
]
90.0
89.6
-
92.0
90.5
89.9
-
85.4
KETM-KB*
88.9
89.5
90.1
80.1
KETM*
89.5
90.4
90.3
84.0
KETM-KB(BERT)*
90.2
92.1
90.7
86.8
KETM(BERT)*
90.6
92.6
91.0
87.1
C.Analysisofthemethodgenerality
Toverifythegeneralityoftheknowledgeenhancementmethodproposedinthispaper,weconductexperimentsusingthetextmatchingmodelESIMandthepre-trainedlanguagemodelBERT.TheexperimentalresultsareshowninFigure
2
.AscanbeseenfromFigure
2
,onthenon-transformerarchitectureESIMmodel,weaddexternalknowledgeandimprovetheaccuracyofthefourdatasetsby0.7,3.1,2.9,and4.4percentagepoints,respectively.Meanwhile,weadd
Fig.2.Theaccuracy(%)ofthedifferentmodelsontheSnli,Scitail,Quora,andSicktestsets.
externalknowledgeontheTransformerarchitectureBERTmodel,andtheaccuracyofthemodelimprovesby0.5,1.1,0.3,and1.4percentagepoints,respectively,andtheperformanceisimprovedonallofthem.Weachievebet-terresultsonboththenon-Transformerarchitecture-basedandTransformerarchitecture-basedmodelscomparedwithnoknowledgeaddition,whichvalidatestheeffectivenessofourproposedknowledgeenhancementframework.
D.Analysisofthedifferenttrainingdata
Toverifytheroleofknowledgeindifferenttrainingdatasizes,weselectedpartofthetrainingsetoftheSnlidatasetfortraining.TheexperimentalresultsareshowninFigure
3
.AscanbeseenfromFigure
3
,whenwetrainwith1%
Fig.3.ExperimentalresultsfordifferenttrainingsetsizesontheSnlidataset.
TABLEV
THEACCURACY(%)OFTHEMODELONTHEADVERSARIALDATASET
BREAKNLI.
Model
BreakNLI
BIMPM*
68.3
RE2*
80.9
KIM
83.8
ESIMESIM+KB*
65.8
78.8
KETM-KB*KETM*
87.7
91.2
oftrainingdata,themodelimprovesthemostperformancewhenexternalknowledgeisadded,indicatingthatexternalknowledgeachievesalargerrolewithasmallamountofdata.Meanwhile,whenwetrainwith10%,50%,and100%ofthe
trainingdata,theaccuracyisimprovedby1.6,0.9,and0.6percentagepointsafteraddingknowledge,respectively.Theexperimentalresultsshowthatexternalknowledgeplaysafacilitatingroleindifferenttrainingdatasizes.Besides,thesmallerthetrainingdatais,thegreaterimprovementthemodelachieves.
E.Analysisfortheadversarialdataset
Tov
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年幼儿教育基础模拟试题及参考答案
- 2026年诊断学检验模拟试题及参考答案
- 2026年巴斯夫培训考试及参考答案
- 2026年中招考音乐模拟试题及答案
- 2027年山东省教师招聘考试学科专业知识(数学)名师押题试卷(2027版)及答案
- 2026年摸底模拟考试卷带答案
- 2026年生物学科实验操作考试带答案
- 果洛藏族自治州久治县2025-2026学年数学四年级下学期期末联考模拟试题含答案
- 2026年(护士)护理三基考试练习题及答案
- 2027年宁波市教师招聘考试新课改高分冲刺试卷及答案
- 2026csco胰腺癌诊疗指南
- 《环境生态学》考试复习题库(附答案)
- 小儿暴发性心肌炎的护理
- 医院口腔科重点专科评审汇报
- 2025年商务英语专业四级考试模拟试题及答案
- 2024年成都市双流区中医医院招聘考试真题
- 《指纹识别》课件
- 车间桥式起重机吊装作业安全培训
- 2025年新疆交投科技有限责任公司招聘笔试参考题库含答案解析
- 战略推演:商业竞争与制胜之道学习通超星期末考试答案章节答案2024年
- 机械基础(少学时)(第三版) 课件全套 第0-15章 绪论、带传动-气压传动
评论
0/150
提交评论