Abstract

For decades, employing cyclic voltammetry for mechanistic investigation has demanded manual inspection of voltammograms. Here, we report a deep-learning-based algorithm that automatically analyzes cyclic voltammograms and designates a probable electrochemical mechanism among five of the most common ones in homogeneous molecular electrochemistry. The reported algorithm will aid researchers’ mechanistic analyses, utilize otherwise elusive features in voltammograms, and experimentally observe the gradual mechanism transitions encountered in electrochemistry. An automated voltammogram analysis will aid the analysis of complex electrochemical systems and promise autonomous high-throughput research in electrochemistry with minimal human interference.
Keywords: electrochemistry, cyclic voltammetry, neural networks, mechanism classification, ResNet, automated analysis, machine learning
Introduction
Cyclic voltammetry is one of the most common electrochemical characterization techniques, and it generates valuable mechanistic information for redox-active chemical systems.1−3 For decades, cyclic voltammetry has been indispensable for electrochemical applications in sensing, energy-storage, chemical transformations, and beyond; however, the general protocol of initial mechanistic analysis after experiments has remained largely unchanged since its inception.3,4 Researchers manually inspect the shapes and variations of cyclic voltammograms under multiple different scan rates (v), sometimes with different reactant concentrations, and subsequently hypothesize a qualitative mechanism consisting of interfacial charge transfers (E step) and/or solution reactions (C steps),1,2 before sometimes extracting quantitative kinetic information via additional experiments and/or numerical simulations.5,6 However, such manual inspection demands extensive researcher training, potentially incurs human bias, and is not compatible with automated testing needed for high-throughput screening. An algorithm that automatically analyzes cyclic voltammograms and qualitatively categorizes electrochemical systems into mechanisms with a specific combination of E and/or C steps will help alleviate the aforementioned challenges in the manual analysis of cyclic voltammograms.
We envision that machine-learning algorithms such as those of deep-learning (DL) are capable of aiding mechanism categorization in cyclic voltammetry. In electrochemistry, the kinetics of E and/or C steps formulate the set of partial differential equations (PDE) and boundary conditions that dictate the i–E characteristics recorded in the cyclic voltammograms under a collection of different v values ({v, i(E)}n, n, number of different v values) (Figure 1A).1,2,7 Such a mathematically bijective function between electrochemical mechanisms ({Ei, Cj}) and the electrochemically accessible parameter space of the combined voltammograms {v, i(E)}n suggests that it is feasible to employ DL algorithms to designate discrete mechanisms from sufficiently sampled cyclic voltammograms with minimal ambiguity (Figure 1A). Indeed, this bijective relationship enables numerical simulations based on finite-element methods,7,8 and recently by artificial neural networks,9−11 to be used as a tool to efficiently search the parameter space of cyclic voltammograms and fit kinetic parameters upon a mechanism determined a priori by manual inspections of voltammogram. Yet, electrochemical mechanistic investigations remain commonly trial-and-error because the determination of the aforementioned a priori mechanism before any quantitative studies still relies on manual inspection.
Figure 1.

Deep-learning (DL) algorithm for automatically analyzing cyclic voltammetry. (A) Bijective relationship between electrochemical mechanism and cyclic voltammograms, and the comparison between manual inspection of voltammograms and our approach. (B) Function of DL algorithm and its proposed benefits. (C) Five common molecular electrochemical mechanisms included in the DL algorithm. PDEs, partial differential equations.
We posit that a set of cyclic voltammograms simulated from finite-element methods based on preset mechanism designations will suffice in the first-order approximation for the establishment of a DL model that analyzes cyclic voltammograms and qualitatively categorizes mechanisms provided a large enough sampling of {v, i(E)}n. Research by Bond and co-workers tested the concept of DL-based automatic analysis of a single simulated voltammogram for a selection of three mechanism types with overall accuracies just below 90%.12,13 The exploration of this concept with experimental data, which commonly includes multiple voltammograms at different v values, has yet to be conducted for mechanistic studies. We advocate the broader use of DL-based analysis and hypothesize that the bijective relationship between {Ei, Cj} and {v, i(E)}n enables the establishment of DL algorithms that detect and utilize subtle voltammogram features, ones not commonly used as mechanistic discriminants by humans, and observe the evolution of “edge” cases when two mechanisms coexist and/or one mechanism is transitioning into another one, challenging scenarios for manual analysis in cyclic voltammetry. The established algorithms can be continuously refined and improved from experimental data, potentially including data contributed by the electrochemistry community. The algorithms will find their use in analyzing complex mechanistic scenarios and addressing the current paucity of automatic, high-throughput mechanistic analysis in electrochemistry.
In this work, we demonstrate a DL algorithm for automatic mechanistic analysis for cyclic voltammetry (Figure 1B). State-of-the-art DL algorithms using residual neural networks (ResNet) architecture14 are established to analyze cyclic voltammograms at different scan rates {v, i(E)} and yield the electrochemical system’s probability toward five of the most common stoichiometric homogeneous mechanisms in electrochemistry textbooks (Figure 1C):1,2,15,16 a single-electron transfer with any level of reversibility (E), an E step followed by a C step with any level of reversibility (EC), an E step preceded by a C step (CE), a system of two E steps connected by an irreversible rate-limiting Ci step with the second E step being more thermodynamically facile than the first one (ECE), and a two-electron transfer that is similar to ECE yet the second E step is replaced by a solution disproportionation reaction (DISP1). We demonstrate DL’s capability of accurately designating mechanisms in simulated and experimental scenarios, unveiling potential new features in the voltammograms elusive to manual inspection, as well as semiquantitatively observing the gradual transitions of electrochemical mechanisms. The developed algorithm will be applicable to analyze complex electrochemical systems when competing mechanisms are intertwined together. In conjunction with robotic experimentation,17,18 the demonstration of automatic mechanistic analysis in cyclic voltammetry presents the possibility of automated high-throughput research to investigate mechanisms in electrochemical systems with minimal human intervention.
Results
The data of cyclic voltammograms were sanitized and transformed into two-dimensional matrices suitable for DL algorithms of ResNet architecture. While cyclic voltammograms are typically presented as images in the literature, much of the white space in voltammograms contains little (if any) information. Hence, similar to the case of electrocardiogram,19 a two-dimensional matrix of {v, i(E)}n, rather than the images of cyclic voltammograms as in the works of Bond and co-workers,12,13 is employed to store electrochemical information for the DL-based analysis (Figure 2A). For the ease of training a ResNet, in each set of {v, i(E)}n, the current densities i in voltammograms were normalized as inormalized against the largest i among all voltammograms in {v, i(E)}n, with inormalized in the forward scan designated as positive values. The electrochemical potentials E were adjusted so that the position of 0 V of the adjusted electrochemical potential (Eadjusted) roughly corresponds to the potential of the studied redox couple (see the Methods section). Such data processing ensures a generally readable format of cyclic voltammograms despite the large variations in experimental testing conditions.
Figure 2.

