Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- -9E4T4oBgHgl3EQfEAsg/content/2301.04873v1.pdfAdded+3
- -9E4T4oBgHgl3EQfEAsg/vector_store/index.faissAdded+3
- -9E4T4oBgHgl3EQfEAsg/vector_store/index.pklAdded+3
- -dE2T4oBgHgl3EQfmQc9/vector_store/index.pklAdded+3
- -dFIT4oBgHgl3EQf9CsF/content/tmp_files/2301.11404v1.pdf.txtAdded+1230
- -dFIT4oBgHgl3EQf9CsF/content/tmp_files/load_file.txtAdded
- -tFAT4oBgHgl3EQfqR1A/content/2301.08646v1.pdfAdded+3
- -tFAT4oBgHgl3EQfqR1A/vector_store/index.pklAdded+3
- .gitattributes+55
- 0tE2T4oBgHgl3EQfiQfL/content/tmp_files/2301.03957v1.pdf.txtAdded+894
- 0tE2T4oBgHgl3EQfiQfL/content/tmp_files/load_file.txtAdded
- 1dFLT4oBgHgl3EQfpy-5/vector_store/index.pklAdded+3
- 1tE3T4oBgHgl3EQfngpH/content/tmp_files/load_file.txtAdded
- 2NAzT4oBgHgl3EQfuP1K/content/2301.01687v1.pdfAdded+3
- 2NAzT4oBgHgl3EQfuP1K/vector_store/index.pklAdded+3
- 2NE4T4oBgHgl3EQfzw00/content/2301.05276v1.pdfAdded+3
- 2NE4T4oBgHgl3EQfzw00/vector_store/index.pklAdded+3
- 39AyT4oBgHgl3EQfcPct/vector_store/index.faissAdded+3
- 39E1T4oBgHgl3EQf6AV3/content/2301.03518v1.pdfAdded+3
- 39E1T4oBgHgl3EQf6AV3/vector_store/index.faissAdded+3
- 39E1T4oBgHgl3EQf6AV3/vector_store/index.pklAdded+3
- 3dE4T4oBgHgl3EQfbAyT/vector_store/index.faissAdded+3
- 49A0T4oBgHgl3EQfNv86/content/tmp_files/2301.02150v1.pdf.txtAdded+1735
- 49A0T4oBgHgl3EQfNv86/content/tmp_files/load_file.txtAdded
- 69E3T4oBgHgl3EQfRQm6/content/2301.04420v1.pdfAdded+3
- 69E3T4oBgHgl3EQfRQm6/vector_store/index.faissAdded+3
- 69E3T4oBgHgl3EQfRQm6/vector_store/index.pklAdded+3
- 69FJT4oBgHgl3EQfmCy-/content/2301.11586v1.pdfAdded+3
- 69FJT4oBgHgl3EQfmCy-/vector_store/index.faissAdded+3
- 69FJT4oBgHgl3EQfmCy-/vector_store/index.pklAdded+3
- 79AzT4oBgHgl3EQfE_pK/content/2301.01002v1.pdfAdded+3
- 79AzT4oBgHgl3EQfE_pK/vector_store/index.faissAdded+3
- 8NE4T4oBgHgl3EQf2w06/vector_store/index.faissAdded+3
- 8dAzT4oBgHgl3EQfSPuZ/content/2301.01230v1.pdfAdded+3
- 8dAzT4oBgHgl3EQfSPuZ/vector_store/index.faissAdded+3
- AdFAT4oBgHgl3EQfrh5X/content/tmp_files/2301.08653v1.pdf.txtAdded+1303
- AdFAT4oBgHgl3EQfrh5X/content/tmp_files/load_file.txtAdded
- B9E4T4oBgHgl3EQf5Q72/content/tmp_files/2301.05323v1.pdf.txtAdded+1535
- B9E4T4oBgHgl3EQf5Q72/content/tmp_files/load_file.txtAdded
- EdFRT4oBgHgl3EQfBDfd/content/tmp_files/2301.13464v1.pdf.txtAdded+3033
- EdFRT4oBgHgl3EQfBDfd/content/tmp_files/load_file.txtAdded
- FdFKT4oBgHgl3EQfay5f/content/2301.11809v1.pdfAdded+3
- FdFKT4oBgHgl3EQfay5f/vector_store/index.faissAdded+3
- FdFKT4oBgHgl3EQfay5f/vector_store/index.pklAdded+3
- G9A0T4oBgHgl3EQfBv-A/content/2301.01980v1.pdfAdded+3
- G9A0T4oBgHgl3EQfBv-A/vector_store/index.pklAdded+3
- HdE5T4oBgHgl3EQfWQ_B/content/2301.05558v1.pdfAdded+3
- HdE5T4oBgHgl3EQfWQ_B/vector_store/index.faissAdded+3
- HdE5T4oBgHgl3EQfWQ_B/vector_store/index.pklAdded+3
- I9A0T4oBgHgl3EQfCP_M/vector_store/index.pklAdded+3
123version https://git-lfs.github.com/spec/v1oid sha256:0a7288c6e06e27cc92072bd70d5e99d0441e03270d661e73c5570b78a1a0da9fsize 2332427123version https://git-lfs.github.com/spec/v1oid sha256:e60a98092cdafb2071f24c7863424b0c45f7b24922868740b89f85b240884404size 4063277123version https://git-lfs.github.com/spec/v1oid sha256:57d4d7edfb6870c59e4ccc348244dca0718f68db63131de3214104a4ea67df12size 147758123version https://git-lfs.github.com/spec/v1oid sha256:39adf4f498b41e6ce367e9c34d5552ee6b0555e7c67fb149e9a9dcb8aa2671c3size 67288123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230A Quantum Monte Carlo study of the structural, energetic, and magneticproperties of two-dimensional (2D) H and T phase VSe2Daniel Wines,1, a) Juha Tiihonen,2 Kayahan Saritas,3 Jaron Krogel,3 and Can Ataca4, b)1)Materials Science and Engineering Division, National Institute of Standards and Technology (NIST), Gaithersburg,MD 208992)Department of Physics, Nanoscience Center, University of Jyväskylä, P.O. Box 35, Finland3)Material Science and Technology Division, Oak Ridge National Laboratory, Oak Ridge,Tennessee 378314)Department of Physics, University of Maryland Baltimore County, Baltimore MD 21250(Dated: 30 January 2023)Previous works have controversially claimed near-room temperature ferromagnetism in two-dimensional (2D) VSe2,with conflicting results throughout the literature. These discrepancies in magnetic properties between both phases (Tand H phase) of 2D VSe2 are most likely due to the structural parameters being coupled to the magnetic properties.Specifically, both phases have a close lattice match and similar total energies, which makes it difficult to determinewhich phase is being observed experimentally. In this study, we used a combination of density functional theory(DFT), highly accurate diffusion Monte Carlo (DMC) and a surrogate Hessian line-search optimization technique toresolve the previously reported discrepancy in structural parameters and relative phase stability. With DMC accuracy,we determined the freestanding geometry of both phases and constructed a phase diagram. Our findings demonstratethe successes of the DMC method coupled with the surrogate Hessian structural optimization technique when appliedto a 2D magnetic system.I.INTRODUCTIONOne of the most promising two-dimensional (2D) mag-netic materials that has been extensively studied experimen-tally and theoretically is 2D VSe2. Similar to other 2D tran-sition metal dichalcogenides (such as MoS2)1, VSe2 existsin two phases, the T (octahedral phase (1T)-centered honey-combs) phase which is metallic and the H (the trigonal pris-matic phase (2H)-hexagonal honeycombs, see Fig. 1) phasewhich is semiconducting. Several experimental and theoret-ical studies have controversially claimed near-room tempera-ture ferromagnetism in VSe2, with conflicting results through-out the literature. Density functional theory (DFT) along withclassical Monte Carlo simulations have been used to obtaina)b)1T-VSe22H-VSe2FIG. 1. Top and side view of the atomic structure of monolayer VSe2in the a) 1T and b) 2H phase.a)Electronic mail: daniel.wines@nist.govb)Electronic mail: ataca@umbc.eduan estimate of the Curie temperature of H-VSe2 (291 K)2, butthe model Ising Hamiltonian used did not take into account themagnetic anisotropy energies, which are essential for an accu-rate estimation of the Curie temperature of a 2D lattice. TheCurie temperature of multilayered 2D H-VSe2 has been ex-perimentally measured to be 425 K, with the ferromagnetismsoftening as the thickness of the sample increases3. Addi-tionally, the experimental Curie temperature for monolayer T-VSe2 has ranged from 300 K to 470 K4,5 depending on whichsubstrate is used (MoS2, graphite, SiO2-coated silicon). Theexperimental magnetization of T-VSe2 has also been met withcontroversy, with values of 15 µB and 5 µB (per formula unit)being reported from two separate studies4,6. Insight has alsobeen reported with regards to how the ferromagnetism is en-hanced with defects, molecular adsorption and the choice ofsubstrate for VSe24,5,7. A wide range of values have also beenreported for the charge density wave (CDW) transition tem-perature for T-VSe2, ranging from 120 K to 350 K3,6,8–10.These discrepancies in the electronic and magnetic proper-ties of either phase of 2D VSe2 arise from the structural pa-rameters of each phase being coupled closely to the magneticand electronic properties and the external factors (substrates,defects) of the individual samples. One example of this hasbeen a reported discrepancy on which phase (T or H) is en-ergetically more favorable. Both the T and H phases have aclose lattice match and similar total energies, which makes itdifficult to determine which phase is being observed experi-mentally. Recently, it has been reported experimentally thatthe T phase is favored for bulk VSe2, but with dimension-ality decrease, the H phase is favored3,11. It has also beenreported that a T-to-H phase transition can be realized by ther-mal annealing11. This same structural phase transition haseven been reported by applying a biaxial strain of ≈ 3 % (fromcalculated results)7,11,12. Researchers have proposed that thislattice strain can be induced by the mismatch that occurs fromarXiv:2301.11404v1 [cond-mat.str-el] 26 Jan 2023
bCaCabb2putting 2D VSe2 on a substrate7,12.From a computational perspective, results for VSe2 dependheavily on which methodology is employed. In most cases,DFT with an empirical Hubbard correction (+U) for corre-lated electrons is used13. For example, if the U correction isapplied for T and H-VSe2, the T phase is more energeticallyfavorable, while if no U correction is applied, the H phaseis more favorable14. In addition to the discrepancies in re-sults calculated with DFT+U, results between van der Waals(vdW) corrected functionals and hybrid functionals are alsoinconclusive14 in terms of predicting the relative phase stabil-ity. In order to alleviate the uncertainty in DFT methods, moresophisticated methods can be used such as Diffusion MonteCarlo (DMC)15. DMC is a correlated, many-body electronicstructure method that has demonstrated success for the elec-tronic and magnetic properties of a variety of bulk and 2Dsystems16–24. This method has a weaker dependence on thestarting density functional and U parameter and can success-fully achieve results with an accuracy beyond the DFT+U15.Due to the fact that T and H-VSe2 have structural parame-ters that are coupled to their electronic and magnetic proper-ties, it makes it difficult to produce conclusive results that relysolely on DFT or DFT+U. For this reason, we employed ourrecently developed energy-based surrogate Hessian methodfor structural optimization with stochastic electronic structuretheories (such as DMC)22 to obtain the geometry of T andH-VSe2 with DMC accuracy, resulting in high-accuracy bondlengths that resolve previous functional dependent structuraldiscrepancies. After obtaining an accurate geometry for bothstructures, we constructed a phase diagram between T and H-VSe2 using DMC calculated energies and obtained accuratemagnetic properties of each structure. The accurate estimatesfor lattice geometry, relative phase energy and the DMC phasediagram assist in clarifying previously inconclusive theoreti-cal and experimental results regarding T and H phase VSe2.For full details of the computational methods used, see theSupporting Information (SI).As an initial starting point for our study, we performedbenchmarking DFT and DFT+U calculations using a varietyof density functionals (local density approximation (LDA)25,Perdew-Burke-Ernzerhof (PBE)26, and strongly constrainedand appropriately normed (SCAN)27 meta-GGA functionals,see SI for more details) and the Vienna Ab initio SimulationPackage (VASP) code for monolayer T-VSe2 and H-VSe2.The goal of these simulations were to assess how sensitivethe relative energy between the T and H phase is with re-spect to functional and material geometry. Another goal ofthese simulations was to benchmark the structural parametersof each material with respect to several density functionals. Itis advantageous to perform these reference calculations withVASP and PAW pseudopotentials as a precursor to the moreexpensive DMC calculations due to the fact that they requirea much smaller cutoff energy and are more cost effective fora large number of simulations. It is important to note thatfor all DFT and DMC simulations, we assumed a ferromag-netic ground state for both T and H-VSe2. Although recentreports have suggested that T-VSe2 could be experimentallyparamagnetic3, we infer that this paramagnetism can be in-duced by magnetic anisotropy. In addition, the modeling ofparamagnetism with computational methods imposes a greatchallenge, which is why we focus on the freestanding ferro-magnetic ground states of both phases. A more robust treat-ment of the magnetic structure can be explored in future work,but is beyond the scope of this work which primarily focuseson determining the geometric structure and phase stability of2D T and H-VSe2.In Fig. 2 we present a comprehensive look at the differencein total energy between T-VSe2 and H-VSe2, using severalDFT functionals under different geometric constraints. Weperformed these calculations for a variety of U values in threedifferent ways: fully relaxing the structure at each value of U(Fig. 2 a) ), fixing the lattice and atomic positions to the U= 0 eV relaxed geometry of that particular functional and cal-culating the static energy at each value of U (Fig 2 b)), fixingthe lattice to the U = 0 eV relaxed geometry of that particularfunctional and relaxing just the atomic positions at each valueof U (Fig. 2 c)). The results in Fig. 2 indicate that there isa significant disagreement between DFT functionals, U valueused, and material geometries, with all three factors playinga significant role in the energy difference between T and Hphase. Specifically, regardless of relaxation method, all bare(no U correction) SCAN, PBE, and PBEsol functionals pre-dict H favorable, while bare LDA predicts T favorable. Forall functionals, there is a critical value of U that reverses therelative phase stability, which is dependent on functional andrelaxation method. The SCAN functional with a U correctionpredicts T phase favorable, with larger energy differences. Asseen in Fig. 2, the trends in the relative phase stability be-tween Fig. 2 b) and c) are nearly identical, but significantlyvary from Fig. a). This implies that the density functional isstrongly coupled to material geometry, but the lattice constantchange has more of an effect on phase stability than atomicpositions and bond distances. This is most prevalent for higherU values (> 2 eV), where the relaxed geometry changes moredrastically with U. The interrelated nature of the material’sgeometry, density functional, and value of U are reasons toseek out higher levels of theory beyond DFT/DFT+U such asDMC to accurately determine the optimal geometry and rela-tive energy between the phases of 2D VSe2.The relaxed lattice constants, V-Se distances, and T - H en-ergies from Fig. 2 a) are presented in Table I and Fig. 3,along with additional VASP reference calculations performedwith the vdW corrected functionals (PBE-D228, PBE-D329,SCAN+rvv1030). The DMC computed parameters are alsogiven for comparison in Table I and Fig. 3 (more discussionto follow). We observe a ≈ 7 % variability in lattice constantacross the different methods for T-VSe2 and a ≈ 4 % variabil-ity in lattice constant across the different methods for H-VSe2.Between both phases, we observe a ≈ 3 % variability in V-Sedistance (dV−Se). Most strikingly, the energy difference be-tween the T and H phases (ET−H) drastically varies depend-ing on the material geometry and computational methodology,ranging from -0.2 eV/f.u. to 0.06 eV/f.u.. Due to the factthat a strain-induced phase transition has been reported be-tween T- and H-VSe27,11,12, we decided to perform additionalVASP benchmarking calculations that involved the applica-
301234U (eV)01234U (eV)01234U (eV)-0.6-0.5-0.4-0.3-0.2-0.100.1T - H Energy (eV/f.u.)-0.3-0.2-0.100.1-0.05 0.05-0.15-0.25-0.35T - H Energy (eV/f.u.)-0.3-0.2-0.100.1-0.05 0.05-0.15-0.25-0.35T - H Energy (eV/f.u.)PBELDASCANPBESOLFull relaxationFixed lattice/relaxed positionsFixed lattice/positionsa)b)c)FIG. 2. Relative (T - H) energy between T and H phase 2D VSe2 as a function of U parameter for several density functionals and methods ofatomic relaxation: a) fully relaxing the structure, b) fixing the lattice and atomic positions to the U = 0 eV relaxed geometry of that particularfunctional and calculating the static energy, c) fixing the lattice to the U = 0 eV relaxed geometry of that particular functional and relaxing justthe atomic positions. The dotted line indicates 0 eV.TABLE I. Tabulated results for lattice constant, V-Se distance, and relative energy (T - H) for both T and H phase 2D VSe2 for severalcomputational methods. DMC error bars (standard error about the mean) are included in parenthesis.T-VSe2H-VSe2Methoda (Å)dV−Se (Å) a (Å)dV−Se (Å) ET−H (eV/f.u.)PBE3.3362.4893.3332.5020.045PBE+U=23.4352.5263.3642.520-0.008LDA3.2282.4383.2292.445-0.026LDA+U=23.2772.4553.2662.4640.045SCAN3.3872.4863.3292.4860.045SCAN+U=23.4622.5243.3532.502-0.202PBEsol3.2622.4583.2722.4710.013PBEsol+U=2 3.3232.4833.3012.4870.025PBE-D23.3232.4843.3182.4960.010PBE-D33.3152.4853.3192.4970.042SCAN+rvv10 3.3792.4813.3192.4820.051DMC3.414(12) 2.505(7)3.335(8) 2.503(5)0.06(2)tion of tensile and compressive strain for each monolayer. Weperformed these calculations for PBE, SCAN, and LDA (withU = 0 eV and U = 2 eV), starting from the U = 0 eV geom-etry for each functional. The resulting equations of state aredepicted in Fig. S3. As seen in the figure, the equation ofstate and resulting strain-induced phase transition is entirelydependent on the functional and U value, with no consistenttrend.The strong sensitivity of each monolayer with respect togeometry and functional are grounds for using a higher-ordermethod such as DMC to obtain a statistically accurate estimateof the lattice parameters and relative energy between phases.Prior to performing the DMC/line-search calculations, we op-timized our nodal surface (orbitals selected for DFT wave-function generation). Since DMC has the zero-variance prop-erty, it means that as the trial wave function approaches the
4ET-H - ET-H(DMC)(eV/f.u.)dV-Se - dV-Se(DMC) (Å)dV-Se - dV-Se(DMC) (Å)a - aDMC (Å)a - aDMC (Å)T-VSe2H-VSe2a)b)c)FIG. 3. A summary of the deviation of the geometric properties rel-ative to the DMC calculated geometric properties for a) T-VSe2 andb) H-VSe2 and c) the the deviation of T - H energy relative to theDMC calculated T - H energy for a variety of DFT functionals (U =2 eV), where the DMC error bar (standard error about the mean) isrepresented by the red bars.exact ground state, the statistical fluctuations in the energyreduce to zero15. Although there have been instances wherevarious sophisticated methods have been used to optimize thenodal surface31–34, we employed the PBE+U approach, wherethe Hubbard (U) value was used as a variational parameterto optimize the nodal surface using DMC (similar to othersuccessful DMC studies of magnetic materials16,20,21,24,35–37).We performed these calculations for both T and H-VSe2 (24atom supercells), where we tuned the U value from (1 to 4) eVwhile creating the trial wavefunction and computed the DMCenergy. The results of these calculations are depicted in Fig.S4, where we observe that U = 2 eV yields the lowest energyfor both phases. It is important to note that for the H phase,the DMC energies for U = 1 and U = 2 eV are statisticallyidentical. Based on this, we created the trial wavefunction us-ing PBE+U (U = 2 eV) for all subsequent DMC calculationswithin the surrogate Hessian line-search for both phases (all52 DMC energy evaluations). Since we obtained an optimalU value of 2 eV for both materials, we focused our DFT+Ubenchmarking efforts more on U = 2 eV (Fig. 3, Fig 5, TableI, Fig. 2, Fig. S3).Based on the DMC line-search results, we determined ac-curate bounds on the lattice parameter (a) and off-plane dis-placement of Se (z), within an error tolerance of 0.018 Å orlower for both parameters. This translates to within ≈ 0.5%accuracy in a parameter set of a and dV−Se with 95% con-fidence. Convergence (absence of significant displacements2.452.502.552.60V-Se distance (˚A)T-phaseH-phaseFit eqm. (T)Fit eqm. (H)LS eqm. (T)LS eqm. (H)3.23.33.43.53.63.73.8Lattice constant (˚A)−2459.5−2459.0−2458.5Energy/f.u. (eV)PES (T)PES (H)FIG. 4. (Top) The phase diagram of 2D VSe2 in terms of a anddV−Se. The phase boundary (solid line, black) is estimated frombicubic fits. To assure quality of the fits, the estimated ±0.01 eVerror contours (dotted line) and the minima from the fits (’x’) and theline-search (’o’) are all well separated. (Bottom) Slices of the PES atdV−Se = 2.505 Å.outside of the error tolerance) was achieved after two parallelline-search iterations for both phases. This convergence is il-lustrated in Fig. S5, where the convergence of the parameteroffsets of a and z and the convergence of the total energy perf.u. are depicted for both T and H phase 2D VSe2 for the ini-tial DFT relaxed structure (1) and both subsequent iterationsof DMC (2 - 3). In addition, the final energy of both of thefitted structures (square points) are given.The final geometric parameters and relative phase energiesdetermined with DMC are given in Table I and Fig. 3. ForT-VSe2, we determined a lattice constant of 3.414(12) Å anda V-Se distance of 2.505(7) Å . For H-VSe2, we determined alattice constant of 3.335(8) Å and a V-Se distance of 2.503(5)Å . The DMC finite-size extrapolated energy difference (T- H) between the two phases was determined to be 0.06(2)eV/f.u., indicating that in freestanding form at the equilibriumgeometry, H-VSe2 is favored over T-VSe2. When comparingthese DMC results to the other DFT functionals in Table I andFig. 3, it is clear that very few DFT functionals can repro-duce the DMC results for lattice constant, V-Se distance andrelative energy difference. The SCAN functional comes theclosest to reproducing all three simultaneous DMC values, butstill falls slightly short for the V-Se distances of both phasesand the lattice constant of T-VSe2. The fact that SCAN+Usuccessfully predicts the structural properties (for H-VSe2)and the fact that SCAN+rvv10 produces an energy differenceclosest to the average DMC energy difference for both phasesloosely implies that a simultaneous description of correlatedmagnetism and vdW interactions are both needed to correctlyrepresent the physics of VSe2. Experimental measurements of
5the lattice constant and V-Se distance of freestanding mono-layer VSe2 are scarce and often times dependent on externalfactors such as the substrate (more discussion to follow) andsample preparation technique4,5,38,39. However, Chen et al.38have recently reported a lattice constant of 3.4 Å for thin filmsof T-VSe2 and Liu et al.39 have recently reported a latticeconstant of 3.3 Å for epitaxially grown monolayer H-VSe2.Both of these measured values are in excellent agreement withour DMC computed lattice constants. Additionally, we deter-mined the near-equilibrium PES of both T and H 2D VSe2with DMC accuracy, which are both depicted in Fig. S6.The phase diagram presented in Fig. 4 is based on similarfits to data, where the z displacement has been remapped todV−Se. This DMC phase diagram can directly be compared tothe energy vs. strain DFT benchmarking calculations in Fig.S3, which emphasizes the need for an accurate representationof the phase boundary between the two phases. The freestand-ing geometries of both T and H lie in the energetic H phase,but a slice of the phase diagram along dV−Se = 2.505 Å in-dicates that the T phase becomes favorable over H at biaxialstrain of a ≳ 3.5 Å. This implies that in freestanding form,once T-VSe2 is positively strained at least ≈ 2.5 %, T phase isfavored over H. Alternatively, if freestanding H-VSe2 is pos-itively strained at least ≈ 5 %, T phase is also favored overH This strain can easily be accomplished by placing mono-layer VSe2 on a substrate with significant lattice mismatch. Infact, this type of mismatch has been reported to alter the mate-rial properties4,5,40,41, significantly contributing to the contro-versies of T and H-VSe2 (for energetic favorability, magneticproperties). Whether or not the changes in energetic favorabil-ity or magnetic properties with respect to the substrate are dueto lattice mismatch or more complicated interactions betweenthe substrate and the monolayer remains to be answered andis beyond the scope of this work, which has focused solely onthe freestanding forms of T and H-VSe2. However, such cal-culations can be employed for future work using higher ordermethods such as DMC. The proximity of the phase boundarybetween T and H phase (Fig. 4) is emphasized by the small en-ergy difference between the two phases (0.06(2) eV/f.u., at theequilibrium geometry) between the two curves. Since this en-ergy difference is so close to room temperature (≈ 0.024 eV),this implies that a process such as thermal annealing can eas-ily induce a phase transition. In fact, recently it was demon-strated that a structural phase transition of multilayer VSe2from T to H occurs through annealing at 650 K, along with ametal-insulator transition11.To gain a deeper understanding of the magnetic propertiesof 2D T and H-VSe2, we extracted the spin densities (using atrial wavefunction at U = 2 eV and 24 atom supercell at thefinal equilibrium geometry predicted by DMC/line-search).The spin density isosurfaces of each phase (ρup - ρdown) aredepicted in the insets of Fig. 5 a) and c) for T-VSe2 and H-VSe2 respectively. For both phases, we observe the V atomsare highly spin-polarized, while the Se atoms are slightly an-tiparallel with respect to the V atoms. For more calculationdetails regarding spin density, see SI.We went on to plot the radial averaged spin densities as afunction of distance, separately for V and Se for T and H-VSe2(depicted in Fig. 5 a) - d)). This allows us to view the spa-tial variations in spin density. Additionally, we benchmarkedthese V and Se radially averaged densities with PBE+U (U= 2 eV) using NC pseudopotentials at the equilibrium geom-etry (the calculation required to create the trial WF for thesubsequent DMC runs). As seen in Fig. 5 a) and c), there isa substantial difference in the V spin density between DMCand PBE+U (U = 2 eV) for both T and H phase. This samesubstantial difference between DMC and PBE+U also occursfor the total charge density. This discrepancy is most preva-lent near the radial density peak (peak of d orbital) and canbe attributed to the fact that DFT functionals (even with theadded Hubbard correction) tend to delocalize and unsuccess-fully capture 3d orbitals. This large discrepancy in the spindensities highlights the need for more accurate, many-bodycomputational methodologies for correlated materials such asVSe2, where DFT fails. In contrast, there is closer agreementbetween the DMC and PBE+U spin densities for Se in T andH-VSe2 (see Fig. 5 b) and d).Finally, we estimated the site-averaged atomic magneticmoments per V and Se for both T and H phase by integratingthe DMC and PBE+U spin densities depicted in Fig. 5. At theDMC level, we estimated a magnetic moment of 1.06(2) µBfor V and -0.09(2) µB for Se in T-VSe2 and a magnetic mo-ment of 1.02(1) µB for V and -0.14(1) µB for Se in H-VSe2.At the PBE+U (U = 2 eV) level, we estimated a magnetic mo-ment of 1.30 µB for V and -0.12 µB for Se in T-VSe2 and amagnetic moment of 1.40 µB for V and -0.15 µB for Se in H-VSe2. Consistent with the radial spin density results in Fig.5, we find that the DMC and PBE+U magnetic moments forSe are in much closer agreement than for V (for both T andH phase). By analyzing the spin densities and obtaining theon-site magnetic moments, we obtain a clear picture of howthe magnetization of each ion depends on the computationalmethod used, serving as a benchmark for the magnetic prop-erties of 2D VSe2.In this work, we used a combination of DFT, DMC anda recently developed surrogate Hessian line-search optimiza-tion technique to resolve the previously reported discrepancyin structural parameters and relative phase stability of mono-layer T-VSe2 and H-VSe2. Using these methods, we deter-mined the lattice constant and V-Se distance (with DMC ac-curacy) to be 3.414(12) Å and 2.505(7) Å respectively for T-VSe2 and 3.335(8) Å and 2.503(5) respectively for H-VSe2.In addition, we find the relative energy between the phases (T- H) to be 0.06(2) eV/f.u. at the DMC level, indicating thatin freestanding form, H-VSe2 is more energetically favorablethan T-VSe2. We went on to obtain a phase diagram betweenT and H phase from the PES and determined that a phase tran-sition can be induced by strain or mechanisms such as ther-mal annealing. Additionally, we benchmarked the magneticproperties such as spin density and on-site magnetic momentfor both phases and find substantial differences between DMCand DFT. The results of this study demonstrate the successesof the DMC method coupled with the surrogate Hessian line-search structural optimization technique when applied to a 2Dmagnetic system.The estimates for lattice constant, bonddistance, relative phase energy and the extracted structural-
6a)b)c)d)4̟r2[ρup - ρdown ] (Ne/Å)4̟r2[ρup - ρdown ] (Ne/Å)4̟r2[ρup - ρdown ] (Ne/Å)4̟r2[ρup - ρdown ] (Ne/Å)T-VSe2 (V)T-VSe2 (Se)H-VSe2 (V)H-VSe2 (Se)r (Å)r (Å)r (Å)r (Å)MV= 1.30 µBMV= 1.06(2) µBMV= 1.40 µBMV= 1.02(1) µBMSe= -0.12 µBMSe= -0.09(2) µBMSe= -0.15 µBMSe= -0.14(1) µBFIG. 5. The radially averaged spin density (ρup - ρdown) as a function of distance, calculated with DMC and PBE+U (U = 2 eV) of a) V andb) Se for 2D T-VSe2 and c) V and d) Se for 2D H-VSe2. The inset of a) and c) depicts the spin isosurface density of T-VSe2 and H-VSe2respectively, where the isosurface value was set to 6 x 10−3 e/Å3. The standard error about the mean for DMC is indicated by error bars inblue.dependent phase diagram assist in clarifying previously incon-clusive theoretical and experimental results regarding T and Hphase VSe2.II.CODE AVAILABILITY STATEMENTSoftware packages mentioned in the article can be found athttps://github.com/usnistgov/jarvis. Please note that the use ofcommercial software (VASP) does not imply recommendationby the National Institute of Standards and Technology.III.COMPETING INTERESTSThe authors declare no competing interests.IV.ACKNOWLEDGMENTSThe authors thank the National Institute of Standardsand Technology for funding,computational,and data-management resources.The authors thank Dr.KamalChoudhary and Dr.Francesca Tavazza for fruitful discus-sions.We acknowledge grants of computer capacity fromthe Finnish Grid and Cloud Infrastructure (persistent identi-fier urn:nbn:fi:research-infras-2016072533).REFERENCES1C. Ataca, H. ¸Sahin, and S. Ciraci, “Stable, single-layer MX2 transition-metal oxides and dichalcogenides in a honeycomb-like structure,” The Jour-nal of Physical Chemistry C 116, 8983–8999 (2012).2H.-R. Fuh, C.-R. Chang, Y.-K. Wang, R. F. L. Evans, R. W. Chantrell, andH.-T. Jeng, “Newtype single-layer magnetic semiconductor in transition-metal dichalcogenides vx2 (x = s, se and te),” Scientific Reports 6, 32625(2016).3X. Wang, D. Li, Z. Li, C. Wu, C.-M. Che, G. Chen, and X. Cui, “Ferromag-netism in 2d vanadium diselenide,” ACS Nano, ACS Nano 15, 16236–16241(2021).4M. Bonilla, S. Kolekar, Y. Ma, H. C. Diaz, V. Kalappattil, R. Das, T. Eggers,H. R. Gutierrez, M.-H. Phan, and M. Batzill, “Strong room-temperatureferromagnetism in VSe2 monolayers on van der Waals substrates,” NatureNanotechnology 13, 289–293 (2018).5W. Yu, J. Li, T. S. Herng, Z. Wang, X. Zhao, X. Chi, W. Fu, I. Abdelwahab,J. Zhou, J. Dan, Z. Chen, Z. Chen, Z. Li, J. Lu, S. J. Pennycook, Y. P.Feng, J. Ding,and K. P. Loh, “Chemically exfoliated vse2 monolayerswith room-temperature ferromagnetism,” Advanced Materials 31, 1903779(2019), https://onlinelibrary.wiley.com/doi/pdf/10.1002/adma.201903779.6G. Duvjir, B. K. Choi, I. Jang, S. Ulstrup, S. Kang, T. Thi Ly, S. Kim, Y. H.Choi, C. Jozwiak, A. Bostwick, E. Rotenberg, J.-G. Park, R. Sankar, K.-S.Kim, J. Kim, and Y. J. Chang, “Emergence of a metal–insulator transitionand high-temperature charge-density waves in vse2 at the monolayer limit,”Nano Letters, Nano Letters 18, 5432–5438 (2018).
77D. W. Boukhvalov and A. Politano, “Unveiling the origin of room-temperature ferromagnetism in monolayer vse2: the role of extrinsic ef-fects,” Nanoscale 12, 20875–20882 (2020).8S. Sahoo, U. Dutta, L. Harnagea, A. K. Sood, and S. Karmakar, “Pressure-induced suppression of charge density wave and emergence of supercon-ductivity in 1t −vse2,” Phys. Rev. B 101, 014514 (2020).9J. Feng, D. Biswas, A. Rajan, M. D. Watson, F. Mazzola, O. J. Clark, K. Un-derwood, I. Markovi´c, M. McLaren, A. Hunter, D. M. Burn, L. B. Duffy,S. Barua, G. Balakrishnan, F. Bertran, P. Le Fèvre, T. K. Kim, G. van derLaan, T. Hesjedal, P. Wahl, and P. D. C. King, “Electronic structure andenhanced charge-density wave order of monolayer vse2,” Nano Letters 18,4493–4499 (2018).10P. Chen, W. W. Pai, Y.-H. Chan, V. Madhavan, M. Y. Chou, S.-K. Mo,A.-V. Fedorov, and T.-C. Chiang, “Unique gap structure and symmetry ofthe charge density wave in single-layer vse2,” Phys. Rev. Lett. 121, 196402(2018).11D. Li, X. Wang, C.-m. Kan, D. He, Z. Li, Q. Hao, H. Zhao, C. Wu, C. Jin,and X. Cui, “Structural phase transition of multilayer vse2,” ACS AppliedMaterials & Interfaces 12, 25143–25149 (2020).12G. V. Pushkarev, V. G. Mazurenko, V. V. Mazurenko,and D. W.Boukhvalov, “Structural phase transitions in vse2: energetics, electronicstructure and magnetism,” Phys. Chem. Chem. Phys. 21, 22647–22653(2019).13S. L. Dudarev, G. A. Botton, S. Y. Savrasov, C. J. Humphreys, and A. P.Sutton, “Electron-energy-loss spectra and the structural stability of nickeloxide: An LSDA+U study,” Phys. Rev. B 57, 1505–1509 (1998).14Z. I. Popov, N. S. Mikhaleva, M. A. Visotin, A. A. Kuzubov, S. Entani,H. Naramoto, S. Sakai, P. B. Sorokin, and P. V. Avramov, “The electronicstructure and spin states of 2d graphene/vx2 (x = s, se) heterostructures,”Phys. Chem. Chem. Phys. 18, 33047–33052 (2016).15W. M. C. Foulkes, L. Mitas, R. J. Needs, and G. Rajagopal, “QuantumMonte Carlo simulations of solids,” Rev. Mod. Phys. 73, 33–83 (2001).16K. Foyevtsova, J. T. Krogel, J. Kim, P. R. C. Kent, E. Dagotto, and F. A.Reboredo, “Ab initio Quantum Monte Carlo calculations of spin superex-change in cuprates: The benchmarking case of Ca2CuO3,” Phys. Rev. X 4,031003 (2014).17B. Busemeyer, M. Dagrada, S. Sorella, M. Casula,and L. K. Wagner,“Competing collinear magnetic structures in superconducting FeSe by first-principles quantum Monte Carlo calculations,” Phys. Rev. B 94, 035108(2016).18D. Wines, K. Saritas, and C. Ataca, “A first-principles Quantum MonteCarlo study of two-dimensional (2D) GaSe,” The Journal of ChemicalPhysics 153, 154704 (2020).19D. Wines, K. Saritas, and C. Ataca, “A pathway toward high-throughputquantum Monte Carlo simulations for alloys:A case study of two-dimensional (2d) GaSxSe1−x,” The Journal of Chemical Physics 155,194112 (2021).20D. Wines, K. Saritas,and C. Ataca, “Intrinsic ferromagnetism of two-dimensional (2d) mno2 revisited: A many-body quantum monte carlo anddft+u study,” The Journal of Physical Chemistry C 126, 5813–5821 (2022).21D. Wines, K. Choudhary, and F. Tavazza, “A systematic dft+u and quantummonte carlo benchmark of magnetic two-dimensional (2d) crx3 (x = i, br,cl, f),” (2022).22J. Tiihonen,P. R. C. Kent,and J. T. Krogel, “Surrogate hes-sian accelerated structural optimization for stochastic electronic struc-ture theories,” The Journal of Chemical Physics 156, 054104 (2022),https://doi.org/10.1063/5.0079046.23H. Shin, J. T. Krogel, K. Gasperich, P. R. C. Kent, A. Benali,andO. Heinonen, “Optimized structure and electronic band gap of mono-layer GeSe from Quantum Monte Carlo methods,” Phys. Rev. Materials5, 024002 (2021).24D. Staros, G. Hu, J. Tiihonen, R. Nanguneri, J. Krogel, M. C. Bennett,O. Heinonen, P. Ganesh, and B. Rubenstein, “A combined first principlesstudy of the structural, magnetic, and phonon properties of monolayer cri3,”The Journal of Chemical Physics, The Journal of Chemical Physics 156,014707 (2021).25P. Hohenberg and W. Kohn, “Inhomogeneous electron gas,” Phys. Rev. 136,B864–B871 (1964).26J. P. Perdew, K. Burke, and M. Ernzerhof, “Generalized gradient approxi-mation made simple,” Phys. Rev. Lett. 77, 3865–3868 (1996).27J. Sun, A. Ruzsinszky, and J. P. Perdew, “Strongly constrained and appro-priately normed semilocal density functional,” Phys. Rev. Lett. 115, 036402(2015).28S. Grimme, “Semiempirical GGA-type density functional constructed witha long-range dispersion correction,” Journal of Computational Chemistry27, 1787–1799 (2006).29S. Grimme,S. Ehrlich,and L. Goerigk, “Effect of the damp-ingfunctionindispersioncorrecteddensityfunctionaltheory,”JournalofComputationalChemistry32,1456–1465(2011),https://onlinelibrary.wiley.com/doi/pdf/10.1002/jcc.21759.30H. Peng, Z.-H. Yang, J. P. Perdew, and J. Sun, “Versatile van der Waalsdensity functional based on a meta-generalized gradient approximation,”Phys. Rev. X 6, 041005 (2016).31Y. Kwon, D. M. Ceperley, and R. M. Martin, “Effects of three-body andbackflow correlations in the two-dimensional electron gas,” Phys. Rev. B48, 12037–12046 (1993).32Y. Kwon, D. M. Ceperley, and R. M. Martin, “Effects of backflow corre-lation in the three-dimensional electron gas: Quantum monte carlo study,”Phys. Rev. B 58, 6800–6806 (1998).33P. López Ríos, A. Ma, N. D. Drummond, M. D. Towler, and R. J. Needs,“Inhomogeneous backflow transformations in quantum monte carlo calcu-lations,” Phys. Rev. E 74, 066701 (2006).34M. Bajdich, M. L. Tiago, R. Q. Hood, P. R. C. Kent, and F. A. Reboredo,“Systematic reduction of sign errors in many-body calculations of atomsand molecules,” Phys. Rev. Lett. 104, 193001 (2010).35T. Ichibha, A. L. Dzubak, J. T. Krogel, V. R. Cooper, and F. A. Reboredo,“cri3 revisited with a many-body ab initio theoretical approach,” Phys. Rev.Materials 5, 064006 (2021).36K. Saritas, J. T. Krogel, S. Okamoto, H. N. Lee, and F. A. Reboredo, “Struc-tural, electronic, and magnetic properties of bulk and epitaxial LaCoO3through Diffusion Monte Carlo,” Phys. Rev. Materials 3, 124414 (2019).37K. Saritas, J. T. Krogel, P. R. C. Kent, and F. A. Reboredo, “Diffusionmonte carlo: A pathway towards an accurate theoretical description of man-ganese oxides,” Phys. Rev. Materials 2, 085801 (2018).38G. Chen, S. T. Howard, A. B. Maghirang, K. Nguyen Cong, R. A. B.Villaos, L.-Y. Feng, K. Cai, S. C. Ganguli, W. Swiech, E. Morosan, I. I.Oleynik, F.-C. Chuang, H. Lin, and V. Madhavan, “Correlating structural,electronic, and magnetic properties of epitaxial Vse2 thin films,” Phys. Rev.B 102, 115149 (2020).39Z.-L. Liu, X. Wu, Y. Shao, J. Qi, Y. Cao, L. Huang, C. Liu, J.-O. Wang,Q. Zheng, Z.-L. Zhu, K. Ibrahim, Y.-L. Wang, and H.-J. Gao, “Epitaxiallygrown monolayer vse2: an air-stable magnetic two-dimensional materialwith low work function at edges,” Science Bulletin 63, 419–425 (2018).40A. Karn, Y. H. Chan, U. Chazarin, P. Chen, and W. W. Pai, “Modificationof monolayer 1t-vse2 by selective deposition of vanadium and tellurium,”AIP Advances 12, 035240 (2022), https://doi.org/10.1063/6.0001402.41D. Song, Y. Zhou, M. Zhang, X. He, and X. Li, “Structural and transportproperties of 1t-vse2 single crystal under high pressures,” Frontiers in Ma-terials 8 (2021), 10.3389/fmats.2021.710849.
Supporting Information: A Quantum MonteCarlo study of the structural, energetic, andmagnetic properties of two-dimensional (2D) Hand T phase VSe2Daniel Wines,∗,† Juha Tiihonen,‡ Kayahan Saritas,¶ Jaron Krogel,§ and CanAtaca∗,∥†Materials Science and Engineering Division, National Institute of Standards andTechnology (NIST), Gaithersburg, MD 20899‡Department of Physics, Nanoscience Center, University of Jyv¨askyl¨a, P.O. Box 35,Finland¶ Department of Applied Physics, Yale University, New Haven CT 06520§ Material Science and Technology Division, Oak Ridge National Laboratory, Oak Ridge,Tennessee 37831∥Department of Physics, University of Maryland Baltimore County, Baltimore MD 21250E-mail: daniel.wines@nist.gov; ataca@umbc.eduComputational MethodsDensity functional theory (DFT) benchmarks for the T and H phase of 2D VSe2 were per-formed using the Vienna Ab initio Simulation Package (VASP) code with projector aug-mented wave (PAW) pseudopotentials.1,2 For these calculations, the local density approxi-S1arXiv:2301.11404v1 [cond-mat.str-el] 26 Jan 2023
mation (LDA),3 Perdew-Burke-Ernzerhof (PBE),4 and strongly constrained and appropri-ately normed (SCAN)5 meta-GGA functionals were used with the added Hubbard correction(U)6 to treat the on-site Coulomb interaction of the 3d orbitals of the V atoms. At least 20˚A of vacuum was given between periodic layers of VSe2 in the c-direction. In addition, weused a reciprocal grid of 24x24x1 and a kinetic energy cutoff of 400 eV.Our Quantum Monte Carlo (QMC) simulations used DFT-PBE to generate the trialwavefunction for fixed-node diffusion Monte Carlo (DMC) calculations.The QuantumEspresso (QE)7 code was used for our DFT calculations to create the trial wavefunction.This trial wavefunction was created for the ferromagnetic configuration of 2D VSe2 usingdifferent U values with the goal of variationally determining the optimal nodal surface (Uvalue that yields the lowest total energy). For V, we used norm-conserving (NC) RRKJ(OPT) pseudopotentials8 and for Se, we used NC Burkatzki-Fillipi-Dolg (BFD) pseudopo-tentials.9 After testing at the DFT level, a kinetic energy cutoff of 4,080 eV (300 Ry) anda k-grid of 6x6x1 was used (see Fig. S1 and S2) to generate trial wavefunctions for DMC.To accelerate the line-search method convergence for the metallic T phase, we increased thek-grid to 12x12x1.After the trial wavefunction was generated with DFT, Variational Monte Carlo (VMC)and DMC10,11 calculations were performed using the QMCPACK12,13 code. The single de-terminant DFT wavefunction is converted into a many-body wavefunction by use of the Jas-trow parameters,14,15 which assist in modeling electron correlation with the goal of reducingthe statistical uncertainty in DMC calculations.16,17 Up to two-body Jastrow18 correlationfunctions were included, where the linear method19 was used to minimize the variance andenergy of the VMC energies. The cost function of the variance optimization is 100 % vari-ance minimization and the cost function of the energy optimization is split as 95 % energyminimization and 5 % variance minimization, which has been proven to reduce the uncer-tainty of DMC calculated results.16 The Nexus20 software suite was used to automate theDFT-VMC-DMC workflow. The locality approximation17 was used to evaluate the nonlocalS2
part of the pseudopotentials in DMC and an optimal timestep of 0.01 Ha−1 was determinedfor DMC simulations due to the fact that it yielded an acceptance ratio greater than 99 %(see Table S1). A full summary of the VMC and DMC methods can be found in reference.10The total charge density and spin density was extracted from our DMC calculations.The spin density is defined as the difference between the spin-up contribution to the totalcharge density and the spin-down contribution to the total charge density (ρup − ρdown). Weused an extrapolation scheme on the DMC charge densities with the goal of eliminating thebias that occurs from using a mixed estimator. Since the charge density estimator does notcommute with the fixed-node Hamiltonian, the DMC charge density was obtained from amixed estimator between the pure fixed-node DMC and VMC densities. The extrapolationformula takes the form:10ρ1 = 2ρDMC − ρVMC + O[(Φ − ΨT)2](1)where ρDMC and ρVMC are the DMC and VMC charge densities respectively. Φ is the trialwavefunction from the DMC Hamiltonian and ΨT is the trial wavefunction from VMC.In addition, we integrated the DFT+U and DMC spin densities up to a cutoff radiusrcut (which we define as 1.34 ˚A , due to the fact that it is approximately half of the V-Sebond distance in 2D T and H-VSe2) in order to estimate the site-averaged atomic magneticmoment per V and Se. To obtain these magnetic moments per atom (MA), we sum over thespherically interpolated spin densities:MA = 4π� rcut0r2ρs(r)dr ≈ 4πrcut/∆r�i=0r2i ρs(ri)∆r(2)where ri is the distance from the center of the atom to a given point on the grid and ∆r isthe radial grid size.To optimize the structural parameters of both T and H-VSe2 according to the DMC po-tential energy surface (PES), we use a surrogate Hessian accelerated optimization method.21S3
In the method, we consider the PES around equilibrium as the second-order expansion inWyckoff parameter space, p:E(p) = E0 + 12(p − p0)THp(p − p0),(3)where Hp is the Hessian, or the force-constant matrix, E0 is the energy minimum and p0the energy-minimizing parameters. Diagonalizing the parameter Hessian, i.e., Hp = U TΛU,forms an optimal basis for a conjugate line-search in the parameter space, namely the eigen-vectors U. The line-searches along U can be conducted in parallel, and ideally, they locatethe minimum in just one parallel iteration within the quadratic region. Here, we conductthe line-search according to a set of 2 parameters: the lattice constant a and the Wyckoffparameter z, which is the unsigned displacement of the Se atoms along the z axis (see Fig.1). For reporting purposes, the line-search parameters a and z are remapped to a and d,where d is the V-Se distance.In the surrogate Hessian scheme, we obtain a cheap but relatively accurate Hessian fromDFT, and use it to the inform line-search on the DMC PES, in particular by providing thesearch directions. We also resample the DFT PES to predict fitting errors. Thus, we mayminimize the computational cost of the DMC runs, while maintaining an error tolerance.The surrogate DFT PES was based on QE with a 4,080 eV (300 Ry) cutoff using PBE withno DFT+U correction. The DMC PES was based on DFT-PBE with U = 2 eV orbitalsand finite-size extrapolation through supercell sizes of 9 and 24 atoms. Each line-search wasbased on a 3rd order polynomial fit and set to contain 7 points, or displaced geometries,totaling 13 energy evaluations per phase, per iteration. However, alternative techniques,including (bi)polynomial fitting, were used in some parts to incorporate auxiliary DMCdata and ensure convergence to the quadratic region. Effectively, two parallel line-searchiterations for both phases were carried out, and the convergence was claimed in the absenceof significant displacements.S4
a)b)Figure S1: The total energy per atom of the unit cell (3 atoms) of 2D a) T-VSe2 and b)H-VSe2 as a function of plane wave cutoff energy for the norm-conserving pseudopotentialscalculated with DFT using the PBE functional at a k-point grid of 6x6x1. The results showa converged cutoff energy of 4,080 eV (300 Ry) for both phases.a)b)Figure S2: The total energy per atom of the unit cell (3 atoms) of 2D a) T-VSe2 and b)H-VSe2 as a function of K-point grid for the norm-conserving pseudopotentials calculatedwith DFT (PBE) at the converged cutoff energy (see Fig. S1). The results show a convergedk-point grid of 6x6x1 (36) for both monolayers. The number of K-points was scaled appro-priately to obtain the converged grid depending on the supercell size and shape for all DFTand DMC calculations.S5
PBE (U = 0)PBE (U = 2)SCAN (U = 0)SCAN (U = 2)3.153.253.353.453.553.153.253.353.453.553.153.253.353.453.553.153.253.353.453.55-18.04-18.00-17.96-17.92-17.88-17.84-16.00-15.95-15.90-15.85-15.80-15.65-15.75-15.70-59.90-59.85-59.80-59.75-58.70-59.65-58.10-58.00-57.90-57.80-57.70-57.60Total Energy (eV)Total Energy (eV)Total Energy (eV)Total Energy (eV)Lattice Constant (Å)Lattice Constant (Å)Lattice Constant (Å)Lattice Constant (Å)3.053.153.253.35-18.04-18.00-17.90-17.80Total Energy (eV)Lattice Constant (Å)LDA (U = 0)3.053.153.253.35Lattice Constant (Å)LDA (U = 2)-20.30-20.20-20.15-20.10Total Energy (eV)-20.25-20.05THFigure S3: Total energy as a function of lattice strain for T (blue) and H (red) phase 2DVSe2, calculated with various functionals and U values. Density functionals include LDA,PBE, and SCAN.S6
Table S1: Tabulated results for the DMC timestep convergence of a 12 atom cell of 2DT-VSe2 and H-VSe2. The acceptance ratio of 0.99 indicates that 0.01 Ha−1 is an appropriatetimestep to use for all subsequent DMC simulations.T-VSe2Timestep (Ha−1)DMC Total Energy (Ha)Error (Ha)Acceptance Ratio0.02-361.7300.0010.9850.01-361.7090.0020.9940.005-361.7090.0030.9970.002-361.7020.0020.999H-VSe2Timestep (Ha−1)DMC Total Energy (Ha)Error (Ha)Acceptance Ratio0.02-361.6730.0010.9850.01-361.6570.0020.9940.005-361.6540.0020.9980.002-361.6570.0030.9991234U (eV)-2460.30-2460.25-2460.20-2460.15-2460.10-2460.05-2460.00-2459.95Total Energy (eV/f.u.)THFigure S4: DMC calculated total energies of a 24-atom supercell (normalized per formulaunit (f.u.))of 2D T (blue) and H (red) phase VSe2 calculated as a function of the Uparameter used to variationally determine the optimal trial wave function. The DMC errorbars represent the standard error about the mean.S7
1.01.52.02.53.0−0.02−0.010.000.01a (˚A )1.01.52.02.53.0−0.010−0.0050.0000.0050.010z (˚A )123Iteration-2459.55-2459.6-2459.65-2459.7E/f.u. (eV )THFigure S5: The convergence of the a and z parameters and DMC energies per f.u. for bothT (blue) and H (red) phase of 2D VSe2 based on parallel line-search iterations along theDMC PES. The starting parameters (iteration 1) are from DFT, the zero offset is the meanover iterations 2 and 3, and dotted lines indicate the error tolerances for each case (95 %confidence). The DMC energies from respective equilibrium geometries are plotted with1SEM (one standard error of the mean) uncertainties, with extra squares marking energiesfrom the predicted minimum geometry.S8
3.003.253.503.754.00Lattice constant (˚A )1.01.21.41.61.82.0Z-offset (˚A )LS eqm .Fit eqm .LS # 0LS # 13.003.253.503.754.00Lattice constant (˚A )0.000.020.040.060.080.10Figure S6: Contour reconstructions of the DMC PESs (eV) of T (left) and H (right) phases of2D VSe2 with respect to a and z parameters. The contours are based on bicubic fits to sparsedata, and thus, subject to biases and statistical uncertainties not indicated in the figures.The markers (’x’ and ’+’) indicate data points from two parallel line-search iterations.References(1) Kresse, G.; Furthm¨uller, J. Efficient iterative schemes for ab initio total-energy calcu-lations using a plane-wave basis set. Phys. Rev. B 1996, 54, 11169–11186.(2) Kresse, G.; Joubert, D. From ultrasoft pseudopotentials to the projector augmented-wave method. Phys. Rev. B 1999, 59, 1758–1775.(3) Hohenberg, P.; Kohn, W. Inhomogeneous Electron Gas. Phys. Rev. 1964, 136, B864–B871.(4) Perdew, J. P.; Burke, K.; Ernzerhof, M. Generalized Gradient Approximation MadeSimple. Phys. Rev. Lett. 1996, 77, 3865–3868.(5) Sun, J.; Ruzsinszky, A.; Perdew, J. P. Strongly Constrained and Appropriately NormedSemilocal Density Functional. Phys. Rev. Lett. 2015, 115, 036402.(6) Dudarev, S. L.; Botton, G. A.; Savrasov, S. Y.; Humphreys, C. J.; Sutton, A. P.S9
Electron-energy-loss spectra and the structural stability of nickel oxide: An LSDA+Ustudy. Phys. Rev. B 1998, 57, 1505–1509.(7) Giannozzi, P. et al. QUANTUM ESPRESSO: a modular and open-source softwareproject for quantum simulations of materials. Journal of Physics: Condensed Matter2009, 21, 395502.(8) Krogel, J. T.; Santana, J. A.; Reboredo, F. A. Pseudopotentials for quantum MonteCarlo studies of transition metal oxides. Phys. Rev. B 2016, 93, 075143.(9) Burkatzki, M.; Filippi, C.; Dolg, M. Energy-consistent pseudopotentials for QuantumMonte Carlo calculations. The Journal of Chemical Physics 2007, 126, 234105.(10) Foulkes, W. M. C.; Mitas, L.; Needs, R. J.; Rajagopal, G. Quantum Monte Carlosimulations of solids. Rev. Mod. Phys. 2001, 73, 33–83.(11) Needs, R. J.; Towler, M. D.; Drummond, N. D.; R´ıos, P. L. Continuum Variational andDiffusion Quantum Monte Carlo calculations. Journal of Physics: Condensed Matter2009, 22, 023201.(12) Kim, J. et al. QMCPACK: an open source ab initio quantum Monte Carlo package forthe electronic structure of atoms, molecules and solids. Journal of Physics: CondensedMatter 2018, 30, 195901.(13) Kent, P. R. C. et al. QMCPACK: Advances in the development, efficiency, and applica-tion of auxiliary field and real-space Variational and Diffusion Quantum Monte Carlo.The Journal of Chemical Physics 2020, 152, 174105.(14) Slater, J. C. The Theory of Complex Spectra. Phys. Rev. 1929, 34, 1293–1322.(15) Jastrow, R. Many-Body Problem with Strong Forces. Phys. Rev. 1955, 98, 1479–1484.(16) Umrigar, C. J.; Filippi, C. Energy and Variance Optimization of Many-Body WaveFunctions. Phys. Rev. Lett. 2005, 94, 150201.S10
(17) Mitas, L.; Shirley, E. L.; Ceperley, D. M. Nonlocal pseudopotentials and DiffusionMonte Carlo. The Journal of Chemical Physics 1991, 95, 3467–3475.(18) Drummond, N. D.; Towler, M. D.; Needs, R. J. Jastrow correlation factor for atoms,molecules, and solids. Phys. Rev. B 2004, 70, 235119.(19) Umrigar, C. J.; Toulouse, J.; Filippi, C.; Sorella, S.; Hennig, R. G. Alleviation of theFermion-Sign Problem by Optimization of Many-Body Wave Functions. Phys. Rev.Lett. 2007, 98, 110201.(20) Krogel, J. T. Nexus: A modular workflow management system for quantum simulationcodes. Computer Physics Communications 2016, 198, 154 – 168.(21) Tiihonen, J.; Kent, P. R. C.; Krogel, J. T. Surrogate Hessian accelerated structural op-timization for stochastic electronic structure theories. The Journal of Chemical Physics2022, 156, 054104.S11
123version https://git-lfs.github.com/spec/v1oid sha256:21ba3ea900e55c140223fefc32418adfc43e6b4c79787398b90fcb69a3b0d4a3size 272164123version https://git-lfs.github.com/spec/v1oid sha256:d984db5efd8099db3d817fde91c01f370290a104be25fd20c20d85af2f7ca792size 308642632 unmodified lines2633263426352632 unmodified lines3dE4T4oBgHgl3EQfbAyT/content/2301.05069v1.pdf filter=lfs diff=lfs merge=lfs -textn9E5T4oBgHgl3EQfjw-t/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textM9E4T4oBgHgl3EQf9A55/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text2632 unmodified lines26332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902632 unmodified lines3dE4T4oBgHgl3EQfbAyT/content/2301.05069v1.pdf filter=lfs diff=lfs merge=lfs -textn9E5T4oBgHgl3EQfjw-t/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textM9E4T4oBgHgl3EQf9A55/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text8dAzT4oBgHgl3EQfSPuZ/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text2NAzT4oBgHgl3EQfuP1K/content/2301.01687v1.pdf filter=lfs diff=lfs merge=lfs -textztE0T4oBgHgl3EQftwFw/content/2301.02596v1.pdf filter=lfs diff=lfs merge=lfs -textvNAzT4oBgHgl3EQfdPyu/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textS9AzT4oBgHgl3EQfJfsf/content/2301.01079v1.pdf filter=lfs diff=lfs merge=lfs -textxtFIT4oBgHgl3EQf0StA/content/2301.11368v1.pdf filter=lfs diff=lfs merge=lfs -textitAzT4oBgHgl3EQfpP1U/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textXtE3T4oBgHgl3EQfcAoE/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textrtE0T4oBgHgl3EQfawAZ/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textOdFIT4oBgHgl3EQfeCsB/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textXtE3T4oBgHgl3EQfcAoE/content/2301.04520v1.pdf filter=lfs diff=lfs merge=lfs -text2NE4T4oBgHgl3EQfzw00/content/2301.05276v1.pdf filter=lfs diff=lfs merge=lfs -text39AyT4oBgHgl3EQfcPct/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text3dE4T4oBgHgl3EQfbAyT/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text8dAzT4oBgHgl3EQfSPuZ/content/2301.01230v1.pdf filter=lfs diff=lfs merge=lfs -textYNFOT4oBgHgl3EQf9jQ2/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text79AzT4oBgHgl3EQfE_pK/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text69FJT4oBgHgl3EQfmCy-/content/2301.11586v1.pdf filter=lfs diff=lfs merge=lfs -textItAzT4oBgHgl3EQfVPwp/content/2301.01279v1.pdf filter=lfs diff=lfs merge=lfs -textOdFIT4oBgHgl3EQfeCsB/content/2301.11272v1.pdf filter=lfs diff=lfs merge=lfs -textkNE3T4oBgHgl3EQfJglg/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textxtFIT4oBgHgl3EQf0StA/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textmdE1T4oBgHgl3EQfhATk/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -texti9E4T4oBgHgl3EQfSwzD/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text79AzT4oBgHgl3EQfE_pK/content/2301.01002v1.pdf filter=lfs diff=lfs merge=lfs -textFdFKT4oBgHgl3EQfay5f/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text_9AzT4oBgHgl3EQfFvrv/content/2301.01018v1.pdf filter=lfs diff=lfs merge=lfs -text8NE4T4oBgHgl3EQf2w06/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textstE3T4oBgHgl3EQf9Quo/content/2301.04815v1.pdf filter=lfs diff=lfs merge=lfs -text_9AzT4oBgHgl3EQfFvrv/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text69E3T4oBgHgl3EQfRQm6/content/2301.04420v1.pdf filter=lfs diff=lfs merge=lfs -textXtE1T4oBgHgl3EQfcAQQ/content/2301.03178v1.pdf filter=lfs diff=lfs merge=lfs -textZNAzT4oBgHgl3EQf2P6Y/content/2301.01812v1.pdf filter=lfs diff=lfs merge=lfs -text69FJT4oBgHgl3EQfmCy-/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text39E1T4oBgHgl3EQf6AV3/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textHdE5T4oBgHgl3EQfWQ_B/content/2301.05558v1.pdf filter=lfs diff=lfs merge=lfs -text-9E4T4oBgHgl3EQfEAsg/content/2301.04873v1.pdf filter=lfs diff=lfs merge=lfs -textHdE5T4oBgHgl3EQfWQ_B/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text39E1T4oBgHgl3EQf6AV3/content/2301.03518v1.pdf filter=lfs diff=lfs merge=lfs -textKNAyT4oBgHgl3EQf6Ppp/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textQ9FPT4oBgHgl3EQfpTVX/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textJtE3T4oBgHgl3EQfXgpN/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textZNAzT4oBgHgl3EQf2P6Y/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text69E3T4oBgHgl3EQfRQm6/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -texteNA0T4oBgHgl3EQfHP9d/content/2301.02058v1.pdf filter=lfs diff=lfs merge=lfs -textvdAyT4oBgHgl3EQfafdn/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textFdFKT4oBgHgl3EQfay5f/content/2301.11809v1.pdf filter=lfs diff=lfs merge=lfs -textu9AyT4oBgHgl3EQfafcR/content/2301.00241v1.pdf filter=lfs diff=lfs merge=lfs -textQ9FPT4oBgHgl3EQfpTVX/content/2301.13137v1.pdf filter=lfs diff=lfs merge=lfs -text-tFAT4oBgHgl3EQfqR1A/content/2301.08646v1.pdf filter=lfs diff=lfs merge=lfs -textItAzT4oBgHgl3EQfVPwp/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -text-9E4T4oBgHgl3EQfEAsg/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textXtE2T4oBgHgl3EQfYgfk/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -texteNA0T4oBgHgl3EQfHP9d/vector_store/index.faiss filter=lfs diff=lfs merge=lfs -textG9A0T4oBgHgl3EQfBv-A/content/2301.01980v1.pdf filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894AI based approach to Trailer Generation for OnlineEducational Courses1st Prakhar MishraIIITBangalore, Indiaprakhar.mishra@iiitb.ac.in2nd Chaitali DiwanIIITBangalore, Indiachaitali.diwan@iiitb.ac.in3rd Srinath SrinivasaIIITBangalore, Indiasri@iiitb.ac.in4th G. SrinivasaraghavanIIITBangalore, Indiagsr@iiitb.ac.inAbstract—In this paper, we propose an AI based approachto Trailer Generation in the form of short videos for onlineeducational courses. Trailers give an overview of the course tothe learners and help them make an informed choice about thecourses they want to learn. It also helps to generate curiosityand interest among the learners and encourages them to pursuea course. While it is possible to manually generate the trailers, itrequires extensive human efforts and skills over a broad spectrumof design, span selection, video editing, domain knowledge, etc.,thus making it time-consuming and expensive, especially in anacademic setting. The framework we propose in this work is atemplate based method for video trailer generation, where most ofthe textual content of the trailer is auto-generated and the trailervideo is automatically generated, by leveraging Machine Learningand Natural Language Processing techniques. The proposedtrailer is in the form of a timeline consisting of various frag-ments created by selecting, para-phrasing or generating contentusing various proposed techniques. The fragments are furtherenhanced by adding voice-over text, subtitles, animations, etc., tocreate a holistic experience. Finally, we perform user evaluationwith 63 human evaluators for evaluating the trailers generatedby our system and the results obtained were encouraging.Index Terms—Video Trailer Generation, Machine Learning,Natural Language ProcessingI. INTRODUCTIONThe growth of the internet has significantly increased theamount of free instructional content. These resources areoffered not only by big institutions but also by individualcontent creators over various platforms such as Coursera,Udemy, YouTube, etc. This increase in content production ratehas resulted in the creation of redundant courses and tutoringvideos for many topics over time. In spite of advantageslike on-demand accessibility, the abundance of options hasincreased confusion and made it more challenging to selecta course that might be in line with learner’s interests. Andoften, enrolling to a course that doesn’t meet the learner’sexpectations for a course’s curriculum and other aspects suchas expected level of commitment, the availability of support,etc., causes the learner to lose motivation and eventually dropthe course. [1], [2].This problem can be tackled to a certain extent by presentinga video trailer to the learners before the start of the course(learning pathway) to help them quickly glance through thepathway and get an overall idea of the course content and itsformat [3]–[5].The idea of Trailers is not brand-new, and the film industryhas been using them extensively for a while. Trailers, incontext of movies are mostly about advertising. They notifyviewers about an upcoming movie while generating interestamong them. Often the effectiveness of a trailer affects theperception of the movie, even before it is released publicly.The course trailers serve a greater purpose in the educationalcontext than simple course promotion. Before beginning thelearning journey, they aid in helping learners set realisticexpectations for their learning outcomes and competencymastery.Concept of trailers might resemble with that of summariza-tion [6]–[8], but apart from incorporating a few elements ofsummarization like shortening and abstracting out informationfrom substantial sized input source, trailers are different interms of their motivation, purpose and the impact they cre-ate on the end users. Unlike summaries, trailers need notbe complete in their coverage. Also, they are designed togive glimpses of a few interesting segments of the narrativewithout revealing the main plot or climax of the underlyingnarrative [9]. Although there is no clear demarcation of whata climax is in academic narratives, based on our analysis ofmany academic course trailers in popular MOOCs (MassiveOpen Online Courses) such as Udemy1 and Coursera2, wesee prevalence of a common pattern in trailer timelines. Thetimeline starts with an introduction about the course and theinstructor and ends with a call-to-action (CTA) which offersopportunity to the learners to take action or start the course.In between, there are several elements and factoids about thecourse and its contents, that aim to arouse viewer interest.The current approach of generating trailers is manual,cumbersome and time-consuming, it requires someone withrelevant skills like designing, video editing, and a subjectmatter expert to help in curating the trailer content. Although,there are software products like Apple iMovie3, WindowsMovie Maker4 and others that people can use for generatingtrailers by performing basic editing like cuts, merging frames,1https://www.udemy.com2https://www.coursera.org3https://www.apple.com/in/imovie4https://www.microsoft.com/en-us/p/movie-maker-video-editor/9mvfq4lmz6c9arXiv:2301.03957v1 [cs.CL] 10 Jan 2023
Fig. 1. Trailer Structureetc. Yet the content to be placed in the trailer has to be curatedentirely by a human expert.In our work, we propose a semi-automatic template basedframework for generating video trailers for learning pathways,which are a sequence of related educational documents ofvarious forms [10]–[12]. Here, most of the content that isplaced in the trailer is auto-generated with a scope for takinginputs from the creator. The framework for trailer generationconsists of various essential trailer fragments arranged asa timeline of the trailer. Each fragment is composed of asequence of frames that are coherent within themselves interms of the topical information they present. And inherently,each frame is composed of various types of elements and theirproperties like font size, text styling, image size, etc. Fig. 1shows the illustration for the same.Once all the elements are generated and placed at theirrespective positions within a frame of a trailer fragment,a template is applied to it. The template consists of themulti-modal experiences such as voice-over, subtitles, sounds,animations, etc. It also determines the elements of the trailerdesign such as number and ordering of fragments, frames andelements. Fig. 2 shows the visual view of some of the framesfor one of the templates with it’s corresponding elements andtheir positioning in the frames.II. RELATED WORKThere are studies that discuss the idea, use and motivationof having trailers for academic courses [3]–[5]. Also, there areonline educational platforms like Coursera and Udemy whichhave course trailers. However, we could not find literature onapproaches to generating trailers for academic courses. Hence,in the following paragraphs we discuss some of the pioneeringworks of trailer generation in-general across other domains.Trailer generation can also be seen as special case of largerresearch interest of adding an element of surprise to the engagereceiver’s attention in midst of information overload [13], [14].Authors in [15]–[18] present an approach for automatictrailer generation from movies as input. Hermes et al. [16]create trailers for action movies by analyzing audio andvideo signals present in movies and automatically detectingfeatures like faces, scene cuts, sound-volume, etc and useontology of the corresponding domain for producing trailers.Irie et al. [17] propose a movie trailer generation methodwhich extracts symbols like title logo, main theme music andselects impressive shot or speech segments based on clusteringmethods and EM algorithm. Brachmann et al. [15] propose anapproach of generating action movie trailers using the conceptof trailer grammar, knowledge base and various ML techniquesfor analyzing audio and images present in the movie. Smithet al. [18] propose a system that understands and encodesthe patterns and emotions present in horror movies usingConvolution Neural Networks(CNN).All the above methods use visual and audio cues to derivethe trailer frames, whereas we use raw text data and buildthe necessary discriminative and generative Neural Networkmodels to create frames and its elements to be placed in thetrailer.Hesham et al. in [19] explore the idea of creating movietrailers from their subtitles. They first classify the movie bygenre, identify important keywords and then rank importantsubtitles. The trailer is then generated by stacking the movietime-frames corresponding to the important subtitles. Gaikwadet al. in [20] propose a technique to create previews of moviesby utilizing subtitles and finding the most representative scenesby matching them with the plot summaries. Chi et al. [21]propose an approach to automatically create marketing-styleshort videos for a given product page url by extractingelements and their styles present in the product html pageunder specified tags.Unlike the aforementioned works which primarily focuson generating trailers based on an extractive strategies, inour work we develop various modules that comprehend in-put document and generate content for the trailer either byparaphrasing or by using Natural Language Generator basedmodel.As far as we know, automatic/semi-automatic generationof video trailers for learning pathways is unexplored. Ourproposed approach of video trailer generation using MachineLearning, Natural Language Processing and Generation tech-niques is also unique.III. PROPOSED SYSTEMWe propose a framework for trailer generation consisting ofdifferent trailer fragments that form a trailer timeline, genera-tion of the trailer fragments and finally applying templates thatdetermine the look and feel of the trailer. Based on our analysisof multiple trailers presented for various online courses offeredon various educational platforms like Coursera and Udemy, wedesigned and structured our trailer elements, fragments andoverall flow of the trailer.We propose a trailer timeline consisting of 7 trailer frag-ments namely, Splash, Trailer Title, Author Details, Outline,Meta-Information, Social Proof and finally the Call-to-Action.Figure 3 shows the timeline of all the above-mentioned frag-ments in the trailer. Each of these fragments define a specificpart of the trailer, their purpose and their importance in thetrailer. We define the fragments in detail in further part ofthis section. As discussed earlier, fragments are composed of
Trailer Fragment 1Fragment 2Fragment t Frame? 1Frame? 2Frame?2 fElement 1 Element 1Element eFig. 2. Illustration of FramesFig. 3. Trailer Timelinea sequence of frames and each frame is composed of varioustypes of elements and their properties.The overall approach for trailer generation is illustrated inFig. 4. All the resources mapped to a learning pathway formthe input to our Fragment Data Generator (FDG) module.Template constraints that define the elements, fragments andframes also form the input to FDG. The FDG along with othersources like creator’s input, any images or information fromthe web or knowledge bases, etc., can be incorporated intothe frames or the fragments. Once the elements for all theframes across all the fragments are generated, we pass it tothe composition module for adding in other important aspectsof the trailer like voice-over, subtitles, sounds, etc., to add toits multi-modal experience.A. Fragment Data GenerationFollowing are the proposed trailer fragments arranged in theorder of their appearance in the trailer timeline-Splash Fragment: The idea of splash fragment is todisplay any introductory information related to the trailer suchas credits, software logo, etc., mostly obtained from creator’sinput. This optional fragment could also be the last fragmentin the trailer depending on the creator’s preference.Trailer Title Fragment: In this fragment we generate ashort yet representative title for the entire trailer, hence givinga quick idea about the topic that summarizes the underlyingpathway or the set of resources. We apply Hierarchical TitleGeneration model [22] over the resources mapped to thelearning pathway to get the list of trailer titles. We select a titleamong them based on their Term Frequency. In case, none ofthe titles are above a threshold, we fall back on the fact that thefirst resource in the pathway is the proxy to the introductoryresource, and we generate the trailer title for it by applyingSingle Document Title Generator [23], [24]. Figure 5 showsthe trailer title fragment generation flow.Author Details Fragment: A quick introduction aboutthe author or the instructor of the learning pathway couldhelp the learners build an implicit connect and trust. Majorityof the elements in the Author Details Fragment like authornames, affiliations and author’s image are expected from thecreator while creating the trailer. Template constraints suchas addressing multiple authors with different frame elements,handling and getting relevant images to be put in this fragmentetc are also obtained from trailer creator. These inputs andtemplate constraints are plugged in the automation systemto fill the overall author frame. Additionally, we crawl theweb to get relevant images, for example: we crawl the weband get relevant affiliation images and place it in the desiredcoordinates as defined by the template. Also for the templatesthat allow for having only the frontal face of author, we makeuse of an open-sourced face recognition model5 to crop theface from the uploaded author image. In case no author imageis provided to the system by the creator, we place a dummycaricatured relevant sized image. Similarly, we have defineddefaults for the features, frames and templates in case there isno input from the trailer creator. For example, when multipleauthors exists, we display information w.r.t to the the firstauthor entered by the creator and treat him/her as the primaryinstructor and rest all the authors are abstracted by placingthem under the “and others” category.Outline Fragment: This fragment gives an idea aboutthe specific topics that would be covered in the learningpathway. This could help in setting learners’ expectation interms of the topics covered and in deciding whether the contentaligns to his/her end goals. For this we use Single Document5https://docs.opencv.org/3.4/db/d28/tutorial cascade classifier.html
AddTextHereAdd Text HereWhat you will learn ..AddTextHereAdd Text HereAdd Text Here1Add TextHere②34Add TextAdd TextAdd TextHereHereHereFrame 1Frame 2Frame 3Meta-SplashTitleAuthorOutlineInformationSocial ProofCTAIntroductionIntroductionOverview ofCourseBuildingCredits/LogoDefiningto the Courseabout thetopics coveredStructure andValidationNext StepsInstructorother detailsand TrustFig. 4. Trailer Generation FlowFig. 5. Trailer Title Fragment Generation FlowTitle Generator [23], [24] model to generate titles for all theresources in the learning pathway which represents the outlineof the learning pathway.Every template under the outline fragment limits the numberof text elements to be listed on the screen with the aim tobalance aesthetics and information at the same time. To adhereto this prior constraint, we design a multi-step process to selectdiverse, yet impactful set of elements from a relatively largerlist of outlines generated in the previous step. Fig. 6 showsthe entire pipeline of Outline Text Selection.Let K be the number of text elements that the frame requiresand N be the total number of resources we have as inputand let K < N. We start with all the resources (N) givenby the user and remove any instance of assessments andshort documents under the assumption that such documentswon’t hold much informational content. After this we removeany occurrence of exact duplicates and near duplicates in theremaining set and pass the remaining resource list to the titlegenerator system to generate title for every resource.Post this, we fix the first and the last position of the outlinewith the first and last resource title. We specifically do thisaction because of the inherent ordering present in the inputresource as a part of learning pathway. Also intuitively, pickingfirst and last sets a bound over the topic space to be coveredunder a particular course.Finally on this reduced set, we divide the space into bins ofequal size from which we randomly sample one outline ele-ment from each bin to remaining K−2 positions in the outlinelist. We use threshold based Jaccard and cosine similarity forfiltering syntactic and semantic duplicates respectively. TheJaccard similarity between any two documents is calculated asan intersection over union of word sets for both documents. Ithelps us get sense of syntactic similarity between documents.For calculating cosine similarity, we vectorise our inputs using
Learning PathwayR1RR3R4R5RaR7RsTemplateConstraintsFragment Data GeneratorOtherSourcesCreatorInputFragment DataSplashTrailer TitleOutlineMeta-Social ProofCall-to-KnowledgeAuthorDetailsInformationActionBaseFragment DataWebCompositionVoice-overText-to-FrameSubtitleixalSpeechGenerationGenerationDurationGenerationTrailerMusicArchiveTask: GenerateNoHierarchical TitleTitles List/WinningNoKUserInputPick 1st ResourceTrailer TitleGenerationTitle ?from InputYesYes Single Document Title GeneratorTrailer Title4pre-trained Sentence Transformers [25] and then measure thesemantic closeness between them using cosine similarity.Algorithm 1 Duplicates Filter1: resources = Array(1, 2, . . . , N − 1, N)2: remaining resources = Array(1, N)3: for i ← 2 to N − 1 do4:scores = Array()5:for r ← remaining resources do6:scores ← calculate similarity(i, r)7:end for8:if max(scores) < threshold then9:remaining resources ← i10:end if11: end for12: return remaining resourcesSince every pathway is composed of different resources ofvarious properties like length, style, etc., having one thresholdthat fits all does not work. Hence, our threshold is adaptable ina way that guarantees at-least K items are selected post any ofthe syntactic or semantic pruning steps. The threshold searchspace is between 0 to 1 where for efficiency and tractability wequantize it at 0.1. Then for each threshold we get remainingresources as defined in Algorithm 1. Finally the threshold thatguarantees at-least K items and possibly reduces the input setby maximum is chosen as the final threshold.Meta-Information Fragment: The idea of having Meta-Information Fragment is to inform learners about other impor-tant aspects of the course like course structure, total readingtime, total number of resources, etc. We believe this wouldhelp learners understand more about the learning pathway orresources apart from just knowing the topics that would becovered. Also, such information can be used by learners incharting out their learning hours and estimating the effortsit would take for the successful completion of the course.Some of the elements that we generate automatically as partof this fragment are: generating topical word clouds 6 bases onword frequencies after pre-processing like stop-word removal,estimating total reading time based on average reading speedstatistics and other pathway level derived statistics like totalresources, availability of discussion forum, etc.Social Proof Fragment: Social Proof is one of the mostprominent ways of social influence and is based on theheuristic that the users follow others similar to them whenuncertain [26]. We collect these statistics from the deployedlearning environments. This information is added to the videotrailer over time when different learners take this course andthe analytical data is available.Call-to-Action Fragment: CTA is a marketing term whichis designed to push the audience in taking the desired actions.It is an important aspect of any trailer because all of theenthusiasm that is built in a learner while watching the trailer isof no use if the learner is not clear on the next actionable [27],6https://pypi.org/project/wordcloud/[28] item. In our system, we randomly select phrases from aset of pre-defined list of potential key-phrases to be placed onthe screen at a pre-defined location under this fragment. Someof the phrases we use are ‘Start your learning today’, ‘Let’sget started’, ‘Are you ready?’, etc., along with the action thatwill take the learner on the learning pathway.B. Additional ElementsIn this subsection, we discuss two other interesting elementsthat we propose to be added to the trailers, namely, DefinitionExtractor and Paraphraser. These are shown as suggestionsto the trailer creator and it’s up to the creator to include themand decide their placement in the trailer.Definition Extractor: Definitions are descriptive elementsthat we believe can help in introduction of concepts. Toselect the definition from the learning resource, we propose adiscriminative model that classifies a given piece of text intoDefinition or Non-Definition class. For building the classifiermodel, we use a dataset7 that contains positive and negativedefinition candidates extracted from Wikipedia for varioustopics. Our best performing model is a fine-tuned DistilBERT-base-uncased8 model with a Definition class F1-score of 0.96and Non-Definition class F1-score of 0.97 on the test set.Paraphraser: We believe that this is an useful utility thatcan be used in the Outline and Trailer title fragments. Thisgives the creator an ability to re-write concisely any substan-tially larger textual content present in any frame. We use apublicly available pre-trained model9 for this task which fine-tunes a large sized T5 (Text-to-Text Transfer Transformer) [7]model on a parallel corpus of sentence and it’s correspondingparaphrase.C. Video CompositionVideo Composition module is responsible for stitchingtogether all the elements that need to be part of the trailer, suchas the Frame data, Voice-over text, Text-to-Speech (TTS), etc.,into a trailer video. Fig. 4 pictorially shows the overall flowof the various components that are a part of the video compo-sition. We use Python’s MoviePy library10 as our choice forvideo editing and composition of the templates as it providesus with all the necessary editing functions like inserting text,concatenations and cuts, which we use to draft our templates.After the frame-level data elements are in-place, the nextstep is to generate voice-over text for each of the frames.Voice-over text is defined as the spoken-text that the narratorspeaks while a frame is displayed on the screen. For this,we select grammar from a pre-defined set of slot basedtext grammars which we define per frame. The slots in thegrammar are nothing but the screen’s text elements. Finally,once the Voice-over Text is generated for every frame, wepass them through the IBM Watson’s Text-to-speech (TTS)7http://nlp.uniroma1.it/wcl/8https://huggingface.co/distilbert-base-uncased9https://github.com/ramsrigouthamg/Questgen.ai10 https://zulko.github.io/moviepy
Fig. 6. Outline Text SelectionAPI11 with relevant parameters such as voice-type, gender,etc., by choosing from a list of speaker profiles to get theaudio files for every frame. Fig. 7 illustrates the flow fromgrammar selection to voice generation for the Trailer TitleFragment. We then derive the frame duration accordingly tomake sure that the visual and audio aspects of the frames arein sync and minimize any kind of lag on either ends. Finally,along with all the above details, we input template constraintslike positioning of elements, and styles, user preferences, andsome basic animations like fade-in and fade-out settings tocome up with the final trailer.IV. EXPERIMENTSIn this section, we describe the dataset, evaluation strategyand results obtained for the trailers generated by our proposedsystem.Dataset: Apart from the datasets which we have used fortraining and evaluating specific modules that are responsiblefor generating fragment relevant data. We created three dif-ferent learning pathways for our experiments and evaluationof the generated trailers. Each learning pathway differs witheach other in the number of resources and stylometry. Two ofthe pathways are based on text book chapters with differencein number of resources mapped, and one pathway is videolectures. We tried to take different pathways to evaluate ourmodel’s flexibility on different types of learning pathways.First one was created by sampling some chapters sequentiallyfrom a freely available Machine Learning textbook [29]. Forsecond, we chose the speech-to-text transcription of a week’svideo lectures from an academic course on NLP. Our thirdlearning pathway is the entire ML textbook [29]12. All thethree corpus are analogous to learning pathways as they are allsemantically coherent, progressive and share the same globaltopic.Evaluation and Results: Trailers can be seen as gen-erative tasks with an inherent notion of creativity. Here theobjective evaluation is not straight-forward because the ef-fectiveness of a trailer is highly subjective and relies on thehuman perception. However, we think that human evaluation11https://cloud.ibm.com/catalog/services/speech-to-text12Datasets can be found at: https://bit.ly/3ro3JLO1The first trailer looked more catchy compared to the secondone. Being generated by an AI agent, both seems to be good.2Looks amazing. Great work!3You guys have truly done a remarkable work!4Good job, keep it up!5Great!TABLE IPOSITIVE COMMENTS1Maybe I just felt that he was conveying info too fast2As of now, it sounds a bit robotic. Some improvements w.r.tthe TTS can help make it better.3Slowing the video when the information that is being conveyedis relatively dense would be helpful. For example, when goingthrough the list of topics, speaking slowly helps. When givinginstructor names, one can be fast.4Also, if there’s some way to bring viewer’s attention to thepart of the slide that’s being mentioned, that would be betterwhere the content is not sequential.5Remove the date from the frame. Add something about whatcan they do once they learn the course(what type of problemscan they solve)TABLE IIIMPROVEMENTS SUGGESTED BY USERSon various trailers generated can give us a good perspectiveon the quality of the trailers. We had 63 human evaluatorsconsisting of Engineering graduates, Post-graduates and PhDstudents well versed in the technical domain that represent ourdataset.We evaluate 6 trailers13 in total that were generated from 3different learning pathways as discussed above, i.e., 2 trailerper learning pathway. These two trailers are based on twotemplates T1, T2 created by us. Both the templates differ inaesthetics and level-of-detail(LOD). The evaluation for eachtrailer was done on a set of 8 questions on Likert-scale from1 to 5, where 1 would mean very poor and 5 would mean verygood.There were three separate groups of evaluators. Each groupwas provided with 2 trailers based on 2 templates for thesame pathway. We thoughtfully perform this diversification tosimulate the cluster sampling procedure, since showing all 6trailers to the same evaluators would have created boredom,resulting in not so accurate evaluation.13Sample Trailers: https://bit.ly/3Hscie9
Filtering Less-informative DocumentsSyntactic Filters over Document TextAll InputFilter AssessmentsFilter ShortFilter ExactFilter NearGenerate Title forResourcesDocumentsDuplicatesDuplicatesevery ResourceR = [1, 2, ... N-1, N]Select 1st and pthRandomly Select 1resource and add inOutline Elementsresource from eachOutline then DivideFilter SemanticFilter NearFilter ExactbinP-2 resources into K-DuplicatesDuplicatesDuplicatesO = [1, 2, ... K-1, K]2 equal spaced binsSemantic Filter over TitlesR = [1, 2, .. P-1, P]Syntactic Filters over Titleswhere, K<=P<=NFig. 7. Flow of Grammar selection to Voice-over generationWe also encouraged the evaluators to give free commentsfor the trailers they evaluated, as this would help us improveour system in future iterations. Table. I and II lists down someof the positive comments and improvements suggested by theusers. Fig. 8 shows some of the trailer fragments generated byour proposed system14.Following is the list of 8 questions that were asked to theevaluator during the evaluation. The text in italics highlightsthe broader aspect of the evaluation feature.Q1. Did you find the trailer to be self-contained?Q2. How were the fonts and styles used in the trailer interms of readability?Q3. How did you find the length and pace of the trailer?Q4. As a user, how impressed are you with this traileroverall?Q5. Could this trailer evoke interest in someone takingthis course? (Ignoring any prior inclination to the topic)Q6. How was the average duration of each frame?Q7. Based on the trailer you just saw, do you think youhave a good impression of the course now?Q8. How did you find the sync between the audio andvisuals you saw?As can be seen in Fig. 9, the scores obtained for each of thesurvey questions are good and far above the average(score of3) for almost all the trailers generated by our approach. Also,in our study, we found both the templates performed equallygood. However, for Q5, the average scores is relatively lowercompared to other questions. On digging deeper we foundsome of the comments of total 24 comments we receivedmentioned about the difficulty of the course for not gettinginterested in the course. This could mean that this question(Q5) is more subjective.14Detaileddemowalk-through:https://www.youtube.com/watch?v=06VVuAlFhTkV. CONCLUSIONS AND FUTURE WORKIn this paper, we presented a novel framework for au-tomatically generating video trailers for a learning pathwayusing ML and NLP techniques. We validated our trailers onmultiple corpus of varied granularity with human evaluationand the results obtained were encouraging. This approach canbe adapted to different domains given enough data to trainthe models involved in the entire process. We believe thatthis approach can lay foundation to building more advancedversions of trailer.In future, we plan to improve the existing system byincorporating suggestions obtained in the user evaluation andadding more interesting themes like automatically detectinglearning outcomes given the resources. We also intend to createan interactive dashboard to take inputs from the creator andallow the creator to make edits to the auto-generated content.ACKNOWLEDGMENTWe thank the Center of Excellence on Cognitive Com-puting, funded by Mphasis F1 Foundation for funding thisresearch. We also thank Dr. Prasad Ram and Gooru team(https://gooru.org) for the topical discussions and encourage-ment.REFERENCES[1] O. Simpson, “Student retention in distance education: are we failingour students?” Open Learning: The Journal of Open, Distance and e-Learning, vol. 28, no. 2, pp. 105–119, 2013.[2] M. Hartnett, A. St George, and J. Dron, “Examining motivation in onlinedistance learning environments: Complex, multifaceted, and situation-dependent,” International Review of Research in Open and DistributedLearning, vol. 12, no. 6, pp. 20–38, 2011.[3] L. Gayoung, K. Sunyoung, K. Myungsun, C. Yoomi, and R. Ilju,“A study on the development of a mooc design model,” Educationaltechnology international, vol. 17, no. 1, pp. 1–37, 2016.[4] B. T.-m. Wong, “Factors leading to effective teaching of moocs,” AsianAssociation of Open Universities Journal, 2016.[5] P. STACEY, “Pedagogy of moocs,” for Innovation and Quality inLearning, p. 111, 2014.
Title GeneratorSample Title: Graph Neural NetworksHello, Welcome to this course on _TITLE_Hi, Welcome to this course on _TITLEGrammarRandom Selection Hi, Welcome to this course on -_TITLEHello, Welcome to _TITLE_ course.Hi, Welcome to the course_TITLE_Trailer Title FragmentHi, Welcome to this course on Graph Neural NetworksText-to-speech engineFig. 8. Trailer FragmentsFig. 9. Average scores per Survey Question for all 3 pathways and trailers. Here P1, P2, P3 represent 3 Pathways and T1, T2 represent Templates[6] J. Zhang, Y. Zhao, M. Saleh, and P. Liu, “Pegasus: Pre-training withextracted gap-sentences for abstractive summarization,” in InternationalConference on Machine Learning.PMLR, 2020, pp. 11 328–11 339.[7] C. Raffel, N. Shazeer, A. Roberts, K. Lee, S. Narang, M. Matena,Y. Zhou, W. Li, and P. J. Liu, “Exploring the limits of trans-fer learning with a unified text-to-text transformer,” arXiv preprintarXiv:1910.10683, 2019.[8] R. Mihalcea and P. Tarau, “Textrank: Bringing order into text,” inProceedings of the 2004 conference on empirical methods in naturallanguage processing, 2004, pp. 404–411.[9] R. Lienhart, S. Pfeiffer, and W. Effelsberg, “Video abstracting,” Com-munications of the ACM, vol. 40, no. 12, pp. 54–62, 1997.[10] C. Diwan, S. Srinivasa, and P. Ram, “Automatic generation of coherentlearning pathways for open educational resources,” in European Confer-ence on Technology Enhanced Learning.Springer, 2019, pp. 321–334.[11] Y.-L. Chi, “Ontology-based curriculum content sequencing system withsemantic rules,” Expert Systems with Applications, vol. 36, no. 4, pp.7838–7847, 2009.[12] V. Shmelev, M. Karpova, and A. Dukhanov, “An approach of learningpath sequencing based on revised bloom’s taxonomy and domain ontolo-gies with the use of genetic algorithms,” Procedia Computer Science,vol. 66, pp. 711–719, 2015.[13] L. R. Varshney, “To surprise and inform,” in 2013 IEEE InternationalSymposium on Information Theory.IEEE, 2013, pp. 3145–3149.[14] ——, “Must surprise trump information?” IEEE Technology and SocietyMagazine, vol. 38, no. 1, pp. 81–87, 2019.[15] C. Brachmann, H. I. Chunpir, S. Gennies, B. Haller, P. Kehl, A. P.Mochtarram, D. M¨ohlmann, C. Schrumpf, C. Schultz, B. Stolper et al.,in Digital Tools in Media Studies. transcript-Verlag, 2015, pp. 145–158.[16] T. Hermes and C. Schultz, “Automatic generation of hollywood-likemovie trailers,” eCulture Factory, 2006.[17] G. Irie, T. Satou, A. Kojima, T. Yamasaki, and K. Aizawa, “Automatictrailer generation,” in Proceedings of the 18th ACM international con-ference on Multimedia, 2010, pp. 839–842.[18] J. R. Smith, D. Joshi, B. Huet, W. Hsu, and J. Cota, “Harnessing aifor augmenting creativity: Application to movie trailer creation,” inProceedings of the 25th ACM international conference on Multimedia,2017, pp. 1799–1808.[19] M. Hesham, B. Hani, N. Fouad, and E. Amer, “Smart trailer: Automaticgeneration of movie trailer using only subtitles,” in 2018 First Interna-tional Workshop on Deep and Representation Learning (IWDRL). IEEE,2018, pp. 26–30.[20] B.Gaikwad,A.Sontakke,M.Patwardhan,N.Pedanekar,andS. Karande, “Plots to previews: Towards automatic movie previewretrieval using publicly available meta-data,” in Proceedings of theIEEE/CVF International Conference on Computer Vision, 2021, pp.3205–3214.[21] P. Chi, Z. Sun, K. Panovich, and I. Essa, “Automatic video creation froma web page,” in Proceedings of the 33rd Annual ACM Symposium onUser Interface Software and Technology, 2020, pp. 279–292.[22] P. Mishra, C. Diwan, S. Srinivasa, and G. Srinivasaraghavan, “Automatictitle generation for learning resources and pathways with pre-trainedtransformer models,” International Journal of Semantic Computing,vol. 15, no. 04, pp. 487–510, 2021.[23] ——, “Automatic title generation for text with pre-trained transformerlanguage model,” in 2021 IEEE 15th International Conference onSemantic Computing (ICSC).IEEE, 2021, pp. 17–24.[24] J. Tan, X. Wan, and J. Xiao, “From neural sentence summarization toheadline generation: A coarse-to-fine approach.” in IJCAI, vol. 17, 2017,pp. 4109–4115.[25] N. Reimers and I. Gurevych, “Sentence-bert: Sentence embeddings usingsiamese bert-networks,” arXiv preprint arXiv:1908.10084, 2019.[26] R. B. Cialdini and L. James, Influence: Science and practice.Pearsoneducation Boston, MA, 2009, vol. 4.[27] “Call-to-action (cta),” https://bit.ly/3DDUBp4, accessed: 2021-12-08.[28] “3 reasons a call to action is important,” https://bit.ly/33c7WbO, ac-cessed: 2021-12-08.[29] J. Gareth, W. Daniela, H. Trevor, and T. Robert, An introduction tostatistical learning: with applications in R.Spinger, 2013.
What you will learn ...October 6, 20:October 6, 2021Readtimo~8hrmodelResourcesoneet alLet's get started!Regularization inConvolutional NeuralfunctionDeep LearningNetworks12346TextlayergradientRegularResourcesneuralnetworkAssessmentsAre yourward NetworksOptimization TechniquesRecurrent Nouralready?NetworksTrainingActiveDiscussionForumIhis course, In this specaly curated courseol the curriculum you wll go througnstartyourjourneyOutline FrameMeta-Information FrameCTA Frame54Likert Value3210Q1Q2Q3Q4Q5Q6Q7Q8SurveyQuestionP1-T1P1-T2P2-T1P2-T2P3-T1P3-T2123version https://git-lfs.github.com/spec/v1oid sha256:e3ebd44b889223021ca073749402a0626fc467147d97a1e2c2d358cec0551f38size 235245123version https://git-lfs.github.com/spec/v1oid sha256:50216d986e7a9513e28d22f27d5968156ff88da65751df700f1f535a5419b5d1size 584705123version https://git-lfs.github.com/spec/v1oid sha256:8c1ac2a5ace02d19d52ed4720e051cab46bdf1df08fd920e9b713eb99a15b2cdsize 377061123version https://git-lfs.github.com/spec/v1oid sha256:3d7e2b7d48546d9e9502eb6ce467bc86da3935ce31b9db049431f12f3d551f62size 542378123version https://git-lfs.github.com/spec/v1oid sha256:55c909ebc1c1040ac63c8fb0b1c53806df1888eb350d1a8be033f307aa970a5esize 156404123version https://git-lfs.github.com/spec/v1oid sha256:55169d147e3371c55411165884274c35b803e5d49eb679484d4d84df993aef7bsize 3670061123version https://git-lfs.github.com/spec/v1oid sha256:5186fee447c70af2a96284ef89bb7ae9391b9385fb7b0a76d155eb7b97423759size 516036123version https://git-lfs.github.com/spec/v1oid sha256:df37c62e06e396496e684b965c38817a59e309326857f2d8b64c7c75c5a07005size 1114157123version https://git-lfs.github.com/spec/v1oid sha256:868224aa6b2a091d2942f3770f2bd9f696e240e7921822af18504b8954efbbb0size 42066123version https://git-lfs.github.com/spec/v1oid sha256:7ebe2b10699c18520c2ee7be1bd119f19f97d026502ac5a4e3231ea38b697fb2size 16384451234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735MNRAS 000, 1–18 (222)Preprint 6 January 2023Compiled using MNRAS LATEX style file v3.0A Gaian Habitable ZoneRudy Arthur,1★ Arwen Nicholson,2†1University of Exeter, Department of Computer Science2University of Exeter, Department of Physics and AstronomyAccepted XXX. Received YYY; in original form ZZZABSTRACTWhen searching for inhabited exoplanets, understanding the boundaries of the habitable zone around the parent star is key. Iflife can strongly influence its global environment, then we would expect the boundaries of the habitable zone to be influencedby the presence of life. Here using a simple abstract model of ‘tangled-ecology’ where life can influence a global parameter,labelled as temperature, we investigate the boundaries of the habitable zone of our model system. As with other models oflife-climate interactions, the species act to regulate the temperature. However, the system can also experience ‘punctuations’,where the system’s state jumps between different equilibria. Despite this, an ensemble of systems still tends to sustain or evenimprove conditions for life on average, a feature we call Entropic Gaia. The mechanism behind this is sequential selection withmemory which is discussed in detail. With this modelling framework we investigate questions about how Gaia can affect andultimately extend the habitable zone to what we call the Gaian habitable zone. This generates concrete predictions for the sizeof the habitable zone around stars, suggests directions for future work on the simulation of exoplanets and provides insight intothe Gaian bottleneck hypothesis and the habitability/inhabitance paradox.Key words: Gaia – Habitable Zone – Biosignatures1 INTRODUCTIONThe Gaia hypothesis is that life influences the Earth’s feedback mech-anisms to form a self-regulating system, and therefore life can helpmaintain habitable conditions on its host planet Lovelock & Mar-gulis (1974). Distinct from the biosphere Huggett (1999), Gaia isthe whole life-earth system, considered as a single entity. The impor-tance of life’s interactions with the non-living environment are nowcommon sense, and the discipline of Earth System Science Lenton& Watson (2013) studies the various feedback loops that constitute‘Gaia’s body’ Volk (2012). Gaia theory itself takes a very broadperspective, aiming to describe life at a planetary scale. Gaia theoryasks questions like: Is Gaia inevitable on a planet that hosts life, oris it due to chance? What mechanisms can create a long lived Gaiansystem? How will we detect other ‘Gaias’ beyond our solar system,where direct planetary exploration is not an option? The astrophysicalpoint of view was crucial in the early development of Gaia, with thesearch for life on Mars providing the initial inspiration for the Gaiahypothesis Lovelock (1965). When looking at Earth from afar, Gaiais what we see and the search for habitable or inhabited exoplanets isthe search for other Gaias.Methods for exoplanet detection have developed considerablysince Gaia was first proposed. New telescopes, such as the JamesWebb Space telescope and the Extremely Large Telescope (currentlyunder construction), and future missions, such as the Large Ultravi-olet Optical Infrared Surveyor, mean that searching for signs of alien★ E-mail: R.Arthur@exeter.ac.uk† E-mail: A.E.Nicholson@exeter.ac.uklife will be possible within the coming decades Snellen et al. (2021);Quanz et al. (2021). While robotic missions to potentially habitableexoplanets remain unfeasible, evidence for alien life will only be ob-servable for exoplanets that have been dramatically shaped by theirbiospheres. Exoplanets with newly emerging life, or those with theremnants of a once-thriving biosphere that has since collapsed, willbe unlikely to produce a remotely observable signature. Answeringthe key questions of Gaia theory not only informs how we think aboutthe history of life on Earth, but can form the theoretical foundationfor the study of life in the universe.Catling et. al. Catling et al. (2018) proposed a framework for as-sessing potential biosignatures using a probabilistic approach thatcombines observations of the candidate planet and host star withmodels of the possible abiotic and biotic planetary processes to de-termine the probability of the planet being inhabited. With a greatdiversity of exoplanets being found, any potential biosignature mustbe considered within the context of its host planet Seager (2013);Claudi. (2017); Kiang et al. (2018); Schwieterman et al. (2018);Krissansen-Totton et al. (2022). Detailed abiotic models of exoplan-ets are being developed for a wide range of detected planets, see e.g.Amundsen et al. (2016); Boutle et al. (2017); Collins (2021); Fauchezet al. (2021), and sophisticated models of biogeochemistry exist fordifferent points in Earth’s history, e.g. Kharecha et al. (2005); Daineset al. (2017); Lenton et al. (2018b); Zakem et al. (2020).Detailed and realistic modelling of life on other planets is im-portant, however this paper will take a broader view that aims tounderstand the generic mechanisms that lead to Gaia. We build onrecent work Ford Doolittle (2014); Lenton et al. (2018a); Arthur& Nicholson (2022) on Gaian selection principles. We argued in© 222 The AuthorsarXiv:2301.02150v1 [astro-ph.EP] 5 Jan 2023
2Arthur & NicholsonArthur & Nicholson (2022) that some approaches to Gaian selec-tion Ford Doolittle (2014); Lenton et al. (2018a) lead to anthropicreasoning - we see Gaia because if we didn’t we wouldn’t exist. An-thropic reasoning is controversial, with its opponents arguing that itunfalsifiable with limited (if any) predictive power Smolin (2007).The coming era of exoplanet astronomy gives new context and pur-pose to these discussions. If our aim is for Gaia theory to inform oursearch for life in the universe, then anthropic arguments are clearlyinadequate.In Arthur & Nicholson (2022) we argue for ‘Entropic Gaia’ - thatthe emergence of Gaia is a statistical tendency for planets that hostlife. This means that life history on a single planet can be chaoticand have periods of stability and collapse, however there is a trendtowards increasing biomass, stability, habitability and other Gaianfeatures. Any single planetary history for a life-bearing planet, suchas Earth, is likely to follow a (bumpy) trajectory towards Gaia. Themicro-mechanism leading to this behaviour was argued to be ‘Se-quential Selection with Memory’ or an ‘entropic ratchet’. In brief, thismechanism starts from the observation that coupled life-environmentsystems move between regulation and disregulation. By definition,disregulating systems quickly destroy themselves while regulatingsystems persist, this is sequential selection Lenton et al. (2018a). Inmodels of ecology and Gaia (e.g. Becker & Sibani (2014); Hard-ing (1999)) increasing diversity and complexity is associated withincreasing stability 1. More diverse ecosystems can generate morenovel species through mutation. Thus after every ecosystem collapse(caused by internal or external factors) if a new ecosystem arisesit is likely to be more diverse, having started with a greater ‘pool’of species, and therefore also more stable. Sequential selection withmemory describes a sequence of distinct stable states that tends toget ‘more Gaian’ over time.This mechanism was originally proposed in the framework of theTangled Nature Model (TNM) Christensen et al. (2002). Originallydesigned to study co-evolution, we demonstrated in Arthur & Nichol-son (2017) that the TNM is closely related to the generalised Lotka-Volterra model. The TNM is based on the idea that the growth rateof a species is given by a fitness function that depends on the otherspecies present. Any model making this assumption will look like theTNM close to equilibrium Arthur & Nicholson (2022). By studyingthe model with agent based dynamics we can incorporate mutation,giving us a very flexible, robust and general model of evolutionaryecology. Since the TNM is quite general, conclusions drawn in thisframework are likely to have general applicability.Artificial life modelling has been used extensively to study Gaia.The original Daisy World Watson & Lovelock (1983) led to a largenumber of variants Wood et al. (2008) and there are a variety ofother models such as the Guild Model Downing & Zvirinsky (1999),Greenhouse World Worden (2010), Flask Model Williams & Lenton(2007) and Exo-Gaia Nicholson et al. (2018) to name a few. We havepreviously discussed Gaian models based on the TNM in Arthur &Nicholson (2017, 2022). Here we propose a new variant on the TNMthat is more similar to other Gaian models with a very simple abiotic(non-living) component.While previous Gaian models have included mutation (such asthe Flask model and ExoGaia) the complexity of the biosphere inthese models has been limited and different species within the mod-els only impact one another via the shared environment, e.g. via1 See Landi et al. (2018) for a thorough discussion of the relationship be-tween ecosystem complexity and stability, though most of these models don’tconsider coupling to the external environmentresource competition or via global parameters such as temperature.When we look at life on Earth it is clear that different species canhave a large impact on each other beyond resource competition orchanging global parameters like temperature. For example, there arecomplex interactions between worms, plants and soil that change thestructure, chemistry, water retention and other properties of soil forthe benefit of many species Le Bayon et al. (2021). These kinds ofsymbiotic (and also antagonistic) interactions are usually missing inGaian models. We also observe that throughout Earth history therehave been dramatic and spontaneous changes in the diversity andcomplexity of the biosphere, e.g. the Great Oxidation Event whichallowed for aerobic respiration to become an important energy sourcefor life Ligrone (2019). These types of events, crucial for the selec-tion mechanism discussed above, are absent in other Gaian models.In contrast, TNM species interact directly through antagonistic orsymbiotic inter-species couplings, the population varies consider-ably due to spontaneously occurring ‘quakes’ and there is no rigidupper bound on the population. Thus by combining elements of theTNM with elements of earlier Gaian models we can explore how Ga-ian regulation emerges within a system that allows for more complexecosystem dynamics.With this model we hope to show that the arguments for EntropicGaia are robust by demonstrating how they work in a setting wherelife needs to interact with and regulate an external environment. At thesame time we will explore how Gaia can inform the search for life inthe universe, in particular how Gaia predicts a larger ‘habitable-zone’.In section 2 we describe the model and how we add temperature,which is a combination of abiotic and biotic components. In section 3we study the model at constant background temperature to understandhow temperature is regulated and interacts with the spontaneous‘quakes’ that occur in the TNM. Section 4 discusses the changes tothe habitable-zone in the presence of life and section 5 studies howlife adapts to deteriorating abiotic conditions. Finally we conclude insection 6.2 MODEL DESCRIPTION2.1 The Tangled Nature ModelWe start, as in Arthur & Nicholson (2022), with the generalisedLotka-Volterra model𝑑𝑁𝑖𝑑𝑡 = 𝑁𝑖 𝑓𝑖(�𝑛, 𝑁)(1)𝑁𝑖 is the population of species 𝑖, 𝑁 is the total population and 𝑛𝑖 =𝑁𝑖𝑁 . 𝑓𝑖 is a fitness function that depends on the type and abundanceof the other species present through �𝑛 = (𝑛1, 𝑛2, . . . , 𝑛𝐷) and 𝑁. Wecan expand 𝑓𝑖 to linear order around the equilibrium at 𝑁 = 0𝑑𝑁𝑖𝑑𝑡 = 𝑁𝑖�𝑓𝑖(�0, 0) +∑︁𝑗𝑑𝑓𝑖𝑑𝑛 𝑗(�0, 0)𝑛 𝑗 + 𝑑𝑓𝑖𝑑𝑁 (�0, 0)𝑁 . . .�(2)The summations here and for the rest of this paper are over all extantspecies. The three terms on the right hand side are the basic TNMvariables.• 𝑟𝑖 ≡ 𝑓𝑖(�0, 0) is the growth rate of species 𝑖 in the absence of anyother species. We set this to zero, meaning that one species’ growthdepends entirely on the other species present. We could add somespecies with non-zero growth rates to represent primary producersbut for simplicity and consistency with the rest of the TNM literatureevery species has 𝑟𝑖 = 0.MNRAS 000, 1–18 (222)
A Gaian Habitable Zone3• 𝐽𝑖 𝑗 ≡ 𝑑 𝑓𝑖𝑑𝑛𝑗 (�0, 0) is the inter-species coupling matrix where 𝐽𝑖 𝑗is the effect of species 𝑗 on species 𝑖. As usual Christensen et al.(2002), we set the elements randomly from a symmetric distribution.Here each element 𝐽𝑖 𝑗 is randomly chosen from a standard normalproduct distribution times 𝑐 = 100. The exact functional form of thedistribution is not important, only that it has infinite support Arthuret al. (2017).• −𝜇 ≡𝑑 𝑓𝑖𝑑𝑁 (�0, 0) is the inverse carrying capacity, controllinghow much of the global ‘resource’ is consumed by each individual.The growth equation now looks like𝑑𝑁𝑖𝑑𝑡 = 𝑁𝑖 ���∑︁𝑗𝐽𝑖 𝑗𝑛 𝑗 − 𝜇𝑁���= 𝑁𝑖 𝑓 𝑇 𝑁 𝑀𝑖(3)In Arthur & Nicholson (2022) we added higher order terms tothe fitness function and argued that these could be interpreted asspecies-environment interactions, since their net effect was to modifythe 𝜇 term to create an “effective” carrying capacity. This kind of‘endogenous’ environment (e.g. roughly analogous to atmosphericcomposition or oceanic pH) is in contrast to most Gaian modelswhich represent the environment through one or more ‘exogenous’parameters, which the model agents aim to regulate. Daisyworld is theparadigmatic example, where black and white daisies spontaneouslyregulate a rising global temperature. We want to study this type ofregulation in the TNM framework and only deal with an abioticenvironment so, for simplicity, we do not include the higher orderterms.While this is a common approach in Gaian modelling it is worthsome consideration. It was shown in Arthur & Nicholson (2022) andArthur & Nicholson (2017) that selection in the TNM tends to pro-duce beneficial endogenous/biotic environments. If we included bothan abiotic and a biotic environment, TNM agents would be subject tomore selective pressure i.e. they would need to avoid degrading theexternal parameters (temperature) and internal parameters (∼ pH). InArthur & Nicholson (2017) it was noted that environmental selectionisrelatively weak, because whennewspecies occurtheystart with lowpopulations and therefore minimal impact on the environment. Thismust also be the case for an abiotic environment. Ultimately the rela-tive weighting of each in the fitness function would determine whichenvironmental parameters are most ‘optimised’. Studying these ef-fects is interesting but we leave it for future work, focusing here onunderstanding the model with a purely exogenous environment.2.2 Adding TemperatureTo add temperature to the TNM we let the global temperature 𝑇 bethe sum of abiotic and biotic components:𝑇 = 𝑇0 + 𝑇𝑙𝑖 𝑓 𝑒(4)𝑇0 is the temperature in the absence of life and𝑇𝑙𝑖 𝑓 𝑒 is the effect of theextant species in the model on the temperature. Every individual ofspecies𝑖 has an effect, 𝐻𝑖, on the global temperature. The values of 𝐻𝑖will be selected from a normal distribution with mean 0 and standarddeviation 𝜎𝐻 , so species are equally likely to have a warming orcooling effect. The total effect of life on the temperature is∑︁𝑖𝐻𝑖𝑁𝑖(5)We describe how �𝑖 𝐻𝑖𝑁𝑖 is related to 𝑇𝑙𝑖 𝑓 𝑒 in the next section.We make the reproduction rate depend on the temperature bymodifying the fitness function to𝑓 𝑇 𝑁 𝑀𝑖(𝑇) =∑︁𝑗𝐽𝑖 𝑗1 +�𝑇 −𝑇𝑃𝜏�2 𝑛 𝑗 − 𝜇𝑁(6)𝑇𝑃 is the preferred temperature and 𝜏 is a tolerance parameter. Thefunctional form is chosen so that at temperatures, 𝑇, far from 𝑇𝑃the interaction strength is reduced, for example at 𝑇 = 𝑇𝑃 + 𝜏 theinter-species interaction strength is halved. The functional form11+𝑥2is chosen for simplicity, any function that applies a smooth andsymmetric temperature ‘window’ would work. We have chosen 𝑇𝑃and 𝜏 to be constant for all species and interactions. We could, forexample, make the width different for every inter-species interaction:𝜏 → 𝜏𝑖 𝑗 and similarly for 𝑇𝑃. In the interest of keeping this workrelatively brief and in line with other work such as the originalDaisyworld model Watson & Lovelock (1983), Flask model Williams& Lenton (2007) and ExoGaia Nicholson et al. (2018), we use aconstant 𝑇𝑃. By keeping 𝑇𝑃 constant for all species we can focus onand highlight life’s impact on its environment. If 𝑇𝑃 is kept constant,then any improvement to a “planet’s” survival rate when includinglife-environment interaction can only come from life improving itsenvironment rather than life simply adapting to it. As this is the partof Gaia theory that is less well accepted Kirchner (2003) it makessense to explore scenarios where this effect isn’t potentially obscuredby species adaptation.2.3 Running the ModelWe solve the growth equation using agent based dynamics. Thismeans that we generate individual agents whose reproduction rateis controlled by the fitness function 𝑓 𝑇 𝑁 𝑀𝑖(𝑇). Each agent is anindividual of some species𝑖 and each agent’s reproduction probabilityis given by𝑝𝑜 𝑓 𝑓𝑖=11 + 𝑒− 𝑓 𝑇 𝑁 𝑀𝑖(𝑇 )(7)The basic dynamics of the model are then (see also Arthur et al.(2017)):(i) Choose an individual and, with probability 𝑝𝑜 𝑓 𝑓𝑖, make acopy of that individual. The copying step is meant to mimic asexualreproduction. We take the 𝐿 = 20 bit binary representation of thespecies-index 𝑖 and copy one bit at a time, with a probability 𝑝𝑚𝑢𝑡 =0.01 to flip a bit during each copy operation.(ii) Chose a random individual and kill it with probability 𝑝𝑘𝑖𝑙𝑙 =0.1𝐿 is the genome length, where the value of 20 is standard Christensenet al. (2002), meaning that the model can generate 2𝐿 ∼ 106 uniquespecies. A ‘generation’ is the time required to iterate over the basicreproduction/death loop above 𝑁/𝑝𝑘𝑖𝑙𝑙 times, where this numberis recalculated at the end of each generation. This means in eachgeneration every individual has had a chance to be selected onceon average for a birth/death process. To update the temperature weperform the following steps after every generation• If required, update the abiotic temperature 𝑇0 (see Section 5).• Update 𝑇𝑙𝑖 𝑓 𝑒 using𝑇𝑙𝑖 𝑓 𝑒(𝑡) = 𝜆𝑇𝑙𝑖 𝑓 𝑒(𝑡 − 1) + (1 − 𝜆)∑︁𝑖𝐻𝑖𝑁𝑖(8)• Set 𝑇 = 𝑇0 + 𝑇𝑙𝑖 𝑓 𝑒MNRAS 000, 1–18 (222)
4Arthur & NicholsonVariableSymbolValueInverse carrying capacity𝜇0.1Mutation rate𝑝𝑚𝑢𝑡0.01Death rate𝑝𝑘𝑖𝑙𝑙0.1Lag parameter𝜆0.9Preferred temperature𝑇𝑃100Temperature tolerance𝜏2Temperature effect𝜎𝐻0.05Table 1. A list of all the key parameters in the model and the values wechoose. The model has a large parameter space and the parameters are setto convenient values used in previous work on the TNM. The qualitativebehaviour of the model is very robust to variations in these parameter valuesChristensen et al. (2002); Arthur et al. (2017).Here 𝑡 is the generation number, the timescale in this model and 𝜆is a lag-parameter that stops the temperature from changing instan-taneously. This mimics the real behaviour of the Earth-system, e.g.climate models have demonstrated a lag in the response of surfacetemperatures over the ocean due to changes in atmospheric 𝐶𝑂2Boucher et al. (2012). The model is initialised with 500 individualsof a randomly chosen species and all averages are taken over 1000model runs using different random seeds.3 CONSTANT TEMPERATURE EXPERIMENTSFirst we run the model with constant𝑇0. Figure 1 shows the behaviourof the population and temperature in one ‘run’ of the model for104 generations. The basic features of the standard TNM - quasi-stable states punctuated by sharp transitions - persist Christensenet al. (2002). The important features of ‘core’ and ‘cloud’ Becker& Sibani (2014) are are retained as can be seen in Figure 2. Thecore species are the only ones with significant population and theseare the primary drivers of the temperature. The cloud species aremutants with small populations and random positive and negativeeffects on the temperature. These two runs show that life can movethe temperature away from 𝑇𝑃 or towards it, the question is whathappens on average, in the long run.Figures 3 (a) and (b) show the average population and averagetemperature for 𝑇0 = 100 = 𝑇𝑃 and 𝑇0 = 105 = 𝑇𝑃 + 2.5𝜏 respec-tively. For (a) 𝑇0 = 𝑇𝑃 and the temperature fluctuates close to theabiotic temperature while the population increases logarithmically.This behaviour, increasing population with constant temperature, in-dicates that the TNM agents are optimising their mutual interactions,�𝑗 𝐽𝑖 𝑗 𝑁 𝑗, as in the standard model, while keeping the temperatureclose to 𝑇𝑃. In (b) where 𝑇0 > 𝑇𝑃 we see that the population in-creases while the temperature decreases. Thus the TNM agents are,on average, simultaneously optimising their mutual interactions whileimproving the temperature.In Arthur & Nicholson (2022) we discussed Selection by Survival(SBS) and Sequential Selection with memory (SSM). SBS is just dif-ferential survival i.e. at late times we see systems with Gaian featuresbecause those are the only ones that could survive that long. SBS is agood null model, here it would predict that the average temperaturetends towards 𝑇𝑃 because runs that don’t maintain 𝑇𝑃 go extinct,leaving a small number of surviving runs that happen to operate at𝑇𝑃. SSM would predict that the punctuations during individual runsdrive the average temperature towards 𝑇𝑃. The numbers in the toprow of Figure 3 (a) and (b) show the proportion of runs which surviveup to that point in the experiment. In (b) for example, at 𝑇0 > 𝑇𝑃about 9% of the runs have gone completely extinct (𝑁 = 0) by 105generations compared to 3% when 𝑇0 = 𝑇𝑃. This is a relatively smallincrease in extinction rate compared to the relatively large decreasein the scaling factor 1/�1 +�𝑇0−𝑇𝑃𝜏�2�≃ 0.14.Figure 4 shows the model runs in more detail for 𝑇0 = 105 > 𝑇𝑃.(a), (b) and (c) demonstrate that the runs can be split into two types:low temperature, cooling core; and high temperature, heating core.We will loosely call these ‘Gaian’ and ‘non-Gaian’ respectively. (d)is the crucial plot. It shows the proportion of surviving runs overtime (dashed line) and the proportion of the surviving runs that have𝑇 ≤ 𝑇𝑃. Here we see that while some runs do go extinct (SBS)in the surviving runs the proportion of Gaian states increases. Thismeans that non-Gaian states transition to Gaian states, leading tomore of them over time. This is exactly as sequential selection withmemory predicts: (non-terminal) resets tend, on average, to improveconditions for life. We will discuss the exact mechanism in detailbelow.This mechanism, Sequential Selection with Memory (SSM) wasdiscussed in Arthur & Nicholson (2022) and briefly in Secion 1.Each model run consists of multiple quasi-equilibria interrupted byquakes (Figure 1). These quakes completely reset the species whichmake up the core. These core species are (by definition) the oneswith large populations which control the model dynamics, in thiscase the total population and temperature. As has been discussedin the TNM literature (especially Becker & Sibani (2014)), quakesoccur spontaneously due to the evolution of a ‘parasite’ that disruptsthe core. A parasite, 𝑎, is any species with significant reproductionprobability that isn’t a member of the core. To have a large probabilityto reproduce, the sum of its interactions must be high enough thatits reproduction rate is higher than its death rate. Solving for fitnessgives:∑︁𝑗𝐽𝑎 𝑗𝑛 𝑗1 +�𝑇 −𝑇𝑃𝜏�2 ≥ 𝜇𝑁 +�1 − 1𝑝𝑘�(9)Lower total population makes it easier for a parasite to occur bydecreasing the 𝜇𝑁 term. Low total population can occur either dueto weak inter-species interactions in the core or unfavourable tem-peratures. However because of the smaller number of reproductionevents at low 𝑁, fewer mutants are generated. On the other hand highpopulations raise the barrier and increase the number of mutationevents.Crossing the barrier requires finding a mutant 𝑎 with sufficientlylarge, positive interactions with some or all species in the core.Large values of 𝐽𝑎 𝑗 are rare (for our choice of distribution, expo-nentially so) and the rate of generating new mutants is low. Con-sidering each reproduction event as 𝐿 = 20 Bernoulli trials, theexpected number of mutations in a reproduction is given by a Bino-mial distribution 𝐵(𝐿, 𝑝𝑚𝑢𝑡) with mean 𝐿𝑝𝑚𝑢𝑡 = 0.2 and variance𝐿𝑝𝑚𝑢𝑡 (1 − 𝑝𝑚𝑢𝑡) ≃ 0.2. Thus the rate of exploration of the geneticspace is quite slow. Ultimately the barrier height is more importantthan the increased rate of reproduction and is what explains the trendof (slowly) increasing population and stability in the TNM. For muchmore on this see Becker & Sibani (2014).Here we have to analyse how the temperature interacts with thismechanism. Assume we have a case where 𝑇0 > 𝑇𝑃 as in Figure4. Temperatures far from 𝑇𝑃 make a quake more likely by reducingthe total population and hence the barrier height. When a quakeoccurs a new core is selected on the basis of strong inter-speciesinteractions that allow it to quickly ‘use up’ the carrying capacity.This new core has an equal chance to be warming or cooling, becauseof the symmetry of 𝐻𝑖. If it is warming we stay in a non-Gaian state,if not we move to a Gaian state. In a Gaian state the barrier canMNRAS 000, 1–18 (222)
A Gaian Habitable Zone5Figure 1. The column (a) shows the population (top row) and temperature (bottom row) where the background temperature is 𝑇0 = 𝑇𝑃 = 100. Column (b) showsthe population and temperature where 𝑇0 = 105. The temperature in (a) is above 𝑇0 and 𝑇𝑃 while the temperature in (b) is below both 𝑇0 and 𝑇𝑃.be significantly higher, leading to a much more stable, long livedcore. In a non-Gaian state the barrier is low, meaning the state willbe relatively short lived, being vulnerable to parasites and to largepopulation fluctuations which may result in total extinction. As shownin Figure 4 (d) over time this leads to more and more model runs ina Gaian state.To summarise: both mechanisms, SBS and SSM operate. Ga-ian states have temperatures close to 𝑇𝑃, and thus high populationswhich, in this model, makes them more stable. Non-Gaian states arefar from 𝑇𝑃 and have low populations. This makes them vulnerableto total extinction (SBS) and punctuation which can take a non-Gaianto a Gaian state (SSM). In this model, for this particular temperature,SSM is a more important mechanism than SBS, though the ratio canvary with 𝑇0, as we will explore in the next section.These ideas can help explain why the Earth today is in a habit-able state. Since its conception the Gaia hypothesis has been definedin numerous ways and ranging from a strong hypothesis that self-regulating feedback loops are an expected property of a life-planetcoupled system, known as ‘probable Gaia’ Lenton & Wilkinson(2003), to a weaker hypotheses that suggests that while the EarthMNRAS 000, 1–18 (222)
(a)(b)140010001200800-1000800600NN600-400400-200200002000400060008000100000200040006000800010000t (generations)t (generations)108To108TpTp106106104104Temperature1021021001009898 -96 9694 94 02000400060008000100000200040006000800010000t (generations)t (generations)6Arthur & NicholsonFigure 2. Model snapshot at 𝑡 = 9000 generations for the runs (a) and (b) from Figure 1. Each node represents a different species, with the size of the node anindication of species’ population (upper and lower limits are applied to the point sizes for clarity). The colour of the nodes indicates the heating or cooling effect,𝐻𝑖. The width of the arrows indicates the interaction strength 𝐽𝑖 𝑗𝑛𝑗. Only interactions with core species are shown. In (a) the red (bottom-right) core specieshas a strong enough heating effect to overwhelm the cooling effect of the other core species, so this configuration has a net heating effect, as seen in Figure 1(a).In (b) both core species have a (weak) cooling effect, reducing the temperature, as seen in Figure 1(b).does have self-regulating feedback loops, these emerged merely bychance and that Gaia is not an expected feature of a planet hostinglife, known as ‘lucky Gaia’ Watson (2004). As Figure 5 shows, in ourmodel the fraction of Gaian states is increasing over time. This sug-gests that for early life starting out on a planet, a large amount of luckmight be needed to initially start off in a Gaian state, but for surviv-ing runs over time the probability of being in a Gaian state increases.This would suggest that when observing a biosphere ‘lucky Gaia’may be the case for young planets but ‘probable Gaia’ is operatingfor older ones.The experiments in Figure 5 have considered systems with onlyinternal perturbations, that is, those generated by the biosphere. How-ever, real planets experience many abiotic perturbations, both rapidand slower, such as changes in volcanic activity, changes in solarluminosity or impacts by large objects Covey et al. (1994); Overpeck& Cole (2006); Goldblatt & Zahnle (2011). Life is thought to haveemerged early on Earth during a time when debris left over fromthe formation of the solar system was frequently colliding with theEarth. Biospheres in a non-Gaian state will be more susceptible thanGaian biospheres to perturbations and will have a higher risk of goingextinct. This is closely related to the ‘Gaian bottleneck’ hypothesisChopra & Lineweaver (2016) that proposes that early on in a planet’shistory, if life emerges it must quickly establish self-regulatory feed-back loops to stabilise the climate of its planet in order to persist.If the biosphere fails then life goes extinct, the planet’s abiotic pro-cesses take over and the planet reverts to an inhospitable state. Whatis novel here is the idea that apart from total extinction, a planet canhave a ‘near death experience’ where a mass extinction clears out alarge fraction of the extant species. These mass extinctions are cru-cial for the exploration of the space of possible ecosystems Arthur& Sibani (2017) and ultimately lead to the emergence of long-livedstable states. Population diversity is known to significantly increasethe resilience of ecosystems to perturbations Peterson et al. (1998);Luck et al. (2003), and additionally yeast Guan et al. (2012) andbacteria Lambert & Kussell (2014) have been shown to develop in-creased resilience to environmental stressors if exposed to them inthe past. It is possible that large perturbations that do not eliminateall life are actually beneficial for evolving Gaia. Indeed, there maybe evidence of this in Earth history, as it is thought that a period ofglobal glaciation may have triggered the evolution of multi-cellularlife Hoffman et al. (1998); Hedges (2004); Vincent et al. (2004);Boyle et al. (2007).4 HABITABLE ZONE EXPERIMENTSThe habitable zone around a star is defined as the distance from a starwhere liquid water could exist on the surface of a planet Kasting et al.(1993). Models demonstrate that the habitable zone is impacted byseveral factors, including the age and class of the host star Ramirez &Kaltenegger (2016), planetary mass Kopparapu et al. (2014), plane-tary atmospheric composition Pierrehumbert & Gaidos (2011), andthe surface water content of the planet Abe et al. (2011). Additionallya planet being within the habitable zone doesn’t guarantee habitabil-ity, as a planet may have more than one possible climate state forthe same stellar and orbital parameters, e.g. a temperate Earth versusa frozen Earth Goldblatt & Zahnle (2011). For a more extreme ex-ample, it is thought that Venus and Earth might represent alternateend states for the same planetary system, with small perturbationsoccurring early on in their history influencing their modern day statesLenardic et al. (2016).Existing exoplanet surveys and models have identified that rockyMNRAS 000, 1–18 (222)
(a)(b)0.040.020.00-0.02-0.04A Gaian Habitable Zone7Figure 3. (a) shows the average (over all surviving model runs) of the population (top row) and temperature (bottom row) where the background temperature𝑇0 = 100 = 𝑇𝑃. Column (b) shows the population and temperature where 𝑇0 = 105. The numbers next to the vertical dashed lines in the top row are theproportion of runs which have survived for that number of generations.planets can exist at a range of distances from their host star Domagal-Goldman et al. (2016). Thus, it is a natural question to ask about thestability and persistence of Gaia across a range of background tem-peratures, some more conducive to life, some less. In this section werun many experiments where we vary the background temperature𝑇0 and look at averages over 1000 model histories. To mimic theidea of a habitable zone with and without biotic influence we com-pare two versions of the model: one where life cannot influence thetemperature, 𝜎𝐻 = 0, and one where life can influence it 𝜎𝐻 = 0.05.In Figure 5 we show the fraction of runs which survive for 105generations in both scenarios. Perhaps surprisingly, the distributionsare roughly similar. As the background temperature changes, a similarnumber of model runs survive for 105 generations whether life caneffect the environment or not. This shows, at least, that species-environment interactions have little effect on the probability of totalextinction and therefore on the presence or absence of life. However,as we saw in the previous section, the model runs can be split intoGaian and non-Gaian states. Figure 5 also shows the proportion ofMNRAS 000, 1–18 (222)
(a)(b)400400350-35010.972i0.909300 -300-10.9810.989≥ 250≥ 2500.9i0.99210.981200 -10.99150 -150-100100102103104105102103104105t (generations)t (generations)108108TpTpT106 106Temperature104 -Temperature1041021021001009898102103104105102103104105t (generations)t (generations)8Arthur & NicholsonFigure 4. 𝑇0 = 105. (a) shows the temperature at 𝑡 = 105 generations versus population. Colour corresponds to the heating (red) or cooling (blue) effect of thecore. There are clearly two distinct clusters: one with (potentially) high population and low temperature and one with low population and high temperature. (b)and (c) show histograms of the temperature and population respectively. (d) shows the proportion of surviving runs at each generation as well as the proportionthat have 𝑇 ≤ 𝑇𝑃.runs that have 𝑁 > 200. The value of 200 is not itself significant,what is important is the comparison between 𝜎𝐻 = 0 and 𝜎𝐻 = 0.05.Far from 𝑇𝑃, only the Gaian states can have large populations, in theother cases the total population is low and life is simply ‘clingingon’. Importantly for exoplanet astronomy, a small pocket of life thatis clinging on to existence is unlikely to produce a detectable bio-signature.Figure 6 shows the population of the model runs as a function of𝑇0. We see that when 𝜎𝐻 = 0 the total population at 𝑇𝑃 is larger.At 𝜎𝐻 = 0 the TNM agents are only attempting to optimise inter-species interactions, not interactions and temperature and thus canfind a better maxima. For example, strongly symbiotic cores mayhave a detrimental effect on the temperature which is only relevantin the 𝜎𝐻 = 0.05 case. However, the population falls rather rapidlywith 𝑇0 at 𝜎𝐻 = 0 compared to the 𝜎𝐻 = 0.05 case. We also see(from the colour gradient) that at 𝜎𝐻 = 0.05, for 𝑇0 far from 𝑇𝑃 onlyMNRAS 000, 1–18 (222)
(a)(b)110.0110.0107.5107.5105.0105.0102.5102.5100.0100.097.597.595.095.092.592.502004006008001000120014000.0000.0250.0500.0750.1000.1250.1500.175NP(T)(c)(d)0.00001.00.00050.00100.8 -0.00150.60.00200.00250.4 -0.00300.20.0035Fraction Surviving0.00400.0Fractionofsurvivors<Tp0200400600800100012001400102103104105Nt (generations)A Gaian Habitable Zone9Figure 5. We run 1000 experiments at a variety of different 𝑇0 from 80 to 120 in steps of 2. As usual 𝑇𝑃 = 100 and 𝜏 = 2 for 105 generations. The figureshows proportion of surviving runs and the proportion of large population runs for a model with no temperature feedback 𝜎𝐻 = 0 and a model with feedback𝜎𝐻 = 0.05. (Note the anomaly at 𝑇0 = 118 for 𝜎𝐻 = 0.05 is a consequence of very low statistics, of the 7/1000 surviving runs, 2 happen to have 𝑁 > 200).those runs which heat or cool as appropriate are capable of havinglarge populations. Figure 7 demonstrates that the runs split into twoclusters, as also shown in Figure 4, which can be labelled by theirtemperature, in combination with Figure 6 this demonstrates thatlarge population Gaian states may be observed when 𝑇0 is far from𝑇𝑃.This simple Gaian model would therefore predicts that if life playsonly a minimal role in shaping its planet and we were looking at anabiotic habitable zone, that there would be a narrow range of radiiaround the host star where we might expect a detectable biospheres.Outside this narrow range the chance of finding an inhabited planetdrops dramatically. If however life does play a strong role in shapingand regulating its host planet then we would expect to observe a muchlarger habitable zone. In the centre of this zone where conditions are‘ideal’ large population states, and so therefore potentially detectablebiospheres, will be most probable but as we move towards the edgesof the habitable zone the probability of detectable biospheres willbe much higher than an abiotic habitable zone would predict. OurMNRAS 000, 1–18 (222)
OH= OOH= 0.05TemperatureWindowTemperatureWindowProportionnotextinctProportionnotextinct1.2FractionofsurvivingrunswithN>2o01.2 -FractionofsurvivingrunswithN>2o01.0 -1.0-0.8 0.8 -0.60.6-0.4 -0.4 0.20.2 0.0 -0.0 -80901001101208090100110120ToTo10Arthur & NicholsonFigure 6. As Figure 5, 1000 experiments at different 𝑇0 values. The figure shows the population of each of the model runs. Some jitter in the x-direction isapplied to the points for clarity. The left hand shows the case where there is no species environment interaction 𝜎𝐻 = 0 and the right shows 𝜎𝐻 = 0.05 wherethe colour of the points reflects a heating (red) or cooling (blue) core.model suggests that there is a chance to detect biosignatures quite farfrom the abiotic habitable zone, provided life can affect the globaltemperature. Our model also predicts that looking at planets outsidethe abiotic habitable zone will be more informative for testing ideasof Gaia Theory, since within it we expect to see habitable planetswhether Gaia is operating or not. Our model also demonstrates thatfinding a non-Gaian state within the biotic habitable zone is notincompatible with Gaia theory. Where life can shape its planet thereremains the possibility for it to push its planet towards inhospitableconditions.5 INCREASING TEMPERATUREGeological evidence on Earth suggests that life emerged on our planetvery soon after surface conditions allowed Nisbet & Sleep (2001)implying that the probability for the emergence of life might be highfor planets with the correct prerequisites, however no alien life has yetMNRAS 000, 1–18 (222)
1400.14000....·..1200:1200!::::100010000800800NN600.06004004002002009..0080901001101208090100110120ToToA Gaian Habitable Zone11Figure 7. As Figure 5, showing the temperature in each of the model runs. The colour of the points reflects a heating (red) or cooling (blue) core. Only𝜎𝐻 = 0.05 is shown, when 𝜎𝐻 = 0, 𝑇 = 𝑇0.been detected. The Gaian bottleneck hypothesis suggests an answer tothis apparent contradiction and proposes that for newly emerged lifeon a young planet, there is a small window of opportunity wherebylife can establish self-regulatory feedback loops to maintain habitableconditions. If the biosphere succeeds, then planetary habitability canbe maintained for long time spans, however if the biosphere fails,surface conditions on the planet will rapidly become inhospitable,causing life to go extinct. This hypothesis is closely tied to ideas of aninhabitance paradox Goldblatt (2016) - that the long term habitabilityof a planet depends directly on whether or not it is inhabited. In thissection we investigate aspects of the inhabitance paradox in the TNMsetting.The classic Daisyworld experiment studies temperature regulationby life in the face of increasing solar luminosity. We can performa similar experiment by increasing 𝑇0 over the course of the modelruns. Figure 8 shows population and temperature for individual modelruns where the background temperature, 𝑇0, increases linearly from𝑇𝑖𝑛𝑖𝑡 = 𝑇𝑃 = 100 up to 𝑇0 = 105 over the course of 104 genera-tions. The key observation is that the actual temperature 𝑇 (bottomrow of Figure 8) increases more slowly than 𝑇0 - meaning that lifeis regulating the temperature. The only way the TNM can regulatewithout changing the composition of the core is by altering the pop-ulations of the core species. In Figure 8 we can see the temperatureincrease during an equilibrium is slowed by increasing or decreasingthe population, and thus life’s contribution to the total temperature.Figure 9 shows the configuration of the model agents at a partic-ular time in the history of the simulation where the core - the groupof species with significant reproduction probability - is stable andlife is adapting to the temperature change. There are two differentcases shown in (a) and (b). In case (a), between roughly 𝑡 = 4000and 𝑡 = 10000, the total population is increasing, which has theeffect of slowing the temperature increase. Figure 9 (a) shows thatthe cloud (by definition species not in the core) has a roughly equalnumber of heating and cooling species, and each of these species hasa small population, thus the cloud (i.e. the majority of species) doesnot participate in temperature regulation. Of the 4 species making upthe core, 2 have a cooling effect, one is heating and one is approxi-mately neutral. The upper left and lower right species happen to have𝐻𝑖 = −0.047 and 𝐻𝑖 = 0.046 respectively, as well as roughly equalpopulations, so their effects cancel out, resulting in a net cooling byincreasing the core population.Note that in Figure 8 (a) during this period the temperature isbelow 𝑇𝑃 = 100. As 𝑇0 increases it will push 𝑇 towards 𝑇𝑃, thefitness of all species𝑓𝑖 =∑︁𝑗𝐽𝑖 𝑗𝑛 𝑗1 +�𝑇 −𝑇𝑃𝜏�2 − 𝜇𝑁increases and therefore the population increases, which increases thecooling effect to (partially) offset the abiotic temperature increase.Figures 8 (b) and 9 (b) shows the opposite case. The core has a netheating effect and the temperature is above 𝑇𝑃. Increasing 𝑇0 movesthe temperature further from 𝑇𝑃, reducing the fitness and also thepopulation, therefore reducing the heating effect of life.This is a regulation mechanism known as ‘rein-control’ where thetemperature of the system can be thought of as being ‘pulled’ intwo different directions by different reins, in this case 𝑇0 and theheating or cooling effect of life. As all species share the same 𝑇𝑃it is the overall heating or cooling impact of the TNM communitythat is important for temperature regulation. Looking at the case ofa cooling community first, Figure 8 (a), after 𝑡 ≈ 4000 generationshas 𝑇 < 𝑇𝑃 < 𝑇0. In this case when 𝑇 < 𝑇𝑃, as 𝑇0 increases, thismoves 𝑇 closer to 𝑇𝑃 and boosts the growth rate and hence the sizeof the cooling core, slowing the rate of heating. Once 𝑇 ≃ 𝑇𝑃 the𝑇0 rein is pulling away from 𝑇𝑃, limiting further growth and so thesystem stabilises. These feedback loops for an overall cooling TNMcommunity are shown in Figure 10.MNRAS 000, 1–18 (222)
120115110 -105 -← 100 - S690 -85 -80 -80859095100105110115120To12Arthur & NicholsonFigure 8. Showing a single model run where background temperature 𝑇0 is increasing over time. The population is shown in the top row and temperature in thebottom row. The two columns show the two different types of temperature regulation by the core. On the left, after 4000 generations the temperature is regulatedby increasing the population. On the right, between 4000 and 8000 generations, temperature is regulated by decreasing the population.In Figure 8 (b) by 𝑡 ≈ 2000 the TNM community is overall heatingand 𝑇 > 𝑇0 > 𝑇𝑃. In this scenario any further growth of the com-munity would increase 𝑇 which would decrease the growth rate. Onthe other hand a reduction in population reduces its heating effect,which partially offsets the increase in 𝑇0 and so the real temperature𝑇 increases more slowly. Even though 𝑇0 > 𝑇𝑃 the heating TNMcommunity and 𝑇0 are still ‘pulling’ the temperature in opposite di-rections as a reduction in the population will cool the environmentwhich will move 𝑇 closer to 𝑇𝑃. When 𝑇0 > 𝑇𝑃 a heating TNMcommunity can never achieve a 𝑇 close to 𝑇𝑃.At 𝑡 ≈ 9000 we see that there is a quake and 𝑇 rapidly dropsbelow 𝑇𝑃 as the TNM community switches from an overall heatingone to overall cooling. This example demonstrates that a biospherein a non-Gaian state can become ‘unstuck’ and transition to a Ga-ian state if life can cling on for long enough. Twice during Earth’shistory it is thought that the planet was covered in ice from poles toMNRAS 000, 1–18 (222)
(a)(b)17501400150012001250-10001000800N7506005004002502000-.2000400060008000100001200020004000600080001000012000t (generations)t (generations)108108IP106106104 104emperatureTemperature10210210010098 -98 -969694 -94 -020004000600080001000012000020004000600080001000012000t (generations)t (generations)A Gaian Habitable Zone13Figure 9. Model snapshot at 𝑡 = 7000 generations for the runs (a) and (b) from Figure 8. (a) The core has an overall cooling effect (b) the core has a heatingeffect.Figure 10. Feedback loops between community population, N, and environment temperature, T, for an overall cooling TNM community. A + symbol (alsoindicated with a solid arrow) indicates an increase in the source leads to an increase in the sink, e.g. an increase in population leads to an increase in temperature.A - symbol (also indicated with a dashed arrow) indicates an increase in the source leads to a decrease in the sink, e.g. an increase in the temperature leads to adecrease in the total population. A feedback loop with an overall positive sign (determined by multiplying each sign in the loop) indicates a runaway feedbackloop, whereas a feedback look with an overall negative sign indicates a stable feedback loop. Therefore for a cooling TNM community, temperature regulationoccurs below 𝑇𝑃.equator - known as a Snowball Earth Hoffman et al. (1998). TheseSnowball Earth states persisted for millions of years and althoughthere is evidence that a diversity of life survived these states, a frozenplanet would present fewer niches for life than a thawed planet would(indeed, on Earth the biodiversity is lowest at the poles Rutherfordet al. (1999)). Such a state could represent a non-Gaian biosphereclinging on, and both Earth history and our experiments demonstratethat observing a planet in a non-Gaian state doesn’t mean that it willalways remain so.5.1 AveragesAgain, we are interested in what happens in the long run on average.Figure 11 shows that for our setup where 𝑇0 > 𝑇𝑃, on average thetemperature is regulated below 𝑇0. Only those communities that havestrong mutually symbiotic interactions and a cooling effect are likelyto survive. If the rate of heating is not too strong (top row) most ofthe runs survive and the population grows logarithmically over timewhile the proportion of runs at or below𝑇𝑃 falls at a much slower ratethan the increasing background temperature. Since most of the runssurvive we can’t have Selection by Survival, so Sequential Selectionwith Memory must be responsible for this behaviour. The 𝑁 versusMNRAS 000, 1–18 (222)
NN+for T < Tpfor T > T.(a)(b)0.040.020.00-0.02-0.0414Arthur & NicholsonFigure 11. Top row is the scenario where we heat from 𝑇0 = 100 = 𝑇𝑝 to 𝑇𝑓 𝑖𝑛 = 105 over the course of 104 generations. The first column is the averagepopulation, the numbers in black are the proportion of runs which have survived, cyan italic shows the proportion of survivors which have 𝑇 ≤ 𝑇𝑃. The secondcolumn shows the average temperature and 𝑇0. The final column shows 𝑁 versus 𝑇 for all the model runs after 104 generations when 𝑇0 = 𝑇𝑓 𝑖𝑛. The secondrow is the same as the first but with 𝑇𝑓 𝑖𝑛 = 120.𝑇 plot in the top row of Figure 11 shows that we still have a splitbetween model runs with a heating core and a cooling core, whereonly those with a cooling core can have large 𝑁.The bottom row of Figure 11 shows the case where the heating ismuch more aggressive with 𝑇𝑓 𝑖𝑛 = 120. With a constant background𝑇0 = 120 around 27% of model runs survive for 104 generations.Figure 11 shows that once the temperature goes above ∼ 110 theruns start to go extinct though a larger proportion, 68%, survive until𝑡 = 104. Surviving runs are divided into two groups: runs where asmall population is ‘clinging on’ at high 𝑇 and runs where a large,cooling population can be maintained.We investigate this further in Figure 12, where we directly compareruns with an constant background temperature 𝑇0 = 110 = 𝑇𝑃 + 5𝜏to runs where the temperature gradually increases to 𝑇0 = 110 over104 generations. At 104 generations, when both systems experiencethe same 𝑇0, the runs which have been heated gradually are doingbetter i.e. more of them survive, they have higher populations andlower temperatures. This simple observation has a few implications.First it suggests that if life occurs earlier, as soon as conditions areoptimal for it, then it can survive longer and it can have a greaterinfluence on the long term habitability of its planet. Second it sug-gests that more realistic models aiming to map out the habitable zonearound a star should consider if the planet has ever been hospitablefor life. In that case planets which would have inhospitable abioticparameters, like 𝑇0, at the time of observation may have been able tomaintain habitable temperatures. This phenomena - where life is keyin preserving habitability is known as the inhabitance paradox - thatlong term habitability of a planet isn’t possible without life main-taining habitability Goldblatt (2016). It also ties closely to the GaianBottleneck hypothesis Chopra & Lineweaver (2016) - life emergingduring a window of opportunity can prevent the environment fromdegrading, even as 𝑇0 changes.Finally, Figure 13 studies the effect of the rate of heating bycomparing two scenarios where 𝑇0 is increased from 𝑇𝑃 = 100to 𝑇𝑓 𝑖𝑛 = 110 over 104 versus 105 generations. The ‘slow’ heatingscenario could be thought to mimic something like the graduallyincreasing solar luminosity while the fast heating scenario is akinto something like the rapid onset of global glaciation Overpeck &Cole (2006). Figure 13 shows that, in general, slower heating leadsto more Gaian states. The population is higher and the final temper-ature is lower. The average population in fact stops increasing in thefast heating case, as abiotic conditions degrade faster than SSM canoperate, while the slow heating case shows a continuously increas-ing population up to 105 generations. Thus, if SSM is to operatethe larger the separation between abiotic and biotic timescales (e.g.geologic versus evolutionary) then the more likely we are to observea Gaia.MNRAS 000, 1–18 (222)
t= 104300107To110.0106280 Tp(T)107.5:0.4710.43105260 105.0104 -10.9910.98240 10.50102.5M220-10.99102100.010197.5180 10095.06692.51609810210310420004000600080001000002505007501000125015001750t (generations)Nt (generations)t= 104120280 -120(T)10.45260115 11510.9910.48240 -ature11010.99220 -105200:0.24105 -10.68100180 -160 -100951021031042000400060008000100000200400600800100012001400t (generations)t (generations)NA Gaian Habitable Zone15Figure 12. Comparing increasing 𝑇0 = 100 → 110 to constant 𝑇0 = 110. Top left is average population, the numbers show the number of surviving runs at eachtime-step. Top right shows average temperature and 𝑇0. Bottom left shows all of the runs (see Figure 4) for the increasing temperature case, and bottom rightshows the runs for the constant temperature case.6 CONCLUSIONSModels such as the one described here help us to understand howplanetary regulation arises from ‘selfish’ individuals. Gaia is a primeexample of an emergent system - one where the whole has propertiesits parts do not. However Gaia was first discussed some years beforeemergence and complexity thinking were common. Lovelock andothers discussing Gaia at the macro level, for example talking abouther health with the notion of Geophysiology Lovelock (1989), havebeen harshly criticised. There have been two primary criticisms: thefirst argues that Gaia is simply a metaphor and not a scientific theoryKirchner (1989) and the second argues that episodes from earthhistory where life generates hostile conditions is strong evidenceagainst Gaia Ward (2009). We believe the notion of Entropic GaiaArthur & Nicholson (2022) and our discussion of selection principlesanswers both of these criticisms.First to address the charge that Gaia is ‘just a metaphor’ it is in-structive to discuss some other emergent systems. A gas is ‘just’ acollection of individual atoms. However emergent properties, likeMNRAS 000, 1–18 (222)
300112Tinit = 100Tinit = 100Tinit = 110Tinit = 110:0.99110250 -10.9510.99108-20010.81106≤ 15010.9410410010.99102 50100 98102103104200040006000800010000t (generations)t (generations)Tinit = 100, t = 104Tinit = 110, t = 104115.0112.5112.5110.0110.0107.5107.5105.0-105.0102.5102.5100.0-100.097.597.595.0 -95.0 92.5025050075010001250150017502000o20040060080010001200NN16Arthur & NicholsonFigure 13. Increasing 𝑇0 = 100 → 110 over 104 generations and 105 generations. Top left is average population, the numbers show the fraction of survivingruns at each time-step. Top right shows average temperature and 𝑇0 (note the log scale makes the linearly increasing 𝑇0 look exponential). The numbers give theaverage temperature at the end of the experiment. Bottom left shows all of the runs at the end of the fast heating experiment, and bottom right shows the runs inthe slow heating scenario.pressure and temperature, are not features of individual atoms butare still very much real. An organism is a ‘just’ a system of chemicalreactions. However biology is not just applied chemistry, it is legiti-mate and useful to reason about cells. The economy is a phenomenonthat emerges out of the production and consumption patterns of mil-lions of individuals. Depression, recession, asset bubbles and so onare properties of the whole system that have real explanatory power.Of course we can have incorrect theories about gases, cells or eco-nomics, but these do not make it illegitimate to reason about wholesystems. When talking about life at planetary scale, we talk aboutsomething called ‘Gaia’. This is a metaphor in the same sense asan organism or an economy, a metaphor that admits rigorous microfoundations and which can be very productive for understanding asystem or a collection of systems. In the context of bio-signaturedetection, where we may have potentially very many ‘Gaias’ andMNRAS 000, 1–18 (222)
400112tmax =10000tmax = 10000tmax=100000tmax = 10000011035010.88108 30010.98105.55M10.9810.99104-103/79250 -10.99i0.95102200寸10015098102103104105102103104105t (generations)t (generations)To=110,t=104To=110, t= 105115.0115112.5110.0-110107.5105.0105102.5100 100.097.595 95.0 025050075010001250150017502000o500100015002000NNA Gaian Habitable Zone17very limited information about the processes going on inside them,a holistic theory is crucial.The second class of criticisms is directly addressed by our idea thatGaia arises due to a selection principle operating on species networks.To briefly re-iterate - sequential selection posits a type of punctuatedequilibrium Eldridge & Gould (1972), characterised by stable periodsinterrupted by catastrophes. Models of co-evolution such as the TNMand others (e.g. Kauffman & Weinberger (1989)) show exactly thiskind of behaviour. Entropic Gaia is the argument that these stableperiods get longer over time. In the TNM this is for the simple reasonthat each punctuation is not a complete reset, the next stable periodemerges from the debris of the previous equilibrium. The speciesnetworks that can establish themselves must have high populationgrowth rates so they saturate the carrying capacity, while also notself limiting. High populations mean more diversity, which meanseven more ‘debris’ during the next reset. In this view, periods ofdisregulation are not evidence against Gaia, they are an integral partof how she arises.To show the use of such a theory in this work we have, within aconcrete and fairly general modelling framework, investigated somepressing questions of astro-biology through Gaia theory. In section 3we studied the effect of life on the ability of a planet to sustain life insuboptimal abiotic conditions. This leads us to propose the idea of theGaian habitable zone versus the standard abiotic habitable zone.Our results predict that Gaia extends the habitable zone around a starwhile making the abiotic habitable zone slightly less hospitable. Thishas a straightforward and testable implication - search for life outsidethe abiotic habitable zone as a signature of Gaia.In section 5 we study the effect of a deteriorating abiotic envi-ronment to address the idea of the Gaian bottleneck. Life’s chancesof long term survival, and the emergence of Gaia, are both morelikely if life can ‘catch’ a window of high habitability (in this modelwhere 𝑇0 = 𝑇𝑃). Life can then, on average, maintain better condi-tions. Again this has implications in the search for life - planets whichwere once inside but are currently outside the abiotic habitable zonemay host life. Again Gaia expands the boundary of habitability andinhabitance.Both Selection by Survival (SBS) and Sequential Selection withMemory (SSM) play a role in determining the likelihood of a Gaianplanet. Nearer the centre of the abiotic habitable zone, SSM is themain mechanism for generating Gaias and towards the edges SBSbecomes more important. Finding a non-Gaian planet at the centerof the abiotic habitable zone is not incompatible with Gaia theory.If life can strongly influence its environment it can degrade it. Theresults of this model suggest that if life can cling on, and abioticconditions do not degrade too much, then the planet can become‘unstuck’ through the evolution of species which regulate the tem-perature. To map out the Gaian habitable zone around a particularstar, or class of star, will require fusing detailed abiotic models withmodels of biogeochemistry. Some steps in this direction were takenin Nicholson et al. (2022), where the fine-details, such as lifespanor maintenance energy requirements of the biosphere were shownnot to affect the general conclusion about life’s effect on potentialbio-signatures. If this is the case generally, and this framework canbe expanded to cover a range of biotic scenarios, then we may be ableto produce detailed predictions of the Gaian habitable zone withoutneeding to know the population-level details of any alien life. Iden-tifying potential metabolic pathways and limiting abiotic factors onmicrobial growth (e.g. resource limitation) would be sufficent forrobust biosignauture predictions.In summary, we propose a statistical theory of planetary habitabil-ity, with strong and testable implications on the search for alien life.Our model, as well as Earth history, teaches us that a Gaian planetcan emerge from periods of disregulation and low habitability. Ulti-mately, this suggests a wider range of habitable and inhabited planetsthan abiotic models would predict.ACKNOWLEDGEMENTSThis work was supported by a Leverhulme Trust research projectgrant [RPG-2020-82].DATA AVAILABILITYThe code is available on request from the authors.REFERENCESAbe Y., Abe-Ouchi A., Sleep N. H., Zahnle K. J., 2011, Astrobiology, 11, 443Amundsen D. S., et al., 2016, Astronomy & Astrophysics, 595, A36Arthur R., Nicholson A., 2017, Journal of theoretical biology, 430, 177Arthur R., Nicholson A., 2022, Journal of Theoretical Biology, 533, 110940Arthur R., Sibani P., 2017, Physica A: Statistical Mechanics and its Applica-tions, 471, 696Arthur R., Nicholson A., Sibani P., Christensen M., 2017, Computational andMathematical Organization Theory, 23, 1Becker N., Sibani P., 2014, EPL (Europhysics Letters), 105, 18005Boucher O., et al., 2012, Environmental Research Letters, 7, 024013Boutle I. A., Mayne N. J., Drummond B., Manners J., Goyal J., Lambert H. F.,Acreman D. M., Earnshaw P. D., 2017, Astronomy & Astrophysics, 601,13Boyle R. A., Lenton T. M., Williams H. T., 2007, Geobiology, 5, 337Catling D. C., et al., 2018, Astrobiology, 18:6Chopra A., Lineweaver C. H., 2016, Astrobiology, 16, 7Christensen K., Di Collobiano S. A., Hall M., Jensen H. J., 2002, Journal oftheoretical Biology, 216, 73Claudi. R., 2017, Proceedings of ScienceCollins M., 2021, LPI Contributions, 2549, 7001Covey C., Thompson S. L., Weissman P. R., MacCracken M. C., 1994, Globaland Planetary Change, 9, 263Daines S. J., Mills B. J., Lenton T. M., 2017, Nature Communications, 8, 1Domagal-Goldman S. D., et al., 2016, Astrobiology, 16, 561Downing K., Zvirinsky P., 1999, Artificial life, 5, 291Eldridge N., Gould S., 1972, Models in Paleobiology/Ed. by TJM Schopf, pp82–115Fauchez T. J., et al., 2021, The Planetary Science Journal, 2, 106Ford Doolittle W., 2014, Biology & Philosophy, 29, 415Goldblatt C., 2016, arXiv preprint arXiv:1603.00950Goldblatt C., Zahnle K. J., 2011, Nature, 474, E1Guan Q., Haroon S., Bravo D. G., Will J. L., Gasch A. P., 2012, Genetics,192, 495Harding S. P., 1999, Tellus B, 51, 815Hedges S. B., 2004, SYSTEMATICS ASSOCIATION SPECIAL VOLUME,66, 27Hoffman P. F., Kaufman A. J., Halverson G. P., Schrag D. P., 1998, science,281, 1342Huggett R. J., 1999, Global Ecology and Biogeography: Ecological Surround-ings, 8, 425Kasting J. F., Whitmire D. P., Reynolds R. T., 1993, Icarus, 101, 108Kauffman S. A., Weinberger E. D., 1989, Journal of theoretical biology, 141,211Kharecha P., Kasting J., Siefert J., 2005, Geobiology, 3, 53Kiang N. Y., Domagal-Goldman S., Parenteau M. N., Catling D. C., Fujii Y.,Meadow V. S., Schwieterman E. W., Walker S. I., 2018, Astrobiology, 18Kirchner J. W., 1989, Reviews of Geophysics, 27, 223Kirchner J. W., 2003, Climatic Change, 58, 21MNRAS 000, 1–18 (222)
18Arthur & NicholsonKopparapu R. K., Ramirez R. M., SchottelKotte J., Kasting J. F., Domagal-Goldman S., Eymet V., 2014, The Astrophysical Journal Letters, 787,L29Krissansen-Totton J., Thompson M., Galloway M. L., Fortney J. J., 2022,arXivLambert G., Kussell E., 2014, PLoS genetics, 10, e1004556Landi P., Minoarivelo H. O., Brännström Å., Hui C., Dieckmann U., 2018, in, Systems analysis approach for complex global challenges. Springer, pp209–248Le Bayon R.-C., Bullinger G., Schomburg A., Turberg P., Brunner P.,Schlaepfer R., Guenat C., 2021, Hydrogeology, chemical weathering,and soil formation, pp 81–103Lenardic A., Crowley J., Jellinek A., Weller M., 2016, Astrobiology, 16, 551Lenton T., Watson A., 2013, Revolutions that made the Earth. OUP OxfordLenton T. M., Wilkinson D. M., 2003, Climatic Change, 58, 1Lenton T. M., Daines S. J., Dyke J. G., Nicholson A. E., Wilkinson D. M.,Williams H. T., 2018a, Trends in Ecology & Evolution, 33, 633Lenton T. M., Daines S. J., J.W. M. B., 2018b, Earth-Science Reviews, 178,1Ligrone R., 2019, in , Biological innovations that built the world. Springer,pp 129–154Lovelock J. E., 1965, Nature, 207, 568Lovelock J. E., 1989, Reviews of Geophysics, 27, 215Lovelock J. E., Margulis L., 1974, Tellus, 26, 2Luck G. W., Daily G. C., Ehrlich P. R., 2003, Trends in Ecology & Evolution,18, 331Nicholson A. E., Wilkinson D. M., Williams H. T., Lenton T. M., 2018,Monthly Notices of the Royal Astronomical Society, 477, 727Nicholson A., Daines S., Mayne N., Eager-Nash J., Lenton T., Kohary K.,2022, Monthly Notices of the Royal Astronomical SocietyNisbet E. G., Sleep N. H., 2001, Nature, 409, 1083Overpeck J. T., Cole J. E., 2006, Annual review of Environment and resources,31, 1Peterson G., Allen C. R., Holling C. S., 1998, Ecosystems, 1, 6Pierrehumbert R., Gaidos E., 2011, The Astrophysical Journal Letters, 734,L13Quanz S. P., et al., 2021, Experimental Astronomy, pp 1–25Ramirez R. M., Kaltenegger L., 2016, The Astrophysical Journal, 823, 6Rutherford S., D’Hondt S., Prell W., 1999, Nature, 400, 749Schwieterman E. W., et al., 2018, Astrobiology, 18, 663Seager S., 2013, Science, 340, 577Smolin L., 2007, Universe or multiverse, pp 323–366Snellen I. A. G., et al., 2021, Experimental AstronomyVincent W. F., Mueller D., Hove P. V., Howard-Williams C., 2004, in , Origins.Springer, pp 483–501Volk T., 2012, Gaia’s body: Toward a physiology of Earth. Springer Science& Business MediaWard P., 2009, in , The Medea Hypothesis. Princeton University PressWatson A. J., 2004, Scientists Debate Gaia, pp 201–208Watson A. J., Lovelock J. E., 1983, Tellus B: Chemical and Physical Meteo-rology, 35, 284Williams H. T., Lenton T. M., 2007, Oikos, 116, 1087Wood A. J., Ackland G. J., Dyke J. G., Williams H. T., Lenton T. M., 2008,Reviews of Geophysics, 46Worden L., 2010, Ecological Economics, 69, 762Zakem E. J., Polz M. F., Follows M. J., 2020, Nature communications, 11, 1This paper has been typeset from a TEX/LATEX file prepared by the author.MNRAS 000, 1–18 (222)
123version https://git-lfs.github.com/spec/v1oid sha256:0c620400a762f119d0f48726bd0aca59861fd63722c3cac663550c0573ad63d7size 468324123version https://git-lfs.github.com/spec/v1oid sha256:2097f4b60d0f4daf26bcac824b5e6b43b076405a8d868d57b81fd4f9b23ee48esize 7405613123version https://git-lfs.github.com/spec/v1oid sha256:b310749d46c49138d10a54c1b1327c6191ce575f4e97049071057eebd1af1c0dsize 225716123version https://git-lfs.github.com/spec/v1oid sha256:010eaed0507243df3e52eca497fef1f831eb7be5a511f86c02658c23f2a3f26esize 1192015123version https://git-lfs.github.com/spec/v1oid sha256:f474601b6d9bb52ebb40a0da4d7fca520d683c04026ec8493c8a8b906f07356dsize 6029357123version https://git-lfs.github.com/spec/v1oid sha256:f8513a8a60f24187ae3769d8c46e19081f8a2af7dc57b4682ac638da25d383acsize 220606123version https://git-lfs.github.com/spec/v1oid sha256:4a2387df83f0a742a8a10e4bdda6f3e57f89392fff76a7fa7a21ae30046679desize 13681998123version https://git-lfs.github.com/spec/v1oid sha256:0363ab6a35bad0924b92a4397ed4d048f0a42bc5b2db491e1f6b92a19205778fsize 3342381123version https://git-lfs.github.com/spec/v1oid sha256:5d5fd3ac3244c7fa44b3dce1ee4bbacda9941f7870158dfdacc4d5602a76e5ebsize 2359341123version https://git-lfs.github.com/spec/v1oid sha256:ad0173e0a79177c7578c40b30be9ec5e9e686ae16bf4bd9dd284c6c4765184b3size 4745516123version https://git-lfs.github.com/spec/v1oid sha256:f700cd98a0e2de3760cd6b2e67171a2a3ba28abc37c9e35e52103bc067f01d71size 41943491234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303An Analysis of the Automatic Bug FixingPerformance of ChatGPTDominik SobaniaJohannes Gutenberg University MainzEmail: dsobania@uni-mainz.deCarol HannaUniversity College LondonEmail: carol.hanna.21@ucl.ac.ukMartin BrieschJohannes Gutenberg University MainzEmail: briesch@uni-mainz.deJustyna PetkeUniversity College LondonEmail: j.petke@ucl.ac.ukAbstract—To support software developers in finding and fixingsoftware bugs, several automated program repair techniques havebeen introduced. Given a test suite, standard methods usuallyeither synthesize a repair, or navigate a search space of softwareedits to find test-suite passing variants. Recent program repairmethods are based on deep learning approaches. One of thesenovel methods, which is not primarily intended for automatedprogram repair, but is still suitable for it, is ChatGPT. Thebug fixing performance of ChatGPT, however, is so far unclear.Therefore, in this paper we evaluate ChatGPT on the standardbug fixing benchmark set, QuixBugs, and compare the perfor-mance with the results of several other approaches reported inthe literature. We find that ChatGPT’s bug fixing performance iscompetitive to the common deep learning approaches CoCoNutand Codex and notably better than the results reported for thestandard program repair approaches. In contrast to previousapproaches, ChatGPT offers a dialogue system through whichfurther information, e.g., the expected output for a certain inputor an observed error message, can be entered. By providing suchhints to ChatGPT, its success rate can be further increased, fixing31 out of 40 bugs, outperforming state-of-the-art.Index Terms—Automated program repair, automatic bug fix-ing, ChatGPT, Codex, language models.I. INTRODUCTIONComplex software usually contains undiscovered bugs in itssource code. The later these are found, the more far-reachingconsequences these can have. Uncorrected bugs in softwarecan lead to failures of essential systems, which can result inhigh economic costs [1].In order to support programmers in finding and fixingsoftware errors, automated program repair (APR) systems havebeen introduced that automatically suggest software patchesto correct the detected errors [2], [3]. For instance, Haralds-son et al. [4] suggest an approach based on genetic improve-ment (GI) [5] that tracks emerging bugs during a workday andsearches for potential fixes for them overnight. The followingmorning the programmers get a list of suggestions whichshould help fix the detected bugs.Standard methods for automated program repair can beclassified into two categories: the generate-and-validate ap-proaches mutate software guided by a search strategy, whilesemantics-driven (or synthesis-based) approaches use a con-straint solver to synthesize repairs [3]. The generate-and-validate ones have first seen industrial uptake [4]. One ofthe key disadvantage of standard approaches to APR is theirrunning cost. The generate-and-validate ones usually rely ontest suites to verify program correctness, while synthesis-basedones on calls to a constraint solver. Both validation strategiesare costly, making typical APR tools hours to run before aviable patch is presented to the developer.Most recently, program repair tools based on deep learn-ing (DL) approaches have been introduced [6]. These learn bugfixing patterns from existing databases and treat the automatedprogram repair problem as a neural machine translation task,producing a ranking of, sometimes hundreds of, patches.Unlike standard approaches, such generated patches are notusually evaluated against a test suite, or other automatedverification strategy, so may not even compile. Nevertheless,DL-based program repair has shown competitive results tostandard approaches [6].In recent years, several large-scale language models basedon the Transformer architecture [7] have been introduced, suchas CodeBERT [8], PyMT5 [9], and Codex [10], which can alsoprocess and extend source code and achieve comparable resultsto standard approaches on various coding tasks [11]. A large-scale language model based on the Transformer architecturethat has recently received great attention is ChatGPT.1 WithChatGPT not only text input can be extended, but it is evenpossible to have a conversation with the language model andthe previous chat history is taken into account for answergeneration. In addition to very general or subject-specifictopics, ChatGPT can also be used to discuss source code, e.g.,to ask for a suggestion for a fix of incorrect code. However,the quality of these suggestions is still unclear.Therefore, in this work we evaluate and analyse the au-tomatic bug fixing performance of ChatGPT. Moreover, weprovide a comparison with results reported in the literatureobtained using state-of-the-art APR approaches and Codex.We chose the QuixBugs [12] benchmark set for our study, asit contains small, yet challenging programs for current APR1https://openai.com/blog/chatgpt/ (accessed January 18, 2023).arXiv:2301.08653v1 [cs.SE] 20 Jan 2023
approaches. We consider all Python problems from QuixBugs,i.e., 40 overall.We first ask ChatGPT for bug fixes for the selected bench-marks and manually check whether the suggested solution iscorrect or not. We repeat the query four times, to account forthe heuristic nature of ChatGPT. Next, we compare its perfor-mance with that of Codex and dedicated APR approaches. Forthe standard APR approaches, we take the results from a recentpaper [13] that examines the performance of several methodson the QuixBugs benchmark set. For dedicated APR methodsbased on deep learning, we take results from CoCoNut [14].2For the large-scale language model Codex, we take the resultsfrom [15]. Furthermore, we study and categorize ChatGPT’sanswers to gain a deeper understanding of its behavior. Giventhat ChatGPT provides a unique opportunity for a conversationwith the model, we provide a small hint to the model (e.g., afailing test input with an error it produces) to see if it improvesChatGPT’s fix rate.We find that ChatGPT’s program repair performance iscompetitive to the results achieved with CoCoNut and Codex(19 vs. 19 vs. 21 instances solved, respectively). Comparedto the standard program repair approaches, ChatGPT achievesnotably better results. With ChatGPT, we could fix bugs in19 out of 40 problems while with the standard approachesonly 7 can be fixed, even though we give ChatGPT only theincorrect code snippet without any additional information andwithout using the chat option in a conversational way. If thechat function is actively used, we can fix even more instances.This shows the power of providing manual hints to a programrepair system. All our experimental data is available online.3II. CHATGPT FOR AUTOMATED PROGRAM REPAIRIn this section we present our methodology for assessingChatGPT’s program repair performance.A. BenchamrkTo evaluate the automatic bug fixing performance of Chat-GPT, we use the QuixBugs [12] benchmark set. Unlikemany other benchmark suites for automated program repair,QuixBugs contains relatively small problems (small number ofcode lines). These are thus suitable for use in a dialogue sys-tem. For each of the 40 benchmark problems from QuixBugs,we take the erroneous Python code, remove all containedcomments4, and ask ChatGPT if the code contains a bug andhow it can be fixed. For each benchmark problem, we makeseveral independent requests to ChatGPT and manually checkwhether the given answer is correct or not. We standardize ourprocedure by using the same format for each query. We ask:“Does this program have a bug? How to fix it?” followed byan empty line and the buggy code without comments. Figure 1shows an example request to ChatGPT for the BITCOUNTproblem. Lines 1-2 contain the question to ChatGPT where2Although more recent approaches exist, we found this work is the mostrecent providing sufficient patch ranking detail.3https://gitlab.rlp.net/dsobania/chatgpt-apr.4This was necessary, as sometimes the comments contain the solution.1Doest h i sprogramhave a bug ? How to2f i xi t ?34defb i t c o u n t ( n ) :5count = 06while n :7n ˆ= n − 18count += 19r e t u r ncountFig. 1: Request to ChatGPT for the BITCOUNT problem.we ask how the bug can be fixed and starting from line 4we present the erroneous code snippet. For this example, wewould expect from ChatGPT an answer that addresses thebug in line 7, where n ˆ= n - 1 should be replaced withn &= n - 1, either with a response containing the completecode snippet with the fixed bug (correctly addressed) or bygiving an exact and correct description how to change theaffected code lines.B. Comparison StudyWe ran four independent requests to ChatGPT for eachproblem from the QuixBugs dataset. In order to compare theresults of ChatGPT with the standard APR methods, we takethe results from a comprehensive study from the literature[13] that reports the performance of ten different methods(Arja [16], Cardumen [17], Dynamoth [18], JGenProg [19],JKali [19], JMutRepair [19], Nopol [20], NPEfix [21], RSRe-pair [16], and Tibra [19]) on the problems from QuixBugs. Fordedicated APR approaches based on deep learning we choserecent results reported by Lutellier et al. [14].5 In Table Iwe report a fix only if the correct patch was ranked first byLutellier et al.’s proposed approach, CoCoNut. For the large-scale language model Codex, we take the results from a recentpaper [15]. We ran this experiment on ChatGPT versions fromDecember 15, 2022 and January 9, 2023.C. Dialogue StudyGiven that ChatGPT provides a unique opportunity of adialogue with the model, we also conduct a study where weprovide ChatGPT with a hint, based on ChatGPT’s response. IfChatGPT does not provide a correct answer to the first request(described in the previous paragraph), we tell ChatGPT in astandardized way that the function is not working correctly andadditionally provide an input example that shows that the func-tion is not working properly. If ChatGPT incorrectly claimedthe program was correct, we replied: “The function does notwork. E.g., for the input <input> it should return <output>.”or “The function does not work. E.g. for the input <input>I get the following error message: <output>”, dependingon whether the failing test case from the QuixBugs datasetreturned an incorrect answer or threw an error. In the case of5CoCoNut, solves overall only 2 instances less than best reported thus faron the QuixBugs Python dataset [15], though details on patch ranking foreach program were missing from the later work.
more complex inputs we made the following response: “Thefunction does not work. E.g., given the following call: <codesnippet> The following should be the output: <output>.”6 Weonly provide one such hint and report results. This experimentwas run on the ChatGPT version from January 9, 2023.III. RESULTS AND DISCUSSIONIn this section, we present the results of the comparisonof ChatGPT, Codex, CoCoNut, and the standard APR ap-proaches. We classify ChatGPT’s answers and report on shortdiscussions with the model. Furthermore, we describe whatwe noticed while working with ChatGPT.A. Automatic Bug Fixing PerformanceTable I shows the achieved results of ChatGPT, Codex,CoCoNut, and the dedicated APR approaches on the bench-mark problems from QuixBugs. For the ChatGPT results, acheckmark () indicates that a correct answer was given inat least one of the four runs for a benchmark problem. Across () indicates that no correct answer was given in anyof the runs. In parentheses we additionally report the numberof runs that led to a successful solution. For the results fromthe literature, a checkmark indicates that a correct bug fix isreported. A cross means that no successful bug fix is reported.We see that the results achieved by ChatGPT are similarto Codex in performance and outperform the standard APRapproaches. Overall, we find bug fixes for 19 benchmarkproblems with ChatGPT, 21 are reported for Codex, 19 forCoCoNut, and only 7 for the standard approaches.The large gap in performance between the language modelbased approaches and the standard APR approaches can beexplained by the fact that the latter usually just use a small testsuite to define the problem, which can be easily overfitted. Theauthors of [13] also report this problem. If only the test suiteis considered for evaluation, the standard approaches wouldsolve a total of 16 benchmark problems. However, as in real-world applications only programs that work also on unseeninputs are usable, we have only adopted the 7 generalizingproblems from [13] as correct.If we take a closer look at the results for ChatGPT, wesee that benchmark problems are often only solved in one ortwo runs. Only for the problems BUCKETSORT and FLATTENChatGPT finds a bug fix in all four runs. So ChatGPT seemsto have a relatively high variance when fixing bugs. For anend-user, however, this means that it can be helpful to executerequests multiple times.Furthermore, it is not surprising that ChatGPT solves aboutthe same number of problems as Codex, as ChatGPT andCodex are from the same family of language models.7 How-ever, we still see potential for improvement for ChatGPT, asthe given responses are often close to the correct solution(for a detailed classification of ChatGPT’s responses seeSection III-B).6The third case only appeared once. All queries are available online.7https://beta.openai.com/docs/model-index-for-researchers (accessed Jan-uary 18, 2023).Nevertheless, we are very strict in our evaluation andconsider only patches as correct if the bug introduced byQuixBugs is actually identified and corrected. E.g., for someproblems, ChatGPT suggests a complete re-implementationwhich is then bug-free. However, these are probably no realbug fixes, since the introduced bug is not localized. We assumethat ChatGPT simply reproduced what it has learned here.Furthermore, we do not count a bug as fixed if additionalchanges suggested by ChatGPT introduce new errors thatprevent the program from running properly. Moreover, bysending just a single request in this evaluation, we are notusing the full potential of the dialogue system. Consequently,we take a closer look at how ChatGPT behaves when weinteract more with the system and give it more informationabout the bug in Section III-C.B. A Classification of ChatGPT’s AnswersWhile working with ChatGPT, we noticed different typesof responses that ChatGPT gave to our requests, especiallywhen a bug could not be found. Therefore, we identified thedifferent types of answers from ChatGPT for the benchmarkproblems from QuixBugs and analyzed their frequency. Weidentified the following classes of ChatGPT answers:• More information required: Asks for more informationon the program behavior to identify the bug.• No bug found: Does not find a bug and states the programis working correctly.• Correct fix provided: Provides the correct fix for thecorrect bug.• Tries to fix something else: Does not find the intendedbug and tries to fix or advise on something else that isnot really a bug or adjusts for edge cases.• Provides fix but introduces new bug: Provides thecorrect fix for the target bug but introduces a new bugsomewhere else.• Alternative implementation: Does not fix the bug butgives a working alternative implementation.Figure 2 shows the number of occurrences of identifiedclasses of ChatGPT answers given for the problems fromQuixBugs.We see that for most of our requests, ChatGPT asks for moreinformation about the problem and the bug. With the secondmost number of answers given, we observe ChatGPT claimingthat the given code snippet does not seem to have a bug. Inboth cases it might be useful to fully utilize the possibilitiesof the dialogue system ChatGPT offers, as further informationmight lead to a correct bug fix.Less often than the request for more information, weobserve that ChatGPT fixes the bug but at the same timeintroduces new errors, or we see that ChatGPT not reallyaddresses the bug correctly but suggests a completely newworking re-implementation for the problem.C. A Discussion with ChatGPTIn order to be able to compare ChatGPT with other systemsin a standardized form, we have so far studied how ChatGPT
TABLE I: Results achieved by ChatGPT, Codex, CoCoNut, and the standard APR approaches on the problems from theQuixBugs benchmark set. For ChatGPT, we also report the number of successful runs in brackets.Benchmark problemChatGPTCodex [15]CoCoNut [14]Standard APR [13]bitcount (0 / 4)breadth-first-search (2 / 4)bucketsort (4 / 4)depth-first-search (0 / 4)detect-cycle (0 / 4)find-first-in-sorted (2 / 4)find-in-sorted (3 / 4)flatten (4 / 4)gcd (0 / 4)get-factors (1 / 4)hanoi (0 / 4)is-valid-parenthesization (2 / 4)kheapsort (0 / 4)knapsack (1 / 4)kth (0 / 4)lcs-length (0 / 4)levenshtein (0 / 4)lis (0 / 4)longest-common-subsequence (0 / 4)max-sublist-sum (0 / 4)mergesort (1 / 4)minimum-spanning-tree (0 / 4)next-palindrome (1 / 4)next-permutation (0 / 4)pascal (1 / 4)possible-change (1 / 4)powerset (0 / 4)quicksort (1 / 4)reverse-linked-list (2 / 4)rpn-eval (0 / 4)shortest-path-length (1 / 4)shortest-path-lengths (0 / 4)shortest-paths (1 / 4)shunting-yard (2 / 4)sieve (0 / 4)sqrt (1 / 4)subsequences (1 / 4)to-base (0 / 4)topological-ordering (0 / 4)wrap (0 / 4)ΣΣΣ (Solved)1921197
01020304050# of occurrencesotheralternative implementationprovides fix but introduces new bugtries to fix something elsecorrect fix providedno bug foundmore information requiredFig. 2: Number of occurrences of identified classes of ChatGPT answers given for the problems from QuixBugs.1Request( 1 ) :2Doest h i sprogramhave a bug ? How tof i xi t ?34defgcd ( a ,b ) :5i fb == 0:6r e t u r na7e l s e :8r e t u r ngcd ( a % b ,b )910Response( 1 ) :11Thisi stheEuclideana l g o r i t h mf o rf i n d i n gtheg r e a t e s tcommon d i v i s o r(GCD)of two12i n t e g e r s ,a and b .I tappearstobeimplementedc o r r e c t l y .I fyouaree x p e r i e n c i n g13i s s u e switht h i sprogram ,i ti sl i k e l yt h a ttheprobleml i e selsewhereinyourcode .14Without morei n f o r m a t i o naboutthebug youareexperiencing ,i ti sd i f f i c u l ttosay15how tof i xi t .1617Request( 2 ) :18No ,thef u n c t i o ni snotc o r r e c t . E . g . ,f o rthei n p u ta = 4 and b = 5 Igetthef o l l o w i n g19e r r o rmessage :” RecursionError : maximum r e c u r s i o ndepthexceededincomparison ” .2021Response( 2 ) :22Thei s s u ei st h a tthef u n c t i o nc a l l si t s e l fr e c u r s i v e l y ,andin some cases ,i tnever23r e a c h e sthebasecase( b == 0) ,causingi ttor e c u r s ei n d e f i n i t e l y .The basecaseof24thegcda l g o r i t h mi swhen theremainderi szero ,butint h i simplementation ,i t ’ s when25bi szero .For example ,when a=4 and b=5 , gcd (4 ,5)i sc a l l e d ,whichthenc a l l s26gcd (4 % 5 ,5)whichi sgcd (4 ,5 ) .Thiscausesani n f i n i t eloop .2728You canf i xt h i sby swappingtheparametersinther e c u r s i v ec a l l .2930defgcd ( a ,b ) :31i fa == 0:32r e t u r nb33e l s e :34r e t u r ngcd ( b % a ,a )3536This way ,i fai szero ,thef u n c t i o nr e t u r n sb ( whichi sthegcdofa and b ) ,o t h e r w i s e37i tc a l l si t s e l fwiththe new valuesof b % a and a .Fig. 3: A discussion with ChatGPT about the GCD problem from QuixBugs. We inserted request and response markers in boldfont to make the chat history more readable.behaves when making exactly one request (see Section III-A).However, a potentially powerful advantage of ChatGPT isthat we can interact with the system in a dialogue to specifya request in more detail. This is useful, as both, a textualdescription as well as a definition given by a test suite, arepossibly ambiguous and could be misleading.
1Request( 1 ) :2Doest h i sprogramhave a bug ? How tof i xi t ?34defb i t c o u n t ( n ) :5count = 06while n :7n ˆ= n − 18count += 19r e t u r ncount1011Response( 1 ) :12I ’m unabletot e l li ftheprogramhas a bugwithoutmorei n f o r m a t i o nontheexpected13behaviorandthei n p u tt h a ti scausingthei s s u e .[ . . . ]1415Request( 2 ) :16The programshouldcountthenumberof 1− b i t sinthebin aryencodingof n .1718Response( 2 ) :19Thef u n c t i o nb i t c o u n t ( n )appearstobecountingthenumberof 1− b i t s[ . . . ]2021To confirmt h i s ,you cant e s tthef u n c t i o nwith somet e s tcasestochecki f22i tproducestheexpectedoutput :2324t e s tc a s e s= [0 ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15]25exp ect ed output = [0 ,1 ,1 ,2 ,1 ,2 ,2 ,3 ,1 ,2 ,2 ,3 ,2 ,3 ,3 ,4]2627Request( 3 ) :28Thef u n c t i o ndoesnot work .Fori n p u t1i tseemstoruni n t oani n f i n i t eloop .2930Response( 3 ) :31You arec o r r e c tt h a tthef u n c t i o nw i l lruni n t oani n f i n i t eloop when thei n p u ti s1 .32[ . . . ]3334defb i t c o u n t ( n ) :35i fn == 0:36r e t u r n037count = 038while n :39n ˆ= n − 140count += 141r e t u r ncount4243defb i t c o u n t ( n ) :44count = 045while n > 0:46n ˆ= n − 147count += 148r e t u r ncount4950defb i t c o u n t ( n ) :51r e t u r nbin ( n ) . count ( ’1 ’)5253defb i t c o u n t ( n ) :54count = 055while n :56i fn & 1:57count += 158n >>= 159r e t u r ncountFig. 4: A discussion with ChatGPT about the BITCOUNT problem from QuixBugs. We inserted request and response markersin bold font to make the chat history more readable. In addition, we shortened ChatGPT’s responses in some places to keepthe example as small as possible. When we left out large text passages, we marked this in the text.
Consequently, we investigate for two benchmark problemshow ChatGPT behaves in a conversation and if it is possibleto find a working solution by discussing the problem with thesystem. We choose GCD and BITCOUNT as benchmark prob-lems because in our previous experiments the contained bugcould not be fixed correctly for both problems. Furthermore,the problems consist of a relatively small number of code lineswhich allows us to discuss these problems in detail.Figure 3 shows an example discussion with ChatGPT aboutthe GCD problem (lines 1–8). In the first response (lines10–15), ChatGPT does not present any solution. It asks formore information about the bug (we observed this behaviorfor many other problems, see Section III-B). Since the givenfunction causes recursion issues for many possible inputs,we give ChatGPT an exact input example and the resultingerror message from Python (lines 17–19). By mentioning therecursion issue, the final response goes in the right directionand we get a correctly working patched version (lines 30–34).In Figure 4 we see an example discussion with ChatGPTabout the BITCOUNT problem (lines 1–9). Again, ChatGPTasks for more information about the problem and for an inputthat causes an error (lines 11–13). As follow-up request, wegive ChatGPT a description of what the function should do(based on a code comment from QuixBugs) and ignore therequest for an example input to see how ChatGPT reacts (lines15 and 16). We can see in the following answer (lines 18–25)that there is clearly a relation between ChatGPT’s first andsecond answer because now we get an explanation of howwe can test the function with some test inputs. We respondwith a problem description for a test input and describe thatthere is probably an issue with an infinite loop (lines 27 and28). ChatGPT responds with four code snippets where the firsttwo (lines 34–48) do not solve the problem with the infiniteloop and the last two (lines 50–59) are complete but workingre-implementations which, however, not directly address thecontained bug. It seems that ChatGPT simply returns functionshere that somehow fit the content of the problem discussion,even though the test cases mentioned by ChatGPT showthat the first two functions cannot work correctly. Also thebug is not simply fixed by replacing n ˆ= n - 1 withn &= n - 1 in the given function, but ChatGPT, as al-ready mentioned, returns two complete re-implementations.However, both observations are not particularly surprising fora language model based approach. Nevertheless, the givenanswers would be useful for a programmer as they help tosolve the problem.D. Systematic Follow-up Requests for ChatGPTNext, we conducted a study where we systematically discusswith ChatGPT. For those programs for which the containedbug was not correctly addressed by ChatGPT (see Table I),we provide ChatGPT with a follow-up request giving a hint,as specified in Section II-C. We report our results in Table II.We use the same notation as before with the addition that acheckmark with an asterisk (*) defines that a solution wasfound without a follow-up request being necessary in this run.TABLE II: Results achieved by ChatGPT with additionalinformation given in a follow-up request for the unsolvedbenchmark problems (see Table I).Benchmark problemChatGPTbitcountdepth-first-search*detect-cycle*gcdhanoikheapsortkthlcs-lengthlevenshteinlislongest-common-subsequencemax-sublist-summinimum-spanning-treenext-permutationpowersetrpn-evalshortest-path-lengthssieve*to-basetopological-orderingwrapΣΣΣ (Solved)9 (12)For 9 benchmark problems we see that a more detaileddescription of the bug is helpful for ChatGPT. For 3 bench-mark problems no follow-up request was necessary in this run,since the bug was correctly addressed in the response givenon our first request. Overall, adding a hint to ChatGPT vastlyimproves its performance, with 31 out of 40 problems solved.ChatGPT thus offers an exciting new way of approachingautomated program repair.IV. THREATS TO VALIDITYIt is worth noting that ChatGPT is currently under activedevelopment. During our study there was a major update toit, which might have influenced our results. Although weobserved repairability rates before and after the update to besimilar. However, future releases might yield different results.Furthermore, ChatGPT allows for conversation with its users.Asking a different question than the ones presented in thisstudy could potentially have a different impact on results.To mitigate this threat to validity, we conducted a pre-study,varying the questions asked. We noted no significant influenceon the results. Moreover, the results might vary dependingon the programming language, size of the benchmarks, and
the number of queries issued. To mitigate these threats, wechose a standard benchmark set and targeted Python – themost popular programming language.8 The classification ofthe results was done manually and therefore represents thesubjective assessment of the authors. To enable a verificationof our results, we made our conversations with ChatGPTavailable online.V. CONCLUSIONS AND FUTURE WORKTo support programmers in finding and fixing softwarebugs, several automated program repair (APR) methods havebeen proposed. ChatGPT, a recently presented deep learning(DL) based dialogue system, can also make suggestions forimproving erroneous source code. However, so far the qualityof these suggestions has been unclear. Therefore, we comparedin this work the automatic bug fixing performance of ChatGPTwith that of Codex and several dedicated APR approaches.We find that ChatGPT has similar performance to Codexand dedicated DL-based APR on a standard benchmark set. Itvastly outperforms standard APR methods (19 vs. 7 out of 40bugs fixed). Using ChatGPT’s dialogue option and giving thesystem more information about the bug in a follow-up requestboosts the performance even further, giving an overall successrate of 77.5%. This shows that human input can be of muchhelp to an automated APR system, with ChatGPT providingmeans to do so.Despite its great performance, the question arises whetherthe mental cost required to verify ChatGPT answers outweighsthe advantages that ChatGPT brings. Perhaps incorporationof automated approaches to provide ChatGPT with hints aswell as automated verification of its responses, e.g., throughautomated testing, would yield ChatGPT to be a viable toolthat would help software developers in their daily tasks.We hope our results and observations will be helpful forfuture work with ChatGPT.ACKNOWLEDGMENTSThis work was partially supported by UKRI EPSRC grantno. EP/P023991/1.REFERENCES[1] W. E. Wong, X. Li, and P. A. Laplante, “Be more familiar with ourenemies and pave the way forward: A review of the roles bugs playedin software failures,” Journal of Systems and Software, vol. 133, pp.68–94, 2017.[2] C. Le Goues, T. Nguyen, S. Forrest, and W. Weimer, “GenProg: Ageneric method for automatic software repair,” Ieee transactions onsoftware engineering, vol. 38, no. 1, pp. 54–72, 2011.[3] L. Gazzola, D. Micucci, and L. Mariani, “Automatic software repair:a survey,” in Proceedings of the 40th International Conferenceon Software Engineering, ICSE 2018, Gothenburg, Sweden, May27 - June 03, 2018, M. Chaudron, I. Crnkovic, M. Chechik,and M. Harman, Eds.ACM, 2018, p. 1219. [Online]. Available:https://doi.org/10.1145/3180155.3182526[4] S. O. Haraldsson, J. R. Woodward, A. E. Brownlee, and K. Siggeirs-dottir, “Fixing bugs in your sleep: How genetic improvement becamean overnight success,” in Proceedings of the Genetic and EvolutionaryComputation Conference Companion, 2017, pp. 1513–1520.8https://www.tiobe.com/tiobe-index/ (accessed January 18, 2023).[5] J. Petke, S. O. Haraldsson, M. Harman, W. B. Langdon, D. R. White, andJ. R. Woodward, “Genetic improvement of software: a comprehensivesurvey,” IEEE Transactions on Evolutionary Computation, vol. 22, no. 3,pp. 415–432, 2017.[6] Q. Zhang, C. Fang, Y. Ma, W. Sun, and Z. Chen, “A survey oflearning-based automated program repair,” 2023. [Online]. Available:https://arxiv.org/abs/2301.03270[7] A. Vaswani, N. Shazeer, N. Parmar, J. Uszkoreit, L. Jones, A. N. Gomez,Ł. Kaiser, and I. Polosukhin, “Attention is all you need,” in Advancesin neural information processing systems, 2017, pp. 5998–6008.[8] Z. Feng, D. Guo, D. Tang, N. Duan, X. Feng, M. Gong, L. Shou,B. Qin, T. Liu, D. Jiang et al., “CodeBERT: A pre-trained modelfor programming and natural languages,” in Proceedings of the 2020Conference on Empirical Methods in Natural Language Processing:Findings, 2020, pp. 1536–1547.[9] C. Clement, D. Drain, J. Timcheck, A. Svyatkovskiy, and N. Sundaresan,“PyMT5: Multi-mode translation of natural language and Python codewith transformers,” in Proceedings of the 2020 Conference on EmpiricalMethods in Natural Language Processing (EMNLP), 2020, pp. 9052–9065.[10] M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. d. O. Pinto, J. Kaplan,H. Edwards, Y. Burda, N. Joseph, G. Brockman et al., “Evaluating largelanguage models trained on code,” arXiv preprint arXiv:2107.03374,2021.[11] D. Sobania, M. Briesch, and F. Rothlauf, “Choose your programmingcopilot: a comparison of the program synthesis performance of GitHubCopilot and genetic programming,” in Proceedings of the Genetic andEvolutionary Computation Conference, 2022, pp. 1019–1027.[12] D. Lin, J. Koppel, A. Chen, and A. Solar-Lezama, “QuixBugs: A multi-lingual program repair benchmark set based on the Quixey Challenge,”in Proceedings Companion of the 2017 ACM SIGPLAN internationalconference on systems, programming, languages, and applications:software for humanity, 2017, pp. 55–56.[13] H. Ye, M. Martinez, T. Durieux, and M. Monperrus, “A comprehensivestudy of automatic program repair on the QuixBugs benchmark,” Journalof Systems and Software, vol. 171, p. 110825, 2021.[14] T. Lutellier, H. V. Pham, L. Pang, Y. Li, M. Wei, and L. Tan, “CoCoNuT:combining context-aware neural translation models using ensemble forprogram repair,” in ISSTA ’20: 29th ACM SIGSOFT InternationalSymposium on Software Testing and Analysis, Virtual Event, USA, July18-22, 2020, S. Khurshid and C. S. Pasareanu, Eds.ACM, 2020, pp.101–114. [Online]. Available: https://doi.org/10.1145/3395363.3397369[15] J. A. Prenner, H. Babii, and R. Robbes, “Can OpenAI’s codex fix bugs?an evaluation on QuixBugs,” in Proceedings of the Third InternationalWorkshop on Automated Program Repair, 2022, pp. 69–75.[16] Y. Yuan and W. Banzhaf, “ARJA: Automated repair of java programs viamulti-objective genetic programming,” IEEE Transactions on softwareengineering, vol. 46, no. 10, pp. 1040–1067, 2018.[17] M. Martinez and M. Monperrus, “Ultra-large repair search space withautomatically mined templates: The cardumen mode of astor,” in Inter-national Symposium on Search Based Software Engineering.Springer,2018, pp. 65–86.[18] T. Durieux and M. Monperrus, “Dynamoth: dynamic code synthesisfor automatic program repair,” in Proceedings of the 11th InternationalWorkshop on Automation of Software Test, 2016, pp. 85–91.[19] M. Martinez and M. Monperrus, “Astor: Exploring the design spaceof generate-and-validate program repair beyond GenProg,” Journal ofSystems and Software, vol. 151, pp. 65–80, 2019.[20] J. Xuan, M. Martinez, F. Demarco, M. Clement, S. L. Marcote,T. Durieux, D. Le Berre, and M. Monperrus, “Nopol: Automatic repairof conditional statement bugs in Java programs,” IEEE Transactions onSoftware Engineering, vol. 43, no. 1, pp. 34–55, 2016.[21] B. Cornu, T. Durieux, L. Seinturier, and M. Monperrus, “NPEfix:Automatic runtime repair of null pointer exceptions in Java,” arXivpreprint arXiv:1512.07423, 2015.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535Salient Object Detection for Images Taken by People With Vision ImpairmentsJarek Reynolds*, Chandra Kanth Nagesh*, and Danna Gurari* denotes equal contributionUniversity of Colorado BoulderAbstractSalient object detection is the task of producing a bi-nary mask for an image that deciphers which pixels be-long to the foreground object versus background. We in-troduce a new salient object detection dataset using imagestaken by people who are visually impaired who were seek-ing to better understand their surroundings, which we callVizWiz-SalientObject. Compared to seven existing datasets,VizWiz-SalientObject is the largest (i.e., 32,000 human-annotated images) and contains unique characteristics in-cluding a higher prevalence of text in the salient objects(i.e., in 68% of images) and salient objects that occupy alarger ratio of the images (i.e., on average, ∼50% cover-age). We benchmarked seven modern salient object detec-tion methods on our dataset and found they struggle mostwith images featuring salient objects that are large, haveless complex boundaries, and lack text as well as for lowerquality images. We invite the broader community to work onour new dataset challenge by publicly sharing the dataset athttps://vizwiz.org/tasks-and-datasets/salient-object.1. IntroductionLocating the most prominent foreground object in an im-age is a core computer vision problem, often referred toas salient object detection (as well as salient object seg-mentation and foreground object detection/segmentation)[8,12,32,40]. This work is motivated by the desire to havesalient object detection models work well for images takenby people who are blind or with low vision1 (i.e., peoplewith vision impairments). Such a feature could offer sev-eral benefits to this community. For example, it could con-tribute to privacy-preservation for photographers who relyon visual assistance technologies to learn about objects intheir daily lives, using mobile phone applications such asMicrosoft’s Seeing AI, Google Lookout, and TapTapSee.21For people with low vision, solutions do not exist to correct their vi-sion (e.g., by wearing glasses, surgery).2Many companies record submitted data as evidence that potentiallycould be needed for legal reasons.Figure 1.Example images demonstrating unique features ofour new VizWiz-SalientObject dataset when compared to otherdatasets. The salient objects commonly contain text and occupya larger portion of the image (i.e., high coverage).All content except the foreground content of interest couldbe obfuscated, which is important since private informationis often inadvertently captured in the background of imagestaken by these photographers [24]. Additionally, localiza-tion of the foreground object would empower low visionusers to rapidly magnify content of interest and also enablequick inspection of smaller details [21,39].Many salient object detection datasets have been createdto enable progress in algorithm development [7,8,22,42]. Alimitation of existing datasets is they are typically built us-ing high-quality images collected from photo-sharing web-sites on the Internet. As we will show in Section 3.2, suchimages commonly lack many characteristics that can be ob-served in real-world settings, especially for visual mediataken by visually impaired photographers who are tryingto learn about the content they photograph [24], often pho-tographing distinct types of content such as objects showingtext [25], and cannot verify visual quality [13].To fill this gap, we introduce a new salient object de-tection dataset based on images captured in an authenticuse case where visually impaired photographers shared theirimages to solicit assistance in learning about the visual con-tent. We created this dataset by crowdsourcing the collec-1arXiv:2301.05323v1 [cs.CV] 12 Jan 2023
rCableSalesSUPPLYext Present口WASYOURTRIP?ANTTOHEARFROUR ON-LINB SURpse hcwyou want to take theXILLLutergli.ols.sgizmo.com/s3lpne:KUCLO LCINNO CICMO Ggli.olsiphone.sgizmo.coPadLOLIUILKIUtion of salient object annotations for nearly 40,000 imagestaken from the VizWiz-Captions dataset [25]. Examplesof resulting annotated images are shown in Figure 1. Af-ter applying quality control filtration steps, our final datasetconsists of 32,000 annotated images. We call our datasetVizWiz-SalientObject (or VizWiz-SO). We conduct a de-tailed analysis revealing how this new dataset relates to ex-isting datasets. When comparing our salient objects to thevisual evidence needed to answer questions the photogra-phers asked about their images (i.e., taken from the VizWiz-VQA-Grounding dataset [11]), we observe that over halfthe time the necessary visual evidence is the salient ob-ject. When comparing our dataset to seven existing datasets,we observe VizWiz-SalientObject is the largest (i.e., 32,000human-annotated images) and is unique in its higher preva-lence of text in the salient objects (i.e., in 68% of images) aswell as salient objects occupying a larger ratio of the images(i.e., on average, ∼50%).We also benchmark modern salient object detection al-gorithms on our new dataset to uncover open challengesfor the research community. Experiments with seven al-gorithms reveal that they struggle most for images withsalient objects that are large, have less complex bound-aries, and lack text as well as for lower quality images.To facilitate progress on these challenging problems, uponpublication, we will publicly-share the dataset and anevaluation server with leaderboard at the following link:https://vizwiz.org/tasks-and-datasets/salient-object.In summary, our new dataset supports the developmentof more generalized algorithms that not only address the in-terests of people with vision impairments but also can ben-efit related applications that encounter similar real worldchallenges observed in our dataset. Relevant applicationsinclude robotics, lifelogging, and privacy protection.2. Related WorkSalient Object Detection Datasets.Over the past cou-ple of decades, many datasets were introduced to facili-tate improving the design of algorithms that address salientobject detection problems. Several survey papers providecomprehensive characterizations of the tens of datasets de-signed for this task [7, 8, 22, 42]. A common observationis that datasets were artificially constructed around high-quality images which often feature salient objects in thecenter of the images with a high contrast against the back-ground. This is a mismatch from many real-world settings,especially for visual media taken by visually impaired pho-tographers who often photograph distinct types of content,such as objects showing text [25], with the aim to learnabout that content. We introduce the first salient object de-tection dataset based on images taken by visually impairedpeople in an authentic use case where they were trying tolearn about their visual surroundings. Compared to sevenmodern datasets, our dataset is larger, has a high prevalenceof salient objects containing textual information, and showsobjects that occupy larger portions of the images.Salient Object Detection Algorithms.Researchers havedesigned novel algorithms to automatically perform salientobject detection for over 20 years, with the status quo since2015 being that state-of-the-art methods employ neural net-works trained on large-scale annotated datasets.Severalsurvey papers provide comprehensive characterizations ofthe hundreds of algorithms for this task [7,8,22,42]. Whileconvolutional neural network (CNN) based models becamethe mainstream method [1, 33, 43] in 2015, transformerbased models [30, 44] have become the mainstream ap-proach over the past few years. To assess how well mod-ern methods perform on our new dataset, we benchmarkseven modern methods. We observe that existing methodsfall below human performance and struggle most for salientobjects that lack text and occupy a larger ratio of the image.Visual Assistance Technologies.Visually impaired peo-ple can share their visual media (images and videos) withvarious technologies [3, 4, 6, 14, 18, 27, 32, 40] in order toreceive assistance for daily tasks such as deciding what toeat, wear, and buy [10,24]. The widespread impact of suchtechnologies for real users is exemplified by reports fromsome of these companies that the technologies have 10s to100s of thousands of users who have submitted millions ofassistance requests [5,9,14,17]. The most common reportedgoal for using such technologies is to learn about a (salient)object [9,10,23,28,47]. Given this common use case, salientobject detection models could help for privacy preservation.Specifically, images (or video frames) could be edited be-fore being shared with companies, by obfuscating the back-ground, in order to reduce inadvertent disclosures of pri-vate content that often appears in the background of imagestaken by visually impaired photographers [24].3. VizWiz-SalientObject DatasetWe now introduce our new salient object detectiondataset, we call VizWiz-SalientObject (VizWiz-SO).3.1. Dataset CreationImage Source.We focus on images taken by visually im-paired people who shared them in an authentic use casewhere they were soliciting visual assistance. Specifically,we leverage the 39,181 labeled images from the VizWiz-Captions dataset, each of which is paired with five crowd-sourced captions [25]. Observing that images from thesephotographers can have severe quality issues resulting in nodetectable salient object (e.g., extreme blur or inadequateillumination), we did not use the images which were cap-tioned as follows by at least four of the five crowdworkers:2
“Quality issues are too severe to recognize visual content.”We also did not use the small images (i.e., both the heightand width were less than 300 pixels) because of the chal-lenges of collecting precise annotations for such images.This left us with 37,120 images for our annotation task.Task Design.Our task interface for segmenting salientobjects begins with a comprehensive instruction set at thetop detailing both how to navigate the interface and how tocomplete challenging annotation scenarios. Next, it showsan image alongside two preliminary questions for verifyingthere is a single, unambiguous foreground object. The firstquestion asks “Is the image showing a screenshot?” If theanswer is “yes”, we conclude the image lacks a salient ob-ject. Next, we ask the more general, direct question of “Isthere a single unambiguous foreground object?” An anno-tator is only prompted to segment the foreground object forimages deemed by these preliminary questions to show asingle, unambiguous foreground object.To demarcate the boundary of the salient object, the in-terface collects a series of points that are connected intopolygon(s). When segmenting the salient object, the an-notator is required to remove any holes (e.g., donut) as wellas capture all object parts when occlusions break a salientobject into more than one polygon (e.g., hand obfuscates apencil into two parts). The annotator also has an option toselect a button indicating that the salient object occupies thefull image. We provide more details about the task interfaceas well as a screenshot of it in the Supplementary Materials.Annotation Collection.We leveraged the benefits ofan around-the-clock distributed workforce by crowdsourc-ing annotations via Amazon’s crowdsourcing marketplace,Amazon Mechanical Turk (AMT).Although AMT can support our large-scale annotationneeds, it brings concerns about annotation quality due to theanonymous nature of the crowdsourced workforce. Con-sequently, we implemented several measures to ensure thecollection of high-quality annotations, as summarized be-low. First, we restricted who were potential candidates forour task.We only accepted workers who had at least a98% acceptance rate while having completed at least 500Human Intelligence Tasks (HITs) on AMT. Moreover, toencourage understanding of our initial and ongoing task in-structions, we opted for crowdworkers only from the UnitedStates since that provided us confidence that they haveEnglish-language proficiency. In addition, we also requiredcrowdworkers to pass a qualification assessment coveringfive challenging annotation scenarios documented in our in-structions. The qualification images feature foreground ob-jects consisting of complex boundaries, holes within the ob-ject, and occlusions obfuscating portions of the foregroundobject. Consequently, the task required crowdworkers todemonstrate an understanding for how to generate multi-ple polygons, annotate holes, handle occlusions, and drawcomplex boundaries.We employed 40 AMT crowdworkers who completedour qualification task to complete annotations of all images.For each of the 37,120 images, we collected two annotationsfrom the crowdworkers.3 During annotation collection, wemonitored ongoing quality by tracking each worker’s per-formance with respect to their frequency of indicating thepresence of full-screen annotations or no prominent fore-ground object as well as the level of detail they provided intheir segmentations (e.g., high prevalence of triangles). Cu-mulatively, the crowdworkers took 1,290 annotation hoursover 11 days to complete annotating the 37,120 images.Annotation Post-Processing.We next analyzed the re-dundant annotations per image to determine how to use eachannotated image in the final dataset.First, we removed3,662 images for which workers agreed there was no sin-gle, unambiguous salient object, which occurred when bothannotators either answered “Yes” to “Is the image a screen-shot?” or “No” to “Is there a single most prominent fore-ground object?” Next, we manually inspected 7,443 imagesfor which workers disagreed on the answers to either of thetwo preliminary questions and determined whether there isindeed a single, unambiguous object. Finally, with all im-ages deemed to have a single, unambiguous salient object,we determined which annotation to assign as ground truth.To assist in this process, we computed the intersection overunion (IoU) score between the two segmentations for allimages with two or more segmentations. With IoUs ≥ 0.90,we deemed both annotations high quality and randomly se-lected one as ground truth. For the remaining 2,951 imageswith IoUs< 0.90, we manually reviewed the annotations todecide whether one was correct or whether the image shouldbe discarded due to foreground object ambiguity.3.2. Dataset AnalysisWe now characterize the VizWiz-SalientObject (VizWiz-SO) dataset and how it relates to existing datasets.3.2.1Salient Objects vs Answer Groundings for VQAWe first explore how the target content the photographerswere asking about relates to an image’s salient object. Todo so, we compare the annotations of the visual evidenceneeded to answer questions about the images, i.e., an-swer groundings provided in the VizWiz-VQA-Groundingdataset [11], to the annotations of the salient objects in ourdataset. We first identified all annotated images that were in3For a subset of images, we collected four annotations to support fur-ther analysis of human annotation performance, which we describe in theSupplementary Materials.3
Figure 2. The histogram summarizes for 6,540 images the fre-quency of observing different levels of similarity between twosegmentations per image, which show the salient object and thevisual evidence needed to answer the photographer’s question re-spectively. These findings reveal that visually impaired photogra-phers often want to learn about the salient objects in their images.common across the two datasets, yielding a total of 6,540images. For each image, we then measured the similaritybetween the answer grounding and salient object segmenta-tions using the IoU metric. We visualize our results using ahistogram where we categorize each image into one of teninterval bins starting with IoU=[0.0, 0.1), incrementing inintervals of 0.1, and ending with IoU=[0.9, 1.0). Resultsare shown in Figure 2.We observe that about half of the images have a high sim-ilarity between the salient object and VQA answer ground-ing; e.g., 46% had an IoU ≥ 0.9. This reveals that visuallyimpaired photographers often are trying to learn about thesalient object in their images when trying to get answers totheir visual questions.We also observe that roughly one quarter of the imageshave a very low similarity between the salient object andVQA answer grounding; i.e., 25.7% of images had an IoU< 0.1. We manually reviewed these 1,680 images with IoUsless than 0.1 to understand the reasons for this finding. Wediscovered that 95% (i.e., 1,599) of these images have asalient object featuring a full-screen or large region whilethe VQA answer grounding captures a small aspect of thesalient object. Examples include expiration dates on foodpackages or the current page number of an open book. Theremaining 5% (i.e., 81) of these images featured a VQA an-swer grounding unrelated to the salient object.More generally, we observe that the IoU scores follow aU-shaped distribution with only a small portion of imageshaving middling scores; e.g., 7.9% (i.e., 511) of images hadan IoU ≥ 0.3 and < 0.7. Among these images, we found thesalient object contained the VQA answer grounding region100% of the time. There are two primary trends that led tothese less common IoU scores. The first trend is that largerVQA answer grounding regions occur with smaller salientobjects. Examples include brands of cereal, types of soda,and denominations of currency. The second trend was forsalient objects featuring holes. That is because the VizWiz-VQA-Grounding dataset did not account for holes in theirannotation task. The absence of annotated holes in only oneof the two segmentations led to lower IoU scores.Altogether, these findings highlight that a valuable stepfor tackling many of this population’s VQA goals is to ini-tially locate the salient object. That is because the answerwill likely only be grounded in the salient object or thebackground rather than their intersection.3.2.2VizWiz-SO vs Existing DatasetsWe next compare our dataset to seven datasets:• DUTS [41]: the most commonly used dataset to trainstate-of-the-art algorithms (e.g., [1,30,33,38,43,44]) dueto its large size paired with diverse saliency challenges.• DUT-OMRON [46]: consist of images showing multiplesalient objects, often with complex backgrounds. This isa useful reference when considering extending our datasetto when photographs taken by visually impaired photog-raphers showing multiple salient objects. We share ourcollected metadata indicating when this occurs to facili-tate this line of future research.• ECSSD [45]: consists of images featuring complex scenesthat present textures and structures expected to be com-mon in real-world salient object detection scenarios.• PASCAL-S [29]: derived from PASCAL VOC’s [16] val-idation set, it is designed to facilitate salient object seg-mentation generalization on realistic images.• HRSOD [48]: explicitly designed for salient object de-tection on high-resolution images; this is relevant for ourreal-world application since images taken by people withvision impairments often are relatively high resolution.• UHRSD [44]: currently the largest ultra-high resolutionsalient object detection dataset, which is relevant to ourwork since images taken by people with vision impair-ments can be ultra high resolution.• DAVIS-S [48]: derived from DAVIS [36], a densely an-notated video segmentation dataset. This is relevant forour real-world application to analyze implications forvideo frames since visually impaired photographers oftenstream live video with their cameras when using visualassistance technologies [4,18].Of note, images in six of these datasets originate from theInternet on photo-sharing websites such as Flickr [29, 41,44–46, 48], and so likely are high quality since they weredeemed of sufficient quality to upload to the Internet.44The origins of the images for the final dataset is not reported [48].4
50%46.0%3.40%Image30%25.7%20%9.0%10%4.4%4.8%2.4%2.1%1.7%1.7%2.2%[0.8, 0.9][0.9.[O.[o.04.0.6),1.0)0.3)IoU SimilarityDAVIS-S [48]PASCAL-S [29]HR [48]ECSSD [45]DUT-O [46]UH [44]DUTS [41]OursImages928502,0101,0005,1685,92015,57232,000Text13%24%15%15%11%19%13%68%MR22%31%25%9%17%35%19%1%Holes82%50%62%29%28%75%41%4%Table 1. Characterization of our VizWiz-SO dataset and seven existing salient object detection datasets with respect to how many imagesare included (“Images”), the percentage of images that have text present in the salient objects (“Text”), the percentage of images that havesalient objects consisting of more than one region (“MR”), and the percentage of images that have salient objects containing any holes(“Holes”). As shown, our dataset is distinct in that it contains more images, more salient objects with text present, more salient objectsconsisting of one region, and fewer salient objects containing holes. (HR=HRSOD; UH=UHRSD)Figure 3. Summary statistics for ours and seven other datasets with respect to four measures. Each box reveals statistics about all salientobjects in a particular dataset with the central mark capturing the median value, box edges the 25th and 75th percentiles values, whiskersthe most extreme data points not considered outliers, and individually plotted points the outliers. Our dataset is unique in that salient objectstend to have less complex boundaries, occupy larger portions of an image, and exhibit a greater diversity of sizes relative to the image.For each salient object in every dataset, we characterizeit in six ways. Three measures focus on detecting the pres-ence versus absence of particular properties for the salientobject. These are whether the salient object contains text 5,consists of multiple regions 6, or contains any hole(s). Theremaining three measures characterize the salient region it-self. First, we identify the position of an object within animage by measuring its center of mass relative to the im-age coordinates, resulting in x and y coordinate values inthe range between 0 to 1. Next, we characterize the ob-ject’s boundary complexity by computing its isoperimetricinequality, which is the ratio of the object’s area to thelength of its perimeter.Values range from 0 to 1, withlarger values indicating simpler boundaries that are lessjagged/dented (e.g., a circle). Finally, to gauge the relativesize of a salient object in the image, we compute its cover-age ratio, meaning the fraction of all image pixels that areoccupied by the salient object’s pixels.We show summative statistics of our findings per datasetin Table 1 and Figure 3. In particular, in Table 1, we re-5We obfuscate all image content but the salient object and then checkwhether Microsoft Azure’s OCR API returns text.6Multiple regions means there are multiple separate polygons. This canoccur either because multiple salient objects were annotated or because ofocclusions that lead to more than one region for a single salient object.port how many images are in each dataset paired with whatpercentage of those images have salient objects with text,multiple regions, and holes. In Figure 3, we visualize statis-tics summarizing the values for each dataset’s salient ob-jects with respect to center of mass, boundary complexity,and coverage ratio using boxplots.While our findings highlight that our VizWiz-SO datasethas many distinct characteristics, one commonality it haswith most existing salient object detection datasets is thatthe salient objects typically occupy centered positionswithin an image. Specifically, in Figure 3, we observe thistrend for all datasets except HRSOD. We found this some-what surprising since visually impaired photographers can-not visually inspect their images to verify they are conform-ing to the common photographer’s bias of centering con-tents of interest they are trying to photograph. Yet, givenour findings from Section 3.2.1 that photographers often areinterested in learning about an image’s salient object, ourfindings suggest these photographers have skills in center-ing contents of interest in pictures they take.A unique aspect of our VizWiz-SO dataset is that it fea-tures more salient objects with textual data. Specifically,68% of salient objects in VizWiz-SO contain text while thedataset with the next highest prevalence of text, PASCAL-S [29], only has it for 24% of the images (Table 1). A gap of5
Center of mass Y-axisCenter of mass X-axis Boundary ComplexityCoverage Ratio1.00.80.60.40.20.0DAVIS-SPASCAL-SHRSODECSSDDUT-OMRONUHRSDDUTSOurs: VizWiz-SOthis magnitude (i.e., 44 percentage points) suggests that ournew dataset offers a considerable domain shift in the salientobject detection problem space. We suspect part of this shiftstems from the types of salient objects included, with manymore daily objects such as products (e.g., food packages)included in our VizWiz-SO dataset.Another unique aspect of VizWiz-SO is that far fewerimages feature salient objects that consist of multiple re-gions; i.e., only 1% of images (Table 1).We suspectthis distinction stems from our unique approach of adopt-ing a rigorous annotation preprocessing step, where we re-quire crowdworkers to verify images have one unambigu-ous salient object before allowing them to annotate imagesfor use in our final dataset. Any remaining objects in ourdataset with multiple regions are therefore highly likely aresult of occlusions breaking a single salient object intomultiple polygons, which evidently is incredibly rare.VizWiz-SO is also unique due to the rarity in whichsalient objects contain holes; i.e., only observed for 4%of images (Table 1). From visual inspection, we suspectthis finding reflects a domain shift in the types of contentfound in the datasets. For example, examples from otherdatasets of objects with holes include people riding bikes,people dancing, and animals in intricate poses.In con-trast, in VizWiz-SO, objects with holes include retail pack-aging made to hang from hooks, pairs of scissors, and coffeemugs. We posit the lower prevalence of holes in VizWiz-SOstems from the fact that images originate from an authenticuse case where photographers primarily photograph house-hold and retail items, which naturally feature fewer holes.A further distinction of our VizWiz-SO dataset is that thesalient objects tend to have less complex boundaries (Fig-ure 3). We suspect this is again because of a domain shift inthe types of objects in our dataset, with many more human-made items, such as food packaging boxes and cans, that bydesign are typically more structured in shape.A final distinction of salient objects in our VizWiz-SOis how much of the image they occupy (Figure 3). First,they tend to occupy a much larger amount of the image thanobserved in other datasets. Specifically, they on average oc-cupy roughly half of all image pixels, with a mean coverageratio of 0.5 and a median of 0.46. In contrast, the datasetwith the next highest coverage ratio statistics is PASCAL-S [29], and over 75% of its images contain salient objectsthat occupy less than half of the image pixels. We attributethis distinction to the authentic use case of our dataset,where visually impaired photographers attempting to learnabout the salient objects they are photographing seem to betaking zoomed-in or close-to-camera images of the contentof interest. Another unique aspect of our salient objects, isthat they exhibit a larger range of sizes, as shown by thegaps between the 25 and 75 percentile values of each box.For example, PASCAL-S features the next largest interquar-tile range with a 23% gap(i.e., 19% to 42%). In contrast,the gap for VizWiz-SO is more than twice as large at 56%(i.e., 22% to 78%). Consequently, a unique challenge ofour dataset for algorithms is that they no longer can assumea strong bias regarding a salient object’s relative size.4. Algorithm BenchmarkingWe benchmark modern salient object detection algo-rithms to show how they perform on our new dataset. Weconducted all experiments on a Nvidia A100 GPU.4.1. Experimental DesignDataset Splits.We use the existing splits available for theVizWiz-Captions dataset [25], which translates to approxi-mately a 60/20/20 training, validation and test split for ourVizWiz-SO dataset. In particular, from the 32,000 anno-tated images, the number of images in each split respec-tively is 19,116, 6,105, and 6,779.Evaluation Metrics.We evaluate each model with re-spect to five popular metrics for salient object detectionmodels: Mean Absolute Error (MAE), Structure Measure(Sm), Mean F-Measure (Fm), Enhanced Alignment Mea-sure (Em), and Intersection over Union (IoU).Algorithms.We benchmark the following seven methodsfrom the past three years to assess the difficulty of our newdataset for modern salient object detection models:• Boundary Aware Segmentation Network (BASNet) [38]:an appealing model for real-time applications like our tar-get use case because it can achieve 70fps during inferencetime while achieving competitive performance (i.e., wasa top-performer in 2019).• Fusion, Feedback and Focus Network (F3Net) [43]: state-of-the-art performing model on five datasets in 2020.• U2 Network (U2Net) [1]: an appealing model for real-world applications like our target use case because it hasa very light footprint (4.7MB), and so is more suitablefor resource-constrained devices such as smartphones. Itachieved competitive performance in 2020.• Visual Saliency Transformer (VST) [30]: achieved state-of-the-art performance in 2021, and is based purely on atransformer architecture.• Pyramidal Feature Shrinking Network (PFSNet) [33]:achieved state-of-the-art performance on five datasets in2021; it consists of a decoder that aims at using aggre-gated adjacent feature nodes hierarchically to avoid theproblem of leaping feature fusion.• Pyramid Grafting Network (PGNet) [44]: introduced in2022, it is a one-stage framework based on a transformer6
HPBASNetF3NetU2NetVSTPFSNetPGNetDISVST-FTVST-S[38][43][1][30][33][44][37]Attr.Backbone-R-34R-50-T2T-ViTR-50R-18+SWINU2NetVSTViTTraining set-DDDDDD+HRDIS5KD+VWVWInput size-256235223202224235222242, 102421024222422242Size (MB)-333984.7171120280169171171VizWiz-SOMAE ↓0.020.280.280.260.170.320.210.360.190.21Sm ↑0.920.590.550.610.650.480.620.460.640.63Fm ↑0.960.770.740.800.830.700.790.610.740.72Em ↑0.970.640.650.650.760.600.740.550.770.70IoU ↑0.940.620.530.630.730.480.670.490.700.69Table 2. Analysis of existing algorithms that we benchmark on our VizWiz-SO dataset, including both off-the-shelf models (which arecited) as well as those fine-tuned (-FT) and trained from scratch (-S). We first report differentiating attributes between the algorithmarchitectures and then present the model performance with respect to five widely-used metrics. (HP=Human Performance; R=ResNet [26];ViT=Vision Transformer [15]; Swin=Shifted window transformer [31]; D=DUTS-TR [41]; VW=VizWiz-SO; HR=HRSOD [48])and CNN backbone that achieves state-of-the-art perfor-mance on five benchmark datasets. [41,44,46,48].• Dichotomous Image Segmentation (DIS) [37]: also in-troduced in 2022 as the state-of-the-art method for theDIS5K [37] dataset; it is designed for detecting salientobject in high resolution images, which makes it relevantfor our use case where many images coming from peoplewith vision impairments are relatively high resolution.We further characterize each model by identifying thebackbone architecture used in the architecture, datasets usedfor training, image size used for training, and model foot-print. These characteristics are reported in Table 2.All models predict saliency maps that represent thebrightness of certain pixels within the same spatial reso-lution as the input image; e.g., ∈ [0, 1] or alternatively∈ [0, 255]. The predictions generated by salient object de-tection models are converted into binary masks.Humans.We also evaluate human performance to estab-lish an upper bound for what we should strive for from au-tomated methods. Since, we get two human annotations perimage in our dataset, we calculate human performance bycomparing the two annotations in cases where the IoU isgreater than 0.90.4.2. Performance for Off-The-Shelf ModelsWe first evaluate each of the algorithms as is in their orig-inal design. Results are shown in Table 2.We observe that VST [30] is the top-performing model.Yet, it still falls short of human performance. For exam-ple, the gap in performance is 0.15 in terms of MAE, 0.211in terms of IoU, 0.26 for Sm, and 0.2 for Em.Conse-quently, this dataset offers a new challenging benchmarkfor the community.A further observation is that the models perform poorlyon the VizWiz-SO dataset in comparison to their perfor-mance on the original datasets for which they were bench-marked. For example the MAE and Sm performance ob-served by PGNet [44] on DUTS-TE is 0.028 and 0.912 re-spectively versus 0.2123 and 0.6233 respectively for ourdataset. We hypothesize that part of the reason for this poorperformance is that models trained and evaluated on otherdatasets are not able to learn how to generalize to the real-world challenges that arise for images taken by visually im-paired photographers.4.3. Performance When Training on VizWiz-SOWe next explore whether training the top-performing al-gorithm, VST [30], on our new dataset will lead to improvedperformance. To do so we analyze two additional models:(1) the pretrained VST [30] model fine-tuned on VizWiz-SO (VST-FT) and (2) the pretrained VST [30] algorithmtrained from scratch on VizWiz-SO (VST-S). We use thedefault hyperparameters reported in the VST [30] paper formodel training. Results are shown in Table 2.We observe that both models, i.e., created by trainingfrom scratch and fine-tuning on our VizWiz-SO dataset,achieve worse results than the baseline of not training the al-gorithm on our dataset. This suggests that the training dataused by algorithms is not the only culprit for what makesour new dataset challenging. Rather, our findings suggestthat new algorithmic frameworks are also needed to achievestrong generalization performance on our new dataset.4.4. Fine-grained AnalysisWe next conduct fine-grained analysis to better isolatewhat makes our dataset challenging for modern algorithms.To do so, we divide our VizWiz-SO test set according to thefollowing four factors, with the first three based on metadatacollected in Section 3.2 to characterize our dataset:7
BASNetF3NetU2NetVSTPFSNetPGNetDISVST-FTVST-S[38][43][1][30][33][44][37]Text PresenceTrue0.230.220.220.130.250.160.320.160.17False0.350.380.320.240.420.290.400.240.26CoverageSmall0.060.160.070.110.160.120.100.090.11Medium0.150.200.150.090.240.150.250.090.10Large0.600.470.540.300.540.350.700.380.39ComplexityHigh0.150.210.150.120.240.160.210.110.12Low0.380.340.350.210.380.250.480.260.27Image QualityGood0.220.230.210.140.260.170.300.160.17Poor0.440.430.410.270.470.340.500.300.31Table 3. Fine-grained analysis of existing algorithms with respect to presence of text on the salient object (“Text Presence”), relative sizeof the salient object in the image (“Coverage”), relative complexity of the salient object’s boundary (“Complexity”), and image quality(“Image quality”). As shown the algorithms perform worse when there is salient objects lack text, occupy a large portion of the image,have less complex boundarys as well as when the image quality is poor.• Text Presence:two groups based on whether text ispresent in the salient object.• Coverage Ratio (Coverage): three groups based on the33rd and 66th quartile values in our dataset. All imageswith coverage ratio less than 0.32 has small coverage, be-tween 0.32 and 0.62 has medium coverage, and greaterthan 0.62 has large coverage.• Boundary Complexity (Complexity): two groups by split-ting them around the mean score for boundary complex-ity (i.e., 0.66) with high boundary complexity when thescore is less than the mean and low boundary complexityotherwise.• Image Quality: leveraging metadata from prior work [25],which indicates how many of the five crowdworkers in-dicated an image as insufficient quality to recognize thecontent, we split the images into groups with good qual-ity being when none of the crowdworkers indicate insuf-ficient quality and poor otherwise.Due to space constraints, we only report results in the mainpaper with respect to the Mean Absolute Error [35]. Resultsfor all benchmarked models are shown in Table 3.In terms of text presence, we see that the models performbetter when there is text present as opposed to when thereis none. For example, the performance drops by 0.11 forthe best performing model, VST. We suspect visual patternsthat arise with text may serve as a valuable cue to models inlocating salient objects.Next, we see that as the coverage ratio of the salient ob-jects increase, the models tend to perform worse. For in-stance, the best performing model, VST, has a performancedropoff of 0.19 when predicting images with small cover-age ratios as opposed to large coverage ratios. We see aneven greater performance dropoff from other models suchas 0.60 for DIS. We suspect this performance gap arises inpart from the fact that existing datasets largely lack suchlarge salient objects, which both could have affected whatalgorithms were designed to handle as well what they couldlearn from the data they observed.Further observed trends are that performance drops forsalient objects with lower boundary complexity and forpoorer quality images. These are two additional factors thatreflect domain shifts between our dataset and prior datasetsthat could have affected the design of algorithms as wellwhat they could learn from the data training data.5. ConclusionsWe introduce the VizWiz-SalientObject dataset to en-courage the community to design more generalized salientobject detection models that can handle a larger range ofchallenges motivated by our authentic use case that also canoccur in many real-world applications. We offer our exper-imental findings from benchmarking modern salient objectdetection algorithms as a valuable starting point for iden-tifying valuable future research directions. To summarize,new models are needed to better handle salient objects thatare large, have less complex boundaries, and lack text aswell as work well in the presence of lower quality images.We now close with a discussion of some ethical impli-cations of our work. While we are motivated to better as-sist a population that is traditionally marginalized in society,we acknowledge our work can lead to potentially adversesocial effects. Our concern is primarily centered on bad-actor behaviors intended to exploit the privacy, autonomy,and livelihoods of a population demographic inherently sus-ceptible to such behavior. Bad actors could use our work todeceive visually impaired individuals in harmful ways, suchas through fraud, scams, and other deceptive practices, byfor example intercepting their visual media and replacingautomatically detected salient objects with misinformation.8
Acknowledgments. This project was supported in part bya National Science Foundation SaTC award (#2148080)and Amazon Mechanical Turk. We thank Leah Findlaterand Yang Wang for contributing to this research idea.References[1] U2-net: Going deeper with nested u-structure for salient ob-ject detection. Pattern Recognition, 106:107404, 2020. 2, 4,6, 7, 8[2] Radhakrishna Achanta, Sheila Hemami, Francisco Estrada,and Sabine S¨usstrunk. Frequency-tuned salient region de-tection. In CVPR, number CONF, pages 1597–1604, 2009.13[3] AIpoly.Aipoly homepage.https://www.aipoly.com/, 2020. (Accessed on 01/08/2020). 2[4] Aira. Aira homepage. https://aira.io/, 2020. (Ac-cessed on 01/08/2020). 2, 4[5] BeSpecular. BeSpecularPressKit. 2[6] BeSpecular. Bespecular. https://www.bespecular.com/, 2020. (Accessed on 01/08/2020). 2[7] Ali Borji, Ming-Ming Cheng, Qibin Hou, Huaizu Jiang, andJia Li. Salient object detection: A survey. Computationalvisual media, pages 1–34, 2019. 1, 2[8] Ali Borji, Ming-Ming Cheng, Huaizu Jiang, and Jia Li.Salient object detection: A benchmark. IEEE transactionson image processing, 24(12):5706–5722, 2015. 1, 2[9] Erin Brady and Jeffrey P Bigham. Crowdsourcing accessi-bility: Human-powered access technologies. 2015. 2[10] Erin L Brady, Yu Zhong, Meredith Ringel Morris, and Jef-frey P Bigham. Investigating the appropriateness of socialnetwork question asking as a resource for blind users. InProceedings of the 2013 conference on Computer supportedcooperative work, pages 1225–1236. ACM, 2013. 2[11] Chongyan Chen, Samreen Anjum, and Danna Gurari.Grounding answers for visual questions asked by visuallyimpaired people.arXiv preprint arXiv:2202.01993, 2022.2, 3[12] Ming-Ming Cheng, Niloy J Mitra, Xiaolei Huang, Philip HSTorr, and Shi-Min Hu. Global contrast based salient regiondetection. IEEE transactions on pattern analysis and ma-chine intelligence, 37(3):569–582, 2014. 1[13] Tai-Yin Chiu, Yinan Zhao, and Danna Gurari. Assessing im-age quality issues for real-world problems. In Proceedings ofthe IEEE/CVF Conference on Computer Vision and PatternRecognition, pages 3646–3656, 2020. 1[14] Ned Desmond. Microsoft’s Seeing AI founder Saqib Shaikhis speaking at Sight Tech Global. 2[15] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov,Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner,Mostafa Dehghani, Matthias Minderer, Georg Heigold, Syl-vain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image isworth 16x16 words: Transformers for image recognition atscale, 2020. 7[16] Mark Everingham, Luc Gool, Christopher K. Williams,John Winn, and Andrew Zisserman.The pascal visualobject classes (voc) challenge.Int. J. Comput. Vision,88(2):303–338, jun 2010. 4[17] Be My Eyes. Be My Eyes: Our story. 2[18] Be My Eyes. Bringing sight to blind and low-vision people.https://www.bemyeyes.com/, 2020. (Accessed on01/08/2020). 2, 4[19] Deng-Ping Fan, Ming-Ming Cheng, Yun Liu, Tao Li, and AliBorji. Structure-measure: A new way to evaluate foregroundmaps. In ICCV, pages 4548–4557, 2017. 13[20] Deng-Ping Fan, Cheng Gong, Yang Cao, Bo Ren, Ming-Ming Cheng, and Ali Borji. Enhanced-alignment measurefor binary foreground map evaluation. In IJCAI, pages 698–704, 2018. 13[21] American Federation for the Blind. Low vision optical de-vices. 1[22] Ashish Kumar Gupta, Ayan Seal, Mukesh Prasad, and Pri-tee Khanna. Salient object detection techniques in computervision—a survey. Entropy, 22(10), 2020. 1, 2[23] Danna Gurari, Kun He, Bo Xiong, Jianming Zhang,Mehrnoosh Sameki, Suyog Dutt Jain, Stan Sclaroff, MargritBetke, and Kristen Grauman. Predicting foreground objectambiguity and efficiently crowdsourcing the segmentation(s). International Journal of Computer Vision, 126(7):714–730, 2018. 2[24] Danna Gurari, Qing Li, Chi Lin, Yinan Zhao, Anhong Guo,Abigale Stangl, and Jeffrey P Bigham.Vizwiz-priv: Adataset for recognizing the presence and purpose of privatevisual information in images taken by blind people. In Pro-ceedings of the IEEE/CVF Conference on Computer Visionand Pattern Recognition, pages 939–948, 2019. 1, 2[25] Danna Gurari, Yinan Zhao, Meng Zhang, and Nilavra Bhat-tacharya. Captioning images taken by people who are blind.In European Conference on Computer Vision, pages 417–434. Springer, 2020. 1, 2, 6, 8[26] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun.Deep residual learning for image recognition, 2015. 7[27] iDentifi. identifi. http://getidentifi.com/, 2020.(Accessed on 01/08/2020). 2[28] Hernisa Kacorri, Kris M Kitani, Jeffrey P Bigham, andChieko Asakawa.People with visual impairment trainingpersonal object recognizers: Feasibility and challenges. InProceedings of the 2017 CHI Conference on Human Factorsin Computing Systems, pages 5839–5849, 2017. 2[29] Yin Li, Xiaodi Hou, Christof Koch, James M. Rehg, andAlan L. Yuille. The secrets of salient object segmentation.In 2014 IEEE Conference on Computer Vision and PatternRecognition, pages 280–287, 2014. 4, 5, 6, 13[30] Nian Liu, Ni Zhang, Kaiyuan Wan, Ling Shao, and JunweiHan. Visual saliency transformer, 2021. 2, 4, 6, 7, 8, 14[31] Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei,Zheng Zhang, Stephen Lin, and Baining Guo. Swin trans-former: Hierarchical vision transformer using shifted win-dows, 2021. 7[32] LookTel. Looktel recognizer. 1, 2[33] Mingcan Ma, Changqun Xia, and Jia Li.Pyramidal fea-ture shrinking for salient object detection. Proceedings ofthe AAAI Conference on Artificial Intelligence, 35(3):2311–2318, May 2021. 2, 4, 6, 7, 8, 14[34] MDN. Fill-rule - svg: Scalable vector graphics: Mdn. 109
[35] Federico Perazzi, Philipp Kr¨ahenb¨uhl, Yael Pritch, andAlexander Hornung. Saliency filters: Contrast based filteringfor salient region detection. In CVPR, pages 733–740, 2012.8, 12[36] Federico Perazzi, Jordi Pont-Tuset, Brian McWilliams,Luc Van Gool, Markus Gross, and Alexander Sorkine-Hornung. A benchmark dataset and evaluation methodologyfor video object segmentation. In The IEEE Conference onComputer Vision and Pattern Recognition (CVPR), 2016. 4[37] Xuebin Qin, Hang Dai, Xiaobin Hu, Deng-Ping Fan, LingShao, and Luc Van Gool. Highly accurate dichotomous im-age segmentation, 2022. 7, 8, 14[38] Xuebin Qin, Deng-Ping Fan, Chenyang Huang, Cyril Di-agne, Zichen Zhang, Adri`a Cabeza Sant’Anna, AlbertSu`arez, Martin Jagersand, and Ling Shao. Boundary-awaresegmentation network for mobile and web applications,2021. 4, 6, 7, 8[39] Abigale J Stangl, Esha Kothari, Suyog D Jain, Tom Yeh,Kristen Grauman, and Danna Gurari. Browsewithme: Anonline clothes shopping assistant for people with visual im-pairments. In Proceedings of the 20th International ACMSIGACCESS Conference on Computers and Accessibility,pages 107–118, 2018. 1[40] TapTapSee. Taptapsee. 1, 2[41] Wang, Lijun, Lu, Huchuan, Wang, Yifan, Feng, Mengyang,Wang, Dong, Yin, Baocai, Ruan, and Xiang. Learning todetect salient objects with image-level supervision. In CVPR,2017. 4, 5, 7, 13[42] Wenguan Wang, Shuyang Zhao, Jianbing Shen, Steven C. H.Hoi, and Ali Borji. Salient object detection with pyramid at-tention and salient edges. In Proceedings of the IEEE/CVFConference on Computer Vision and Pattern Recognition(CVPR), June 2019. 1, 2[43] Jun Wei, Shuhui Wang, and Qingming Huang. F3net: Fu-sion, feedback and focus for salient object detection, 2019.2, 4, 6, 7, 8, 14[44] Chenxi Xie, Changqun Xia, Mingcan Ma, Zhirui Zhao, Xi-aowu Chen, and Jia Li. Pyramid grafting network for one-stage high resolution saliency detection, 2022. 2, 4, 5, 6, 7,8, 13[45] Qiong Yan, Li Xu, Jianping Shi, and Jiaya Jia. Hierarchicalsaliency detection. In 2013 IEEE Conference on ComputerVision and Pattern Recognition, pages 1155–1162, 2013. 4,5, 13[46] Yang, Chuan, Zhang, Lihe, Lu, Huchuan, Ruan, Xiang,Yang, and Ming-Hsuan. Saliency detection via graph-basedmanifold ranking. In Computer Vision and Pattern Recogni-tion (CVPR), 2013 IEEE Conference on, pages 3166–3173.IEEE, 2013. 4, 5, 7, 13[47] Xiaoyu Zeng, Yanan Wang, Tai-Yin Chiu, Nilavra Bhat-tacharya, and Danna Gurari.Vision skills needed to an-swer visual questions. Proceedings of the ACM on Human-Computer Interaction, 4(CSCW2):1–31, 2020. 2[48] Yi Zeng, Pingping Zhang, Jianming Zhang, Zhe Lin, andHuchuan Lu. Towards high-resolution salient object detec-tion. In Proceedings of the IEEE/CVF International Confer-ence on Computer Vision, pages 7234–7243, 2019. 4, 5, 7,13AppendixThis document supplements the main paper with additionalinformation concerning:1. Dataset Creation (supplements Section 3.1)• Annotation Task Interface• Worker Qualification Task• Analysis of Workers’ Annotation Differences2. Dataset Analysis: VizWiz-SO vs Existing Datasets(supplements Section 3.2.2)3. Experimental Design (supplements Section 4.1)A. Dataset CreationA.1. Annotation Task InterfaceThe task interface displays five images within a tabbedcontainer on the left and preliminary questions with taskinstructions on the right. A screenshot of the task interface(without instructions) is shown in Figure 4.To account for occlusions and holes while keeping thetask simple for annotators, we permitted annotators to gen-erate multiple polygons. For occlusions, annotators coulduse as many polygons as necessary for demarcating fore-ground objects partitioned into multiple polygons.Forholes, we apply an even-odd fill rule to images featuringforeground objects with holes. With an even-odd fill rule,every area inside an even number of enclosed areas be-comes hollow, and every region inside an odd number ofenclosed areas becomes filled [34]. By treating the image’sfour corners as the first enclosed area, the outermost bound-ary of the foreground object becomes the second enclosedarea. Moreover, holes within foreground objects representthe third layer of enclosed areas and become filled, allowingannotators to demarcate foreground objects featuring holes.In practice, annotators first trace the outermost boundary ofthe foreground object and close the path by clicking the firstpoint a second time. We then instructed annotators to traceany holes within the foreground object, and so those holesend up in odd-numbered layers.A.2. Worker Qualification TaskWe administered a qualification task for workers to sup-port our collection of high-quality ground truth annotations.The qualification task required annotating five images, eachof which features a distinct challenging annotation scenario.All five images are shown in Figure 5. The first two imagesshow a table and a bench, offering examples with complexboundaries and holes. The next two images feature a per-son holding a coffee mug, to support educating a crowd-worker about our expectations for annotating objects with10
Figure 4. A screenshot of our annotation task interface.Figure 5. The five images used for the worker qualification task.Each was selected to demonstrate a challenging annotation sce-nario such as complex boundaries, holes, and occlusions.complex geometries that have many curves and occlusionsthat require annotating multiple polygons. The final imageis a spatula. This task verified a crowdworker’s ability tocorrectly identify and annotate multiple holes that can arisewithin the salient object.After crowdworkers annotated each qualification image,the backend code of our website checked if their annotationwas sufficiently similar to the GT annotation (i.e., IoU sim-ilarity of at least 0.90). Crowdworkers could only proceedto the following image after they obtained an IoU ≥ 0.90on the current image. Crowdworkers obtaining an IoU ≥0.90 on all five qualification assessment images on a per-image basis gave us substantial confidence that they wouldbe able to successfully handle complex and challenging out-lier cases within the original VizWiz Dataset.7A.3. Analysis of Workers’ Annotation DifferencesWe collected a larger number of redundant annotationsper image for a random subset of images to better explorewhen and why annotation differences are observed from dif-ferent workers. Specifically, for this analysis, we collectedfour annotations as opposed to two for a subset of 1,237 im-ages. Examples of the redundant annotations collected perimage are shown in Figure 6.The first example (i.e., row 1 of Figure 6) highlights thatannotation differences can stem from challenging annota-tion scenarios where objects contain holes (e.g., in mug han-dle) or are occluded (e.g., by the straw). For instance, thehole was not annotated in the third annotation. Addition-ally, only the fourth annotation captured the occlusion thatarises from the straw.The second example (i.e., row 2 of Figure 6) highlightsthat annotation differences can stem from ambiguity regard-7Some crowdworkers did not pass the qualification assessment due totime constraints. In these cases, crowdworkers would contact us with theimages they annotated. If we were confident in their annotation abilities,we manually added these crowdworkers to the qualified worker pool.11
Image 1Image 2Image 3Image 4Image 5Work may be rejected for not following instructionsStep 1: Is the image showing a screenshot?O YesO NoWASYOURTRIP?Step 2: Is there a single prominent foreground object?OYesONOANTTOHEARFROOUR ON-LINE SURVEYTONACHANCETO WIN SUStep 3: Demarcate the prominent foreground objectosehcwyou wantto takethesunveytypethatweb address inyourbrowseputerone:gli.ols.sgizmo.com/s3/Prev ImageNext ImagePadgli.olsiphone.sgizmo.com/s3gli.olsipad.sgizmo.com/s3/Select FullUndo LastClear AllImagePointPolygonsFigure 6. Example annotations from our random subset where wecollected four annotations as opposed to two. We find worker dif-ferences primarily occur in challenging annotation scenarios suchas holes, occlusions, complex boundaries, and object saliency.ing what is the salient object. As shown, the first two an-notations flag the image as lacking a foreground object,the third annotation identifies the child holding the cup asthe salient object, and the fourth annotation identified thechild’s cup as the salient object.The third example (i.e., in row 3 of Figure 6) highlightsthat annotation differences also can arise for objects thatsimultaneously have complex boundaries and holes. In an-notation one, the worker did not fully annotate the salientobject, cutting out part of the object from the annotation.Only the third and fourth annotations accurately annotateall holes that are present in the salient object’s boundarywhile also having tight boundaries in the annotation.In summary, we found occlusions, holes, and saliencyambiguity to be the primary factors contributing to annota-tion differences. In the case of occlusions, worker differ-ences can arise when deciding whether to include objectsthat are a composite part of the salient object. In the caseof holes, annotation differences can arise regarding whichholes to annotate. Last, we found that it can be ambiguousas to which object is the most salient.Figure 7. Example ground truth annotations from the HRSODdataset which exemplify that salient objects are not usually notcentered in the image. This is a common trend in the dataset.B. Dataset AnalysisB.1. VizWiz-SO vs Existing DatasetsWe present finer-grained details about typical image res-olutions for the different salient object detection datasetsto expand upon discussions in the main paper about howVizWiz-SO relates to other datasets. Specifically, we reportthe median image width (Med. W), median image height(Med. H), and whether the dataset supports high resolu-tion images (High Res.) as defined by whether the medianimage height and width are greater than 1080 and 1920 re-spectively. Results are reported in Table 4. We observe thatour new dataset, overall, provides higher resolution imagesthan most datasets.We also expand on a surprising finding reported in ourmain paper that the HRSOD dataset is the only one forwhich salient objects do not occupy the typical center po-sitions. To do so, we visualize the ground truth masks ofsome non-centered objects in Figure 7. In row one, we seethat objects are horizontally distributed to left and right po-sitions of the images. Similarly, we observe in row two thatthe salient objects are vertically distributed to the top andbottom positions of the images.C. Algorithmic BenchmarkingC.1. Experimental DesignWe compute the five metrics used in the benchmarkingsection using the following definitions:Mean Absolute Error [35] represents the average abso-lute difference between the predicted saliency map and its12
Annotation 1Annotation 2Annotation 3Annotation 4WRKDAVIS-S [48]PASCAL-S [29]HR [48]ECSSD [45]DUT-O [46]UH [44]DUTS [41]OursMed. W1080375270430030036123001296Med. H192050032644004005000400968High Res.Table 4. Characterization of our VizWiz-SO dataset and seven existing salient object detection datasets with respect to metrics showcasingthe image resolution. This includes median image width (“Med. W”), median image height (“Med. H”), and flag indicating if highresolution (“High Res.”). (HR=HRSOD; UH=UHRSD)ground truth per pixel. It can be given as:MAE =1H ∗ WH�r=1W�c=1|pred(r, c) − gt(r, c)|(1)where pred represents the predicted saliency map, gt repre-sents the ground truth, (H, W) represents the height andwidth of the image, and (r, c) represents the pixel co-ordinates for the given image.Structure Measure [19] is used to measure the similaritybetween the predicted saliency map and the ground truth.Since, we convert both the predictions and ground truthsinto the [0, 1] range, we apply the formula directly to thepredictions and maps. It can defined as follows:Sm = (1 − α)Sr + αSo(2)where, Sr is defined as the region aware similarity score, Sois defined as the object aware similarity score, and α repre-sents the weight that is used to sum up the values. We setα = 0.5, therefore making sure that we see equal contribu-tion from both region and object aware scores.F-Measure [2] represents the precision and recall ratiofor the given prediction. It can be represented as:Fm = (1 + β2) ∗ Precision ∗ Recallβ2 ∗ Precision + Recall(3)Here precision =T PT P +F P and recall =T PT P +F N on theentire prediction image by pixels. We set β2 = 0.3 and re-port the average of all F-measures as Fm similar to previousworks.Enhanced Alignment Measure [20] is used as the met-ric to measure the effectiveness of the saliency predictionagainst the ground truth. It captures the pixel-level match-ing information and image-level statistics into one singlemetric by the means of an enhanced alignment matrix φ. Itis defined as follows:Em =1H ∗ WH�r=1W�c=1φF M(r, c)(4)where, φF M represents the enhanced alignment matrix forthe foreground map, (H, W) represents the height andwidth of the image, and (r, c) represents the pixel co-ordinates for the given image.Intersection over Union also known as Jaccard Index isused to determine the similarity between sample sets. Inthis case it captures the overlap between the ground truthand prediction map of the salient object. We convert thepredictions in binary map and compute the Jaccard Indexover two classes. It can be defined as follows:IoU = J(A, B) = |A ∩ B||A ∪ B|(5)where, A and B are images of same size, consisting of inte-ger class values {0, 1}.We further show how the models performed on VizWiz-SO with qualitative examples shown in Figure 8. These ex-amples feature a variety of challenges we observed for themodels, such as a large salient object, less complex bound-aries, lack of text on the salient object, and lower qual-ity images. For example, we observe how the models failto perform adequately in identifying larger salient objects(rows 4 and 5). We also observe the models perform bet-ter when salient objects contain text (rows 1 and 2) versuslack text (rows 5 and 6). Further, we see models performworse for images that are lower quality (rows 3, 4, and 5).Our fine-grained analysis in the main paper suggests eachof these factors offer unique challenges for modern salientobject detection models.13
Figure 8. Examples of difficult images present in VizWiz-SO, with characteristics such as high coverage ratio, presence of text, lesscomplex boundaries, and lower image quality. We show how the seven models perform on these cases as compared to the human annotation(GT=Ground Truth). We see that models such as PFSNet [33], DIS [37], and F3Net [43] do not always give us the correct salient objectsor sometime no predictions at all. We also notice that VST [30] usually predicts salient objects with better accuracy compared to othermodels, but also suffer from not detecting the correct salient object.14
ImageGTBASNetF3NetU2NetVSTPFSNetPGNetDIS123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033TRAINING WITH MIXED-PRECISION FLOATING-POINT ASSIGNMENTSWonyeol Lee 1 Rahul Sharma 2 Alex Aiken 1ABSTRACTWhen training deep neural networks, keeping all tensors in high precision (e.g., 32-bit or even 16-bit floats)is often wasteful. However, keeping all tensors in low precision (e.g., 8-bit floats) can lead to unacceptableaccuracy loss. Hence, it is important to use a precision assignment—a mapping from all tensors (arising intraining) to precision levels (high or low)—that keeps most of the tensors in low precision and leads to sufficientlyaccurate models. We provide a technique that explores this memory-accuracy tradeoff by generating precisionassignments that (i) use less memory and (ii) lead to more accurate models at the same time, compared to theprecision assignments considered by prior work in low-precision floating-point training. Our method typicallyprovides > 2× memory reduction over a baseline precision assignment while preserving training accuracy, andgives further reductions by trading off accuracy. Compared to other baselines which sometimes cause trainingto diverge, our method provides similar or better memory reduction while avoiding divergence.1INTRODUCTIONIn deep neural network training, floating-point formats areusually used to represent tensors and it is worthwhile to usethe smallest bitwidth format that gives acceptable results.For example, it is common to replace tensors using 32-bitfloats with tensors that use 16-bit floats (Micikevicius et al.,2018; Kalamkar et al., 2019). The benefits are easy to under-stand: computations using lower-precision floats not onlyuse less memory but are also faster (due to improved vec-tor parallelism, locality, and reduced data movement). Thedownside is that there is generally some loss of training accu-racy, and in the worst case training may not even converge.For such low-precision floating-point training, the mostcommon approaches use two floating-point formats—onefor lower-precision floats (e.g., 8-bit floats) and the otherfor higher-precision floats (e.g., 16-bit floats)—and assignone of the two formats to each tensor (including weights,activations, and their gradients). The precision assignmentsstudied in previous work fall into one of two assignmentschemes (which both have several variants): the uniformassignment uses low precision for almost all tensors(often excepting those in the first and/or last few layers)(Micikevicius et al., 2018), while the operator-basedassignment limits low precision to the input tensors ofcertain operators (e.g., convolutions) (Sun et al., 2019).Prior work has shown that both precision assignmentschemes (with well-chosen low-bitwidth floating-pointformats) can match the accuracy of 32-bit-float training1Stanford University, USA2Microsoft Research, India.Correspondence to: Wonyeol Lee <wonyeol.lee.cs@gmail.com>.Preprint. Under review.(Micikevicius et al., 2018; Kalamkar et al., 2019; Wanget al., 2018; Sun et al., 2019; Chmiel et al., 2021; Drumondet al., 2018; Cambier et al., 2020; Fox et al., 2021).There is an important limitation in all prior approachesto low-precision floating-point training: they use veryfew precision assignments (most often just one) for agiven set of models, but there are some other models andinputs where the chosen precision assignment (i) resultsin noticeably worse accuracy than 32-bit-float training,(ii) causes training to even diverge, or (iii) admits a moreefficient assignment that achieves similar training accuracy(see Figures 1, 3, and 4).In this paper, we present a new, automated method for choos-ing precision assignments that removes the limitations de-scribed above. To do so, we formally introduce the memory-accuracy tradeoff problem: given a dataset, a model, andtwo floating-point precision levels (i.e., bitwidths; high andlow), find a mixed precision assignment (a mapping fromall tensors arising in training to high/low precision) for themodel that maximizes training accuracy subject to a givenupper bound on the model aggregate (i.e., the total numberof bits of all tensors appearing in training). The model aggre-gate is a proxy for the memory and time required for training,as it is roughly proportional to memory footprint and alsowell-correlated with training time (since training is oftendominated by data movement) (Micikevicius et al., 2018).We prove that the memory-accuracy tradeoff problemis theoretically difficult (namely NP-hard) partly dueto the exponential number of possible mixed precisionassignments (which we often refer to simply as precisionassignments for brevity). The large number of possibleassignments makes the problem difficult in practice asarXiv:2301.13464v1 [cs.LG] 31 Jan 2023
Training with Mixed-Precision Floating-Point Assignments(a) SqueezeNet(b) ShuffleNet-v2(c) MobileNet-v2Figure 1: Training trajectory of various models on CIFAR-100. Colors denote precision assignments: all-32-bit πfp32 (red),uniform πunif (yellow), and operator-based πop (blue) (see §3.1); the latter two use the 8-bit (and 16-bit) floats in (Sun et al.,2019) as low (and high) precision numbers. Markers denote the “width multiplier” of a model, which controls the capacityof the model (see §5.3): 1.0 (•), 0.5 (■), 0.25 (▲), and 0.1 (). Some lines of πunif are missing as they converge to smallvalues or diverge. Observe that neither πunif nor πop works best for all models: in some models, πop has a similar accuracyto πfp32; but in other (and all) models, the accuracy drop of πop (and πunif) from πfp32 are noticeably large (i.e., >1%).well: there is no known analytical method for predictingthe training accuracy of a given precision assignment, andfor any practical model there are far too many precisionassignments to simply test them all.We propose a simple (heuristic) approach to the tradeoffproblem that prioritizes tensors for low-precision formatsbased on the tensor’s size (with an additional step describedbelow). More specifically, our algorithm takes as inputa single parameter giving a desired upper bound on themodel aggregate. Starting with the largest tensor in themodel, tensors are assigned low precision in size order(from largest to smallest) until the model aggregate fallsbelow the given upper bound; all remaining tensors areassigned high precision. Our main result is that this methoddiscovers mixed precision assignments that use less memorywhile achieving higher training accuracy than previousapproaches. While we cannot show that our method findsPareto-optimal memory-accuracy tradeoffs, we do show thatour results are closer to Pareto-optimal than prior methods.Some precision assignments initially generated by ouralgorithm cause training to diverge due to an excessivenumber of overflows. To address this issue, we propose anoverflow handling technique that promotes tensors causingtoo many overflows from low precision to high precisionduring training.In our experiments, these promotionsconsume only a small amount of additional memory (< 3%of the maximum model aggregate) and prevent trainingfrom diverging. The overflow handling technique is notspecific to our algorithm and can be applied to otherprecision assignment methods as well.We evaluate a PyTorch implementation of our method usingexperiments on standard image classification tasks. We firstdemonstrate that the precision assignments computed by ourmethod alleviate the limitations of existing methods: theyindeed explore the tradeoff between memory and accuracyand exhibit a better tradeoff than the uniform and operator-based assignments. We then show the two main componentsof our method (i.e., precision demotion of larger tensorsand precision promotion of overflowing tensors) are bothimportant to produce competitive precision assignments.We also provide some guidance on how users may applyour method to navigate the memory-accuracy tradeoff.To summarize, this work makes four main contributions:• We formally introduce the memory-accuracy tradeoffproblem to explore better mixed precision assignmentsfor low-precision floating-point training and prove theNP-hardness of the problem.• We present a novel precision assignment technique, as aheuristic solution to the tradeoff problem, that proposesassignments based on a single parameter denoting adesired upper bound on the model aggregate.• We present a novel technique that can handle an exces-sive number of overflows arising in training while usinga small amount of additional memory. The technique canbe applied to any (not just our) precision assignments.• We demonstrate that the mixed precision assignmentsfound by our method do explore the tradeoff betweenmemory and training accuracy, and outperform existingprecision assignment methods.We remark that this work focuses on low-precisionfloating-point training, not fixed-point training (which usesfixed-point formats), since we want to target upcominghardware (e.g., (Andersch et al., 2022)) with native supportfor low-precision floats (e.g., 8-bit floats) and their oper-ations. Also, this work focuses on low-precision training(which trains a model from scratch), not inference (whichassumes a pre-trained model). More discussion is in §2.Our precision assignment method typically provides > 2×memory reduction over the operator-based assignmentwhile maintaining similar training accuracy and givesfurther reductions by trading off accuracy. Our methodalso provides similar memory reduction to the uniformassignment, while avoiding the divergence of training oftencaused by a uniform assignment.
70accuracy (%)6050test 40050100150200epoch7570test accuracy (%)6560555045050100150200epoch75test accuracy (%)706560555045050100150200epochTraining with Mixed-Precision Floating-Point AssignmentsThe paper is organized as follows.After discussingrelated work (§2), we define the memory-accuracy tradeoffproblem and study its hardness (§3). We then describe ouralgorithm for the problem (§4) and our evaluation (§5). Weconclude with limitations and future work (§6).2RELATED WORKLow-precision floating-point training has been exten-sively studied since the work of (Micikevicius et al., 2018).One active research direction is to select appropriate floating-point formats (or their variants) for low- and high-precisionnumbers in training. Various floating-point formats havebeen proposed, including FP16 (Micikevicius et al., 2018),BF16 (Kalamkar et al., 2019), FP8 (Wang et al., 2018),HFP8 (Sun et al., 2019), and FP6 (Chmiel et al., 2021),along with some variants such as HBFP (Drumond et al.,2018), S2FP8 (Cambier et al., 2020), and BM (Fox et al.,2021). Recently, the problem of automatically selectingsuch floating-point formats has been considered: e.g., (Yanget al., 2022). Another research direction is to develop algo-rithmic techniques that improve training accuracy under lowprecision: e.g., (Sa et al., 2018; Yang et al., 2019a; Zamiraiet al., 2020; Björck et al., 2021). Our work is orthogonaland complementary to all these prior works: they considervarious floating-point formats or training algorithms but usea fixed precision assignment, which is either the uniformor operator-based assignment (or their variants); our workexplores various precision assignments once floating-pointformats and training algorithms are fixed (e.g., based onthe prior works). The tradeoff between memory and accu-racy in training is also considered in (Yang et al., 2022),but the work differs from ours: they vary floating-point for-mats when a precision assignment is fixed, while we varyprecision assignments when floating-point formats are fixed.Low-precision fixed-point training uses fixed-point for-mats as a low-precision representation instead of a floating-point format. Some works use fixed-point formats for for-ward tensors and floating-point formats for backward ten-sors: e.g., (Courbariaux et al., 2015; Jacob et al., 2018; Choiet al., 2018; Yang et al., 2019b; Sun et al., 2020). Otherworks use only fixed-point formats for all tensors: e.g.,(Gupta et al., 2015; Zhou et al., 2016; Wu et al., 2018; Daset al., 2018; Banner et al., 2018; Sakr & Shanbhag, 2019;Zhang et al., 2020; Rajagopal et al., 2020). Among all theseworks, some consider various mixed precision assignmentswith different bitwidth (fixed-point) formats (e.g., (Sakr &Shanbhag, 2019; Zhang et al., 2020)); but they are not ap-plicable to our context (i.e., floating-point training) sincethey rely on some properties of fixed-point formats that donot hold for floating-point formats (e.g., all numbers in agiven format are equally distributed). The approach taken in(Rajagopal et al., 2020) is orthogonal and complementaryto ours: they use only the uniform precision assignment, butchange the underlying low-precision formats during train-ing; we consider various mixed precision assignments, butfix the underlying low-precision formats during training.Low-precision inference, often called neural network quan-tization (in a narrow sense), aims at reducing the latencyor memory of neural network inference (instead of train-ing) by using low-precision numbers (Nagel et al., 2021).Existing approaches typically assume a pre-trained modeland try to find low-precision formats for each part ofthe inference computation, either by retraining the model(called quantization-aware training) or without any retrain-ing (called post-training quantization); see, e.g., (Gholamiet al., 2022; Qin et al., 2022) for surveys. Some works oninference consider various mixed precision assignments, butthey are not applicable to our context: they focus on makinginference more efficient and usually assume a pre-trainedmodel; we focus on making training more efficient and aimat learning a model from scratch.Floating-point tuning is another related topic, which con-siders the following problem: given a program, assign ap-propriate formats (among given candidates) to the program’sfloating-point variables such that the program’s output hasan error smaller than a given threshold for all given inputs,while also maximizing performance (Rubio-González et al.,2013; 2016; Chiang et al., 2017; Guo & Rubio-González,2018; Menon et al., 2018). This problem is different fromthe problem we consider: the former is concerned with thefloating-point error after a single run of a program, whilewe are concerned with the training accuracy after a largenumber of runs of a program (i.e., a gradient computation)where each run affects the next run; further, the former con-siders general-purpose programs, while we consider deeplearning programs and exploit their unique features.3PROBLEMIn this section, we first provide background on low-precision floating-point training (§3.1), based on whichthe memory-accuracy tradeoff problem is introduced (§3.2).We then prove the NP-hardness of the problem (§3.3). Ourapproach in §3–4 is more formal than most related worksfor two reasons: (i) we show the problem is NP-hard, whichhas not been considered in prior work; and (ii) to clearlydescribe the precision assignments to be considered.3.1 Background: Low-Precision Floating-Point TrainingLet T be the set of real-valued tensors and let [n] denote theset {1, · · · , n}. For a supervised learning task, we usuallyconsider a model network M = (f1, · · · , fn) parameter-ized by θ = (θ1, · · · , θn) ∈ Tn, and a loss network L =(fn+1, · · · , fm), where fi : T2 → T is a primitive operatoron tensors (e.g., convolution, batch normalization, maxpool,and softmax). Given an input-output pair (x, y) ∈ T2, the
Training with Mixed-Precision Floating-Point Assignments𝑓!𝑑𝑓!,!𝑑𝑓!,#𝑓$%!𝑑𝑓$%!,!⋯𝑓$𝑑𝑓$,#𝑑𝑓$,!𝑓&𝑑𝑓&,!⋯⋯⋯#𝑑𝑣&%𝑣#&𝜃!#𝑑𝑣##𝑑𝜃!%𝑣$%!%𝑣$%##𝑑𝑣$%!#𝑑𝑣$%#&𝜃$#𝑑𝜃$%𝑣&%!#𝑑𝑣&%!𝑦: forward computation: backward computation%𝑣!%𝑣$%𝑣&#𝑑𝑣!#𝑑𝑣$Figure 2: A diagram showing the tensors and operatorsused in a gradient computation; see Eq. (1) for details. Forbrevity, rounding functions rndπ(·) are omitted.model M computes a predicted output y′ of x by iterativelyapplying fi(·, θi) to x (i ∈ [n]), and L computes a lossfrom y′ by iteratively applying fi′(·, y) to y′ (i′ ∈ [m]\[n]).A standard way to train M is to minimize the loss valueusing the gradient descent algorithm: iteratively update θby following the gradient of the loss with respect to θ.Floating-point training. In practice, we perform a gradientcomputation usually with tensors represented in floating-point formats. Let π : TS → FP be a precision assignmentgiving the floating-point format of each tensor, where TS =∆{vi, dv i, θj, dθj | i ∈ [m + 1], j ∈ [n]} is the set of tensorsarising in a gradient computation (explained below), andFP =∆ {fp(e, m, b) | e, m ∈ N, b ∈ Z} is the set of floating-point formats. Here fp(e, m, b) denotes a floating-pointformat that consists of a 1-bit sign, an e-bit exponent, andan m-bit mantissa, and has an (additional) exponent biasof b ∈ Z. A common choice of π is πfp32(t) =∆ fp32 forall t ∈ TS, where fp32 =∆ fp(8, 23, 0) is the standard 32-bitfloating-point format.Given a precision assignment π, a gradient computation istypically performed by the backpropagation algorithm: withˆv1 = rndπ(v1)(x) and ˆdv m+1 = rndπ(dv m+1)(1), computeˆvi+1 = rndπ(vi+1)(fi(ˆvi, ˆui)),ˆθj = rndπ(θj)(θj),ˆdv i = rndπ(dv i)(df i,1( ˆdv i+1, ˆvi, ˆui)),ˆdθj = rndπ(dθj)(df j,2( ˆdv j+1, ˆvj, ˆθj)),(1)for i ∈ [m] and j ∈ [n]; see Figure 2 for a diagram. Herernd : FP × T → T is a function rounding a given inputto a given floating-point format, df i,1, df i,2 : T3 → T arethe backward operators of fi with respect to its first andsecond arguments, respectively, and ˆui = ˆθi if i ∈ [n] andy otherwise. We call vi and θj the forward tensors, anddv i and dθj the backward tensors. We put a hat over eachtensor to emphasize that its value is the output of a roundingfunction to a possibly low-precision format; remark thatsuch a rounding function is not used within fi, df i,1, anddf i,2, since they typically use large bitwidth floats (e.g.,fp32) and no low-precision floats internally (Kalamkaret al., 2019; Cambier et al., 2020). After the computation,ˆdθj stores the gradient of the loss value with respect to θj.The overall picture of floating-point training is now de-scribed as follows. In each iteration of the gradient descentalgorithm, we compute ˆdθj via Eq. (1) using a given preci-sion assignment π, training data (x, y), and current weightsθ. We then update each θj by θj ← rndfp32(θj − η · ˆdθj)given a learning rate η > 0, and proceed to the next iterationuntil the training ends. Here we use fp32 to represent θjby following the convention in low-precision floating-pointtraining: a “master copy” of weights (i.e., θj) is stored sep-arately from the weight values (i.e., ˆθj) used in a gradientcomputation, and is usually represented by fp32 (Micike-vicius et al., 2018; Kalamkar et al., 2019; Cambier et al.,2020). The memory overhead of this master copy is verysmall compared to the memory required to store other ten-sors (e.g., activation tensors vi) (Micikevicius et al., 2018).Low-precision floating-point training. In low-precisiontraining, we use a precision assignment π where sometensors have a smaller bitwidth than fp32.Particularlywell-studied are π that use two predetermined floating-point bitwidths (which are different) and optionally varythe rest of the format from tensor to tensor.We callC : TS × {lo, hi} → FP a precision-candidate assignmentif C(t, lo) has the same bitwidth for all t ∈ TS, the sameholds for hi, and the bitwidth for lo is smaller than that for hi.We also define Π(C) =∆ {π : TS → FP | ∀t ∈ TS. π(t) ∈{C(t, lo), C(t, hi)}} to be the set of precision assignmentsthat conform to C.Among various precision assignments in Π(C), two havereceived the most attention:the uniform assignmentπunif,C (Micikevicius et al., 2018) and the operator-basedassignment πop,C (Sun et al., 2019). The former assignslow-precision formats to all tensors uniformly1, and thelatter to (most of) the input tensors of GEMM operators (inboth forward and backward passes):πunif,C(t) =∆ C(t, lo) for all t ∈ TS,πop,C(t) =∆�������C(t, lo) if t ∈ {vi, θi, dv i+1} for some iand fi is a GEMM operator(but not the first/last one)C(t, hi) otherwise,(2)where a GEMM operator refers to a general matrix multi-plication operator which arises in, e.g., fully-connected orconvolutional layers. A particular variant πop′,C of πop,Chas received much attention as well (Kalamkar et al., 2019;PyTorch, 2022), which assigns low-precision formats to(most of) the input and output tensors of GEMM operators:it is defined as πop,C except that {vi, θi, dv i+1} in Eq. (2)is replaced by {vi, θi, vi+1, dv i, dθi, dv i+1}. For severalchoices of C, these assignments have been shown to producetraining accuracy similar to that by πfp32 on many datasetsand models (see §1–2).1For simplicity we define πunif,C without the commonexceptions for tensors near v1 and/or vm+1.
Training with Mixed-Precision Floating-Point Assignments3.2Memory-Accuracy Tradeoff ProblemWe now introduce the following problem based on §3.1,to address the limitation of existing approaches forlow-precision floating-point training discussed in §1:Problem 3.1 (Memory-accuracy tradeoff). Given trainingdata {(xi, yi)}, a model and loss network M and L, aprecision-candidate assignment C, and a lower boundr ∈ [0, 1] on the low-precision ratio, find π ∈ Π(C) thatmaximizes acc(π) subject to ratiolo(π) ≥ r.Here acc(π) denotes the accuracy of the model M whentrained with π on {(xi, yi)}, and ratiolo(π) denotes thelow-precision ratio of π, i.e., the portion of the tensorsrepresented in low-precision under π, among all tensorsappearing in a gradient computation:2ratiolo(π) =∆ size({t ∈ TS | π(t) = C(t, lo)})size(TS)∈ [0, 1]where size(T) =∆�t∈T size(t) denotes the total size(i.e., number of elements) of all tensors in T ⊆ TS. Forinstance, ratiolo(πhi) = 0 and ratiolo(πlo) = 1 for theall-high-precision assignment πhi and the all-low-precisionassignment πlo. The problem asks for a precision assign-ment that maximizes training accuracy under a memoryconstraint, which is expressed as a fraction of the memoryrequired to train the model using πhi.3.3NP-Hardness of the ProblemWe prove that the memory-accuracy tradeoff problem from§3.2 is NP-hard by showing that there is a polynomial-timereduction from the knapsack problem to this problem:Theorem 3.2. Problem 3.1 is NP-hard.Proof sketch. Recall the knapsack problem: given n itemswith weights wi ∈ N and profits pi ∈ N (i ∈ [n]), find asubset of the items that maximizes the total profit while itstotal weight does not exceed a given threshold W ∈ N.Given an instance (w, p, W) of the knapsack problem, weconstruct an instance of Problem 3.1 such that we get thefollowing (informal) correspondence between the two: wicorresponds to the size of the parameter tensor θi; pi to thei-th component of the input data; W to the lower bound ron the low-precision ratio (in an inverse way); and selectingthe i-th item corresponds to assigning a high-precisionformat to the tensor θi (and related tensors), which roughlydecreases the low-precision ratio by wi while increasingthe accuracy of the model (after training) by pi. Based2As explained in §1, the low-precision ratio is a proxy forthe reduction in memory as well as training time (because thelow-precision ratio increases as the model aggregate decreases).Note that it is not always possible to simply measure training time,as some floating-point bitwidths of interest (e.g., 8-bit) are notsupported natively by current hardware.on this informal correspondence, we formally prove thatan optimal solution to the above instance of Problem 3.1can be converted in linear time to an optimal solution tothe given knapsack problem (w, p, W). That is, we havea linear-time reduction from the knapsack problem (whichis NP-hard (Karp, 1972)) to Problem 3.1 which is thereforeNP-hard. For a detailed proof, see Appendix A.Intuitively, the proof relies on two aspects of Problem 3.1:the size of the search space (i.e., |Π(C)|) is exponential inthe size of the problem (especially |TS|), and some valuesrepresentable in a high-precision format underflow to 0 ina lower-precision format. Note that underflows are relevantin low-precision training: they frequently arise in practice,degrading the results of training (Micikevicius et al., 2018).The NP-hardness result indicates that it is unlikely anypolynomial-time algorithm solves the problem exactly.4ALGORITHMIn this section, we propose a novel (heuristic) algorithm forthe memory-accuracy tradeoff problem (§4.1), and a newtechnique to handle overflows arising in training (§4.2).4.1Precision Demotion for Saving MemoryConsider an input to the memory-accuracy trade-off prob-lem (Problem 3.1): a model and loss network M = (f1,· · · , fn) and L = (fn+1, · · · , fm), a precision-candidateassignment C, and a lower bound r on the low-precisionratio. Given the input, our algorithm works in two steps.Tensor grouping. We first group tensors in TS such thateach group consists of all the tensors between two “adjacent”GEMM operators (see below for details). This grouping re-duces the search space over precision assignments, from allof Π(C) to a subset in which the same precision is assignedto the tensors in the same group. This specific groupingstrategy is based on two observations: a majority of floating-point operations are carried out in GEMM operators, and itis standard (e.g., in PyTorch) to use the same precision for aforward tensor and its corresponding backward tensor.Formally, we group tensors as follows. Let fk and fk′(k < k′) be GEMM operators that are “adjacent”, i.e., thereis no GEMM operator in {fk+1, · · · , fk′−1}. For each such(fk, fk′), we create a group {vi, dv i, θj, dθj | i ∈ (k, k′] ∩[m + 1], j ∈ (k, k′] ∩ [n]}. After that, we create two moregroups for the remaining tensors: one for the tensors near v1and the other for tensors near vm+1. As a result, we obtaina set of disjoint groups of tensors {T1, T2, · · · } ⊆ 2TS.Precision demotion. Given the groups of tensors, T1, T2,· · · , we construct a precision assignment π as follows: ini-tialize π to the all-high-precision assignment and updateπ by demoting the precision of all tensors in a group tolow precision, one group at a time, until the low-precision
Training with Mixed-Precision Floating-Point Assignmentsratio of π becomes greater than r. We demote the pre-cision of groups in decreasing order of their sizes (i.e.,the total number of elements in tensors); that is, the pre-cision of a larger size group is demoted earlier. Formally,let {T ′1, T ′2, · · · } be the reordering of {T1, T2, · · · } suchthat size(T ′1) ≥ size(T ′2) ≥ · · · . After initializing π byπ(t) = C(t, hi) for all t, we iterate over i ∈ N and update πto π(t) = C(t, lo) for all t ∈ T ′i, until ratiolo(π) ≥ r is firstsatisfied. The resulting π is the output of our algorithm.The intuition behind using group size as the priority orderfor precision demotion is based on the fact that it is actuallyoptimal in a very simplified setting. Suppose that an inputx to the model M stores a quantity of information I andthe forward computation of M is nothing but a process ofextracting the information in the input into a small numberof values, i.e., the tensor vn+1. Assume that passing througheach group Oi = {fk+1, · · · , fk′} of operators (corre-sponding to the group Ti of tensors) reduces the amount ofinformation by a factor αi ∈ (0, 1), and using low precisionon the group Ti further reduces the amount of informationby a constant factor β ∈ (0, 1) for all i. Then, the amountof information left in vn+1 becomes I × (α1α2 · · · ) × βl,where l is the number of groups in low precision. In thissimplified setting, maximizing the amount of information invn+1 is equivalent to minimizing the number of groups inlow precision, which is achieved precisely by demoting thelargest groups first (when there is a constraint on the low-precision ratio). We show empirically (§5.4) that using thedecreasing size order in precision demotion indeed producesbetter precision assignments than using other orders.4.2Precision Promotion for Handling OverflowsWhile our algorithm in §4.1 exerts a constraint on memoryusage, it places no explicit constraint on training accuracy,and so not surprisingly for some models and datasetsthe resulting precision assignment causes training todiverge—accuracy decreases significantly and remains lowafter some point. We observe that when training begins todiverge (and a bit before that), many overflows occur in therounding function of some tensors ˆvi, i.e., an input tensor tothe function rndπ(vi)(·) in Eq. (1) contains many elementswhose magnitude is larger than the maximum representablenumber of the format π(vi) (Figure 6(a-b); §5.4). Thisrapid increase in overflows in individual tensors is a signalthat training may diverge.Precision promotion. Based on this observation, after eachgradient computation we update the current precision as-signment π by promoting to high precision (i.e., C(t, hi))any forward tensor t whose overflow ratio is greater than agiven threshold Θ ∈ (0, 1); this updated precision assign-ment is used in the next gradient computation. Here theoverflow ratio of t ∈ TS denotes the number of overflowsarising in the rounding function of ˆt in Eq. (1), divided bythe number of elements in ˆt. We show empirically (§5.4)that training always converges using this technique and theadditional memory cost of promotion is small (in our exper-iments, < 3% of the maximum model aggregate). For theexperiments, we use Θ = 0.01; in fact we found that a widerange of values for Θ (0.1, 0.01, and 0.001) all work well.Note that this technique is not specific to our algorithm andcan also be applied to other precision assignment methods.We apply precision promotion only to forward tensors fortwo reasons. First, dynamic loss scaling (Micikeviciuset al., 2018; Sun et al., 2019; Nvidia, 2019; PyTorch, 2022)already handles overflows in backward tensors, but not inforward tensors: loss scaling multiplies the backward losstensor dv m+1 by a constant before performing backwardcomputation, to scale up all backward tensors; the dynamicversion adjusts the constant during training in a way thatavoids overflows in backward tensors. Note that dynamicloss scaling does not affect forward tensors at all. Second,we cannot use a similar idea to handle overflows in forwardtensors, because forward tensors are not linear in the inputtensor v1 whereas backward tensors are linear in the back-ward loss tensor dv m+1 (by the linearity of differentiation).Precision promotion incurs little if any computational over-head: checking whether a single rounding operation over-flows is cheap, and we only apply rounding functions to theoutput tensor of an arithmetic-intensive operator (e.g., con-volution and batch normalization), amortizing the cost of theoverflow checks over a large number of other operations.5EXPERIMENTSIn this section, we evaluate our precision assignmenttechnique (developed in §4) on standard training tasks toanswer three research questions:• Does our technique explore the tradeoff betweenmemory and accuracy and achieve a better tradeoff thanexisting (fixed) precision assignments (§5.3)?• Are the two main components of our technique,precision demotion/promotion of larger/overflowingtensors, important for good performance (§5.4)?• How can we choose the parameter r in our technique(i.e., a lower bound on the low-precision ratio) (§5.5)?5.1ImplementationWe have implemented our precision assignment techniqueusing PyTorch (Paszke et al., 2019). Given a model and lossnetwork, and a dataset, our implementation takes as param-eters a precision-candidate assignment C and a lower boundr on the low-precision ratio; it then automatically assignsprecisions to tensors (appearing in training) according toour technique and uses those assigned precisions in gradientcomputations. To make these procedures automatic, ourimplementation works as follows:
Training with Mixed-Precision Floating-Point Assignments• For each PyTorch class for a primitive operator (e.g.,torch.nn.Conv2d), our implementation provides itswrapped version (e.g., mpa.nn.Conv2d) which recordsauxiliary information for our technique (e.g., floating-point format of input/output tensors) and applies properrounding functions in forward/backward computationsbased on the auxiliary information. Models should nowuse the wrapped classes instead of the original ones.• Our implementation first constructs a computation graph(of a given model and loss network) dynamically byrunning a forward computation on a minibatch of inputdata. The computation graph and other information (e.g.,each tensor’s size) are recorded in the wrapped classes.• Using the auxiliary information just recorded, ourimplementation then constructs a precision assignmentaccording to §4.1, uses it in gradient computations, andupdates it after each gradient computation accordingto §4.2. We record the precision assignment also in thewrapped classes to automatically apply proper roundingfunctions in gradient computations.As no current hardware natively supports low-precisionformats used in the experiments (e.g., 8-bit floats) andtheir operations, we simulate them with 32-bit floatsand 32-bit operations followed by rounding functions asdescribed in Eq. (1). We implement the rounding functionsbased on the QPyTorch library (Zhang et al., 2019); a fewextensions are required though, e.g., to support exponentbias and signal overflows for dynamic loss scaling. Weautomatically apply these rounding functions after eachprimitive operator, by using PyTorch’s hook feature (e.g.,nn.Module.register_*hook).5.2Experiment SetupsDatasets and models. As benchmarks for our experiments,we use the image classification task and three datasets for thetask: CIFAR-10 and CIFAR-100 (Krizhevsky, 2009), andImageNet (Russakovsky et al., 2015); we choose them sincethey have been widely used in recent works on low-precisiontraining as a standard choice (Wang et al., 2018; Sakr &Shanbhag, 2019; Rajagopal et al., 2020; Chmiel et al., 2021).For the task and datasets, we use four well-known models:SqueezeNet (Iandola et al., 2016), ShuffleNet-v2 (Ma et al.,2018), MobileNet-v2 (Sandler et al., 2018), and ResNet-18 (He et al., 2016); they are chosen since models withrelatively few weights, such as these, are generally knownto be more difficult to train with low precision than thosewith more weights (Sun et al., 2019). We considered othertasks (e.g., language modeling) and related models (e.g.,RNN/transformer-based models) but did not include themin our experiments because substantial additional implemen-tation effort orthogonal to our main contributions would berequired: these models use some PyTorch operators that donot support per-tensor precision assignments, so applyingour technique to these models requires significant modifica-tions to PyTorch internals.Precision-candidate and precision assignments. For theexperiments, we use the precision-candidate assignmentC studied in (Sun et al., 2019), which uses 16-bit (and8-bit) floats for high (and low) precision; in particular,C(t, hi) = fp(6, 9, 0) for all (forward/backward) tensorst, and C(t, lo) = fp(4, 3, 4) for all forward tensors t andfp(5, 2, 0) otherwise. We choose this particular C because ituses sub-32-bit floating-point formats for both low and highprecision and the precision assignment πop,C was shown toachieve accuracy comparable to 32-bit training (Sun et al.,2019). The three floating-point formats used in C allowsubnormals but no infinities and NaNs, which are roundedto the largest or smallest representable numbers. While nocurrent hardware is available for the latter two 8-bit formats,they will be supported natively on NVIDIA’s forthcomingH100 GPU (Andersch et al., 2022). Because our techniqueis parameterized by a precision-candidate assignment, it iseasily applied to other assignments as well.We evaluate our technique by varying its parameter r(i.e., a lower bound on low-precision ratio) over decilesr ∈ {0, 0.1, 0.2, · · · , 1}. We write πours,r to denote theprecision assignment chosen by our technique (describedin §4) for a given r; e.g., πours,0 is the all-high-precisionassignment, and πours,1 is the all-low-precision assignmentequipped with our precision promotion technique (§4.2).By following (Sun et al., 2019), all precision assignments(including πours,r) in our experiments use high precision(i.e., 16 bits) for all backward weight tensors (i.e., ˆdθj).Other setups and compute time. All experiments wereperformed on NVIDIA V100 GPUs; total compute time forall experiments was 1,008 GPU-days. We train all models ina standard way: we apply dynamic loss scaling (a standardtechnique used in low-precision floating-point training; see§4.2 for details) except for 32-bit training, and use standardsettings (e.g., learning rate); see Appendix B for details.Due to random variations in training, we perform four runsof training for each configuration and report the average andthe range of measured quantities.5.3Comparison with Existing Precision AssignmentsTo compare our technique with existing precision assign-ments for floating-point training, we train each modelwith the following precision assignments: all-32-bit πfp32,uniform πunif (Micikevicius et al., 2018), operator-basedπop (Sun et al., 2019), its variant πop′ (Kalamkar et al.,2019; PyTorch, 2022), and ours πours,r (see §3.1 and §5.2for their definitions).We choose πunif, πop, and πop′as baselines because existing precision assignments forfloating-point training fall into one of the three assignments(or their variants) (see §1–2).
Training with Mixed-Precision Floating-Point AssignmentsFigure 3: Results of training ShuffleNet-v2 on ImageNet with πfp32, πunif (Micikevicius et al., 2018), πop (Sun et al.,2019), πop′ (Kalamkar et al., 2019), and πours,r. Left: Each line shows the average training trajectory for each precisionassignment; πours,r is colored from navy to yellow (darker for smaller r). Right: Each point shows the memory-accuracytradeoff of each precision assignment; a red-dashed line shows the accuracy of πfp32; and shaded areas show the variationamong four training runs. In the right figure, top-right points are better than bottom-left ones. Observe that there are •sabove and to the right ofand, respectively. ⋆ is missing as its y-value is too small.(a) CIFAR-10, SqueezeNet(b) CIFAR-100, SqueezeNet(c) CIFAR-100, SqueezeNet†(d) CIFAR-10, ShuffleNet-v2(e) CIFAR-100, ShuffleNet-v2(f) CIFAR-100, ShuffleNet-v2†(g) CIFAR-10, MobileNet-v2(h) CIFAR-100, MobileNet-v2(i) CIFAR-100, MobileNet-v2†(j) CIFAR-10, ResNet-18(k) CIFAR-100, ResNet-18(l) CIFAR-100, ResNet-18†Figure 4: Memory-accuracy tradeoffs of πunif (Micikevicius et al., 2018), πop (Sun et al., 2019), πop′ (Kalamkar et al.,2019), and πours,r for four models and their smaller variants on CIFAR-10 and CIFAR-100. The variant models have widthmultiplier 0.25 and are marked by †. Top-right points are better than bottom-left ones. In all but three plots, there are •sabove and to the right ofand, respectively; even in the three plots (g,h,k), •s have almost the same tradeoffs toand. In half of all plots, ⋆ has much smaller y-values than other points. The training trajectories for the above plotsand the results of other smaller models are in Appendix C.1.
929088fp32op86opunif80ours780.000.250.500.751.00low-prec. ratio727068fp32op66opunif2ours00.000.250.500.751.00low-prec. ratio66test accuracy (%)64X62fp3260opopunif2ours00.000.250.500.751.00low-prec. ratio94 (%)92test accuracy (90fp3288opopunif80ours780.000.250.500.751.00low-prec. ratio74(%)72test accuracy (70fp3268opopunif2ours00.000.250.500.751.00low-prec. ratio68accuracy (%)6664fp3262optest aopunif40ours380.000.250.500.751.00low-prec. ratio96test accuracy (%)9492fp32op90opunif76ours0.000.250.500.751.00low-prec. ratio80(%)78test accuracy (76fp3274opopunif2ours00.000.250.500.751.00low-prec. ratio706866fp32op64opunif52ours500.000.250.500.751.00low-prec. ratio60test accuracy (%)40fp32op20opunifours0020406080epoch66test accuracy (%)6462fp32op60opunif34ours320.000.250.500.751.00low-prec. ratio94 (%)92test accuracy (90fp3288opopunif72ours700.000.250.500.751.00low-prec. ratio72(%)70test accuracy (6866fp32opopunif2ours00.000.250.500.751.00low-prec. ratio56test accuracy (%)5452fp32op50opunif2ours00.000.250.500.751.00low-prec. ratioTraining with Mixed-Precision Floating-Point AssignmentsWe train the four models mentioned in §5.2 on CIFAR-10and CIFAR-100, and ShuffleNet-v2 on ImageNet. We alsotrain smaller variants of the four models (which are moredifficult to train with low precision) on CIFAR-100. Weobtain these variant models by following (Sun et al., 2019),i.e., by applying a well-known approach for model reductionthat uses a parameter called the width multiplier (Howardet al., 2017): each variant model reduces the number ofchannels in most tensors by a width multiplier; we use threevalues {0.5, 0.25, 0.1} for the width multiplier. We trainjust one model on ImageNet due to the large amount ofcomputation involved: for each model, 44 training runs (11choices for r and 4 runs for each choice) are required forπours,r and each run on ImageNet takes nearly a half daywith 16 GPUs. We use ShuffleNet-v2 for ImageNet sincethe model shows interesting memory-accuracy tradeoffswhen trained on the (smaller) CIFAR datasets.ImageNet. Figure 3 presents training results of ShuffleNet-v2 on ImageNet: its left graph plots the average trainingtrajectory for each precision assignment, and its right graphshows how each precision assignment trades off betweenmemory and accuracy, where memory is represented (in-versely) by the low-precision ratio of the assignment and ac-curacy is the best test accuracy of the model during training.Each point in the right graph shows the average accuracyof four runs of training, while the shaded area shows thevariation in accuracy among those four training runs.Figure 3 shows three points.First, as the parameter rincreases, the average accuracy drop of πours,r from πfp32increases (up to 5%). In contrast, πunif and πop′ have amuch larger average accuracy drop (more than 30%), assome training runs diverge when πunif and πop′ are used.Second, the tradeoff given by πours,r is better (i.e., closerto Pareto-optimal) than by πop: πours,r for r ∈ {0.3, 0.4}has both higher accuracy and larger low-precision ratio (i.e.,memory reduction) than πop. In particular, πours,0.4 has1.6× the memory reduction of πop. Third, πours,r providesoptions that πop cannot (which has an accuracy drop of>1%). If we want accuracy closer to πfp32, say within 0.5%,we can use πours,0.2 with 2.6% more memory than πop. Ifwe can tolerate a larger accuracy loss, say ≈ 3%, then wecan use πours,0.7 with 2.9× the memory reduction of πop.CIFAR-10/100. Figure 4 presents the memory-accuracytradeoffs of precision assignments for the four models onCIFAR-10 and CIFAR-100, and their smaller variants (withwidth multiplier 0.25) on CIFAR-100. The results for othersmaller variants are similar and included in Appendix C.1.The conclusions from Figure 3 hold for Figure 4: πours,rprovides a range of options by varying r and exhibits abetter tradeoff than πunif, πop, and πop′ in almost all cases.We give a detailed comparison as follows. First, in half ofall 12 plots, πunif shows a similar tradeoff to πours,1. Butin the remaining half, πunif has an accuracy drop muchlarger than all other precision assignments including πours,r,since using πunif often makes training diverge while using,e.g., πours,1 does not do so. Second, in all but two plots,πours,r shows a strictly better tradeoff than πop: πours,r hasnoticeably larger (> 2×) memory reduction than πop whilemaintaining similar accuracy. Even in the two plots, πours,rhas a tradeoff very close to πop. Note that in three plots,πop has an accuracy drop of >1% while πours,r providesseveral options that have smaller accuracy drops and morememory savings at the same time. Third, πours,r shows astrictly better (or similar) tradeoff than πop′ in all but two(or two) plots. Note that πop′ has accuracy smaller than πopin all but one plots. Also it has an accuracy drop of >1% inhalf of all plots, and sometimes makes training even diverge(in one plot here and three other plots in Appendix C.1).5.4 Ablation Study: Precision Demotion and PromotionPrecision demotion.To evaluate the decision to useprecision demotion in decreasing-size order, we trainthe four models on CIFAR-100 with πours,r, πours[inc],r(which demotes tensor groups in increasing-size order) andπours[rand],r (which demotes tensor groups in random or-der). For πours[rand], three different random orders are usedin each case. The results, presented in Figure 5 (and Ap-pendix C.2), show that the order of precision demotion has asignificant impact on the resulting memory-accuracy trade-off, and that decreasing order provides the best results innearly all cases. Increasing order consistently shows theworst results, suggesting our intuition (given in §4.1) forchoosing decreasing order has some basis in reality.Precision promotion. To understand whether precision pro-motion of overflowing tensors is important to our technique,we train ShuffleNet-v2 on ImageNet using πours[no-promo],rwhich does not promote tensors. The results, presented inFigure 6(a), show that several training trajectories divergein early epochs and fail to recover afterwards. Figure 6(b)plots the top-5 tensor overflow ratios for the highlightedtrajectory in Figure 6(a). The overflow ratios first spikeabout when divergence occurs around epoch 11. A closerlook shows that the spike in overflow ratio occurs shortlybefore divergence, and starts first in a few tensors and thenpropagates to others. These observations indicate that anexcessive number of overflows in a few tensors are the causeof the training divergence.Finally, Figure 6(c-d) shows that precision promotion iseffective at preventing the divergence of training whilesacrificing only a small amount of memory reduction. Thefigure shows ShuffleNet-v2 on ImageNet trained using ourtechnique with and without precision promotion. Figure 6(c)shows that without precision promotion large accuracydrops occur due to divergence, whereas with precision pro-motion training converges. Figure 6(d) shows that the total
Training with Mixed-Precision Floating-Point Assignments(a) SqueezeNet(b) ShuffleNet-v2(c) MobileNet-v2Figure 5: Memory-accuracy tradeoffs of πours,r, πours[inc],r, and πours[rand],r for three models on CIFAR-100. Observethat •s are above and to the right of other points in nearly all cases. The results of ResNet-18 are in Appendix C.2.(a)(b)(c)(d)Figure 6: Training ShuffleNet-v2 on ImageNet with πours,r and πours[no-promo],r. (a) Training trajectories of πours[no-promo],rfor different r; colors denote r values (darker for smaller r). (b) Top-5 overflow ratios of tensors at each epoch, for thehighlighted trajectory in (a); the largest ratio is blue and the fifth largest red. (c) Memory-accuracy tradeoffs of πours,rand πours[no-promo],r. (d) Low-precision ratio when training ends vs. when training starts, for πours,r and πours[no-promo],r.The results on CIFAR-10 are in Appendix C.2.size of tensors promoted to high precision is small for all rvalues. See Appendix C.2 for similar results for CIFAR-10.5.5Choosing the value of rThe time and space savings of our method are most signif-icant when a model is regularly retrained, which commonlyoccurs when new data is periodically incorporated intoan existing model. Assuming that new data has a similardistribution to existing data, we can choose a single r (aparameter in our method) by conducting one set of exper-iments where we train with πfp32 and πours,r for different rand then choose the r value that maximizes model aggregatesavings while still having an acceptable drop in accuracy.To simulate this scenario, we create five datasets ImageNet-200-i (i ∈ [5]) as follows, so that each of them containsdifferent but similar data: randomly select 1/5 of the classesin ImageNet (which has 1000 classes in total), and split thetraining data of each class evenly into five new datasets.For each ImageNet-200-i, we train ShuffleNet-v2 withπfp32 and πours,r and present the results in Figure 7. Basedon the tradeoff results of πours,r, we can choose r = 0.4 ifwe desire an average of < 1% accuracy drop from πfp32, andwe can choose r = 0.9 if an average ≈ 3% accuracy dropis tolerable. We make two more observations: the tradeoffresult of πours,r is similar across all five datasets eventhough each dataset is different, and for each r the varianceFigure 7:Memory-accuracy tradeoffs of πours,r forShuffleNet-v2 on ImageNet-200-i (i ∈ [5]).in the accuracy of πours,r from different datasets and runs oftraining is similar to that of πfp32. Thus we expect that ona new but similar dataset, πours,r would have an accuracydrop similar to Figure 7 with acceptable variance.6LIMITATIONS AND FUTURE WORKOur work has the same limitation present in prior workson low-precision floating-point training: as 8-bit floats andoperations are not handled natively in hardware, but rathersimulated in software, we cannot directly measure the poten-tial speedup of our method, though we do expect speedupsto be proportional to the reduction in the model aggregate.We leave it as future work to perform such experimentson future hardware (e.g., NVIDIA’s H100) that nativelysupports more low-precision formats. Another directionfor future work is to integrate our method into systems forautomatically optimizing deep learning computations (e.g.,(Jia et al., 2019; Unger et al., 2022)) to accelerate training.
72accuracy (%)7068test ours[inc]ours[rand]66 ours0.000.250.500.751.00low-prec. ratio74-test accuracy (%)7270ours[inc]68ours[rand]ours0.000.250.500.751.00low-prec. ratio74(%)accuracy(7270test ours[inc]ours[rand]68 ours0.000.250.500.751.00low-prec. ratio80604020020406080epoch1.00.8overflow ratio0.60.4top-1top-2top-30.2top-4top-50.0020406080epoch80(%)60accuracy (40test 20ours[no-promo]ours00.000.250.500.751.00low-prec. ratio1.0low-prec. ratio (end)0.80.60.2ours[no-promo]ours0.00.00.20.40.60.81.0low-prec. ratio (start)64 62茶6058fp32ours0.000.250.500.751.00low-prec. ratioTraining with Mixed-Precision Floating-Point AssignmentsREFERENCESAndersch,M.,Palmer,G.,Krashinsky,R.,Stam,N.,Mehta,V.,Brito,G.,andRamaswamy,S.NVIDIAHopperArchitectureIn-Depth.https://developer.nvidia.com/blog/nvidia-hopper-architecture-in-depth/,2022.Banner, R., Hubara, I., Hoffer, E., and Soudry, D. Scalablemethods for 8-bit training of neural networks.InNeurIPS, pp. 5151–5159, 2018.Björck, J., Chen, X., De Sa, C., Gomes, C. P., andWeinberger, K. Low-Precision Reinforcement Learning:Running Soft Actor-Critic in Half Precision. In ICML,pp. 980–991, 2021.Cambier, L., Bhiwandiwalla, A., Gong, T., Elibol, O. H.,Nekuii, M., and Tang, H. Shifted and Squeezed 8-bitFloating Point format for Low-Precision Training ofDeep Neural Networks. In ICLR, 2020.Chiang, W., Baranowski, M., Briggs, I., Solovyev, A.,Gopalakrishnan, G., and Rakamaric, Z.Rigorousfloating-point mixed-precision tuning.In POPL, pp.300–315, 2017.Chmiel, B., Ben-Uri, L., Shkolnik, M., Hoffer, E., Banner,R., and Soudry, D. Neural gradients are near-lognormal:improved quantized and sparse training. In ICLR, 2021.Choi, J., Wang, Z., Venkataramani, S., Chuang, P. I., Srini-vasan, V., and Gopalakrishnan, K. PACT: ParameterizedClipping Activation for Quantized Neural Networks.arXiv:1805.06085, 2018.Courbariaux, M., Bengio, Y., and David, J.-P. BinaryCon-nect:Training Deep Neural Networks with binaryweights during propagations. In NeurIPS, pp. 3123–3131,2015.Das, D., Mellempudi, N., Mudigere, D., Kalamkar, D.,Avancha, S., Banerjee, K., Sridharan, S., Vaidyanathan,K., Kaul, B., Georganas, E., Heinecke, A., Dubey, P.,Corbal, J., Shustrov, N., Dubtsov, R., Fomenko, E., andPirogov, V. Mixed Precision Training of ConvolutionalNeural Networks using Integer Operations. In ICLR,2018.Drumond, M., LIN, T., Jaggi, M., and Falsafi, B. TrainingDNNs with Hybrid Block Floating Point. In NeurIPS,pp. 451–461, 2018.Fox, S., Rasoulinezhad, S., Faraone, J., david boland, andLeong, P. A Block Minifloat Representation for TrainingDeep Neural Networks. In ICLR, 2021.Gholami, A., Kim, S., Dong, Z., Yao, Z., Mahoney, M. W.,and Keutzer, K.A Survey of Quantization Methodsfor Efficient Neural Network Inference. In Low-PowerComputer Vision: Improving the Efficiency of ArtificialIntelligence, pp. 291–326. CRC Press, 2022.URLhttps://arxiv.org/abs/2103.13630.Guo, H. and Rubio-González, C. Exploiting CommunityStructure for Floating-Point Precision Tuning. In ISSTA,pp. 333–343, 2018.Gupta, S., Agrawal, A., Gopalakrishnan, K., and Narayanan,P. Deep Learning with Limited Numerical Precision. InICML, pp. 1737–1746, 2015.He, K., Zhang, X., Ren, S., and Sun, J. Deep Residual Learn-ing for Image Recognition. In CVPR, pp. 770–778, 2016.Howard, A. G., Zhu, M., Chen, B., Kalenichenko, D.,Wang, W., Weyand, T., Andreetto, M., and Adam, H.MobileNets: Efficient Convolutional Neural Networksfor Mobile Vision Applications. arXiv:1704.04861, 2017.Iandola, F. N., Moskewicz, M. W., Ashraf, K., Han, S.,Dally, W. J., and Keutzer, K. SqueezeNet: AlexNet-levelaccuracy with 50x fewer parameters and <1MB modelsize. arXiv:1602.07360, 2016.Jacob, B., Kligys, S., Chen, B., Zhu, M., Tang, M., Howard,A., Adam, H., and Kalenichenko, D.Quantizationand Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference. In CVPR, pp. 2704–2713,2018.Jia, Z., Zaharia, M., and Aiken, A. Beyond Data and ModelParallelism for Deep Neural Networks. In MLSys, pp.1–13, 2019.Kalamkar, D. D., Mudigere, D., Mellempudi, N., Das,D., Banerjee, K., Avancha, S., Vooturi, D. T., Jammala-madaka, N., Huang, J., Yuen, H., Yang, J., Park, J.,Heinecke, A., Georganas, E., Srinivasan, S., Kundu,A., Smelyanskiy, M., Kaul, B., and Dubey, P.AStudy of BFLOAT16 for Deep Learning Training.arXiv:1905.12322, 2019.Karp, R. M. Reducibility Among Combinatorial Problems.In Complexity of Computer Computations, pp. 85–103,1972.Krizhevsky, A.Learning multiple layers of featuresfrom tiny images.Technical report, 2009.URLhttps://www.cs.toronto.edu/~kriz/learning-features-2009-TR.pdf.Ma, N., Zhang, X., Zheng, H.-T., and Sun, J. ShuffleNetV2: Practical Guidelines for Efficient CNN ArchitectureDesign. In ECCV, pp. 122–138, 2018.
Training with Mixed-Precision Floating-Point AssignmentsMenon, H., Lam, M. O., Osei-Kuffuor, D., Schordan,M., Lloyd, S., Mohror, K., and Hittinger, J. ADAPT:Algorithmic Differentiation Applied to Floating-PointPrecision Tuning. In SC, pp. 48:1–48:13, 2018.Micikevicius, P., Narang, S., Alben, J., Diamos, G., Elsen,E., Garcia, D., Ginsburg, B., Houston, M., Kuchaiev, O.,Venkatesh, G., and Wu, H. Mixed Precision Training. InICLR, 2018.Nagel, M., Fournarakis, M., Amjad, R. A., Bondarenko, Y.,van Baalen, M., and Blankevoort, T. A White Paper onNeural Network Quantization. arXiv:2106.08295, 2021.Nvidia.Documentation of apex.amp.https://nvidia.github.io/apex/amp.html, 2019.Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury,J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N.,Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito,Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner,B., Fang, L., Bai, J., and Chintala, S. PyTorch: AnImperative Style, High-Performance Deep LearningLibrary. In NeurIPS, pp. 8024–8035, 2019.PyTorch.Documentationoftorch.amp.https://pytorch.org/docs/stable/amp.html#gradient-scaling, 2022.Qin, H., Ding, Y., Fan, W., Leff, C., Bahri, M., and Shaw,E. Awesome Model Quantization. https://github.com/htqin/awesome-model-quantization,2022.Rajagopal, A., Vink, D. A., Venieris, S. I., and Bouganis, C.-S. Multi-Precision Policy Enforced Training (MuPPET):A Precision-Switching Strategy for Quantised Fixed-Point Training of CNNs. In ICML, pp. 7943–7952, 2020.Rubio-González, C., Nguyen, C., Nguyen, H. D., Demmel,J., Kahan, W., Sen, K., Bailey, D. H., Iancu, C.,and Hough, D.Precimonious: Tuning Assistant forFloating-Point Precision. In SC, pp. 27:1–27:12, 2013.Rubio-González, C., Nguyen, C., Mehne, B., Sen, K.,Demmel, J., Kahan, W., Iancu, C., Lavrijsen, W., Bailey,D. H., and Hough, D. Floating-Point Precision TuningUsing Blame Analysis. In ICSE, pp. 1074–1085, 2016.Russakovsky, O., Deng, J., Su, H., Krause, J., Satheesh, S.,Ma, S., Huang, Z., Karpathy, A., Khosla, A., Bernstein,M., Berg, A. C., and Fei-Fei, L. ImageNet Large ScaleVisual Recognition Challenge. International Journal ofComputer Vision, 115(3):211–252, 2015.Sa, C. D., Leszczynski, M., Zhang, J., Marzoev, A.,Aberger, C. R., Olukotun, K., and Ré, C. High-AccuracyLow-Precision Training. arXiv:1803.03383, 2018.Sakr, C. and Shanbhag, N. Per-Tensor Fixed-Point Quantiza-tion of the Back-Propagation Algorithm. In ICLR, 2019.Sandler, M., Howard, A., Zhu, M., Zhmoginov, A., andChen, L.-C.MobileNetV2: Inverted Residuals andLinear Bottlenecks. In CVPR, pp. 4510–4520, 2018.Sun, X., Choi, J., Chen, C.-Y., Wang, N., Venkataramani,S., Srinivasan, V. V., Cui, X., Zhang, W., and Gopalakr-ishnan, K. Hybrid 8-bit Floating Point (HFP8) Trainingand Inference for Deep Neural Networks. In NeurIPS,pp. 4901–4910, 2019.Sun, X., Wang, N., Chen, C.-Y., Ni, J., Agrawal, A., Cui,X., Venkataramani, S., El Maghraoui, K., Srinivasan,V. V., and Gopalakrishnan, K. Ultra-Low Precision 4-bitTraining of Deep Neural Networks.In NeurIPS, pp.1796–1807, 2020.Unger, C., Jia, Z., Wu, W., Lin, S., Baines, M., Narvaez, C.E. Q., Ramakrishnaiah, V., Prajapati, N., McCormick, P.,Mohd-Yusof, J., Luo, X., Mudigere, D., Park, J., Smelyan-skiy, M., and Aiken, A. Unity: Accelerating DNN Train-ing Through Joint Optimization of Algebraic Transforma-tions and Parallelization. In OSDI, pp. 267–284, 2022.Wang, N., Choi, J., Brand, D., Chen, C.-Y., and Gopalakrish-nan, K. Training Deep Neural Networks with 8-bit Float-ing Point Numbers. In NeurIPS, pp. 7686–7695, 2018.Wu, S., Li, G., Chen, F., and Shi, L. Training and Inferencewith Integers in Deep Neural Networks. In ICLR, 2018.Yang, C., Wu, Z., Chee, J., Sa, C. D., and Udell, M.How Low Can We Go: Trading Memory for Error inLow-Precision Training. In ICLR, 2022.Yang, G., Zhang, T., Kirichenko, P., Bai, J., Wilson, A. G.,and De Sa, C. SWALP : Stochastic Weight Averaging inLow Precision Training. In ICML, pp. 7015–7024, 2019a.Yang, J., Shen, X., Xing, J., Tian, X., Li, H., Deng, B.,Huang, J., and Hua, X.-s. Quantization Networks. InCVPR, pp. 7308–7316, 2019b.Zamirai, P., Zhang, J., Aberger, C. R., and Sa, C. D.Revisiting BFloat16 Training. arXiv:2010.06192, 2020.Zhang, T., Lin, Z., Yang, G., and Sa, C. D. QPyTorch:A Low-Precision Arithmetic Simulation Framework.arXiv:1910.04540, 2019.Zhang, X., Liu, S., Zhang, R., Liu, C., Huang, D., Zhou,S., Guo, J., Guo, Q., Du, Z., Zhi, T., and Chen, Y.Fixed-Point Back-Propagation Training. In CVPR, pp.2327–2335, 2020.
Training with Mixed-Precision Floating-Point AssignmentsZhou, S., Ni, Z., Zhou, X., Wen, H., Wu, Y., and Zou,Y.DoReFa-Net:Training Low Bitwidth Convolu-tional Neural Networks with Low Bitwidth Gradients.arXiv:1606.06160, 2016.
Training with Mixed-Precision Floating-Point AssignmentsAPROBLEM: DEFERRED PROOFTheorem 3.2. Problem 3.1 is NP-hard.Proof. We prove the NP-hardness of Problem 3.1 (thememory-accuracy tradeoff problem) by reducing theknapsack problem (which is NP-hard) to the tradeoffproblem.More precisely, we prove that the knapsackproblem can be solved in polynomial time if we assumean oracle for the tradeoff problem.Recall the knapsack problem: given n items with weightswi ∈ N and profits pi ∈ N (i ∈ [n]), and given a thresholdW ∈ N, decide which items to choose such that the totalprofit of the chosen items is maximized while their totalweight does not exceed W. That is, find α ∈ {0, 1}n thatmaximizes �i∈[n] αipi subject to �i∈[n] αiwi ≤ W. Thisproblem is well-known to be NP-hard (Karp, 1972).Given an instance of the knapsack problem (w, p, W), weconstruct an instance of the tradeoff problem as follows:• Notations.The following construct uses a constantk ∈ N and floating-point formats fphi, fplo ∈ FP (onefor high precision and the other for low precision).Below we will specify the conditions they should satisfy,and show that some k, fphi, and fplo indeed satisfy theconditions. We write rndhi(·) and rndlo(·) as shorthandfor rndfphi(·) and rndfplo(·).• Training setups. We consider a very simple setting fortraining: the gradient descent algorithm with a learningrate η = 2−l (l ∈ N) is applied for just one epoch; allparameters are initialized to 0 and their master copiesare represented in fphi; and the negative loss of a modelon training data (i.e., −L(fθ(x), y) using notations tobe described below) is used as the accuracy of the model.Here l ∈ N can be any natural number.• Model and loss networks. A model network M anda loss network L are given as Figure 8, where M has nparameter tensors θi ∈ Rwi of size wi (i ∈ [n]). For aninput-output pair (x, y) ∈ Rn × R, M and L compute apredicted output fθ(x) ∈ R and a loss L(fθ(x), y) ∈ Ras follows (assuming that no rounding functions areapplied):fθ(x) =∆ �i∈[n]�j∈[wi]θi,jxi,L(fθ(x), y) =∆ 2−k|fθ(x) − y|.Roughly speaking, M is (a variant of) a linear classifierand L is a ℓ1-loss (scaled by 2−k).• Training data. Training data consists of a single input-output pair (x, y) ∈ Rn × R that satisfies the following:xi = rndlo(�pi/wi),y < −2−(k+l) �i∈[n]wix2ifor all i ∈ [n]. Here y can take any value as long asit satisfies the above inequality. Note that xi can bedifferent from�pi/wi since the latter value may notbe representable in fplo.• Precision-candidateassignment.Aprecision-candidate assignment C : TS×{hi, lo} → FP is given as:C(t, hi) =∆ fphi,C(t, lo) =∆ fplofor all t ∈ TS.That is, for all tensors, fphi is used as a high-precisionformat and fphi as a low-precision format. Here fphi andfplo should satisfy the following:ehi ≥ elo,mhi ≥ mlo,(3)|rndlo(s) − s| < |s| · errfor all s ∈ S1,(4)rndlo(s) = 0for all s ∈ S2,(5)rndhi(s) = sfor all s ∈ S2 ∪ S3,(6)where ehi and mhi (and elo and mlo) denote the numberof exponent bits and mantissa bits of fphi (and fplo), anderr =∆ 1/(6n · maxi∈[n]pi),S1 =∆ {�pi/wi | i ∈ [n]},S2 =∆ {2−k} ∪ {2−kxi | i ∈ [n]},S3 =∆ {2−(k+l)xi | i ∈ [n]}.Eq. (4) says that the relative error of representing eachs ∈ S1 in fplo should be less than err. Eq. (5) says thateach s ∈ S2 should underflow to 0 when representedin fplo. Eq. (6) says that each s ∈ S2 ∪ S3 should berepresentable in fphi.• Low-precision ratio. A lower bound r ∈ [0, 1] on thelow-precision ratio is given as:r =∆ max�0, 1 − 2W + 1size(TS)�∈ [0, 1].So r decreases linearly as W increases.We make three points on the above construction.• First, each part of the knapsack problem (w, p, W) isused in the following parts of the construction: wi isused mainly in the size of the parameter tensor θi; piin the input xi; and W in the lower bound r.• Second, there exist k ∈ N and fphi, fplo ∈ FP that sat-isfy Eqs. (3)–(6). This can be shown as follows: first,by taking sufficiently many exponent and mantissa bitsfor fplo, we can make Eq. (4) satisfied; next, by taking asufficiently large k, we can make Eq. (5) satisfied; finally,by taking sufficiently many exponent and mantissa bitsfor fphi, we can make Eq. (3) and Eq. (6) satisfied (sincexi is representable in fplo and 2−(k+l) is a power of two).• Third, some well-known models (e.g., ShuffleNet-v2)have a similar structure to M in that they apply the fol-lowing operations as a subroutine: split a tensor into mul-tiple tensors, apply some operators to each split tensor,and combine the resulting tensors into a single tensor.
Training with Mixed-Precision Floating-Point Assignments⫶𝑥! !∈ #.∑!∈ # ∑$∈ %! 𝑣#&!,$.2() 𝑣*#&+ − 𝑦𝑣,,+𝜃+,$ ⋅ 𝑣+ .$∈ %"𝑣,,#𝜃+,$ .$∈ %"𝜃#,$ ⋅ 𝑣# .$∈ %#𝜃#,$ .$∈ %#𝑦𝑣,∈ℝ#𝑣+∈ℝ𝑣#∈ℝ𝜃#∈ℝ%#𝜃+∈ℝ%"𝑣*#∈ℝ%#𝑣#&+∈ℝ%"𝑣*#&+∈ℝ𝑣*#&*∈ℝ𝑦∈ℝ⫶⫶splitconvconvsumlossℳℒFigure 8: The model network M and the loss network L used in the proof of Theorem 3.2.We now prove that the knapsack problem (w, p, W) canbe solved in polynomial time, if an oracle to the abovetradeoff problem is given. Suppose that π ∈ Π(C) is anoptimal solution to the above tradeoff problem (given bythe oracle). Define an item selection α ∈ {0, 1}n for theknapsack problem as:αi =∆�1if π(dθi) = π(dv n+i) = π(dv 2n+1) = fphi0otherwisefor each i ∈ [n]. Note that α can be constructed from π inlinear time. Thus, it suffices to show that α is an optimalsolution to the knapsack problem (w, p, W), which isequivalent to the following two claims:• Claim 1: We have �i∈[n] αiwi ≤ W.• Claim 2: For any α′ ∈ {0, 1}n with �i∈[n] α′iwi ≤ W,we have �i∈[n] α′ipi ≤ �i∈[n] αipi.We now prove each claim as follows.Proof of Claim 1. If α = (0, · · · , 0), then the claim clearlyholds. Suppose that α ̸= (0, · · · , 0). Then, we have1 −1 + 2 �i∈[n] αiwisize(TS)≥ ratiolo(π)≥ r ≥ 1 − 1 + 2Wsize(TS).Here the first inequality uses α ̸= (0, · · · , 0) and the defini-tion of α and M; the second inequality uses the fact that π isa valid solution to the above tradeoff problem; and the thirdinequality uses the definition of r. Hence, the claim holds.Proof of Claim 2. Suppose that the claim does not hold.Then, there exists α′ ∈ {0, 1}n such that�i∈[n]α′iwi ≤ W,�i∈[n]α′ipi >�i∈[n]αipi.Define a precision assignment π′ ∈ Π(C) as:π′(dv 2n+1) =∆ fphi,π′(dθi) =∆ π′(dv n+i) =∆ fphifor all i ∈ [n] with α′i = 1,π′(t) =∆ fplofor all other t ∈ TS.Then, we have ratiolo(π′) ≥ r by �i∈[n] α′iwi ≤ W andthe definition of π′, M, and r. Hence, it suffices to showacc(π) < acc(π′), because this would contradict to the factthat π is an optimal solution.To show acc(π) < acc(π′), we prove the following twolemmas: the first lemma gives a closed form of acc(π) andacc(π′), and the second lemma shows that �i∈[n] βiwix2iis close to �i∈[n] βipi (where the former summationappears in acc(π) and acc(π′)).Lemma A.1. The following hold:acc(π) = 2−ky + 2−(2k+l) �i∈[n]αiwix2i ,acc(π′) = 2−ky + 2−(2k+l) �i∈[n]α′iwix2i .Proof. We prove the equation for acc(π) only, since theequation for acc(π′) can be proved similarly.First, we show that for all i ∈ [n] and j ∈ [wi],ˆdθi,j = αi · 2−kxi.(7)Pick any i ∈ [n] and j ∈ [wi]. Note that by the definitionof M, we haveˆdθi,j = rndπ(dθi)�rndπ(dv n+i)(rndπ(dv 2n+1)(2−k))· rndvi(rndv0(xi))�= rndπ(dθi)�rndπ(dv n+i)(rndπ(dv 2n+1)(2−k)) · xi�,where the second equality uses Eq. (3) and that xi isrepresentable in fplo. We prove Eq. (7) by case analysison αi. Suppose αi = 1. Then, by the definition of αi,
Training with Mixed-Precision Floating-Point Assignmentsπ(dθi) = π(dv n+i) = π(dv 2n+1) = fphi. From this, weget the desired equation:ˆdθi,j = rndhi�rndhi(rndhi(2−k)) · xi�= rndhi(2−k · xi) = 2−kxi,where the last two equalities use Eq. (6). Suppose nowαi = 0. Then, by the definition of αi, at least one of π(dθi),π(dv n+i), and π(dv 2n+1) is fplo. If π(dv n+i) = fplo orπ(dv 2n+1) = fplo, we get the desired equation:ˆdθi,j = rndπ(dθi)�rndlo(2−k) · xi�= rndπ(dθi)(0 · xi) = 0,where the first equation uses Eq. (3) and Eq. (6), and thesecond equation uses Eq. (5). The remaining case is whenπ(dv n+i) = π(dv 2n+1) = fphi and π(dθi) = fplo. We getthe desired equation in this case as well:ˆdθi,j = rndlo�rndhi(rndhi(2−k)) · xi�= rndlo(2−k · xi) = 0,where the second equality uses Eq. (6), and the last equalityuses Eq. (5). Hence, we have proved Eq. (7).Next, let θi be the i-th parameter tensor before trainingstarts, and θ′i be the corresponding tensor after training ends(i ∈ [n]). Then, by the definition of the tradeoff problemconstructed above, we have θi,j = 0 andθ′i,j = θi,j − rndhi(2−l · ˆdθi,j)= 0 − rndhi(2−l · (αi · 2−kxi))= αi · (−2−(k+l)xi),where the second equality uses Eq. (7) and the third equalityuses Eq. (6). Using this equation, we finally obtain theconclusion of this lemma:acc(π) = −L(fθ′(x), y)= −2−k���y −�i∈[n]�j∈[wi]θ′i,jxi���= −2−k���y −�i∈[n]�j∈[wi]αi · (−2−(k+l)xi) · xi���= −2−k���y +�i∈[n]αi · 2−(k+l)wix2i���= 2−k�y +�i∈[n]αi · 2−(k+l)wix2i�= 2−ky + 2−(2k+l) �i∈[n]αiwix2i ,where the first two equalities use the definition of accuracy,and the second last equality uses the definition of y. Thisconcludes the proof of the lemma.■Lemma A.2. For any β ∈ {0, 1}n,����i∈[n]βiwix2i −�i∈[n]βipi��� < 12.Proof. We first show that for any i ∈ [n],|wix2i − pi| < 12n.Pick any i ∈ [n]. By Eq. (4) and the definition of xi, we have���xi −� piwi��� <� piwi·16n · maxj∈[n] pj≤� piwi·16npi.From this, we have� piwi�1 −16npi�< xi <� piwi�1 +16npi�,piwi�1 −16npi�2< x2i < piwi�1 +16npi�2.From this, we obtain the desired result:|wix2i − pi| < pi��1 +16npi�2− 1�= pi�13npi+1(6npi)2�< pi�13npi+16npi�= pi ·12npi= 12n,where the second inequality uses 6npi > 1 (as n, pi ∈ N).Using this result, we can show the conclusion as follows:����i∈[n]βiwix2i −�i∈[n]βipi��� =����i∈[n]βi(wix2i − pi)���≤�i∈[n]|βi| · |wix2i − pi|<�i∈[n]12n = 12,where the last inequality uses |βi| ≤ 1. This completes theproof of the lemma.■Using the two lemmas, we prove acc(π) < acc(π′) as fol-lows. First, by Lemma A.2 and �i∈[n] αipi < �i∈[n] α′ipi,we have�i∈[n]αiwix2i <�i∈[n]αipi + 12≤�i∈[n]α′ipi − 12 <�i∈[n]α′iwix2i ,where the second inequality comes from αi, α′i ∈ {0, 1}and pi ∈ N. From this, and by Lemma A.1, we obtainacc(π) < acc(π′) as desired. This concludes the proof ofClaim 2, thereby finishing the proof of the theorem.
Training with Mixed-Precision Floating-Point AssignmentsRemark A.3. In the proof of Theorem 3.2, we provedthe NP-hardness of Problem 3.1 by making use of only afew limited aspects of the problem. For instance, we usedthe fact that some values representable in a high-precisionformat round to zero in a low-precision format; on the otherhand, many other values representable in a high-precisionformat round to non-zero values in a low-precision format,and this indeed occurs in practical training (even morefrequently than underflows). Also, we used a simple settingfor training in which a gradient descent algorithm is appliedfor one epoch, training data consist of one input-output pair,and test data is the same as training data; on the other hand,in practical training, a gradient descent algorithm is appliedfor many epochs, training data consists of many input-outputpairs, and test data is different from training data.Problem 3.1 is general enough so that it embraces all theaforementioned aspects of floating-points and training,including those that are not considered in the proof ofTheorem 3.2. Since those aspects are likely to make theproblem even more difficult, we conjecture that the problemwould be more intractable than being NP-hard.BEXPERIMENTS: DEFERRED DETAILSThe datasets we use have the following licenses:• CIFAR-10 and CIFAR-100: These datasets are underthe MIT license.• ImageNet: This dataset can be used “only for non-commercial research and educational purposes.” Formore details, see its webpage (Stanford Vision Lab,2020).The implementations of models we use have the followinglicenses:• SqueezeNet for CIFAR-10 and CIFAR-100: We adaptan implementation of the model in a public GitHubrepository (Pathak, 2020), whose license informationis not available.• ShuffleNet-v2,MobileNet-v2,and ResNet-18 forCIFAR-10 and CIFAR-100: We adapt an implementationof these models in a public GitHub repository (kuangliu,2021), which is under the MIT license.• ShuffleNet-v2 for ImageNet and ImageNet-200-i: Weadapt an implementation of the model in the torchvisionlibrary (PyTorch, 2022b), which is under the BSD3-Clause license.The details of how we train models are as follows:• Four models on CIFAR-10 and CIFAR-100: We trainthe four models with a standard setup (kuangliu, 2021).In particular, we run the (non-Nesterov) SGD optimizerfor 200 epochs with minibatch size of 128 (over 1GPU), learning rate of 0.1, momentum of 0.9, weightdecay of 5 × 10−4, and the cosine annealing schedulerfor learning rate. For dynamic loss scaling, we useinitial scale of 216, growth factor of 2, back-off factorof 0.5, and growth interval of 1 epoch, as suggested inPyTorch (PyTorch, 2022a).• ShuffleNet-v2 on ImageNet: We train the model with thedefault setup given in PyTorch’s GitHub repository (Py-Torch, 2022c), except that we use larger minibatch sizeand learning rate as in (Kalamkar et al., 2019; PyTorch,2022d; Krizhevsky, 2014; Goyal et al., 2017) to reducethe wall-clock time of training. In particular, we runthe (non-Nesterov) SGD optimizer for 90 epochs withminibatch size of 1024 (over 16 GPUs), learning rateof 0.4, momentum of 0.9, weight decay of 10−4, andthe cosine annealing scheduler for learning rate. Fordynamic loss scale, we use initial scale of 216, growthfactor of 2, back-off factor of 0.5, and growth intervalof 0.5 epoch, as suggested in PyTorch (PyTorch, 2022a).• ShuffleNet-v2 on ImageNet-200-i: We train the modelwith the same settings for ImageNet except that we usethe default values for minibatch size and learning rategiven in (PyTorch, 2022c), i.e., minibatch size of 256(over 4 GPUs) and learning rate of 0.1.CEXPERIMENTS: DEFERRED RESULTSC.1Comparison with Existing Precision AssignmentsFigure 9 presents results omitted in Figure 4: trainingresults of smaller variant models (which have widthmultiplier 0.5 or 0.1) on CIFAR-100 with πfp32, πunif,πop, πop′, and πours,r. The figure shows similar resultsto Figure 4: the results for the variant models with widthmultiplier 0.5 (and 0.1) are similar to those for the originalmodels (and the variant models with width multiplier 0.25).Figures 10 and 11 show the average training trajectoriesfor the configurations presented in Figures 4 and 9.C.2 Ablation Study: Precision Demotion and PromotionFigure 12 presents results omitted in Figure 5: training re-sults of ResNet-18 on CIFAR-100 with πours,r, πours[inc],r,and πours[rand],r.The figure shows similar results toFigure 5 except that it shows smaller differences in memory-accuracy tradeoff between the three precision assignments.Figure 13 presents results omitted in Figure 6: trainingresults of four models on CIFAR-10 with πours,r andπours[no-promo],r.The figure shows similar results toFigure 6 except that the training of ResNet-18 on CIFAR-10does not diverge even with πours[no-promo],r for all r values.
Training with Mixed-Precision Floating-Point Assignments(a) CIFAR-100, SqueezeNet‡(b) CIFAR-100, SqueezeNet¶(c) CIFAR-100, ShuffleNet-v2‡(d) CIFAR-100, ShuffleNet-v2¶(e) CIFAR-100, MobileNet-v2‡(f) CIFAR-100, MobileNet-v2¶(g) CIFAR-100, ResNet-18‡(h) CIFAR-100, ResNet-18¶Figure 9: Continued from Figure 4. Memory-accuracy tradeoffs of πunif (Micikevicius et al., 2018), πop (Sun et al., 2019),πop′ (Kalamkar et al., 2019), and πours,r for smaller variants of four models on CIFAR-100. The variant models have widthmultiplier 0.5 (marked by ‡) or 0.1 (marked by ¶). Top-right points are better than bottom-left ones. In all but one plots,there are •s above and to the right ofand, respectively; even in the one plot (g), •s have almost the same tradeoffs toand. In three of all plots, ⋆ has much smaller y-values than other points; ⋆ is missing in (h) as its y-value is too small.
66test accuracy (%)6462fp3260opopunif2ours00.000.250.500.751.00low-prec. ratio44accuracy (%)4036 fp3232optest aopunif24 ours0.000.250.500.751.00low-prec. ratio70test accuracy (%)6866fp3264opopunif2ours00.000.250.500.751.00low-prec. ratio5652X4844fp32opopunif24ours0.000.250.500.751.00low-prec. ratio72test accuracy (%)7068fp3266opopunif2ours00.000.250.500.751.00low-prec. ratio56test accuracy (%)5248fp3244opopunif36ours320.000.250.500.751.00low-prec. ratio76test accuracy (%)7472fp32op70opunif2ours00.000.250.500.751.00low-prec. ratio60test accuracy (%)5652fp32op48opunif40+ours360.000.250.500.751.00low-prec. ratioTraining with Mixed-Precision Floating-Point Assignments(a) CIFAR-10, SqueezeNet(b) CIFAR-100, SqueezeNet(c) CIFAR-100, SqueezeNet†(d) CIFAR-10, ShuffleNet-v2(e) CIFAR-100, ShuffleNet-v2(f) CIFAR-100, ShuffleNet-v2†(g) CIFAR-10, MobileNet-v2(h) CIFAR-100, MobileNet-v2(i) CIFAR-100, MobileNet-v2†(j) CIFAR-10, ResNet-18(k) CIFAR-100, ResNet-18(l) CIFAR-100, ResNet-18†Figure 10: Training trajectories for the configurations shown in Figure 4. Each line shows the average training trajectoryfor each precision assignment. πours,r is colored from navy to yellow (darker for smaller r).
100(%)90test accuracy (80fp32op70op'unifours60050100150200epoch70accuracy (%)60fp3250optest aop'unif40ours050100150200epoch60test accuracy (%)5040fp32opop'30unifours20050100150200epoch100(%)90test accuracy (80fp32opop'70unifours60050100150200epoch80test accuracy (%)7060fp32op50op'unifours40050100150200epoch70test accuracy (%)6050fp32op40op'unifours30050100150200epoch100(%)90test accuracy (80fp32opop'70unifours60050100150200epoch80test accuracy (%)7060fp32op50op'unifours40050100150200epoch70test accuracy (%)6050fp32op40op'unifours30050100150200epoch100(%)90test accuracy (80fp32op70op'unifours60050100150200epoch80accuracy (%)70fp3260optest a,dounif50ours050100150200epoch70accuracy (%)60fp3250optest aop'unif40ours050100150200epochTraining with Mixed-Precision Floating-Point Assignments(a) CIFAR-100, SqueezeNet‡(b) CIFAR-100, SqueezeNet¶(c) CIFAR-100, ShuffleNet-v2‡(d) CIFAR-100, ShuffleNet-v2¶(e) CIFAR-100, MobileNet-v2‡(f) CIFAR-100, MobileNet-v2¶(g) CIFAR-100, ResNet-18‡(h) CIFAR-100, ResNet-18¶Figure 11: Training trajectories for the configurations shown in Figure 9. Each line shows the average training trajectoryfor each precision assignment. πours,r is colored from navy to yellow (darker for smaller r).
70test accuracy (%)6050fp32op40op'unifours30050100150200epoch50test accuracy (%)4030fp32op20op'unifours10050100150200epoch70accuracy (%)60fp3250optest op'unif40ours050100150200epoch605040fp32op30opunifours20050100150200epoch70accuracy (%)60fp3250optest aop'unif40ours050100150200epoch605040fp32op30op'unifours20050100150200epoch807060fp32op50,dounifours40050100150200epoch70test accuracy (%)6050fp32op40op'unifours30050100150200epochTraining with Mixed-Precision Floating-Point Assignments(a) ResNet-18Figure 12: Continued from Figure 5. Memory-accuracy tradeoffs of πours,r, πours[inc],r, and πours[rand],r for ResNet-18on CIFAR-100. Observe that •s are above and to the right of other points in nearly all cases.(a) CIFAR-10, SqueezeNet(b) CIFAR-10, ShuffleNet-v2(c) CIFAR-10, MobileNet-v2(d) CIFAR-10, ResNet-18Figure 13: Continued from Figure 6. Training four models on CIFAR-10 with πours,r and πours[no-promo],r. Column 1:Training trajectories of πours[no-promo],r for different r; colors denote r values (darker for smaller r). Column 2: Top-5overflow ratios of tensors at each epoch, for the highlighted trajectory in (a); the largest ratio is blue and the fifth largestred. Column 3: Memory-accuracy tradeoffs of πours,r and πours[no-promo],r. Column 4: Low-precision ratio when trainingends vs. when training starts, for πours,r and πours[no-promo],r.
82(%)80test accuracy (7876ours[inc]ours[rand]ours0.000.250.500.751.00low-prec. ratio100test accuracy (%)806040200050100150200epoch1.00.8overflow ratio0.60.4top-1top-2top-30.2top-4top-50.0050100150200epoch100(%)80accuracy (6040test 20ours[no-promo]ours00.000.250.500.751.00low-prec. ratio1.0ratio (end)0.80.6low-prec.0.2ours[no-promo]ours0.00.00.20.40.60.81.0low-prec. ratio (start)100test accuracy (%)806040200050100150200epoch1.00.8overflow ratio0.60.4top-1top-2top-30.2top-4top-50.0050100150200epoch100(%)80accuracy (6040test 20ours[no-promo]ours00.000.250.500.751.00low-prec. ratio1.0ratio (end)0.80.6low-prec.0.2ours[no-promo]ours0.00.00.20.40.60.81.0low-prec. ratio (start)100test accuracy (%)806040200050100150200epoch1.00.8overflow ratio0.60.4top-1top-2top-30.2top-4top-50.0050100150200epoch100(%)80accuracy (6040test 20ours[no-promo]ours00.000.250.500.751.00low-prec. ratio1.0ratio (end)0.80.6low-prec.0.2ours[no-promo]ours0.00.00.20.40.60.81.0low-prec. ratio (start)100test accuracy (%)806040200050100150200epoch0.100.08overflow ratio0.060.04top-1top-2top-30.02top-4top-50.00050100150200epoch100(%)80accuracy (6040test 20ours[no-promo]ours00.000.250.500.751.00low-prec. ratio1.0low-prec. ratio (end)0.80.60.2ours[no-promo]ours0.00.00.20.40.60.81.0low-prec. ratio (start)Training with Mixed-Precision Floating-Point AssignmentsREFERENCES (FOR APPENDIX)Goyal, P., Dollár, P., Girshick, R. B., Noordhuis, P.,Wesolowski, L., Kyrola, A., Tulloch, A., Jia, Y., and He,K. Accurate, Large Minibatch SGD: Training ImageNetin 1 Hour. arXiv:1706.02677, 2017.Kalamkar, D. D., Mudigere, D., Mellempudi, N., Das,D., Banerjee, K., Avancha, S., Vooturi, D. T., Jammala-madaka, N., Huang, J., Yuen, H., Yang, J., Park, J.,Heinecke, A., Georganas, E., Srinivasan, S., Kundu,A., Smelyanskiy, M., Kaul, B., and Dubey, P.AStudy of BFLOAT16 for Deep Learning Training.arXiv:1905.12322, 2019.Karp, R. M. Reducibility Among Combinatorial Problems.In Complexity of Computer Computations, pp. 85–103,1972.Krizhevsky,A.One weird trick for parallelizingconvolutional neural networks. arXiv:1404.5997, 2014.kuangliu.https://github.com/kuangliu/pytorch-cifar, 2021.Pathak,G.https://github.com/gsp-27/pytorch_Squeezenet, 2020.PyTorch.Documentationoftorch.amp.https://pytorch.org/docs/stable/amp.html#gradient-scaling, 2022a.PyTorch.https://github.com/pytorch/vision/tree/main/torchvision/models,2022b.PyTorch.https://github.com/pytorch/vision/tree/main/references/classification, 2022c.PyTorch.https://github.com/pytorch/vision/tree/main/references/classification#resnext, 2022d.Stanford Vision Lab.https://image-net.org/download.php, 2020.
123version https://git-lfs.github.com/spec/v1oid sha256:6728405ea0ae102d125272759cc69555d4880a05e27fd02892ccd223424b67f1size 685190123version https://git-lfs.github.com/spec/v1oid sha256:a37107154f9c906fd6be1076813c7addf514f5a1385ec1ff76d44959cf8a507fsize 1835053123version https://git-lfs.github.com/spec/v1oid sha256:34bd47b65683f641ae4af5070ec43b2fc0398cdaa12e0ba39c95d8df401a223dsize 62736123version https://git-lfs.github.com/spec/v1oid sha256:292ba3fa1cfc831e150bcdf1b481e3ba48de42d580ea0b3635331f393efd19aesize 483634123version https://git-lfs.github.com/spec/v1oid sha256:5292d426d5efa51bb088ab57984578f2be1269f888ca8d029bcfe0e9d4feade0size 92891123version https://git-lfs.github.com/spec/v1oid sha256:73937f34fea79f1c27dc5baaa58e333e8e454df2b23a7b522d34066d6084d0a7size 3522691123version https://git-lfs.github.com/spec/v1oid sha256:8b6c13fc2cef74a733d85463a907de460bfce7c8973b9e459c8bc431d8f8f983size 3604525123version https://git-lfs.github.com/spec/v1oid sha256:e9ba04a0a118bfe289a554ce07a29da8f1c46b7080861858ae80d0e5e9d01f87size 144019123version https://git-lfs.github.com/spec/v1oid sha256:f66fff92099d4bc35f86e779913af2f03d00eac75708c51fe165fa3b6687b1b4size 287773-9E4T4oBgHgl3EQfEAsg/content/2301.04873v1.pdfAdded+3
-9E4T4oBgHgl3EQfEAsg/vector_store/index.faissAdded+3
-9E4T4oBgHgl3EQfEAsg/vector_store/index.pklAdded+3
-dE2T4oBgHgl3EQfmQc9/vector_store/index.pklAdded+3
-dFIT4oBgHgl3EQf9CsF/content/tmp_files/2301.11404v1.pdf.txtAdded+1230
-dFIT4oBgHgl3EQf9CsF/content/tmp_files/load_file.txtAdded
-tFAT4oBgHgl3EQfqR1A/content/2301.08646v1.pdfAdded+3
-tFAT4oBgHgl3EQfqR1A/vector_store/index.pklAdded+3
.gitattributes+55
0tE2T4oBgHgl3EQfiQfL/content/tmp_files/2301.03957v1.pdf.txtAdded+894
0tE2T4oBgHgl3EQfiQfL/content/tmp_files/load_file.txtAdded
1dFLT4oBgHgl3EQfpy-5/vector_store/index.pklAdded+3
1tE3T4oBgHgl3EQfngpH/content/tmp_files/load_file.txtAdded
2NAzT4oBgHgl3EQfuP1K/content/2301.01687v1.pdfAdded+3
2NAzT4oBgHgl3EQfuP1K/vector_store/index.pklAdded+3
2NE4T4oBgHgl3EQfzw00/content/2301.05276v1.pdfAdded+3
2NE4T4oBgHgl3EQfzw00/vector_store/index.pklAdded+3
39AyT4oBgHgl3EQfcPct/vector_store/index.faissAdded+3
39E1T4oBgHgl3EQf6AV3/content/2301.03518v1.pdfAdded+3
39E1T4oBgHgl3EQf6AV3/vector_store/index.faissAdded+3
39E1T4oBgHgl3EQf6AV3/vector_store/index.pklAdded+3
3dE4T4oBgHgl3EQfbAyT/vector_store/index.faissAdded+3
49A0T4oBgHgl3EQfNv86/content/tmp_files/2301.02150v1.pdf.txtAdded+1735
49A0T4oBgHgl3EQfNv86/content/tmp_files/load_file.txtAdded
69E3T4oBgHgl3EQfRQm6/content/2301.04420v1.pdfAdded+3
69E3T4oBgHgl3EQfRQm6/vector_store/index.faissAdded+3
69E3T4oBgHgl3EQfRQm6/vector_store/index.pklAdded+3
69FJT4oBgHgl3EQfmCy-/content/2301.11586v1.pdfAdded+3
69FJT4oBgHgl3EQfmCy-/vector_store/index.faissAdded+3
69FJT4oBgHgl3EQfmCy-/vector_store/index.pklAdded+3
79AzT4oBgHgl3EQfE_pK/content/2301.01002v1.pdfAdded+3
79AzT4oBgHgl3EQfE_pK/vector_store/index.faissAdded+3
8NE4T4oBgHgl3EQf2w06/vector_store/index.faissAdded+3
8dAzT4oBgHgl3EQfSPuZ/content/2301.01230v1.pdfAdded+3
8dAzT4oBgHgl3EQfSPuZ/vector_store/index.faissAdded+3
AdFAT4oBgHgl3EQfrh5X/content/tmp_files/2301.08653v1.pdf.txtAdded+1303
AdFAT4oBgHgl3EQfrh5X/content/tmp_files/load_file.txtAdded
B9E4T4oBgHgl3EQf5Q72/content/tmp_files/2301.05323v1.pdf.txtAdded+1535
B9E4T4oBgHgl3EQf5Q72/content/tmp_files/load_file.txtAdded
EdFRT4oBgHgl3EQfBDfd/content/tmp_files/2301.13464v1.pdf.txtAdded+3033
EdFRT4oBgHgl3EQfBDfd/content/tmp_files/load_file.txtAdded
FdFKT4oBgHgl3EQfay5f/content/2301.11809v1.pdfAdded+3
FdFKT4oBgHgl3EQfay5f/vector_store/index.faissAdded+3
FdFKT4oBgHgl3EQfay5f/vector_store/index.pklAdded+3
G9A0T4oBgHgl3EQfBv-A/content/2301.01980v1.pdfAdded+3
G9A0T4oBgHgl3EQfBv-A/vector_store/index.pklAdded+3
HdE5T4oBgHgl3EQfWQ_B/content/2301.05558v1.pdfAdded+3
HdE5T4oBgHgl3EQfWQ_B/vector_store/index.faissAdded+3
HdE5T4oBgHgl3EQfWQ_B/vector_store/index.pklAdded+3
I9A0T4oBgHgl3EQfCP_M/vector_store/index.pklAdded+3