Assessing Phase Diagram Accuracy

Assessing the predictive power of any computational model requires the definition of an appropriate metric or figure-of-merit (e.g. mean square error, maximum error, etc). However, quantifying errors in an alloy phase diagram with a single figure-of-merit is a considerably more complex problem. The “distance” between phase boundaries is not a uniquely defined concept and different phase diagrams may differ in the possible stable phases which they predict, making it unclear which “distance” to measure. Given the difficulty associated with such metrics, we instead propose to use differences in predicted phase fractions between different phase diagrams as the basis of a suitable metric. We prove that our criterion satisfies all the properties of the mathematical notion of a norm or of a metric, in addition to other properties directly relevant to phase stability problems. We illustrate the use of such criterion to the study of the convergence of assessments performed on the same alloy system by different authors over time.


Introduction
One of the underlying assumption of the goal of achieving ''predictive science'' is the availability of suitable metric to quantify the accuracy of the predictions. Although mean square error-type quantities are often well-suited for this purpose when the predicted quantities are simple functions or vectors, quantifying errors in a more general graph, such as phase diagram, in a single figure-of-merit represents a considerably more complex problem. Given this, it is perhaps not surprising that the area of research focusing on the construction of thermodynamic models [often referred to as CALculation of PHAse Diagram (CALPHAD)] [5,[10][11][12]15] is currently lacking a theoretically justified and widely adopted figure-of-merit to quantify the discrepancies between two possible phase diagrams obtained via different routes. This paper intends to fill this gap by building upon earlier proposals. [17] There are multiple challenges associated with this task, as illustrated in Fig. 1. Phase boundaries cannot be considered single-valued functions: For instance, in a binary phase diagram, a phase boundary might cross a given vertical line (see label 1 on the figure) multiple times, thus precluding the use of simple ''mean-square error along one axis'' criteria. The same can occur for horizontal lines (see label 2 on the figure). More generally, no matter which ''axes'' one uses, the phase boundaries will generally be defined on different domains (label 3). The use of perpendicular distances between two curves is also ambiguous: To which of the two curves should the distance be perpendicular to (label 4)? What does ''perpendicular'' mean when the axes have different units so that their relative scaling is arbitrary (label 5)? For the same reason, the use of the Hausdorff metric [2] is also affected by the fact that different axes may have different units. Boundary distance-based metrics are also unable to handle the fact that, sometimes, phases are entirely absent from one phase diagram but present in another (label 6). How should a figure-of-merit quantify this situation?
Given these issues, we instead propose to quantify the differences between two phase diagrams via differences in the predicted phase fractions of the corresponding phases. Phase fractions have been put forward as powerful and fundamental descriptors of phase equilibria. [16] Phase fractions are scalar, dimensionless, everywhere defined and merely take the value 0 when a phase is not stable. These desirable properties solve all of the aforementioned problems. We prove that a criterion based on phase fractions satisfies all the properties of the mathematical notion of a norm or of a metric, in addition to other properties directly relevant to phase stability problems. We illustrate the use of such a criterion to the study of the convergence of assessments performed on the same alloy system by different authors over time.