Established DL algorithm of ResNet architecture for cyclic voltammetry. (A) Structure of input data and the convolutional neural networks of residual neural network (ResNet) architecture. (B) Output and utility of DL model for mechanism designation. (C and D) Confusion matrix of DL model trained by simulated cyclic voltammograms (C) with and (D) without explicit values of scan rate (v) as input data. v, scan rate; σ, the standard deviation of the Gaussian noise; n, the number of v values. (E) Accuracies of the DL model in panel (C) when tested with simulated voltammograms with varying values of n and σ.
Cyclic voltammograms based on the targeted mechanisms (Figure 1C) were numerically simulated as the training set for deep neural networks via the finite-element method (see the Methods section). Numerical models of PDEs, boundary conditions, and initial conditions were constructed based on mechanisms’ definitions in textbooks (see the Supporting Information).1,2 Moreover, the numerical models’ parameters, including but not limited to, the numbers and values of scan rate v (n = 1–6), electrodes’ double layer capacitance reported in the literature,20 standard rate constant of interfacial charge transfer in the concentration-dependent Butler–Volmer equation following Nicholson’s formalism (ψ ∈ [10, 0.3]) in the E step,3 and the equilibrium constants and forward/backward rate constants in the C step based on Savéant’s definitions2 were incorporated into the simulations and carefully constrained with practical and fundamental considerations. The parameters were randomly sampled (see Table S1 and the Supporting Information) for a comprehensive yet even exploration of the mechanism’s corresponding domain in the {v, i(E)}n space, i.e., the corresponding kinetic zone diagrams.2 As the experimental voltammograms typically contain Gaussian-type noise due to background and instrumentation,21 Gaussian noise of varying degrees of standard deviation σ relative to the maximal current densities were added to the simulated voltammograms, resulting in the training set {v, i(E, σ)}n (n = 1–6) (examples in Figure S1). The addition of Gaussian noise not only better reflects the realistic electrochemical data but also increases the algorithm’s tolerance toward noises in automatic mechanism categorization14 (vide infra).
We chose ResNet,14 a widely used network architecture evolved from convolutional neural networks,22,23 to extract intrinsic features from high-dimensional data. The ResNet architecture utilizes skip connections within its convolutional layers for deeper networks for greater feature extraction. Such architecture is critical for training successes as it alleviates the problems of both vanishing and exploding gradients during the training process, which mitigates the risk of training failure while maintaining the low overfitting risk inherent in convolutional architectures.14 The neural network is trained to take either the first or the second cycle of voltammograms for the same electrochemical system at various numbers of different scan rates ({v, i(E, σ)}n, n = 1–6) and yields the vector y = {y1, y2, y3, y4, y5} (Figure 2B, see the Methods section), in which each component in y is a surrogate of the electrochemical system’s probability or fraction toward mechanisms of E, EC, CE, ECE, and DISP1, respectively. The classification process is completed by designating the mechanism of the largest component in y as the most probable or most prominent one for the studied electrochemical system. Furthermore, the proposed model can estimate the “importance” of different parts of the voltammograms to the prediction (Figure 2B) by visualizing the relative magnitudes of gradients of the logits on input data after feeding through the neural network. We hypothesize that such a visual guide of algorithm’s “importance” will illustrate how DL models analyze cyclic voltammograms and offer a comparative study between manual inspection and the ResNet-based one.
State-of-the-art ResNet models of 18 residual learning layers, i.e., ResNet-18, were trained and validated by simulated cyclic voltammograms {v, i(E, σ)}n. Here, the use of a minimal ResNet-18 model is commensurate with our study when smaller neural networks are desired.14 When n = 6 and σ = 0.3, satisfactory accuracy (>90%) was achieved among {v, i(E, σ)}n when more than 3000 electrochemical systems were included for each mechanism type in the training set (Figure S2a). After 1000 epochs of training to improve accuracy (Figure S2b), a voting process that contains eight ResNet-18 models, designated as ResNet{v, i(E, σ)}n, achieved an overall accuracy of 98.5% for {v, i(E, σ)}n (n = 6, σ = 0.3) and generated a confusion matrix with nearly zero off-diagonal components (Figure 2C). In comparison, alternative machine-learning algorithms24 including linear classification, the vanilla multilayer perceptron (MLP), the MLP using attention mechanism to aggregate the extracted features of each curve (“MLP & attention mechanism”), and the MLP sharing same parameters/weights on the first layer (“MLP & parameter sharing”) only yielded lower accuracies of 88.7, 89.6, 92.3, and 90.7%, respectively (Figure S2c–f). We also built a DL model under the same protocol without the v values as input, ResNet{i(E, σ)}n (n = 6, σ = 0.3), in which the model’s inputs contain the n number of voltammograms but not the exact v values. Only an overall accuracy of 92.0% was achieved, and the corresponding confusion matrix contains noticeable nonzero off-diagonal entries (Figure 2D). Consistent with manual inspection, the exact values of v are critical in DL to fully differentiate electrochemical mechanisms.
The established DL model is remarkably resilient to appreciable degrees of noise in the simulated cyclic voltammograms. The prediction accuracy of the DL model trained by {v, i(E, σ)}n (n = 6, σ = 0.3) was tested by simulated cyclic voltammograms (n = 6) with varying values of σ ranging from 0.0 to 1.0. The overall accuracy remains mostly constant and higher than 95% until σ ≥ 0.5 (purple trace in Figure 2E). Even at σ = 1.0, when the simulated voltammograms are barely recognizable by manual inspection (Figure S1), an overall accuracy of more than 70% was achieved. Such a tolerance toward noises in cyclic voltammograms is remarkable in comparison to the DL models trained when σ = 0.0 (no noise) and 0.1, since in the latter two models (trained with σ = 0.0 and 0.1), the overall accuracies gradually drop below 40–80%, respectively, at σ = 0.5 of the testing data (Figure S2g,h). Such a gradual decline in accuracy with added noise is indicative of a robust and well-fit model since an overfit model would be expected to perform poorly when added noise in the testing set deviates from the added noise level that it was trained on. The addition of Gaussian noise in model training increases the robustness and sensitivity of the established DL model against data noise that may not be tolerable by manual analysis.14
We also evaluated how the value of n, i.e., the number of cyclic voltammograms, affects the overall accuracy of DL models of ResNet architecture. The accuracies of DL models trained by {v, i(E, σ)}n (n = 1–6, σ = 0.3) were tested by simulated voltammograms (n = 1–6, respectively) of σ values ranging from 0.0 to 1.0 (Figure 2E). Interestingly, when σ < 0.5 in the testing data, there are no distinguishable differences in overall accuracies when n = 2–6, while the accuracies are noticeably lower when n = 1 (Figure 2E). Consistent with the diagnostic value of voltammograms’ evolution across different zones in the kinetic zone diagram,2 cyclic voltammograms of at least two different v values are sufficient for the DL algorithm to accurately designate the reaction mechanism within the parameter space defined in the training set.
Encouraged by the ResNet-based model’s accuracy of simulated cyclic voltammograms, we applied the established DL models trained by {v, i(E, σ)}n (n = 1–6, σ = 0.3) to exemplary experimental scenarios mostly based on the voltammograms of the second cycle. ResNet-based DL model is capable of accurately predicting the E mechanism in the ferrocene/ferrocenium (Fc/Fc+, 1 mM) redox couple in dimethylformamide (DMF)25 (Figure 3A) and the single-electron cobalt(II/I) redox couple with tetraphenylporphyrin cobalt(II) (CoII(TPP), 1 mM) as the starting compound in the absence of any electrophiles in DMF26−28 (Figure 3B). The DL model accurately recognizes an EC mechanism, or more precisely, the ErCi variant, when both the thermodynamic and kinetic propensity of the forward C step is large enough to be considered an irreversible Ci step, where the addition of 1-bromobutane (n-BuBr, 50 mM) as an electrophile to 1 mM CoII(TPP) in DMF leads to the formation of tetraphenylporphyrin cobalt(III) n-butyl (CoIII(TPP)(n-Bu)) (Figure 3C).28,29 The model also accurately recognizes a CE mechanism for the first single-electron oxidation of 4-tert-butylcatechol (1 mM) in the aqueous buffer of boric acid (pH = 9.2 and 10 mM), where a reversible C step is needed to dissociate the thermodynamically favored catechol-borate adduct into the electrochemically accessible catechol30,31 (Figure 3D). The y vector output from the DL model designates the ECE mechanism as the most probable one in the case of 5 mM trans-Mn(CO)2(η2-DPPE)2+ (DPPE, 1,2-bis(diphenylphosphino)ethane) in tetrahydrofuran (THF). This designation is consistent with prior determinations of an ECE process with minimal DISP contribution,32,33 where an intramolecular ligand rearrangement exists between the two single-electron reductions in which the second reduction is thermodynamically more favored than the first one (Figure 3E). Last, from the first-cycle voltammograms, the DL model accurately designates the DISP1 mechanism in the net two-electron reduction of 1 mM anthracene in DMF with the presence of 0.1 M phenol as a proton donor, where the protonation of the anion radical (C step) after the first one-electron reductive E step is the rate-determining step followed by the disproportionation reaction (DISP step)15,34 (Figure 3F). The successful mechanism designation by the DL models for model experimental systems suggests the practicality of utilizing DL for automatic analysis in cyclic voltammetry.
Figure 3.
Application of DL model to experimental scenarios. The mechanisms, cyclic voltammograms, y vectors from DL model’s predictions, and the “importance” plots for (A, G) 1 mM ferrocene/ferrocenium redox couple, (B, H) 1 mM tetraphenylporphyrin cobalt(II) (CoII(TPP)), (C, I) 1 mM CoII(TPP) and 50 mM 1-bromobutane (n-BuBr), (D, J) 1 mM 4-tert-butylcatechol in 10 mM pH 9.2 boric acid buffer, (E, K) 5 mM trans-Mn(CO)2(η2-DPPE)2+ (DPPE, 1,2-bis(diphenylphosphino)ethane), and (F, L) 1 mM anthracene and 0.1 M phenol. inormalized, normalized current density with the forward scan in the positive direction. Eadjusted, electrochemical potential shifted to center the redox features. The “importance” toward the DL model in expected (green) and somewhat unexpected (red) parts in the voltammograms are highlighted. 3 mm glassy carbon; Ag+/Ag reference except panel (D) (Ag/AgCl, 3 M KCl); Pt wire counter electrode. DMF in Ar except panels (D) (water) and (E) (THF). 0.1 M n-Bu4NClO4 in panels (A and E), 0.1 M n-Bu4NPF6 in panels (B, C, and E), and 90 mM KCl in panel (D). The voltammograms of the second (A to E) or the first cycles (F) are displayed and analyzed. iR corrected. v = 0.05, 0.1, 0.2, 0.3, 0.5, and 0.7 V/s in panels (A, B, C, and D); v = 0.1, 0.2, 0.3, 0.5, and 0.7 V/s in panel (E); v = 0.05, 0.1, 0.2, 0.5, 1, and 2 V/s in panel (F). Darker traces in panels (G–L) indicate higher “importance” in the DL model.
Discussion
There are appreciable similarities between the analytic processes of the established DL algorithm and human inspection. The accuracy decreases from 98.5 to 92.0% when the v values were not included as input in the DL model (Figure 2C,D) consistent with manual inspection when a more definitive mechanism assignment is feasible when the explicit v values are included in the analysis.1−3 Indeed, the exclusion of v values as model input deteriorates the model’s accuracies mostly by misassigning E as EC and misassigning EC as DISP1 (increasing from 0% chance to 17% and from 2 to 11%, respectively, from Figure 2C,D). These misassignments are common when v information is missing in manual analysis, owing to the gradual transition of cyclic voltammograms between E and EC in the kinetic zone diagrams as well as the similarity between the one-electron ECi and two-electron DISP1 processes.2 The ResNet-based model’s dependence of prediction accuracies on n (Figure 2E) is understandable yet informative. It is common in qualitative mechanistic studies to obtain cyclic voltammograms under multiple v values (i.e., n > 1) and compare the voltammograms’ evolution.4 Yet, in practice, the number of v values needed for mechanism determination seems ill-defined. What the DL model suggests is that statistically, in most scenarios, two cyclic voltammograms of different v values will suffice and there are diminishing returns of prediction accuracy when n ≥ 2 within the parameter space defined in our training set of simulated voltammograms. When n = 2, we derived the corresponding mathematical requirements for the two v values to be satisfied in the training data set, hence empirically offering good accuracy of mechanistic prediction from our DL model (see the Supporting Information). Such mathematical relationships will be helpful for researchers when deciding on experimental parameters in cyclic voltammetry.
Plotting the algorithm’s “importance” toward parts of cyclic voltammograms suggests that there is additional information in subtle voltammogram features that may elude manual inspection. Figure 3G–L plots the “importance” distributions in cyclic voltammograms from the DL model shown in Figure 3A,F, respectively. Additional “importance” plots of exemplary simulated voltammograms are available in Figure S3. While an understandable amount of the model’s attention is attributed to the presence or absence of primary redox peaks in voltammograms (green areas in Figures 3G–L and S3), one noticeable feature unique to the DL algorithm emerges. An appreciable amount of “importance” of the DL model is frequently assigned to the reverse scan roughly beneath the redox peaks (red areas in Figures 3G–L and S3), an area typically not carefully examined in the manual inspection. We propose that such seldomly examined regions in cyclic voltammograms contain useful mechanistic information and ought to be better utilized for mechanistic studies, probably by DL-based automatic analysis, thanks to the algorithm’s sensitivity. Additional investigations will be conducted to examine such an argument with a more rigorous and systematic analysis.
In the predominantly ECE case of trans-Mn(CO)2(η2-DPPE)2+ in THF,32,33 the evolution of y vector as n increases illustrates how more definitive mechanism determination in edge cases will benefit from cyclic voltammograms of multiple v values (Figure 4A,B). With additional voltammograms, the ErCr component in the yielded y vector decreases from 0.73 (n = 1) to 0.12 (n = 5) while the ECE one increases from 0.27 (n = 1) to 0.88 (n = 5) (Figure 4B). Such changes in y components as a function of n are consistent with the reported challenges in differentiating ErCr and ECE/DISP1 mechanisms with a small number of v.2
Figure 4.

