{"title": "Representation Learning of Compositional Data", "book": "Advances in Neural Information Processing Systems", "page_first": 6679, "page_last": 6689, "abstract": "We consider the problem of learning a low dimensional representation for compositional data. Compositional data consists of a collection of nonnegative data that sum to a constant value. Since the parts of the collection are statistically dependent, many standard tools cannot be directly applied. Instead, compositional data must be first transformed before analysis. Focusing on principal component analysis (PCA), we propose an approach that allows low dimensional representation learning directly from the original data. Our approach combines the benefits of the log-ratio transformation from compositional data analysis and exponential family PCA. A key tool in its derivation is a generalization of the scaled Bregman theorem, that relates the perspective transform of a Bregman divergence to the Bregman divergence of a perspective transform and a remainder conformal divergence. Our proposed approach includes a convenient surrogate (upper bound) loss of the exponential family PCA which has an easy to optimize form. We also derive the corresponding form for nonlinear autoencoders. Experiments on simulated data and microbiome data show the promise of our method.", "full_text": "Representation Learning of Compositional Data\n\nMarta Avalos-Fernandez\u2020 Richard Nock\u2021\u00a7(cid:92) Cheng Soon Ong\u2021\u00a7 Julien Rouar\u2020 Ke Sun\u2021 \u2217\n\n\u2020Universit\u00e9 de Bordeaux, \u2021Data61,\n\n\u00a7the Australian National University and (cid:92)the University of Sydney\n\nfirst.last@{u-bordeaux.fr,data61.csiro.au}\n\nAbstract\n\nWe consider the problem of learning a low dimensional representation for compo-\nsitional data. Compositional data consists of a collection of nonnegative data that\nsum to a constant value. Since the parts of the collection are statistically dependent,\nmany standard tools cannot be directly applied. Instead, compositional data must\nbe \ufb01rst transformed before analysis. Focusing on principal component analysis\n(PCA), we propose an approach that allows low dimensional representation learn-\ning directly from the original data. Our approach combines the bene\ufb01ts of the\nlog-ratio transformation from compositional data analysis and exponential family\nPCA. A key tool in its derivation is a generalization of the scaled Bregman theorem,\nthat relates the perspective transform of a Bregman divergence to the Bregman\ndivergence of a perspective transform and a remainder conformal divergence. Our\nproposed approach includes a convenient surrogate (upper bound) loss of the ex-\nponential family PCA which has an easy to optimize form. We also derive the\ncorresponding form for nonlinear autoencoders. Experiments on simulated data\nand microbiome data show the promise of our method.\n\n1\n\nIntroduction\n\nCompositional data analysis (CoDA) is a sub\ufb01eld of statistics introduced more than three decades ago\n[3, 2, 1, 29]. Compositional data consist of a collection of nonnegative measurements that sum to a\nconstant value, typically, proportions that sum to 1. Because knowing the sum, one component can be\ndetermined from the sum of the remainder, the parts that make up the composition are mathematically\nand statistically dependent. This distinct structure complicates analysis and does not allow standard\nstatistical analyses. Ignoring the underlying nature of the data studied might give rise to misleading\nconclusions.\nAmong others, [1] and [13] provided a framework to perform CoDA by mapping data from the\nconstrained simplex space to the Euclidian space using nonlinear log-ratio transforms. In this paper,\nwe focus on Principal Components Analysis (PCA), one of the main tools for exploratory analysis of\ncompositional data. Just like in standard Euclidean data, it is particularly useful when the \ufb01rst few\nprincipal components explain enough variability to be considered as representative. Unfortunately,\nany operation of centering or scaling destroys the compositional nature of the data, which complicates\na direct application of PCA.\nOur motivation for studying CoDA comes from the recent explosion of microbiome studies [14, 15].\nIndeed, spectacular advances in 16S rRNA gene sequencing of the bacterial component of the human\nmicrobial community (microbiota) have enabled researchers to investigate human health and disease,\nleading to new insights into the role of these microbial communities. The microbiota sequencing data\nare measured as read counts interpreted as a species\u2019 abundance in a microbial community. To make\nthe microbial abundance comparable across samples, data are normalized to the relative abundances\n\n\u2217Authors in alphabetical order\n\n32nd Conference on Neural Information Processing Systems (NeurIPS 2018), Montr\u00e9al, Canada.\n\n\fFigure 1: 2D Visualization of the low dimensional representation A on the arms dataset.\n\nof all bacteria observed. On the other hand, because high-throughput experiments produce large\namounts of data, multivariate analysis is indispensable [27, 21]. There is a stress to understand the\nsoundness of models [5].\nIn this paper, we propose to learn a low dimensional representation of CoDA from the original data.\nTo account for the nonlinearity due to the compositional nature of the data, we start from exponential\nfamily PCA [12] that we augment with the compositional constraint and then simplify the loss to\nbe optimized via a generalization of a recent result [25] on Bregman divergences, which may be\nof independent interest. We also propose a nonlinear autoencoder (AE) version to learn the low\ndimensional representation.\nLet us examine a toy example to illustrate our approach. We generate the arms dataset in S19 by\nevenly interpolating the simplex center and each of the 20 vertices with 100 points, therefore yielding\na matrix X20\u00d72000. Figure 1 shows the 2D representation A2\u00d72000 computed by \ufb01ve methods: the\nstandard PCA; clr-PCA computes the standard PCA after performing clr; CoDA-PCA and CoDA-AE\nare our proposed methods; t-SNE [32] is a popular nonlinear dimensionality reduction method and\nis applied on X directly. In the PCA plot, the black segments indicate that the PCA reconstruction\nis outside of the simplex. PCA cannot be directly adapted to CoDA because the projection on\nthe principal components may go beyond the convex hull of the vertices.\nIt is clear that only\nCoDA-PCA and CoDA-AE uncover the true structure, where all the arms are clearly presented, and\ntheir connections are faithfully presented.\n\n2 Compositional Data Analysis\n\nSd = (cid:8)x \u2208 (cid:60)d : \u2200j, xj > 0; (cid:80)d\n\nj=1 xj = \u03ba(cid:9), where \u03ba > 0 is a constant, classically 1. Here\nWe brie\ufb02y review some de\ufb01nitions of CoDA. Compositional data are proportions: X is a compositional\ndataset if and only if X \u2208 (cid:60)d\u00d7m such that \u2200i \u2208 [1, ..., m] the vector column xi of X is in the simplex\nthe superscript d does not denote the dimensionality as dim(Sd) = d \u2212 1. For a dataset X(cid:48) which\ncontains counts of strictly positive values, we reduce it to a compositional dataset by dividing out the\ntotals, that is we compute the CoDA set X such that: xi = x(cid:48)\nis the vector of proportions\nfor individual i.\nUsing Bregman divergences makes explicit a dual af\ufb01ne [6] coordinate space which is in fact the log\ncoordinates of Aitchison [1]. It is in this space that we have af\ufb01ne constraints, which are therefore\nnon-linear in the \"primal\", ambient space. To manage this nonlinear structure, it has been proposed [4]\nto \ufb01rst apply a log-ratio transformation to transpose the data into real Euclidean space. For instance,\nthe additive log-ratio transformation (alr) applies log-ratio between a component and a reference\ncomponent; the centered log-ratio transformation (clr) scales each subject vector by its geometric\nmean; and the isometric log-ratio transformation (ilr) is associated with an orthogonal coordinate\nsystem in the simplex. Afterwards, standard PCA is performed.\nBy de\ufb01nition, the clr transformation is\n\n1(cid:80)d\nj=1 x(cid:48)\n\nji\n\ni\n\nwhere g(x) = ((cid:81)d\n\ncKL(x) = log\n\n= Cclr log(x) = log(x) \u2212 log(x)1d,\n\n(1)\n\nj=1 xj)1/d the geometric mean of x, x = 1\n\n1d is the 1\u00d7 d vector of all ones, and Cclr = Id \u2212 1\n\nd 1d1\n\nj=1 xj is the arithmetic mean of x,\n(cid:124)\nd. The purpose of the log-ratio transformation\n\nd\n\n(cid:18) x\n\n(cid:19)\n\ng(x)\n\n(cid:80)d\n\n2\n\n\u22120.45400.4583#comp1\u22120.43200.4471#comp212345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322430130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433540140240340440540640740840941041141241341441541641741841942042142242342442542642750150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753860160260360460560660760860961061161261361461561661761861962062162262362470170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275380180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695710011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116512011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144415011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153316011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188319011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923PCA\u22124.7533.976#comp1\u22124.936.08#comp212345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000clr-PCA\u221226.227.3#comp1\u221227.1925.59#comp212345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000CoDA-PCA\u221283.167.4#comp1\u221279.175.6#comp212345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000CoDA-AE\u221266.362.5#comp1\u221264.163.0#comp212345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000t-SNE\fKL (x(cid:48)) = exp(x(cid:48))(cid:81)d\n\n(centered or not) is to go back to (cid:60)d from Sd without losing information. Notice that log(xj),\nlog(x) \u2208 (\u2212\u221e, 0) so the compositional data is embedded in (cid:60)d under the clr transformation. The\nreverse operation: x = c\u22121\nj) embeds (cid:60)d into Sd. See the table\nbelow for a comparison of clr, alr and ilr, presented as different transformations C log(x). They are\nequivalent up to linear transformations. Without loss of generality we focus on the clr.\n(cid:9)\n\nj=1 exp( 1\n\n1\u2212d x(cid:48)\n\nclr\n\n(cid:8)RCclr : RR\n\nilr\n\n= Id\u22121\n\nalr\n\n(cid:124)\n\n(d\u22121)\u00d7d = [Id\u22121,\u22121d\u22121]\nCalr\n\nCilr\n(d\u22121)\u00d7d \u2208\n\nd\u00d7d = Id \u2212 1\nCclr\n\nd 1d1\n\n(cid:124)\nd\n\nHowever interpreting the resulting coordinates is still challenging [13, 24]: alr transformation is no\ndistance-preserving; clr leads to degenerate distributions and singular covariance matrices; ilr avoids\nthe precedent drawbacks, but still, results from complicated nonlinear transformations are dif\ufb01cult to\ninterpret. Currently, there seems to be no consensus about the best practices ([16] versus [31]) and, in\nall cases, log-transforming is not a remedy for all the dif\ufb01culties arisen by CoDA [20].\n\n3 Exponential Family Principal Component Analysis\n\nAnother way to apply dimension reduction is to perform a generalized PCA on crude count data.\nBased on the same ideas as the generalised linear model, [12] described a generalized PCA model for\ndistributions from the exponential family. We \ufb01rst recall the standard PCA setting.\n\n3.1 Principal Component Analysis\n\nFor simplicity suppose that the data matrix X is already centered that can be easily achieved by\nappending to A matrix a row of ones.\n(Traditional PCA) We have a dataset X \u2208 (cid:60)d\u00d7m that we approximate as X \u223c V\nthe following loss wrt the constraints A \u2208 (cid:60)(cid:96)\u00d7m , V \u2208 (cid:60)(cid:96)\u00d7d , VV\n\nA by minimizing\n\n= I(cid:96):\n\n(cid:124)\n\n(cid:124)\n\n(cid:96)PCA(X; A, V)\n\n(cid:124)\n\n.\n\n= (cid:107)X \u2212 V\n\nA(cid:107)2\nF .\n\n(2)\n\nV de\ufb01ning a rank-(cid:96)\nHence, observations are column-wise. V : (cid:60)d \u2192 (cid:60)(cid:96) is surjective with V\nprojection, assuming in general (cid:96) < d. A is the representation of data points. The goodness of \ufb01t\nof the representation is measured by the squared Frobenious norm. We summarise the different\ntransformations and loss functions in Table 1.\nObserve that instead of \ufb01nding a linear representation A and its corresponding linear loadings V,\nwe can consider nonlinear functions for encoding and decoding the latent representation. When the\nnonlinear encoder and decoder are implemented as feed-forward neural networks, we arrive at the\nautoencoder setting.\n\n(cid:124)\n\n3.2 Bregman Divergence and \u03d5-PCA\n\nAs mentioned in the introduction, compositional data do not live in Euclidean space. Count data are\nnaturally linked to the Poisson distribution, and therefore we should consider an exponential family\nmodel for count data. From the Bayesian viewpoint, the PCA goal is to minimize a distance (L2 for\nusual PCA) which is equivalent to a Bregman divergence minimization (or a Likelihood function\nmaximization).\nDe\ufb01nition 1 (Bregman Divergence) Let \u03d5 : (cid:60)d \u2192 (cid:60) convex differentiable. The Bregman diver-\ngence D\u03d5 with generator \u03d5 is\n(3)\n\n(cid:124)\n)\n\n).\n\n)\n\n.\n\n= \u03d5(x) \u2212 \u03d5(x(cid:48)\n\n) \u2212 (x \u2212 x(cid:48)\n\nD\u03d5(x(cid:107) x(cid:48)\n\n\u2207\u03d5(x(cid:48)\n\nA Bregman divergence is just a truncation of the Taylor expansion of a function. It can therefore be\nde\ufb01ned for any differentiable function, not just the convex ones. If \u03d5 is not convex, we call D\u03d5 a\nBregman distortion, which is a signed dissimilarity. We denote by \u03d5(cid:63)(x)\ny \u2212 \u03d5(y)} the\nconvex conjugate of the generator \u03d5 [9].\n\n= supy{x\n\n(cid:124)\n\n.\n\n3\n\n\fTable 1: Summary of methods in this paper\n\nMethod\nPCA\n\u03d5-PCA\nclr-PCA\ngauged-\u03d5-PCA\nCoDA PCA\nS-CODA-PCA\nCoDA AE\n\nOriginal\n\nX\nX\n\ncKL(X)\n\u2207\u03d5(\u02c7X)\ncKL(X)\n\u02c7xi\nX\n\nReconstruction\n\nA)\n\n\u2207\n\n(cid:124)\nA\nV\n(cid:124)\n\u2217\u03d5(V\n(cid:124)\nA\nV\n(cid:124)\nA\nV\n(cid:124)\nA\nV\n\u2207 \u02c7KL(exp(V\n\n(cid:124)\ng\u03b8 \u25e6 h\u03a6(X)\n\nai))\n\nF\n\nDistortion\n(cid:107) \u00b7 \u2212 \u00b7 (cid:107)2\nD\u03d5(\u00b7(cid:107)\u00b7)\n(cid:107) \u00b7 \u2212 \u00b7 (cid:107)2\nD\u03d5(cid:63) (\u00b7(cid:107)\u00b7)\nDexp(\u00b7(cid:107)\u00b7)\ninner product\nDexp(\u00b7(cid:107)\u00b7)\n\nF\n\nNotes\nclassical PCA(2)\nexponential family PCA (4)\nCoDA with clr (5)\nGeneral Bregman PCA (8)\n(11) is a special case of (8)\nupper bound (17)\nneural networks g\u03b8 and h\u03a6\n\nPCA has been generalized to the exponential families in a way that makes \ufb01tting occur in the natural\nparameter space [12, 19] (and references therein). The optimization problem is non-convex. The\nalgorithmic strategy proposed by [12] is to use an alternating sequence of convex minimizations\nunder constraints. Alternatively, [19] proposed maximizing the deviance (as a generalized notion\nof variance) and [10] proposed maximizing the likelihood function via a variational algorithm and\ngradient descent.\nWe denote exponential family PCA as \u03d5-PCA, where \u03d5 is the cumulant of the exponential family,\nwhich is strictly convex differentiable with convex conjugate \u03d5(cid:63), and uniquely determines the\nexponential family under mild conditions [7]. Note that for \u03d5-PCA, X is not neccessarily in a vector\nspace (e.g. X (cid:54)\u2286 (cid:60)d\u00d7m).\n(\u03d5-PCA) We have a dataset Xd\u00d7m that we approximate as X \u223c \u2207\u03d5(cid:63)(V\nV \u2208 (cid:60)(cid:96)\u00d7d, VV\n\n= I(cid:96), through minimizing the Bregman loss\n\nA) with A \u2208 (cid:60)(cid:96)\u00d7m,\n\n(cid:124)\n\n(cid:124)\n\n(cid:96)\u03d5-PCA(X; A, V)\n\n.\n=\n\n(cid:88)\n\ni\n\nD\u03d5(xi (cid:107)\u2207\u03d5(cid:63)(V\n\nai)) = D\u03d5(X(cid:107)\u2207\u03d5(cid:63)(V\n\n(cid:124)\n\n(cid:124)\n\nA)).\n\n(4)\n\n(cid:124)\n\nVectors are column-vectors: xi, ai are respectively column observation i in the ambient and principal\nspaces, respectively. This formulation has a major advantage that linear algebra may be used to \ufb01t\nA, V while X may not lie in a vector space, see for example [12, 19] and references therein. We\nremark that because of the dual symmetry of Bregman divergences, we have D\u03d5(X(cid:107)\u2207\u03d5(cid:63)(V\nA)) =\nA(cid:107)\u2207\u03d5(X)) [8]. Notice there exists a little \"hole\" in the \u03d5-PCA de\ufb01nition, as X is not\nD\u03d5(cid:63) (V\nnecessarily easy to center when it is not in a vector space.\n\u03d5-PCA includes standard PCA as a special case as when \u03d5(x) = 1\nF and the corresponding\nBregman divergence becomes D\u03d5(x(cid:107) x(cid:48)) = 1\n4 Exponential family PCA on Compositional Data\n\n2(cid:107)x \u2212 x(cid:48)\n\n2(cid:107)x(cid:107)2\n\nF .\n(cid:107)2\n\n(cid:124)\n\nCoDA has found a workaround for the centering problem, centered log-ratio coordinates. From [3,\nDef. 4.6, Chap. 8] the associated loss is the standard PCA loss on clr transformed data:\n\n(cid:96)clr-PCA(X; A, V)\n\n.\n=\n\n1\n2(cid:107)cKL(X) \u2212 V\n\n(cid:124)\n\nA(cid:107)2\n\nF = D\u03d5(cKL(X)(cid:107)\u2207\u03d5(cid:63)(V\n\n(cid:124)\n\nA)),\n\n(5)\n\nwhere cKL(X) is the centered log-ratio transform de\ufb01ned in Equation (1) and \u03d5(x) = 1\nF. Recall\nfrom the previous section that we could deal with crude count data by using exponential family PCA.\nHowever if we wish to perform PCA on the crude count data, while maintaining the clr transform, we\nneed an additional normalization term, which requires us to obtain a gauged version of the Bregman\ndivergence.\n\n2(cid:107)x(cid:107)2\n\n4.1 Scaled Bregman Theorem with Remainder\n\nIn this section we generalize the Scaled Bregman Theorem from [25, Theorem 1] to allow for a\nremainder term. We use it in this paper to deal with the perspective transform required for CoDA,\nbut it may be of independent interest. Recall that \u03d5 is the generator of the Bregman distortion\n(De\ufb01nition 1). We additionally de\ufb01ne a perspective (or gauge) function g to deal with the fact that we\n\n4\n\n\fare considering data on the simplex. Whenever \u03d5 and g are differentiable, the following is immediate\nfrom [25, Theorem 1].\nTheorem 2 (Scaled Bregman Theorem with Remainder) For any \u03d5 : X \u2192 (cid:60) and g : X \u2192 (cid:60)\u2217\n((cid:60)\u2217 = (cid:60) \\ {0}) that are both differentiable, denoting\n\n(cid:18) x\n\n(cid:19)\n\ng(x)\n\n,\n\n\u02c7x .\n=\n\nx\n\ng(x)\n\nand\n\n\u02c7\u03d5(x)\n\n.\n\n= g(x) \u00b7 \u03d5\n\nthe following holds true:\n\ng(x) \u00b7 D\u03d5 ( \u02c7x(cid:107) \u02c7y) = D \u02c7\u03d5 (x(cid:107) y) + R\u03d5,g(x(cid:107) y) ,\n\n\u2200x, y \u2208 X ,\n\n.\n\nwhere R\u03d5,g(x(cid:107) y)\nWe can abstract Theorem 2 by saying that for any \u03d5, g differentiable, we have\n\n= \u03d5(cid:63) (\u2207\u03d5( \u02c7y)) \u00b7 Dg(x(cid:107) y) is called the remainder.\n\n(6)\n\n(7)\n\nperspective-Bregman(\u03d5, g) = Bregman(perspective(\u03d5)) + conformal-Bregman(g, \u03d5),\n\nwhere \u201cperspective(\u03d5)\u201d is \u02c7\u03d5 in (6), and conformal divergences are de\ufb01ned and analyzed in [26].\nGeneral classes of perspective transforms of convex functions are introduced in [22, 23]. The notion\nof perspective transform of a Bregman divergence was introduced in [25]. In [25, Theorem 1],\nconditions are assumed that make R\u03d5,g(x(cid:107) y) = 0, resulting in the scaled Bregman theorem. Notice\nthat D\u03d5 is a Bregman distortion but not necessarily a Bregman divergence if \u03d5 is not convex. For\nreasons explained in [25], we call g a gauge. In the following we assume that \u03d5 is separable, so that\nwe can use both notations \u2207\u03d5 and \u03d5(cid:48) to denote the gradient and derivatives involving \u03d5.\nis homogeneous of degree one, D\u03d5 ( \u02c7x(cid:107) \u02c7y) and\nBy Theorem 2,\ng(x) = (cid:81)d\ng(x) [D \u02c7\u03d5 (x(cid:107) y) + R\u03d5,g(x(cid:107) y)] are both invariant to re-scaling of x and y and can therefore be\nused to deal with compositional data. A general formulation of g satisfying this condition can be\nj=1 wj = 1. In this paper, we focus on the special\nj=1 x\ncase \u2200j, wj = 1\nd so that D\u03d5 ( \u02c7x(cid:107) \u02c7y) can be expressed in terms of the widely used clr transformation.\nSetting w to be a one-hot vector (1, 0,\u00b7\u00b7\u00b7 , 0) can express D\u03d5 ( \u02c7x(cid:107) \u02c7y) with the alr. This latter case\nwill be omitted here.\n\n, where \u2200j, wj \u2265 0 and(cid:80)d\n\nlong as g(x)\n\nwj\nj\n\nas\n\n1\n\n4.2 Exponential Family CoDA\n\nWe are now in a position to derive the exponential family version of the loss in (5). Let \u02c7X denote the\nmatrix of the column vectors \u02c7xi. It turns out that in the same way as (2) is an approximation of (4),\nthe loss in (5) is an approximation of the gauged loss:\n\n(cid:96)gauged-\u03d5-PCA(X; A, V)\n\n.\n= D\u03d5(cid:63) (V\n\n(cid:124)\n\nA(cid:107)\u2207\u03d5(\u02c7X)) = D\u03d5(\u02c7X(cid:107)\u2207\u03d5(cid:63)(V\n\n(cid:124)\n\nA)).\n\n(8)\n\nNote that the above expression is in terms of the normalised matrix \u02c7X. To unpack it in terms of\n.\nthe original data X, we apply Theorem 2. In the CoDA case, \u03d5(cid:63)(z)\n= exp z, the convex dual of\n\u03d5(z)\n\n= z log z \u2212 z. Indeed, after remarking that \u2207\u03d5(\u02c7X) = cKL(X), it follows\n\n.\n\n(cid:124)\n\nA)1 \u2212 trace(cid:0)\u02c7X\n\nA(cid:107) cKL(X)) = DKL\n(cid:124)\n(cid:124)\nV\n\n(cid:124)\n\n(cid:0)\u02c7X(cid:107) exp(V\nA)(cid:1)\nA(cid:1) + constant.\n\n(cid:124)\n\n(cid:124)\n\n(cid:96)gauged-KL-PCA(X; A, V) = Dexp(V\n\n(9)\nIn other words, the CoDA PCA is in fact \ufb01tting natural parameters from centered log-ratios being\nnatural coordinates as well. From (9) we observe that both of them live in the same space. Therefore\nV\n\nA is centered in the same way as cKL(X), and so\n\nexp(V\n\n= 1\n\n(cid:124)\n\n(cid:124)\nV1d \u2208 ker(A\n\n(cid:124)\n) \u21d4 A\n\nV1 = 0m .\n\n(10)\n\nRemark that a centering assumption is also explicit in [3, Chapter 8, Eq. 8.1].\nHence, we can de\ufb01ne the CoDA PCA problem as follows.\n\n5\n\n\f(CoDA PCA) We have a dataset X \u2208 (Sd)m that we approximate as cKL(X) \u223c V\n(cid:124)\nthe following loss wrt the constraints A \u2208 (cid:60)(cid:96)\u00d7m , V \u2208 (cid:60)(cid:96)\u00d7d , VV\n= I(cid:96) , A\n\n(cid:124)\n\n(cid:96)CoDA-PCA(X; A, V) = Dexp(V\n\n(cid:124)\n\nA(cid:107) cKL(X)).\n\nA by minimizing\n\n(cid:124)\nV1 = 0:\n\n(11)\n\nRegarding cKL(x), \u02c7x and x as different coordinate systems of Sd, we use the Fisher information\nmetric (FIM) [6], whose formulation is well studied on the x coordinates, to de\ufb01ne the corresponding\npullback metric G under the cKL(x) and \u02c7x coordinates, meaning that these metrics correspond to the\nsame underlying geometry of Sd. We have the following proposition (proof omitted; see [30] for\nsimilar derivations).\nProposition 3 The FIM that uniquely de\ufb01nes the geometry of c \u2208\nGij(c) = \u03b4ij\n\n(cid:8)cKL(x) : x \u2208 Sd(cid:9) is given by\n\n((cid:80)d\ni=1 exp(ci))2 ; the FIM under the coordinates \u02c7x is given by Gij( \u02c7x) =\n\n(cid:80)d\ni=1 exp(ci) \u2212 exp(ci+cj )\n((cid:80)d\n(cid:80)d\ni=1 \u02c7xi)2 , where \u03b4ij = 1 if i = j otherwise \u03b4ij = 0.\ni=1 \u02c7xi \u2212\n(cid:124)G( \u02c7x)d \u02c7x\n\n(cid:124) of a tiny shift d \u02c7x. It is not\nIntuitively, the metric G measures the local distance d \u02c7x\neverywhere identity as in a Euclidean space. Therefore the distance should not be measured by the\nFrobenious norm as in (5). In contrast, our loss (cid:96)CoDA-PCA(X; A, V) is based on the KL divergence\nwhich locally agrees with the FIM [6].\n\n\u03b4ij\n\n\u02c7xi\n\nexp(ci)\n\n1\n\n1\n\n4.3 Relating CoDA PCA to \u03d5-PCA\n\n(cid:80)d\n\nWe now de\ufb01ne and analyze a generalized perspective transform of the generator of KL divergence:\nlet \u02c7KL(x)\n\nj=1 \u03d5(xj/g(x)) where \u03d5(z)\n\nj xj)1/d.\n\n.\n\n.\n\n= z log(z) \u2212 z and g(x)\n\n= g(x) \u00b7\n\nLemma 4 (Properties of \u02c7KL) \u02c7KL satis\ufb01es the following properties:\n\n= ((cid:81)\n\n.\n\n(1) \u02c7KL is convex;\n\n(2) the general term of the Hessian H of \u02c7KL is\n\nHij\n\n.\n= Hij( \u02c7KL(x)) =\n\n1\ndxj \u00b7\n\n(cid:26)\n\n.\n= 1 + xa/xb. Furthermore,\n\n(cid:124)\n\nz\n\nHz =\n\n1\n2d\n\n(cid:88)\n\nij\n\n(xi + xj) \u00b7\n(cid:124)\n\nwhere uab\n\nHence, z\n\n(cid:124)\n\n(cid:80)\n(cid:18) zi\n\n\u2212uji\nk(cid:54)=j ukj\n\nxi \u2212\n\nzj\nxj\n\n(cid:19)2\n\nif\nj (cid:54)= i\notherwise\n\n,\n\n,\u2200z \u2208 (cid:60)d.\n\n(12)\n\n(13)\n\nHz \u2265 0,\u2200x \u2208 (cid:60)d\n\n++,\u2200z \u2208 (cid:60)d and z\n\nHz = 0 only when z \u221d x;\n\n(3) function \u02c7KL \u25e6 exp is 1-homogeneous on span({1})\u22a5.\n\n(Proof in SM, Section D) A consequence of Theorem 2 is the following Corollary.\n\n(cid:124)\nCorollary 5 For any A, V such that A\n\nV1 = 0, we have\n1\n\n(cid:88)\n\n(cid:96)CoDA-PCA(X; A, V) \u2264 \u02dc(cid:96)\n\n.\n=\n\ng(xi) \u00b7 D \u02c7KL(xi(cid:107) exp(V\n\ni\n\n(cid:124)\n\nai)).\n\n(14)\n\nHence, the CoDA PCA loss is upperbounded by a weighted generalized \u03d5-PCA loss. Furthermore,\n(15)\n\n(cid:124)\nai)) = \u02c7KL(xi) \u2212 x\ni \u2207 \u02c7KL(exp(V\n\nD \u02c7KL(xi(cid:107) exp(V\n\nai))\n\n(cid:124)\n\n(cid:124)\n\nProof Since g is concave (Example 1 in Supplement), Dg(x(cid:107)y) = \u2212D\u2212g(x(cid:107)y) \u2264 0, and (14)\nfollows from Theorem 7 and the fact that ri \u2265 0,\u2200i, which shows (14). (15) is a consequence of the\nanalytical construct of Bregman divergences (De\ufb01nition 1) and point (3) in Lemma 4 and the fact that\n(cid:124)\nai \u2208 span({1})\u22a5 by assumption.\nV\n\n6\n\n\fRemark In [3, Chapter 8], CoDA PCA is presented as a (centered) regular PCA over data that been\nsubject to two transforms via the centered log-ratio coordinates. What Corollary 5 shows is that\nwe can solve the problem via a surrogate formulation using non transformed data but minimizing\na loss which is that of a \u03d5-PCA transformed twice: \ufb01rst taking a perspective transform of the KL\ngenerator ( \u02c7KL) and then having a weighted Bregman divergence minimization (g\u22121(.)). We remark\nthat weights can also be folded in the arguments as we have:\n\n\u02dc(cid:96) =\n\nKL( \u02c7xi) \u2212 \u02c7x\n\n(cid:124)\ni \u2207 \u02c7KL(exp(V\n\n(cid:124)\n\nai)) .\n\n(16)\n\n(cid:88)\n\ni\n\nFurthermore, the leftmost argument in (16) plays no role in its minimization, and therefore we get the\nSurrogate CoDA PCA (S-CODA-PCA) by replacing (11) with a simple inner product:\n\n(cid:88)\n\ni\n\n\u02c7x\n\n(cid:124)\ni \u2207 \u02c7KL(exp(V\n\n(cid:124)\n\nai)) .\n\n(17)\n\n(cid:96)S-CODA-PCA(X; A, V)\n\n.\n\n= \u2212\n\n5\n\nImplementations\n\nBoth the CODA-PCA in (11) and the S-CODA-PCA in (17) can be equivalently written as the\nfollowing unconstrained problems\n\n(CODA-PCA)\n\n(S-CODA-PCA)\n\nargmin\n\nB,U\n\nargmin\n\nB,U\n\nY(cid:1)(cid:3) ,\n\n(cid:124)\n\n(cid:2)1\n\n(cid:124)\n\nd exp(Y)1m \u2212 trace(cid:0)\u02c7X\n(cid:124)(cid:18)\n(cid:20)\n\ntrace\n\n\u02c7X\n\nexp(\u2212Y) \u25e6\n\n(cid:124)\n1d1\nd\nd\n\nexp(Y) \u2212 Y\n\n,\n\n(cid:19)(cid:21)\n\n(18)\n\n(19)\n\n(cid:124)\n\nd (I(cid:93)\n\n(cid:124)\n\n(cid:124)\n1 = B\n\n(cid:124)\nUC\n\n(cid:124)\n\n(cid:124)\nB(cid:63) = (V(cid:63))\n\n(cid:124)\nd or C = Id \u2212 I(cid:93)\nd 1d1\n\nwhere \u201c\u25e6\u201d means element-wise product, exp(\u00b7) is element-wise exponential, and Y = CU\nB with\nC \u2208 (cid:60)d\u00d7d, U \u2208 (cid:60)(cid:96)\u00d7d, B \u2208 (cid:60)(cid:96)\u00d7m. C is a constant centering matrix satisfying rank(C) = d \u2212 1,\n(cid:124)\n1 = 0. Any C\n1 = 0, so that Y\u2019s columns are automatically centered and Y\nC\nsatisfying this condition corresponds to a valid re-parametrization of the feasible space, for example\nd circularly raises the diagonal entries of Id by 1 row). U\u2019s rows\nC = Id \u2212 1\nform a nonorthogonal basis of (cid:60)d. B\u2019s columns are the sample coordinates in such a basis. After\n(cid:124)\noptimization, we take the QR decomposition C(U(cid:63))\nT(cid:63), where V(cid:63)\u2019s rows are orthonormal.\nTherefore C(U(cid:63))\nT(cid:63)B(cid:63) and A(cid:63) = T(cid:63)B(cid:63) is the corresponding coordinates. An optimal\nsolution of the original constrained PCA problem is given by (V(cid:63), A(cid:63)).\nAlthough the losses in (18) and (19) are non-convex, they are both bi-convex. Fixing U, the loss\nis a strictly convex function of B that is decomposed into a sum of per-sample convex functions\nof bi; \ufb01xing B, it is a strictly convex function of U. These convex functions have the general\n\u03be. Its gradient and Hessian are both in simple closed form:\n(cid:124)\ni . One can apply an off-the-shelf\nconvex optimizer, which in the simplest case can be the Newton method, to alternately minimize B\nand U until convergence. Our implementation simply uses L-BFGS [9] based on the gradient of the\nloss. In summary, we have the following result.\n\ni \u03be+\u03b2i)\u03b1i +\u03b6; (cid:53)2f =(cid:80)\n\nform f (\u03be) =(cid:80)\n(cid:53)f =(cid:80)\n\ni exp(\u03b1\n\n(cid:124)\ni \u03be+2\u03b2i)\u03b1i\u03b1\n\n(cid:124)\ni \u03be + \u03b2i) + \u03b6\n\n(cid:124)\n= (V(cid:63))\n\ni exp(\u03b1\n(cid:124)\n\ni exp(2\u03b1\n\n(cid:124)\n\nProposition 6 The CODA-PCA and the S-CODA-PCA are both equivalent to an unconstrained\nbi-convex optimization problem.\n\nAs an alternative implementation, we assume a parametric mapping bi = g\u0398(xi) that is the (cid:96)-\ndimensional output of a feed-forward neural network with input cKL(xi) and xi (or \u02c7xi) and connection\nweights \u0398. Then we minimize the cost function in (18) with respect to U and \u0398. If g\u0398 is \ufb02exible\nenough, then the minimization recovers the CODA-PCA projection. This approach could be favored\nas \u008c it learns an out-of-sample mapping g\u0398(\u00b7) with a compact parametric structure that does not\nscale with the sample size m; and \u008d it can be adapted to an online learning scenario. However, it\nrequires tuning of the neural network architecture and the optimizer. In our experiments, the encoding\nmap is modeled by a feed-forward neural network with two hidden layers of ELU [11] units, each of\nsize 100. To distinguish between the two implementations, the method to directly optimize U and B\n\n7\n\n\fFigure 2: Testing errors (y-axis) against the number of principal components (x-axis) based on three\ndifferent distance measures (from left to right) on the Atlas data (\ufb01rst row) and the diet swap data\n(second row). The numbers along the clr-PCA curves show the percentage of improvement (green)\nor disimprovement (red), comparing CoDA-PCA against clr-PCA.\n\nwithout assuming the neural network mapping is called non-parametric CODA-PCA, and the latter\nparametric version is simply called CODA-PCA.\n\n\u0398\n\n(cid:124)\n\n\u2212\u2192 bi\n\nbi. In the general case, we apply a non-linear decoder bi\n\nU\u2212\u2192 yi, where the decoder is\nThe above implementation resembles an auto-encoder structure: xi\n\u2212\u2192 yi in\nsimply a linear mapping yi = CU\nthe form yi = Ch\u03a6(bi), where h\u03a6(\u00b7) is a neural network with parameters \u03a6 and d output dimensions.\nAt the same time, we add a small random noise to the encoder input so as to avoid over\ufb01tting.\nIn this way we obtain a denoising CODA-AUTOENCODER. In contrast to the CODA-PCA, the\nCODA-AUTOENCODER can only be trained by gradient-based optimizers.\nIn practice, the input matrix X may contain zeros that lie on the boundary of Sd. In this case\ncKL(x) and \u02c7x are unde\ufb01ned. A simple way to tackle the zero entries is to replace them with a small\nj:xj >0(xj)1/\u03c1, where\n\npositive number \u0001 > 0. Alternatively, one can rede\ufb01ne the gauge as g(x) =(cid:81)\n\n\u03a6\n\n\u03c1 = |{j : xj > 0}| so that g(x) is always positive and \u02c7x is well de\ufb01ned on Sd \u222a \u2202Sd.\n6 Experiments\n\nWe compare the following methods: clr-PCA means PCA applied on the centered log-ratio coordi-\nnates; CoDA-PCA is the proposed CODA-PCA in (11); SCoDA-PCA is the proposed S-CODA-PCA in\n(17); clr-AE is an autoencoder with L2 loss applied on the clr transformation; CoDA-AE is the\nproposed CODA-AUTOENCODER in subsection 5. Both clr-AE and CoDA-AE use exactly the same\nstructure with one hidden layer of 100 ELU [11] units in their decoders.\nThe baselines are assessed based on an array of measures including (L2-clr) the L2-distance (cid:107)cKL(x)\u2212\ncKL(x(cid:48))(cid:107)F between the input data x \u2208 Sd and the reconstruction x(cid:48)\n\u2208 Sd in the clr space; (JSD)\n); (TV) the total variation distance\nthe Jensen-Shannon divergence 1\n\n) + 1\n\n2 KL(x(cid:48) : x+x(cid:48)\n\n2 KL(x : x+x(cid:48)\n\n2\n\n2\n\n8\n\nclr-PCACoDA-PCASCoDA-PCAclr-AECoDA-AE110#PCs7.510.012.515.017.520.0-103.4-106.6-102.3-106.2-103.4-97.9-98.9-97.3-96.0-102.7L2-clr(test)110#PCs0.040.060.080.1024.619.126.320.023.333.339.742.641.939.3JSD(test)110#PCs0.150.200.250.300.3514.016.821.016.517.023.029.030.630.326.8TV(test)110#PCs3456-9.6-14.0-35.1-24.9-16.2-17.0-19.7-21.4-27.0-28.3L2-clr(test)110#PCs0.020.040.060.080.1029.920.418.014.630.129.530.732.427.231.0JSD(test)110#PCs0.100.150.200.250.300.3524.517.116.719.128.426.528.131.922.423.8TV(test)\f(cid:80)d\ni=1 |xi \u2212 x(cid:48)\n\ni|. These measurements are all invariant to scaling or permutation of x and x(cid:48). See\n1\n2\nthe supplementary material for more baselines and performance indicators.\nWe consider the following datasets available in the microbiome R package [18], each of which is\nrandomly split into a training set (90%) and a testing set (10%). The HITChip Atlas dataset [17]\ncontains 130 genus-level taxonomic groups that cover the majority of the known bacterial diversity\nof the human intestine. The data come from 1006 western adults from 15 western countries (Europe\nand the United States). Sample sets were analysed with three different DNA extraction methods. The\ntwo-week diet swap study between western (USA) and traditional (rural Africa) diets was reported in\n[28]. In this study, a two-week food exchange was performed in subjects from the same populations,\nwhere African Americans were fed a high-\ufb01bre, low-fat African-style diet and rural Africans a\nhigh-fat, low-\ufb01bre western-style diet. The group diet was indicated by HE (home environment days),\nDI (dietary intervention days) and ED (initial and \ufb01nal endoscopy days). Each subject served as\nhis/her own control, given the known wide individual variation in colonic microbiota composition.\nFig. 2 shows the typical testing results. We observe that on most performance indicators CoDA-PCA\nand CoDA-AE show a much smaller testing error as compared to clr-PCA and clr-AE, respectively.\nThe only exception is on L2-clr, where clr-PCA and clr-AE appear to be favored against our CoDA\nvariants. This is because L2-clr is exactly the cost function of those two methods. We found that\nCoDA-AE is more robust against over\ufb01tting as compared to clr-AE. The performance of SCoDA-PCA\nis close to CoDA-PCA on most of the indicators and is better than CoDA-PCA on L2-clr.\nThe source codes to reproduce our experimental results are available online2.\n\n7 Conclusion\n\nWe propose an approach for learning a low dimensional representation directly on raw count data,\nwhich is compositional in nature. Our proposed algorithm generalizes PCA in two ways, \ufb01rst by going\nto the exponential family via the Bregman divergence, and second by converting the normalization of\ndata to a change in the Bregman divergence. The key theorem used for transforming the Bregman\ndivergence generalizes a recent result, and may be of independent interest.\n\nAcknowledgements\n\nThe authors gratefully thank Perrine Soret, Frank Nielsen, Xinhua Zhang, and the anonymous NIPS\nreviewers, for their helpful and constructive feedback. This work was done while MAF was visiting\nData61, CSIRO in Canberra, Australia.\n\nReferences\n[1] J. Aitchison. The statistical analysis of compositional data (with discussion). Journal of the\n\nRoyal Statistical Society B, 44(2):139\u2013177, 1982.\n\n[2] J. Aitchison. Principal component analysis of compositional data. Biometrika, 70(1):57\u201365,\n\n1983.\n\n[3] J. Aitchison. The Statistical Analysis of Compositional Data. Chapman and Hall, New York,\n\n1986.\n\n[4] J. Aitchison. Principles of compositional data analysis. Multivariate Analysis and its Applica-\n\ntions, 24:73\u201381, 1994.\n\n[5] J. Aitchison and J.-J. Egozcue. Compositional data analysis: Where are we and where should\n\nwe be heading? Mathematical Geology Journal, 37:829\u2013850, 2005.\n\n[6] S.-I. Amari. Information Geometry and Its Applications. Springer-Verlag, Berlin, 2016.\n\n[7] O. Barndorff-Nielsen. Information and Exponential Families in Statistical Theory. Wiley\n\nPublishers, 1978.\n\n2https://bitbucket.org/RichardNock/coda\n\n9\n\n\f[8] J.-D. Boissonnat, F. Nielsen, and R. Nock. Bregman Voronoi diagrams. Discrete Comput.\n\nGeom., 44(2):281\u2013307, 2010.\n\n[9] S. Boyd and L. Vandenberghe. Convex Optimization. Cambridge University Press, 2004.\n\n[10] J. Chiquet, M. Mariadassous, and St\u00e9phane Robin. Variational inference for probabilistic\n\nPoisson PCA. Annals of Applied Statistics (to appear), 2018.\n\n[11] D.-A. Clevert, T. Unterthiner, and S. Hochreiter. Fast and accurate deep network learning by\n\nexponential linear units (ELUs). In 4th ICLR, 2016.\n\n[12] M. Collins, S. DasGupta, and R. Schapire. A generalization of principal components analysis to\nthe exponential family. In T. G. Dietterich, S. Becker, and Z. Ghahramani, editors, NIPS*15,\n2002.\n\n[13] J.-J. Egozcue, V. Pawlowsky-Glahn, G. Mateu-Figueras, and C. Barcel\u00f3-Vidal.\n\nIsometric\nlogratio transformations for compositional data analysis. Mathematical Geology Journal,\n35:279\u2013300, 2003.\n\n[14] G. Reid G. B. Gloor. Compositional analysis: a valid approach to analyze microbiome high-\n\nthroughput sequencing data. Can J Microbiol., 12:1\u201312, 2016.\n\n[15] G. B. Gloor, J. R. Wu, V. Pawlowsky-Glahn, and J. J. Egozcue. It\u2019s all relative: analyzing\n\nmicrobiome data as compositions. Ann Epidemiol., 26:322\u20139, 2016.\n\n[16] M. Greenacre. Compositional Data Analysis in Practice. Chapman and Hall, New York, 2018.\n\n[17] L. Lahti, J. Saloj\u00e4rvi, A. Salonen, M. Scheffer, and W. M. de Vos. Tipping elements in the\n\nhuman intestinal ecosystem. Nat. Commun., 5:4344, 2014.\n\n[18] L. Lahti, S. Sudarshan, T. Blake, and J. Salojarvi. Microbiome R package. version 1.1.10012,\n\n2017.\n\n[19] A. J. Landgraf. Generalized Principal Component Analysis: Dimensionality Reduction through\n\nthe Projection of Natural Parameters. PhD thesis, Ohio State University, 2015.\n\n[20] D. Lovell, W. M\u00fcller, J. Taylor, A. Zwart, and C. Helliwell. Caution! compositions! can\n\nconstraints on omics data lead analyses astray? Technical Report EP10994, CSIRO, 2010.\n\n[21] A.F. Andersson L.W. Hugerth. Analysing microbial community composition through amplicon\n\nsequencing: From sampling to hypothesis testing. Frontiers in Microbiology, 8:1561, 2017.\n\n[22] P. Mar\u00e9chal. On a functional operation generating convex functions, part 1: duality. J. of\n\nOptimization Theory and Applications, 126:175\u2013189, 2005.\n\n[23] P. Mar\u00e9chal. On a functional operation generating convex functions, part 2: algebraic properties.\n\nJ. of Optimization Theory and Applications, 126:375\u2013366, 2005.\n\n[24] J. A. Mart\u00edn-Fern\u00e1ndez, V. Pawlowsky-Glahn, J. J. Egozcue, and R. Tolosona-Delgado. The\nstatistical analysis of compositional data (with discussion). Math Geosci, 50:273\u2013298, 2018.\n\n[25] R. Nock, A.-K. Menon, and C.-S. Ong. A scaled Bregman theorem with applications. In\n\nNIPS*29, pages 19\u201327, 2016.\n\n[26] R. Nock, F. Nielsen, and S.-I. Amari. On conformal divergences and their population minimizers.\n\nIEEE Trans. IT, 62:1\u201312, 2016.\n\n[27] V. Shankar O. Paliy. Application of multivariate statistical techniques in microbial ecology.\n\nMolecular ecology, 25:1032\u201357, 2016.\n\n[28] S. J. D. O\u2019Keefe, J. V. Li, L. Lahti, J. Ou, F. Carbonero, K. Mohammed, J. M. Posma, J. Kinross,\nE. Wahl, E. Ruder, K. Vipperla, V. Naidoo, L. Mtshali, S. Tims, P. G. B. Puylaert, J. DeLany,\nA. Krasinskas, A. C. Bene\ufb01el, H. O. Kaseb, K. Newton, J. K. Nicholson, W. M. de Vos, H. R.\nGaskins, and E. G. Zoetendal. Fat, \ufb01ber and cancer risk in African Americans and rural Africans.\nNat. Commun., 6:6342, 2015.\n\n10\n\n\f[29] V. Pawlowsky-Glahn and A. Buccianti. Compositional Data Analysis, theory and applications.\n\nWiley, 2011.\n\n[30] Ke Sun and St\u00e9phane Marchand-Maillet. An information geometry of statistical manifold\n\nlearning. In 31st ICML, pages 1\u20139, 2014.\n\n[31] R. Tolosona-Delgado V. Pawlowsky-Glahn, J. J. Egozcue. Lecture notes on compositional data\n\nanalysis. Technical report, Girona University, 2007.\n\n[32] L. van der Maaten and G. E. Hinton. Visualizing data using t-SNE. Journal of Machine Learning\n\nResearch, 9(Nov):2579\u20132605, 2008.\n\n11\n\n\f", "award": [], "sourceid": 3363, "authors": [{"given_name": "Marta", "family_name": "Avalos", "institution": "INRIA, INSERM U1219, University of Bordeaux"}, {"given_name": "Richard", "family_name": "Nock", "institution": "Data61, the Australian National University and the University of Sydney"}, {"given_name": "Cheng Soon", "family_name": "Ong", "institution": "Data61 and ANU"}, {"given_name": "Julien", "family_name": "Rouar", "institution": "University of Bordeaux"}, {"given_name": "Ke", "family_name": "Sun", "institution": "Data61, CSIRO"}]}