Definition and Motivation
tor of the phase fractions of all possible phases in the system under conditions c ¼ x; T ð Þ, where T is temperature and x is a vector of overall compositions (omitting one composition, to avoid redundancy). One could also include pressure into the vector c, if desired. The knowledge of this vector-valued function over some region R fully defines the phase diagram over that region.
We propose to quantify the difference between two phase diagrams f 1 ; f 2 in a region R of interest via the following figure-of-merit: where the integrals are multivariate, i.e. dc is a (hyper)volume element. This definition exhibits a number of desirable properties. It has the natural interpretation of the expected total absolute error in phase fraction for a condition chosen at random in region R.
Since this definition is mathematically equivalent to a socalled weighted L 1 norm [18] defined on a vector-valued field, it automatically inherits all the natural properties of norm: It is zero if only if the two phase diagrams f 1 and f 2 agree, 1 and it obeys the triangular inequality k k but this property is not useful in this context, since the phase fractions must sum up to one.) Since a norm is a special case of a metric, our proposal also defines a proper metric.
Definition (1) provides a dimensionless quantity, which facilitates its interpretation. Another desirable property is that it naturally handles the case when one phase is simply missing in one phase diagram. This possibility is not uncommon when comparing experimental and ab initio phase diagrams. Also, in novel systems that are not yet well characterized, there may not be perfect knowledge of which phases are stable or metastable and it is useful to be able to quantify this type of discrepancy. It is not clear how missing phases could be handled with a figure-of-merit based on distances between phase boundaries. This definition also applies a less severe penalty in situations in which only one phase is in disagreement while the others agree. This makes sense, since this situation typically arises when two phases have very similar free energies and can easily be mispredicted without affecting the reliability of the phase diagram elsewhere.
Our approach also makes it simple to account for the fact that Gibbs triangles (or, more generally, Gibbs simplexes) are the most natural way to represent multiple composition axes. The fact that the axes are not orthogonal can be ignored in definition (1) because the same Jacobian terms appear in both the numerator and denominator. One can thus simply integrate over all but one composition using orthogonal axes, whether these axes are truly orthogonal or not in the phase diagram's representation.
The definition (1) is also computationally attractive since it can easily be calculated via Monte Carlo sampling. Let c i , i ¼ 1; . . .; n denote independent random draws from a uniform distribution over the region R, then, by the Law of large numbers  (4), ambiguity of the notion of orthogonality when axes have arbitrary relative scales due to differing units (5) and potential absence of a phase (6) 1 n converges in probability to f 1 À f 2 R as n À! 1. In multicomponent systems, some care must be taken to ensure that the compositions are indeed drawn uniformly. For instance, in a ternary system, picking 3 composition uniformly on 0; 1 ½ and scaling them so their sum is one does not generate a uniform distribution. However, picking the 3 composition from an exponential distribution and then normalizing them to sum to 1, does generate a uniform distribution (see Ref 19). This Monte Carlo algorithm scales very favorably with the number of components in the system, unlike a standard grid integration.
The definition does exhibit some limitations. Most importantly, it is dependent on the choice of the region of interest R. This could be mitigated by agreeing on standardized regions. For instance, one can use a region including the entire composition range and temperatures from absolute zero (or room temperature) to the highest phase transformation temperature of all systems considered.
As an alternative, one could also use ðEq 3Þ for some q ! 1 to obtain analogues of any of the familiar L q norms. [18] For single phase regions, this substitution has no effect since 0 q ¼ 0 and 1 q ¼ 1. For multiphase equilibria, the choice of q does matter, but we suggest keeping the q ¼ 1 choice due to its ease of interpretation. Another possible alternative to Definition (1), which is related to a previously proposed figure-of-merit, [17] is to only compare the presence or absence of a phase, independently of its phase fraction and define the metric: where the function 1 þ f ð Þ is equal to 1 if f [ 0 and 0 otherwise. This definition has the interpretation of the expected number of mismatched phases for a point c picked at random in R. It also can be roughly interpreted as the fraction of the (hyper)volume of the phase diagram where disagreements between the nature of the stable phases exist, weighted by the number of mismatches [One could eliminate this weighting by replacing P p a¼1 by max a2 1;...;p f g in (4)]. The notation d R f 1 ; f 2 ð Þ (instead of is used because Eq 4 does not define a norm when viewed as a function of the f i a c ð Þ, since it cannot be written as a function of f 1 a c ð Þ À f 2 a c ð Þ. However, it is a norm when viewed as a function of the 1 þ f i a c ð Þ À Á . This definition therefore still defines a proper metric d R f 1 ; f 2 ð Þ, since the knowledge of 1 þ f a c ð Þ ð Þ also fully characterizes the phase diagram. Definition (4) may be easier to implement if one only has access to the picture of the phase diagram (instead of its underlying thermodynamic model), because it avoids implementing the level rule to recover the phase fractions (which becomes difficult beyond binary systems). It is also in the same spirit as recent efforts to cast inverse problems in thermodynamics modeling as constraint satisfaction problems. [8] The presence of a miscibility gap leads to a subtle complication in Definition (1) [or (4)]. In this case, multiple phases exhibiting the same crystal structure but at different compositions could be in a multiphase equilibrium. We handle this by considering each phase (even with the same crystal structure) as distinct but when comparing the resulting phase fractions across two phase diagrams, we always re-order the phase fractions (among phases sharing the same crystal structure) so as to minimize (1). If the number of phases with the same crystal structure is different in the two phase diagrams, we then add the appropriate number of phases with a zero phase fraction. In the limit where the differences between the two phases diagrams are small, this simple rule yields differences in phase fraction between corresponding phases.
The proposed metrics have been implemented as the phasenorm command in the ATAT package [23][24][25] and this implementation relies on OpenCalphad [21,22] to compute phase equilibria. It has the following syntax: where • tdbfile1 and tdbfile2 are the two thermodynamic database files (in the TDB format [1] ) of the assessments to be compared; • element1,element2,... is a comma-separated list of the elements involved in the phase diagram of interest (which allows the user to extract a subsystem from the TDB files); • nb of samples specifies the number of Monte Carlo sampling steps performed; • min temperature and max temperature define the temperature range of the region R of interest (the full composition range is assumed); • the optional -01 switch instructs the use of Eq 4 instead of (1).
When using this tool, it is important to ensure that the two thermodynamic database files use the same naming conventions for the phases.

Application Example
The figure-of-merit proposed here enables instructive quantitative studies of the accuracy of phase diagrams. One natural question, for instance, is whether the assessments of an alloy system are actually converging, that is, becoming more accurate over time as more data because available and more researchers study the same system.
Since one never actually knows for sure what is the ''true'' phase diagram, it may not be obvious if any convergence of our knowledge of given system is really taking place. One needs to study convergence through an internal consistency criterion that does not require that the true phase diagram be perfectly known. Given a sequence s 1 ; s 2 ; . . ., how can one know if it converges without first calculating the limit lim nÀ!1 s n ? The way out of this circular reasoning is to check if the sequence s n f g forms a Cauchy sequence, i.e., whether it has the property that lim nÀ!1 max i;j ! n s i À s j ¼ 0: It can be shown that any such Cauchy sequence necessarily converges [18] (under a technical condition known as completeness of the space in which the s n live, which is typically satisfied for vector spaces commonly used to represent scientific data). In our context, this amounts to checking if the distance between all phase diagrams f i f g published on a given system after some time t decreases significantly as time t progresses: where t i is the publication time of phase diagram i. Of course, by construction, the quantity D t necessarily decreases with increasing t, but the rate at which this happens is instructive and the absolute magnitude of D t is indicative of the expected remaining errors at time t.
Using the recently developed Thermodynamic DataBase DataBase (TDBDB), [26] one can easily identify popular alloy systems that have been repeatedly assessed, so that the Cauchy property can be tested. We have selected the many assessments of the Fe-Ti system [3,4,7,9,13,27] and of the Al-Cu system [6,14,20,22,28] that are available in the TDBDB and that can be parsed by OpenCalphad. We have used the Monte Carlo algorithm (Eq 2) with 2000 draws and a region bounded by 300 and 2000 K that covers the entire composition range.
In Fig. 2, it can be seen that the distances between assessments do clearly decrease sharply over time, indicating that a consensus regarding the Fe-Ti phase diagram is steadily emerging. In contrast, in the Al-Cu system (shown in Fig. 3), it appears that disagreements have persisted for many years, although the two latest assessments reported in 2016 [20,22] do seem to show good mutual agreement. This analysis implicitly assumes that even if a recent study re-uses older assessments, its authors consider it as the current state-of-the-art, so that this data set inherits the ''time stamp'' of its most recent (re)use.
We can also use our metric to identify clusters of work that report mutually consistent results. Figure 4  Accuracy years || f i − f j || R D t Fig. 3 Convergence of assessments of the Al-Cu system. Each cross represents the distances between a phase diagram published at time t and a future (or concurrent) phase diagram. The line represents D t , the largest distance between pairs of phase diagrams published at or after time t report all pairwise distances between the assessments. For a given similarity threshold (here 1 or 2%), one can find groups of assessments that lie close to each other, within that threshold. Encouragingly, these clusters seem to primarily consist of recent publications thus again suggesting an emerging consensus.

Conclusion
We have described a formal methodology to quantify, in a single figure-of-merit, the level of agreement between two phase diagrams. Our proposal not only satisfies the mathematical requirements of a norm or a metric, but also has a sound physical basis, is invariant to scaling of the graph axes, and is easy to compute via Monte Carlo sampling, with or without access to the thermodynamic model underlying each phase diagram. We illustrate its usefulness in a meta-analysis of a set of thermodynamic assessments in popular alloy systems, in an effort to determine whether the most current assessments have reached a consensus. Our metric may find applications in other areas as well, for instance, to report how well phase diagrams generated purely via ab initio methods agree with the corresponding experiments-based thermodynamic assessements.