Semiqualitative analysis of cyclic voltammograms with DL algorithm. (A) Mechanism and y vector components for the ECE scenario of trans-Mn(CO)2(η2-DPPE)2+. (B) Cyclic voltammograms of 5 mM trans-Mn(CO)2(η2-DPPE)2+ for different n values under the same conditions in Figure 3F. (C) Mechanism, kinetic factors, and y vector components for the EC scenario of CoII(TPP) and n-BuBr. (D–G) Cyclic voltammograms of 1 mM CoII(TPP) under different v ranges and n-BuBr concentrations ([n-BuBr]) under the same conditions in Figure 3C. The voltammograms of the second cycle are displayed and analyzed.
The output y vector from the DL model can be utilized to provide additional semiquantitative analysis in addition to its function of designating the most probable mechanism. We propose that nonzero probabilities/fractions for mechanisms other than the most probable/prominent one suggest either a competing reaction or a gradual transition from one mechanism to another. In the one-electron reduction of CoII(TPP) in the presence of n-BuBr (Figure 4C), the forward C step, namely the nucleophilic attack of CoI(TPP)•– toward n-BuBr, is pseudo-first-order on the concentration of n-BuBr ([n-BuBr]) and the forward rate constant kf is proportional to [n-BuBr].28,29 The corresponding dimensionless kinetic parameter λ, proportional to kf/v (Figure 4C), measures the competition between the solution reaction and redox specie’s diffusion from/to the electrode surface.2 As [n-BuBr] increases or v decreases, λ is larger and leads to more pronounced “irreversibility” from the C step in the voltammograms. Experimentally, we found that the cyclic voltammograms display a smaller tendency of reoxidation of CoI(TPP)•– when [n-BuBr] increases from 10 mM (Figure 4D,E) to 50 mM (Figure 4F,G) and when the range of v values decreases from v ∈ [0.1, 1.0] V/s (Figure 4D,F) to v ∈ [0.05, 0.7] V/s (Figure 4E,G). Accordingly, as shown in Figure 4C, the EC component in the yielded y vectors gradually increased from 0.22 for Figure 4D to 0.86 for Figure 4F, while the component for Er correspondingly decreased from 0.78 to 0.14. Such results indicate that the DL model is capable of semiquantitatively detecting the extent and gradual increase of the C step, which could be valuable when studying systems with undesirable deactivation in redox cycling or desirable chemical transformation amid an Er system.
We speculate that the DL algorithm based on a set of voltammograms is capable of addressing, at least partly, the mechanistic ambiguity noted as “heterogeneous equivalent” by Feldberg and co-workers,35 in which different reaction mechanisms may yield similar voltammograms that are indistinguishable within measurement errors. While the issue of “heterogeneous equivalent” is most prominent under a single voltammogram due to the limited information available from electrochemical measurement, our DL algorithm is based on a bijective relationship between mechanism and a more informative-rich set of voltammograms under different scan rates ({v, i(E)}n). Hence, we contend that the issue of mechanistic ambiguity will be alleviated if not mitigated in the DL algorithm, which will be further evaluated in future studies. Yet, the EC case of the one-electron reduction of CoII(TPP) in the presence of n-BuBr is already sufficiently exemplary (Figure 4C–G). In Figure 4D, the voltammogram at the largest scan rate v (1.0 V/s, black trace) can be seemingly interpreted as a quasi-reversible E process, while mechanistic ambiguity is resolved by the data at smaller v values. Meanwhile, the DL algorithm assigns 0.78 and 0.22 for E and EC processes, acknowledging the possible existence of mechanistic ambiguity yet offering statistically meaningful diagnostic results useful for researchers. Such a probability-driven approach avoids the pitfalls of deterministic mechanistic assignment and will be beneficial toward addressing the issue of mechanistic ambiguity in the long run.
Conclusions
Electrochemical analysis for mechanistic investigation has relied heavily on manual inspection, which demands extensive training and may be prone to human bias and misinterpretation due to researchers’ prior experience. In this work, we demonstrated a DL algorithm based on ResNet architecture that automatically analyzes cyclic voltammograms and, congruent with manual inspection, suggests the most probable mechanism among five of the most common mechanisms in homogeneous molecular electrochemistry. Potentially being more sensitive and capable of detecting subtle elusive features at least within our parameter range (Table S1), the established DL model can also semiquantitatively analyze competing pathways and observe the gradual transition from one mechanism to another. Additional factors that are known to impact the voltammograms, such as the 50/60 Hz noise of power-line frequency, will be incorporated into the DL model to increase its utility in practical applications. The established DL algorithm will be further refined with experimental data, being specifically targeted for algorithm development or contributed to by the general electrochemistry community via an open-access online platform. Efforts to expand the types of electrochemical mechanisms, including homogeneous, heterogeneous, stoichiometric, and catalytic transformations, will advance the utility of the algorithm. In the long run, this DL-based approach will aid if not replace extensive manual mechanistic inspections in electrochemistry. We propose that such automatic analysis will find its advantages in analyzing complex reaction schemes that may be beyond the capacity of manual analysis, such as the square diagrams with the possibility of concerted pathways in systems of proton-coupled electron transfer.5 The semiquantitative output of the developed DL algorithm also offers a mathematically quantified feature, which can be the subject of Bayesian optimization that seeks to maximize electrochemical transformations with optimal experimental conditions. In conjunction with automatic robotic experimentation,17,18 an autonomous high-throughput electrochemistry research will become feasible, where Bayesian optimization strives to maximize certain transformations with intelligently varied experimental conditions (e.g., reactant type and concentrations) in an iterative fashion by “learning” the parameter space via our DL algorithm and deciphering the partition of various reaction pathways measured in cyclic voltammetry.
Methods
Finite-Element Simulation of Cyclic Voltammograms
Finite-element simulations of cyclic voltammograms were conducted using COMSOL Multiphysics v5.5. The modules of Electrochemistry and Chemical Reaction Engineering were used for a one-dimensional model under the supporting electrolyte assumption with a time-dependent solver specialized for cyclic voltammetry, using an adaptive mesh with a maximal mesh size of 41 μm and a growth rate of 1.3. COMSOL simulations were iterated using COMSOL LiveLink, which implements MATLAB R2020b. Random samples of variables were realized by Python 3 scripts and fed to COMSOL via MATLAB for the simulations of at least five consecutive cycles in cyclic voltammetry. Additional sanitization was implemented after COMSOL simulation to ensure the simulated cyclic voltammograms not only satisfy the corresponding mechanism but also are electrochemically accessible. A total of about 15 000 valid simulated cases, each containing cyclic voltammograms up to six different v values, were conducted. The detailed model information and the constraints of variables for each specific mechanism type are provided in the Supporting Information.
Establishment of Machine-Learning Algorithm
Simulated and experimental data were sanitized and translated into the two-dimensional matrix {v, i(E)}n as reported in the main text (Figure 2A) before the implementation of machine learning. For each data point that is comprised of either simulated or experimental cyclic voltammograms at n number of v values ({v, i(E)}n), the current densities i in voltammograms were normalized as inormalized against the largest i among all voltammograms in {v, i(E)}n, with inormalized in the forward scan designated as a positive value. The electrochemical potentials E were adjusted so that the adjusted electrochemical potential Eadjusted = 0 V roughly corresponds to the potential of the studied redox couple. For voltammograms in which irreversibility precludes an accurate determination of redox potential, a rough estimate is automatically conducted based on the largest slope of the first rising redox peak. Interpolation and/or imputation of the i–E characteristics were conducted so that the two-dimensional matrix as input of the machine-learning model (Figure 2A) does not explicitly contain the information of E. Therefore, the use of Eadjusted in this work is mostly for presentation purposes because the absolute values of Eadjusted are not inputs of the machine-learning model and hence are not directly relevant to the automatic mechanistic analysis.
Machine-learning code was implemented on Jupyter notebooks using Python3 code. PyTorch machine-learning frameworks were used to implement the various neural networks discussed in this work. The DL algorithms are trained to take either the first or second cycles of voltammograms for the same electrochemical system at various numbers of different scan rates ({v, i(E, σ)}n, n = 1–6, σ = 0.0–1.0) and yields the vector y = {y1, y2, y3, y4, y5}. Because different starting potentials of voltammograms create additional variations for the first cycle of the voltammograms in both simulated and experimental scenarios, algorithms trained by the second cycles of voltammograms are used for the results reported here. Data of normalized cyclic voltammograms were processed by python API OpenCV to a three-dimensional tensor/matrix with a size of {6 × 3 × 500} and labels {n,y,m}. Here, n has a dimension of six correlating to the number of simulated scan rates, m has a dimension of 500 correlating to the 500 potential values used during resizing, and y has a dimension of three corresponding to ifor, irev, and vn, which are the forward (ifor) and reverse (irev) normalized current values for scan rate vn at potential m. When training models with n < 6, the size of the tensor remains the same and empty regions are filled with zeros so that the tensor size remained {6 × 3 × 500} for all models. The input tensor was evaluated using a kernel/filter of size {6 × 3 × 7}. The kernel only views the data present in the tensor, and the filter is not changed with different values of n. In terms of the hyperparameters of the ResNet-18 model, the standard learning rate of 1 × 10–3 and standard weight decay of 1 × 10–5 were used for all training. It takes approximately 1 h to train the ResNet model and just seconds to predict the class of one sample. Training was performed on a machine using an Intel Xeon Silver 4214 CPU with 126 GB of RAM and an Nvidia GeForce RTX 2080 Ti GPU. A terminal training data accuracy of 99.95% during the establishment of our ResNet-18 model was achieved, and is in line with the reported test data accuracy of 98.5% (Figure 2C). Such an alignment of accuracies during model training and testing is an indication of a model that generalizes well and is not overfit. Graphs were generated using the MatPlotLib library and the PyPlot module. Training data were input with stochastically added noise after the raw/prenoise data were normalized to have a global absolute current of 1, increasing the robustness of the model to the noise encountered in real experimental data.
Final classifications were dictated by eight trained ResNet-18 models voting on a final classification to decrease the effect of randomness in individual model training. For each simulated or experimental set of cyclic voltammograms, eight individually trained ResNet-18 models will provide their y values. The values of yielded y vectors are subsequently averaged, and the maximal component in the y vector is chosen as the final predicted type of electrochemical mechanism. Relatively small yet nonzero variability of predictions exists among eight ResNet models. Statistically, the standard deviations of the yielded y vectors for a specific mechanism type are: 2.3 × 10–3 (CE), 9.3 × 10–3 (EC), 7.6 × 10–2 (E), 1.3 × 10–4 (ECE), and 3.5 × 10–5 (DISP) (n = 100 for each mechanism class).
Experiments of Electrochemical Characterization
Tetraphenylporphyrin cobalt(II) (CoII(TPP)) (80%), tetra-n-butylammonium hexafluorophosphate (n-Bu4NPF6) (98%), and tetra-n-butylammonium perchlorate (n-Bu4NClO4) (98%) were purchased from TCI America; anhydrous diethyl ether was purchased from Fisher Scientific; ferrocenium (Fc+) hexafluorophosphate (98%) was purchased from Santa-Cruz Biotechnology; 1-bromobutane (n-BuBr) (99%), anhydrous N,N-dimethylformamide (DMF), anhydrous benzene, anhydrous acetonitrile, anhydrous tetrahydrofuran (THF), anhydrous dichloromethane, anhydrous pentane, dimanganese(0) decacarbonyl (98%), ethylenebis(diphenylphosphine) (99%), boric acid (99.5%), potassium chloride (99%), sodium hydroxide (99%), and 4-tert-butylcatechol (97%, HPLC) were purchased from Sigma-Aldrich. All of the chemicals were used as received unless otherwise specified below. Bu4NPF6 and Bu4NClO4 salts were recrystallized from ethanol before use. CoII(TPP) was recrystallized from methylene chloride before use. n-BuBr was fractionally distilled over CaSO4 under N2 at atmospheric pressure. The second fraction was collected at 102 °C and was dried over molecular sieves before use. THF was dried over molecular sieves before use. 4-Tert-butylcatechol was distilled under reduced pressure and was allowed to recrystallize under vacuum at room temperature as a white crystalline solid before use.
The Mn complex [trans-Mn(CO)2(DPPE)2]PF6 was synthesized according to a published procedure with some modifications.32 Dimanganese(0) decacarbonyl (0.2 g, 0.5 mmol) and DPPE (DPPE = ethylenebis(diphenylphosphine), 0.4 g, 1 mmol) were dissolved in 10 mL of benzene, and the solution was refluxed under N2 for 4 h. The [trans-Mn(CO)2(DPPE)][Mn(CO)5] salt was formed and collected as a yellowish solid. A portion of this solid (0.11 g, 0.1 mmol) was dissolved in 3 mL acetonitrile, and 1 equiv ferrocenium hexafluorophosphate (0.033 g, 0.1 mmol) was added to this solution, and the reaction mixture was stirred vigorously for 30 min. Layering diethyl ether over this reaction mixture afforded an orange-yellow solid, which upon further recrystallization with dichloromethane/pentane afforded an orange-yellow crystalline solid (0.06 g, 59%). 31P NMR (CDCl3): δ 77.9 ppm (s) and −144.3 ppm (m).
Experiments of cyclic voltammetry were performed at room temperature using a CH Instruments 630D potentiostat. Solutions in organic solvents were performed under an Ar atmosphere in a glovebox (Vigor SG1200/750TS), while aqueous experiments were performed under a N2 atmosphere. iR corrections were conducted with positive feedback compensations for the ohmic drop. Ag/Ag+ pseudo-reference electrode was calibrated against Fc+/Fc redox after electrochemical measurements.
Acknowledgments
C.L. and Q.G. acknowledge the National Science Foundation (CHE-2140762) for the financial support. C.L. acknowledges the National Institute of Health (R35GM138241), the Sloan Research Fellowship, the startup fund at the University of California, Los Angeles, and the support of the Jeffery and Helo Zink Endowed Professional Development Term Chair.
Supporting Information Available
The Supporting Information is available free of charge at https://pubs.acs.org/doi/10.1021/acsmeasuresciau.2c00045.
Parameter ranges for the simulated voltammograms (Table S1); additional analysis of the established model (Figures S1–S3); detailed information regarding the numerical simulation of voltammograms; definitions of individual mechanisms; and procedures of randomly sampling the parameter space of individual mechanisms in cyclic voltammetry (PDF)
Author Contributions
C.L. and Q.G. supervised the project. B.B.H., C.C., and C.L. developed the theoretical computational frameworks for the generation of simulated cyclic voltammograms. B.B.H. generated and sanitized the data necessary for model training/validation. Q.G. and W.Z. established the machine-learning model and provided codes for data analysis to B.B.H. and C.L. S.X. synthesized the desirable compounds for electrochemical testing. S.X., R.D., and C.C. provided the experimental data of cyclic voltammetry. B.B.H. prepared the initial draft of the manuscript. All of the authors discussed the results of the project and assisted with manuscript preparation. CRediT: Benjamin B Hoar conceptualization (equal), data curation (lead), formal analysis (lead), investigation (lead), software (equal), validation (equal), visualization (equal), writing-original draft (lead), writing-review & editing (lead); Weitong Zhang data curation (equal), methodology (equal), software (equal), writing-review & editing (equal); Shuangning Xu data curation (equal), methodology (equal), writing-review & editing (equal); Rana Deeba data curation, methodology, resources (equal); Cyrille Costentin data curation, formal analysis (equal), investigation (equal), validation, writing-original draft (equal), writing-review & editing; Quanquan Gu formal analysis (equal), investigation (equal), resources (equal), writing-original draft (equal), writing-review & editing (equal); Chong Liu conceptualization (lead), formal analysis (equal), funding acquisition (equal), investigation (equal), project administration (equal), resources (equal), supervision (lead), writing-original draft (equal), writing-review & editing (lead).
The authors declare the following competing financial interest(s): B.B., W.Z., Q.G., and C.L. have filed a provisional patent for the work reported here.
Notes
B.B., W.Z., Q.G., and C.L. have filed a provisional patent.
Supplementary Material
References
- Bard A. J.; Faulkner L. R.. Electrochemical Methods: Fundamentals and Applications, 2nd ed.; John Wiley & Sons, inc., 2001. [Google Scholar]
- Savéant J.-M.; Costentin C.. Elements of Molecular and Biomolecular Electrochemistry: An Electrochemical Approach to Electron Transfer Chemistry, 2nd ed.; John Wiley & Sons, Inc, 2019. [Google Scholar]
- Nicholson R. S. Theory and Application of Cyclic Voltammetry for Measurement of Electrode Reaction Kinetics. Anal. Chem. 1965, 37, 1351–1355. 10.1021/ac60230a016. [DOI] [Google Scholar]
- Elgrishi N.; Rountree K. J.; McCarthy B. D.; et al. A Practical Beginner’s Guide to Cyclic Voltammetry. J. Chem. Educ. 2018, 95, 197–206. 10.1021/acs.jchemed.7b00361. [DOI] [Google Scholar]
- Costentin C.; Robert M.; Savéant J.-M. Update 1 of: Electrochemical Approach to the Mechanistic Study of Proton-Coupled Electron Transfer. Chem. Rev. 2010, 110, PR1–PR40. 10.1021/cr100038y. [DOI] [PubMed] [Google Scholar]
- Sandford C.; Edwards M. A.; Klunder K. J.; et al. A synthetic chemist’s guide to electroanalytical tools for studying reaction mechanisms. Chem. Sci. 2019, 10, 6404–6422. 10.1039/C9SC01545K. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Newman J.; Thomas-Alyea K. E.. Electrochemical Systems, 3rd ed.; Wiley, 2004. [Google Scholar]
- Rudolph M.; Reddy D. P.; Feldberg S. W. A Simulator for Cyclic Voltammetric Responses. Anal. Chem. 1994, 66, 589A–600A. 10.1021/ac00082a725. [DOI] [Google Scholar]
- Gundry L.; Guo S. X.; Kennedy G.; et al. Recent advances and future perspectives for automated parameterisation, Bayesian inference and machine learning in voltammetry. Chem. Commun. 2021, 57, 1855–1870. 10.1039/D0CC07549C. [DOI] [PubMed] [Google Scholar]
- Chen H.; Katelhon E.; Compton R. G. Predicting Voltammetry Using Physics-Informed Neural Networks. J. Phys. Chem. Lett. 2022, 13, 536–543. 10.1021/acs.jpclett.1c04054. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chen H.; Katelhon E.; Le H.; Compton R. G. Use of Artificial Intelligence in Electrode Reaction Mechanism Studies: Predicting Voltammograms and Analyzing the Dissociative CE Reaction at a Hemispherical Electrode. Anal. Chem. 2021, 93, 13360–13372. 10.1021/acs.analchem.1c03154. [DOI] [PubMed] [Google Scholar]
- Kennedy G. F.; Zhang J.; Bond A. M. Automatically Identifying Electrode Reaction Mechanisms Using Deep Neural Networks. Anal. Chem. 2019, 91, 12220–12227. 10.1021/acs.analchem.9b01891. [DOI] [PubMed] [Google Scholar]
- Gundry L.; Kennedy G.; Bond A. M.; Zhang J. Inclusion of multiple cycling of potential in the deep neural network classification of voltammetric reaction mechanisms. Faraday Discuss. 2022, 233, 44–57. 10.1039/D1FD00050K. [DOI] [PubMed] [Google Scholar]
- He K.; Zhang X.; Ren S.; Sun J.. Deep Residual Learning for Image Recognition, 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR); 2016; pp 770–778.
- Amatore C.; Gareil M.; Savéant J. M. Homogeneous vs. heterogeneous electron transfer in electrochemical reactions. J. Electroanal. Chem. Interfacial Electrochem. 1983, 147, 1–38. 10.1016/S0022-0728(83)80054-0. [DOI] [Google Scholar]
- Evans D. H. Solution electron-transfer reactions in organic and organometallic electrochemistry. Chem. Rev. 1990, 90, 739–751. 10.1021/cr00103a004. [DOI] [Google Scholar]
- Eyke N. S.; Koscher B. A.; Jensen K. F. Toward Machine Learning-Enhanced High-Throughput Experimentation. Trends Chem. 2021, 3, 120–132. 10.1016/j.trechm.2020.12.001. [DOI] [Google Scholar]
- Dave A.; Mitchell J.; Kandasamy K.; et al. Autonomous Discovery of Battery Electrolytes with Robotic Experimentation and Machine Learning. Cell Rep. Phys. Sci. 2020, 1, 100316 10.1016/j.xcrp.2020.100264. [DOI] [Google Scholar]
- Zihlmann M.; Perekrestenko D.; Tschannen M.. Convolutional Recurrent Neural Networks for Electrocardiogram Classification. In 2017 Computing in Cardiology (CinC)., IEEE, 2017; pp 1–4.
- Yoon Y.; Yan B.; Surendranath Y. Suppressing Ion Transfer Enables Versatile Measurements of Electrochemical Surface Area for Intrinsic Activity Comparisons. J. Am. Chem. Soc. 2018, 140, 2397–2400. 10.1021/jacs.7b10966. [DOI] [PubMed] [Google Scholar]
- Gao R.; Edwards M. A.; Harris J. M.; White H. S. Shot noise sets the limit of quantification in electrochemical measurements. Curr. Opin. Electrochem 2020, 22, 170–177. 10.1016/j.coelec.2020.05.010. [DOI] [Google Scholar]
- Zeiler M. D.; Fergus R.. Visualizing and Understanding Convolutional Networks, European Conference on Computer Vision; Springer, 2014; pp 818–833.
- Sermanet P.et al. OverFeat: Integrated Recognition, Localization and Detection using Convolutional Networks, International Conference on Learning Representations (ICLR) (Banff); 2013.
- Géron A.Hands-on Machine Learning with Scikit-Learn, Keras, and Tensorflow, 2nd ed.; O’Reilly, 2019. [Google Scholar]
- Tsierkezos N. G. Cyclic Voltammetric Studies of Ferrocene in Nonaqueous Solvents in the Temperature Range from 248.15 to 298.15 K. J. Solution Chem. 2007, 36, 289–302. 10.1007/s10953-006-9119-9. [DOI] [Google Scholar]
- Felton R. H.; Linschitz H. Polarographic Reduction of Porphyrins and Electron Spin Resonance of Porphyrin Anions1. J. Am. Chem. Soc. 1966, 88, 1113–1116. 10.1021/ja00958a004. [DOI] [Google Scholar]
- Whitlock H. W.; Bower B. K. Cobalt (I) meso-tetraphenylporphyrin. Tetrahedron Lett. 1965, 6, 4827–4831. 10.1016/S0040-4039(01)89042-0. [DOI] [Google Scholar]
- Lexa D.; Savéant J. M.; Soufflet J. P. Chemical catalysis of the electrochemical reduction of alkyl halides: Comparison between cobalt-tetraphenyl porphin and vitamin B12 derivatives. J. Electroanal. Chem. Interfacial Electrochem. 1979, 100, 159–172. 10.1016/S0022-0728(79)80158-8. [DOI] [Google Scholar]
- Lexa D.; Mispelter J.; Saveant J. M. Electroreductive alkylation of iron in porphyrin complexes. Electrochemical and spectral characteristics of σ-alkylironporphyrins. J. Am. Chem. Soc. 1981, 103, 6806–6812. 10.1021/ja00413a004. [DOI] [Google Scholar]
- Bailey S. I.; Ritchie I. M. The effect of borate buffer on ortho quinone electrochemistry. Electrochim. Acta 1987, 32, 1027–1033. 10.1016/0013-4686(87)90028-4. [DOI] [Google Scholar]
- Rafiee M.; Nematollahi D. Electrochemical study of catechol–boric acid complexes. Electrochim. Acta 2008, 53, 2751–2756. 10.1016/j.electacta.2007.10.055. [DOI] [Google Scholar]
- Kuchynka D. J.; Kochi J. K. Facile rearrangement and electron transfer of 19-electron radicals from the reduction of the bischelated manganese carbonyl cation Mn(CO)2[PPh2(CH2)2PPh2]2+. Inorg. Chem. 1988, 27, 2574–2581. 10.1021/ic00288a005. [DOI] [Google Scholar]
- Kuchynka D. J.; Kochi J. K. Equilibrium of 17-electron and 19-electron organometallic radicals derived from carbonylmanganese anions and cations. Inorg. Chem. 1989, 28, 855–863. 10.1021/ic00304a012. [DOI] [Google Scholar]
- Amatore C.; Savéant J. M. Electrochemical hydrogenation of aromatic hydrocarbons: Discrimination between ECE and disproportionation mechanisms by double potential step chronoamperometry. J. Electroanal. Chem. Interfacial Electrochem. 1980, 107, 353–364. 10.1016/S0022-0728(80)80206-3. [DOI] [Google Scholar]
- Ruić I.; Feldberg S. The heterogeneous equivalent: A method for digital simulation of electrochemical systems with compact reaction layers. J. Electroanal. Chem. Interfacial Electrochem. 1974, 50, 153–162. 10.1016/S0022-0728(74)80147-6. [DOI] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.

