Mass-conserving diffusion-based dynamics on graphs

An emerging technique in image segmentation, semi-supervised learning, and general classification problems concerns the use of phase-separating flows defined on finite graphs. This technique was pioneered in Bertozzi and Flenner (2012), which used the Allen-Cahn flow on a graph, and was then extended in Merkurjev, Kostic and Bertozzi (2013) using instead the Merriman-Bence-Osher (MBO) scheme on a graph. In previous work by the authors, Budd and Van Gennip (2019), we gave a theoretical justification for this use of the MBO scheme in place of Allen-Cahn flow, showing that the MBO scheme is a special case of a"semi-discrete"numerical scheme for Allen-Cahn flow. In this paper, we extend this earlier work, showing that this link via the semi-discrete scheme is robust to passing to the mass-conserving case. Inspired by Rubinstein and Sternberg (1992), we define a mass-conserving Allen-Cahn equation on a graph. Then, with the help of the tools of convex optimisation, we show that our earlier machinery can be applied to derive the mass-conserving MBO scheme on a graph as a special case of a semi-discrete scheme for mass-conserving Allen-Cahn. We give a theoretical analysis of this flow and scheme, proving various desired properties like existence and uniqueness of the flow and convergence of the scheme, and also show that the semi-discrete scheme yields a choice function for solutions to the mass-conserving MBO scheme. Finally, we exhibit initial work towards extending to the multi-class case, which in future work we seek to connect to recent work on multi-class MBO in Jacobs, Merkurjev and Esedoglu (2018).


Introduction
In this paper, we will investigate variants of the Allen-Cahn equation and Merriman-Bence-Osher (MBO) scheme on a graph, modified to ensure that mass is conserved along trajectories. First, we formulate on a graph the massconserving Allen-Cahn flow devised by Rubinstein and Sternberg [23], noticing that mass conservation continues to hold in the discrete setting. Next, following our earlier work in [11] and drawing on work in Van Gennip [14], we show that a formulation of a mass-conserving MBO scheme arises naturally as a special case of a semi-discrete scheme for the mass-conserving Allen-Cahn flow with the double-obstacle potential. We then examine various theoretical properties of this mass-conserving semi-discrete scheme.
Finally, we exhibit results towards generalising to the multi-class case, formulating mass-conserving Allen-Cahn flow with a "multi-obstacle" potential and thereby deriving a mass conserving multi-class semi-discrete scheme which we hope to link to the multi-class MBO scheme.

Contributions of this work
In this paper we have: • Following [23], defined a mass-conserving graph Allen-Cahn flow with double-obstacle potential (Definition 3.5) and proved that it conserves mass (Proposition 3.3).
• Extended the analysis in [11] to this new flow, proving a weak form, an explicit form, and uniqueness and existence theory for this flow (Theorems 3.6, 3.7, 3.8, and 3.9, respectively) and via the semi-discrete scheme proved that solutions exhibit monotonic decrease of the Ginzburg-Landau energy, and Lipschitz regularity (Theorems 5.8 and 5.10, respectively).
• Defined a mass-conserving semi-discrete scheme for this flow (Definition 4.1) and as in [11] proved that this scheme is equivalent to a variational scheme of which the MBO scheme is a special case (Theorems 4.3 and 4.22).
• Used the tools of convex optimisation to characterise the solutions of this variational scheme (Theorems 4. 16 and 4.19) and proved that in the MBO limit the mass-conserving semi-discrete solutions converge to an MBO solution, providing a choice function for the mass-conserving MBO solutions (Theorem 4.21).
• Following [11], derived a Lyapunov functional for the mass-conserving semi-discrete scheme (Theorem 4.23) and proved convergence of the scheme to the Allen-Cahn trajectory (Theorem 5.6), giving a novel proof of a key lemma from the method in [11].
• Defined non-mass-conserving and mass-conserving graph Allen-Cahn flows with a multi-obstacle potential, and corresponding multi-class semi-discrete schemes (Definitions 6.3 and 6.4, respectively).
Though we worked in the framework of [11], this paper extends upon [11] in a number of key ways. Most directly, we have shown a new result, that shows that the link discovered in [11] between Allen-Cahn flow and the MBO scheme is robust in the prescence of a further constraint. Moreover, this was not a trivial extension: the mass conservation condition substantially increased the difficulty of some of the key results of [11]. In particular, finding the solutions of the variational form and thereby proving the equivalence to the semi-discrete scheme for Allen-Cahn, which are both fairly straightforward in [11], required a substantial employment of the tools of convex optimisation. Other results, such as Theorems 3.6 and 4.21, also required non-trivial extensions to the proofs of their counterparts in [11] (indeed, the latter being in that context sufficiently clear as to not be needed to be stated). Furthermore, for the proof of convergence we have exhibited a novel proof technique for one of the key lemmas. Finally, the final section on multi-obstacle Allen-Cahn was entirely new work.

Background
The primary background for this work is [11], in which the authors developed a general framework for linking graph Allen-Cahn flow and the graph MBO scheme via a semi-discrete scheme. We showed that the MBO scheme was a special time-discretisation of Allen-Cahn flow with a double-obstacle potential, and investigated properties of this Allen-Cahn flow and time-discretisation scheme. This paper will follow that framework, introducing a mass constraint.
Mass conservation (a.k.a. volume preservation) as a constraint on the MBO scheme and on Allen-Cahn flow arises in a number of contexts, which we shall here briefly survey. For a wider survey of general MBO schemes and Allen-Cahn flow in both the continuum and graph contexts, see [11] and [15] and the references therein.
In the continuum context, mass-conserving dynamics of the Ginzburg-Landau energy have a long history, dating back to [12] and [13] and the development of the Cahn-Hilliard equation. In the 1990s, Rubinstein and Sternberg [23] devised a mass-conserving variant of the Allen-Cahn equation as an alternative to the Cahn-Hilliard equation. We will use this alternative equation as the basis for our mass-conserving graph Allen-Cahn equation.
Just as the original MBO scheme was introduced as a method for mean curvature flow in Merriman, Bence, and Osher [3], mass-constrained MBO schemes in the continuum have been investigated as methods for studying mass-constrained mean curvature flow. It was first introduced as such in Ruuth and Wetton [25], and the convergence of this scheme has been recently studied by Laux and Schwartz [18], who showed that as the time-step goes to zero the algorithm of Ruuth and Wetton converges (up to a subsequence) to the weak formulation of mass-constrained mean curvature flow defined in [22].
Turning to the graph context, recently Van Gennip [14] studied a graph analogue of the Ohta-Kawasaki functional, and devised a modified graph MBO scheme (with the ordinary MBO scheme as a special case) and mass-conserving graph MBO scheme as a method for minimising this functional without and with a mass conservation constraint, respectively. We will show that the massconserving MBO scheme yielded by applying the technique from [11] to the Rubinstein and Sternberg Allen-Cahn equation on a graph coincides with this definition of the mass-conserving MBO scheme on graphs (up to non-uniqueness of MBO solutions).
Finally, graph Allen-Cahn flow and MBO schemes have received much attention in the last decade as algorithms for image processing and semi-supervised learning, stemming from pioneering work by Bertozzi and Flenner [4] and Merkurjev, Kostić and Bertozzi [21], respectively, and extended to the multi-class case in Merkurjev et. al. [20]. Bae and Merkurjev [1] studied the effect of mass conservation constraints on these algorithms, inspiring Jacobs, Merkurjev, and Esedoḡlu [16] to employ "auction dynamics" as a novel way to solve a mass-conserving multi-class graph MBO scheme. In this work we extend the link developed in [11] between these image-processing algorithms to this massconserving setting in the two-class case, and demonstrate how to define our framework in the multi-class case. In future work we seek to extend the theory of this paper to the multi-class case, and so link up with this body of work.

Paper outline
We here give a brief overview of the rest of this paper.
In section 2, we outline our notation and key definitions, and then briefly describe the link from [11] that we shall be extending to the mass-conserving case in this paper.
In section 3, we define mass-conserving graph Allen-Cahn flow, following Rubinstein and Sternberg's [23] definition of mass-conserving Allen-Cahn flow in the continuum. We extend the analysis in [11] to this mass-conserving setting, rigorously defining this flow with the double-obstacle potential, and proving explicit and weak forms, as well as existence and uniqueness, for this flow.
In section 4, we define the mass-conserving semi-discrete scheme, which we formulate variationally, as in [11], to link to the MBO scheme. We then use the tools of convex optimisation to solve this variational equation, first in the case where the objective function is linear (i.e. MBO) and next (using strong duality) in the general semi-discrete case where the objective function is strictly convex. This task of solving the variational equation is significantly more involved than its counterpart in [11]. We show that as the strictly convex case converges to the MBO case, the corresponding solutions converge to a unique MBO solution, providing a choice function for the mass-conserving MBO scheme. We lastly follow [11] in deriving a Lyapunov functional for the mass-conserving semidiscrete scheme and thereby discussing the long-time behaviour of the scheme.
In section 5, we follow the method of [11] to prove convergence of the massconserving semi-discrete scheme to mass-conserving Allen-Cahn flow as the time-step tends to zero. We also give a novel proof of one of the lemmas in this proof. We then use this convergence to prove monotonicity of the Ginzburg-Landau functional along mass-conserving Allen-Cahn trajectories, and prove the Lipschitz regularity of those trajectories.
Finally, in section 6 we make first steps towards future work concerning a multi-class MBO scheme, defining a graph Allen-Cahn flow with the "multiobstacle" potential and a corresponding multi-class semi-discrete scheme, with and without mass conservation.

Groundwork
We here rewrite the abridged summary of [15] from [11]. We henceforth consider graphs G := (V, E) which are finite, simple, connected, undirected and positively weighted, with vertex set V , edge set E ⊆ V 2 and with weights {ω ij } ij∈E satisfying ω ij = ω ji and ω ij ≥ 0 for all ij ∈ E. We extend ω ij = 0 when ij / ∈ E. We define function spaces on G (where X ⊆ R, and T ⊆ R an interval): We introduce a Hilbert space structure on these function spaces. For r ∈ [0, 1], and writing d i := j ω ij for the degree of vertex i, we define inner products on and define the inner product on V t∈T (or V X,t∈T ) We then induce inner product norms || · || V , || · || E and || · || t∈T and also define on V the norm ||u|| ∞ := max i∈V |u i |. Next, we define the L 2 and L ∞ spaces: Finally, for T an open interval, we define the Sobolev space H 1 (T ; V) as the set of u ∈ L 2 (T ; V) with weak derivative du/dt ∈ L 2 (T ; V) such that where C ∞ c (T ; V) denotes the set of elements of V t∈T that are infinitely differentiable with respect to time and compactly supported in T . By [11,Proposition 1], u ∈ H 1 (T ; V) if and only if u i ∈ H 1 (T ; R) for each i ∈ V . Then H 1 (T ; V) has inner product: We also define the local H 1 space on any interval T : and likewise define L 2 loc (T ; V) and L ∞ loc (T ; V). We introduce some notation: Next, we introduce the graph gradient and Laplacian: We note that ∆ is positive semi-definite and self-adjoint with respect to V. From ∆ we define the graph diffusion operator : where v(t) = e −t∆ u is the unique solution to dv/dt = −∆v with v(0) = u.
Note that e −t∆ 1 = 1, where 1 is the vector of ones, so graph diffusion is massconserving, i.e. e −t∆ u, 1 V = u, 1 V . By [11,Proposition 2] if u ∈ H 1 (T ; V) and T is bounded below, then e −t∆ u ∈ H 1 (T ; V) with d dt e −t∆ u = e −t∆ du dt − e −t∆ ∆u.
We recall from functional analysis the notation, for any linear F : V → V, ||F u|| V and recall the standard result that if F is self-adjoint then ||F || = ρ(F ). Finally, we recall the notation from [11]: for problems of the form we write f ≃ g and say f and g are equivalent when g(x) = af (x) + b for a > 0 and b independent of x. As a result, replacing f by g does not affect the minimisers.
To define graph Allen-Cahn (AC ) flow, we first define the graph Ginzburg-Landau functional as in [11] by where W is a double-well potential and ε > 0 is a scaling parameter. AC flow is then the ·, · V gradient flow of GL ε , which for W differentiable is given by where ∇ V is the Hilbert space gradient on V.
In [11] AC flow was linked to the MBO scheme via a discretisation of it by the "semi-discrete" implicit Euler scheme (with time step τ ≥ 0): This obeys the variational equation: We now define the MBO scheme.
Definition 2.1 (Mass-conserving graph MBO scheme). We define the massconserving graph Merriman-Bence-Osher (MBO) scheme by the sequence of variational problems: This is motivated by recalling the result from [15] that the ordinary graph MBO scheme, defined as an iterative diffusion (for a time τ ) and thresholding scheme, is equivalent to the sequence of variational problems: to which we have added a mass conservation constraint on the minimiser. Note that we can suppress the now constant 1, u V term.
To link the AC flow to the MBO scheme, as in [11] take as W the doubleobstacle potential : See also Blowey and Elliott [5,6,7] for study of this potential in the continuum context and Bosch, Klamt and Stoll [8] for recent work in the graph context.
As W is not differentiable, the AC flow has to be redefined via the subdifferential of W . As in [11] we say that a pair (u, β) ∈ V [0,1],t∈T × V t∈T is a solution to double-obstacle AC flow for any interval T when u ∈ H 1 loc (T ; V) and for a.e. t ∈ T and all i ∈ V : That is, 1] , and for u ∈ V [0,1] it is the set of β ∈ V such that The semi-discrete scheme thus becomes, where λ := τ /ε, where β n+1 ∈ B(u n+1 ). Then the key result of [11,Theorem 3] is the derivation of the MBO scheme from AC flow via the semi-discrete scheme, i.e. that for ε = τ the solutions to (2.8) obey the variational equation: and thus the solutions are MBO trajectories. This paper will follow this method to derive the mass-conserving MBO scheme as a special case of a semi-discrete scheme for a mass-conserving doubleobstacle AC flow.

Mass-conserving AC flow
In [23], Rubinstein and Sternberg define a mass-conserving Allen-Cahn flow (on a domain Ω) as the non-local reaction-diffusion PDE, where u : Ω → R, with Neumann boundary conditions. We can readily formulate this on a graph, noting the differing sign convention on ∆ and introducing our scaling, as the ODE du dt Finally, as above in (2.6) we account for the non-differentiability of W to arrive at: We verify the mass conservation property for u continuous and H 1 . We first recall from [11] a standard fact about continuous representatives of H 1 functions.
, then u is locally absolutely continous on T . It follows that u is differentiable a.e. in T , and the weak derivative equals the classical derivative a.e. in T . Proof. First, note that M(u(t)) ∈ H 1 loc (T ; R) ∩ C 0 (T ; R) with Then for almost every t, taking the mass of both sides of (3.3): So most of the terms cancel and we are left with with the final equality because ∆ is self-adjoint and ∆1 = 0. Then by absolute continuity we infer that M(u(t)) is constant.
As in [11] with the ordinary Allen-Cahn flow, not all values in the subdifferential are attained in valid trajectories. We use Lemma 3.1 to characterise the validly attained β.
Then, for a.e. t ∈ T and all i ∈ V , we have Proof. Since β(t) ∈ B(u(t)) at a.e. t ∈ T , (3.6) holds at a.e. t ∈ T for which u i (t) ∈ (0, 1). LetT ⊆ T denote the times when u is differentiable and has classical derivative equal to its weak derivative. Since u i (t) ∈ [0, 1] at all times, when t ∈T and u i (t) ∈ {0, 1} we have du i /dt = 0. Consider first u i (t) = 0. Then for a.e. such t ∈T Likewise for u i (t) = 1 we have for a.e. such t ∈T β i (t) −β(t) =ū − 1 + ε(∆u(t)) i so (3.6) holds at a.e. t ∈T . By Lemma 3.1, T \T is null, so (3.6) holds at a.e. t ∈ T . .

(3.7)
For brevity we will often refer to just u as a solution to (3.7).

Weak form and explicit integral form
In this section, we prove first a weak form of mass-conserving AC flow, and then an explicit integral form.
For any valid ξ, by (3.9) and (3.10) we have that Next, first suppose u j (t) ∈ (0, 1) for some j ∈ V . Then we fix such a j and choose θ(t) so that β j (t) = 0, and thus by (3.11) for any i ∈ V and valid ξ: Then by the above note, if we choose a valid ξ with ξ i of the appropriate sign, Next, suppose no such j exists. By above if u i (t) = 0 and u j (t) = 1 then we can choose ξ i > 0 and so by (3.11) we have that β j (t) ≤ β i (t). Thus we can choose θ(t) to add an appropriate constant to the values of β(t) so that Hence we have Note finally that whatever the choice of θ, by (3.8b) and (3.10) we have Hence by (3.10) and we chose θ(t) so that our choice of β(t) ∈ B(u(t)). Hence (u, β) solves (3.7).
Theorem 3.7. For u ∈ V [0,1],t∈T and β ∈ V t∈T , (u, β) is a solution to (3.7) if and only if β −β1 is locally essentially bounded and locally integrable (where by "locally" we mean on each bounded subinterval of T ), β(t) ∈ B(u(t)) for a.e. t ∈ T , and for all t ∈ T u(t) =ū1 + e t/ε e −t∆ (u(0) −ū1) + 1 ε e t/ε e −t∆ t 0 e −s/ε e s∆ β(s) −β(s)1 ds. (3.12) Proof. Let (u, β) solve (3.7). Then β −β1 is a sum of a continuous function and the derivative of a H 1 loc function and hence is locally integrable. We shall prove that β −β1 is globally essentially bounded in Lemma 5.9. Finally, following [11], we rewrite (3.7) to obtain (3.12). Consider the expression: Applying the product rule we obtain that for a.e. t ∈ T , and therefore integrating both sides and applying the 'fundamental theorem of calculus' on H 1 [10, Theorem 8.2] we obtain the integral form. Now let ξ := β −β1 be locally essentially bounded and locally integrable, let β(t) ∈ B(u(t)) for a.e. t ∈ T , and for all t ∈ T let (3.12) hold. By differentiating and reversing the above steps we get that (u, β) obeys the ODE in (3.7), and in particular the weak derivative of u is given by: As ξ is locally essentially bounded, by (3.12) u is continuous, and since u is bounded it is locally L 2 . Finally, by above du/dt is a sum of (respectively) a smooth function, a locally essentially bounded function and the integral of a locally essentially bounded function, so is locally essentially bounded and hence locally L 2 . Hence u ∈ H 1 loc (T ; V). Note. The forward reference to Lemma 5.9 does not introduce circularity here, because we do not use this aspect of the forward direction of this theorem until after proving that lemma. We will however use the converse direction in proving the convergence of the semi-discrete scheme (Theorem 5.6).

Existence and uniqueness
Finally, we have the following existence and uniqueness theory for (3.7).
and there existsT such that T \T has zero measure and for all t ∈T , Proof. As u and v solve (3.7), by subtracting and sinceū =v we get for a.e.
Let w := v − u and take the inner product with w, noting that w, Furthermore since ∆ is positive semi-definite we have ∆w(t), w(t) V ≥ 0. Therefore by the above we have for a.e. t ∈ T , and note that w(0) = 0. Hence by Grönwall's differential inequality we have that for all t ∈ T , ||w(t)|| 2 Therefore at t ∈T , either β(t) − γ(t) = (β(t) −γ(t))1 or, if u i (t) ∈ (0, 1) for some i ∈ V , then taking the average value of both sides we get Note. There are only Proof. We prove this as Theorem 5.6, by taking the limit as τ ↓ 0 of the semidiscrete approximations defined in (4.1). (We avoid circularity as we do not use this theorem until after we have proved Theorem 5.6.) 4 Mass-conserving semi-discrete scheme and link to the MBO scheme Definition 4.1 (Mass-conserving semi-discrete scheme). Building on the insight from [11], we link the mass-conserving AC flow to the mass-conserving MBO scheme by defining the following mass-conserving semi-discrete scheme: We check this conserves mass.
Proposition 4.2. For u n+1 given by (4.1), Proof. Taking the mass of both sides of (4.1) and cancelling gives with the final equality because e −τ ∆ is self-adjoint and e −τ ∆ 1 = 1.
We express this scheme variationally, and link to the MBO scheme. [11,Theorem 12]). If 0 ≤ τ ≤ ε then the solutions to the semi-discrete scheme (4.1) obey In particular, when τ = ε we have which is equivalent to the mass-conserving MBO scheme as in Definition 2.1.
Proof. Let u n+1 solve (4.1). First, note that B(u n+1 ) is non-empty and so Next, expanding out the functional for M(u) = M gives: We seek to prove that for λ ≤ 1 and ∀η ∈ V [0,1] such that η, By rearranging and cancelling this is equivalent to (noting that η − u n+1 , Finally, for λ = 1 the quadratic term in (4.2) cancels and we get the equation (4.3).

Solving the variational equations
Compared to [11] the addition of the mass conservation constraint substantially increases the difficulty in solving the equations from Theorem 4.2. We here employ the techniques of convex optimisation, particularly the Krein-Milman theorem, complementary slackness and strong duality, to help resolve this difficulty.
We consider the set of feasible solutions to (4.2) and (4.3).
We can visualise this as the plane through u 0 with V-normal vector 1. Then we write the set of feasible solutions to (4.2) and (4.3) Note that X is compact, and is the intersection of two convex sets, so is convex. Furthermore, note that X can be described as the set of solutions to the linear inequalities and thus is said to be a polyhedral set.
and write Ext C for the subset of C consisting of all such points.
We can then characterise the extreme points of the feasible set.
Proposition 4.6. The set Ext X of extreme points of X is finite and is given by Proof. Since X is polyhedral, Ext X is finite by a standard result [17, Corollary 1.3.1]. Suppose u ∈ X and ∃i, j ∈ V such that i = j and u i , u j ∈ (0, 1). Now for δ > 0 let For tidiness, we define some useful notation.
Proof. Follows immediately from [ This is convex as the objective function is linear and X is convex, compact as it is a closed subset of X, and non-empty as X is compact so the continuous objective function attains its maxima.
Proof. Follows immediately from the fact that S τ,un is non-empty, and so S τ,un ∩ Ext X is non-empty as otherwise S τ,un = conv(∅) = ∅.
In [14], Van Gennip considers a mass-conserving MBO scheme for minimising the Ohta-Kawasaki functional with a modified graph diffusion, which in the γ = 0 special case reduces to ordinary graph diffusion and hence is the same problem as (4.3). We here repeat his form for the solutions to (4.3) lying at extreme points.
Proof. By Proposition 4.6 we have that u n+1 = χ E +θχ V \(E∪F ) where θ ∈ (0, 1) and V \(E ∪F ) has at most one element which we will denote i * (when it exists).

Uniqueness conditions for the mass-conserving MBO scheme
We consider when (4.3) has a unique solution, and characterise all solutions to (4.3).
Corollary 4.14. S τ,un has one element if and only if S τ,un ∩ Ext X has one element.
Usefully, Theorem 4.13 gives a necessary condition for u ∈ S τ,un ∩ Ext X. We demonstrate the following sufficient condition for uniqueness of solutions.
Proof. WLOG, up to relabelling of V , we may write (4.8) as Let u ∈ S ∩ Ext X. By Theorem 4.13 we thus have and hence by Proposition 4.6 u must have the form where θ ∈ (0, 1] so (a, θ) uniquely determines any element of S τ,un ∩ Ext X. Let M(a, θ) := M(u) for u defined by (a, θ) as above.
Then for a < b, and clearly M(a, θ) = M(a, φ) if and only if θ = φ. If u ∈ S τ,un ∩ Ext X, M(u) = M , and by the above we have that M(a, θ) = M for a unique (a, θ). Thus S τ,un ∩ Ext X has a unique element (as by the proof of Corollary 4.12 S τ,un ∩Ext X is non-empty), so by Corollary 4.14 S τ,un has a unique element.
Following this idea, we get a characterisation of S τ,un and a necessary and sufficient condition for uniqueness.
Therefore S τ,un has a unique element if and only if Proof. First, we show that k exists and is unique. Let B r := K l=r a un,τ,α l . Then as a un,τ,α l > 0 the B r are strictly decreasing in r and we observe that Hence we have a unique solution if and only if (e −τ ∆ u n ) i = α k at a unique i ∈ V or θ = 1 (and therefore u i = 1 for (e −τ ∆ u n ) i = α k ), i.e. when (4.10) holds.
Note. If M = 0 then X = {0}, so uniqueness is trivial, hence supposing that M > 0 incurs no loss of generality.
Note. The solution in (4.9), with an adjustible threshold level (i.e. α k ) to ensure that mass is conserved, accords with the definition of the mass-conserving graph MBO scheme in [14] and with the definition of the mass-conserving continuum MBO scheme in [25].

Behaviour as λ ↑ 1
Usefully, for λ < 1 (4.2) is strictly convex, so it has a unique solution u λ n+1 . In this section we show that as λ ↑ 1 these solutions converge, yielding a choice function for solutions of (4.3). By the discussion in section 4.3 we have the following theorem.
As a prelude to investigating the convergence properties of u λ n+1 , we first show that convergence of solutions of (4.2) as λ ↑ 1 is relevant to solving (4.3).
Theorem 4.20. Fix u n and denote the objective function in (4.2) by: Then as λ ↑ 1, f λ → f 1 uniformly on X, and note that f 1 is equivalent to the objective function in (4.3). Furthermore, if (u λ ) ∈ X solve (4.2) and u λ → u as λ ↑ 1, then u ∈ X is a solution to (4.3).
Proof. For any u ∈ X and λ ≤ 1, which tends to zero uniformly as λ ↑ 1. Next, suppose u λ → u as above. Then u ∈ X since X is closed. By uniform convergence, for all ε > 0 we have some δ > 0 such that for all λ ∈ (1 − δ, 1) and all Therefore since the u λ minimise f λ , for any v ∈ X we have Since f 1 is continuous we can take λ ↑ 1 and rearrange to get and since ε was arbitrary we must have that u is a minimiser of f 1 . Then for some sufficiently small δ > 0, depending only on e −τ ∆ u n , and each λ ∈ (1 − δ, 1) if and only if (e −τ ∆ u n ) i ≥ α k+1 , (4.23) and thus u λ n+1 converges to the RHS of (4.23) as λ ↑ 1.

Hence by (4.22) we must have either
Note. The RHS of (4.23) can immediately be seen to solve (4.3) as it satisfies the conditions of (4.9). Furthermore, note that u λ n+1 converges to a point in Ext X (i.e. the RHS of (4.23) is in Ext X) if and only if (4.10) holds, i.e. if and only if it converges to the unique solution of (4.3).

The converse of Theorem 4.3
In this section we prove the following theorem. Note. If (u, β) and (u, β ′ ) solve (4.1) then rearranging we get i.e. β and β ′ differ only by a multiple of 1. So, for a given u and β ∈ B(u), (u, β) is a solution if and only if (u, β ′ ) is a solution for all and only the β ′ ∈ {β + θ1 | θ ∈ R} ∩ B(u). If u i ∈ (0, 1) for an i ∈ V and (u, β) and (u, β ′ ) solve (4.1), then β = β ′ as β i = β ′ i = 0. Then, recalling Theorem 4.16, any solution u to (4.2) for λ = 1 must satisfy We seek to find a β such that β i = 0 if u i ∈ (0, 1). Note that if u i ∈ (0, 1), then by Theorem 4.16 we have (e −τ ∆ u n ) i = α k , so we desire to have Therefore substituting into (4.24) we have candidate solution: We now verify that this candidate solution works even for binary u.
Proof of Theorem 4.22 for λ = 1. We check that the β as in (4.25) solves (4.24): Moreover, by the form for u from Theorem 4.16 it follows that β ∈ B(u).

A Lyapunov functional for the mass-conserving semidiscrete scheme
In this section we show that the Lyapunov functional for the semi-discrete scheme derived in [11] is also a Lyapunov functional for the mass-conserving semi-discrete scheme. We then use this functional to examine the eventual behaviour of the scheme, extending the analysis in [11] by accounting for the complications that arise due to the mass conservation condition. All results in this section assume only that the initial condition u 0 ∈ V [0,1] , and are otherwise independent of the initial condition.
Recall from [15] the Lyapunov functional for the oridinary MBO scheme, i.e. the strictly concave functional J : Theorem 4.23 (Cf. [11,Theorem 14]). When 0 ≤ λ ≤ 1, the functional (on is non-negative, and furthermore the functional is a Lyapunov functional for (4.1), in the sense that H(u n+1 ) ≤ H(u n ) with equality if and only if u n+1 = u n for the sequence of u n ∈ V [0,1] defined by (4.1). In particular, we have that (4.29) Proof. Note that I −e −τ ∆ has eigenvalues 1−e −τ λ k ≥ 0, since the eigenvalues λ k of ∆ are non-negative, and so u, Next by the concavity of J and linearity of L un , recalling that u n −u n+1 , 1 V = 0: where the final line follows from β n+1 ∈ B(u n+1 ) as in the proof of Theorem 4.3. Note that if u n+1 = u n then J(u n ) − J(u n+1 ) > L un (u n − u n+1 ) by strict concavity, so even for λ = 1 there is equality if and only if u n+1 = u n . (i) for eventually all n, u n+1 ∈ Ext S τ,un , or (ii) for eventually all n, u n+1 is as in (4.23) (i.e. the λ ↑ 1 limit of the semidiscrete updates u λ n+1 ), then there exists u ∈ X such that for eventually all n, u n = u.
Proof. For (i), recall that Ext S τ,un = S τ,un ∩ Ext X ⊆ Ext X and that Ext X is a finite set. Hence {u n | n ∈ N} is a finite set, so if the u n are not eventually a single u then we must have some u, v ∈ X such that u = v, u n = u infinitely often, and u n = v infinitely often. Therefore we must have n < m < k such that u n = u k = u and u m = v, and hence All the inequalities are equalities, and therefore by the equality condition on H from Theorem 4.23 we have u = v, a contradiction. Thus the u n are eventually constant.
For (ii), we show that there are finitely many possible u ∈ X of the form (4.23). Each such u has the form . To see this, note that u as in (4.23) has But since V is finite, there are only finitely many tripartitions of V . Hence {u n | n ∈ N} is a finite set, and the proof runs as above. We wish to use the gradient of H to investigate critical points of the flow. However as we restrict the flow to lie in S M , a non-Hilbert space, we make the following definition.
Furthermore, note that E = ker P so in that case M 1, Since H(u n ) is monotonically decreasing and bounded below, it follows that H(u n ) ↓ H ∞ for some H ∞ ≥ 0. Furthermore, since the sequence u n is contained in X and X is compact, there exists a subsequence u n k that converges to some u * ∈ X with H(u * ) = H ∞ , since H is continuous. Unfortunately, just like [19] for graph AC flow with the standard quartic potential, or [11] for AC flow with the double-obstacle potential, we are unable to infer convergence of the whole sequence from these facts. However by the same argument as in [19,Lemma 5] if the set of accumulation points of the u n is finite then there is in fact only one such point and the whole sequence converges. Notably, if u * ∈ V (0,1) ∩ X is an accumulation point of the u n then by Corollary 4.25 and (4.31) we have that ∇ SM H| SM (u * ) = 0. Thus, if H(u 0 ) < H( M 1,1 V 1) then no accumulation points of the u n lie in V (0,1) ∩ X.

Convergence of the semi-discrete scheme
We follow the method of [11] to prove convergence of the semi-discrete iterates to the solution of the continuous-time flow (3.7) for T = [0, ∞) and u(0) = u 0 ∈ V [0,1] . Note that for u 0 ∈ {0, 1} this result is trivial, since the semi-discrete scheme has u n ≡ u 0 and (3.7) has u(t) ≡ u 0 . Therefore, for the rest of this section we shall assumeū = u 0 ∈ (0, 1).

Asymptotics of the n th semi-discrete iterate
We first note two important controls.
Consider the set B : Recall that the semi-discrete scheme is defined by Iterating this formula, we get the following formula for the n th term.

Proof of convergence
We consider the limit of (5.4) as τ ↓ 0, n → ∞ with nτ → t for some fixed t and τ ∈ (0, ε). The key insight, as in [11], is noticing that (5.4) strongly resembles a Riemann sum for the integral form for the mass-conserving AC flow from Theorem 3.7. To exploit this, we define the piecewise constant function k , (k − 1)τ < s ≤ kτ for k ∈ N, and the function (note that for bookkeeping we introduce the superscript [τ ] to keep track of the time step governing a particular sequence of u n and β n ). We note an important convergence result. Proposition 5.3. For any sequence τ ′ n → 0 with τ ′ n < ε for all n, there exists a function z : [0, ∞) → V and a subsequence τ n of τ ′ n such that z τn converges weakly to z in L 2 loc ([0, ∞); V) and z τn weak*-converges to z in L ∞ loc ([0, ∞); V).
Proof. For N ∈ N, consider z τ | [0,N ] . As the β 1] for all k and τ by Lemma 5.1, we have for all s ∈ [0, N ] and τ < ε where we have used that for s ≤ N the corresponding kτ in the exponent of z τ (s) is less than N + τ , and that ||e −s ′ ( 1 ε I−∆) || = e s ′ (||∆||−ε −1 ) is maximised at the endpoints of [0, N + ε]. Therefore the z τ | [0,N ] are uniformly bounded in || · || V (and therefore in || · || ∞ since all norms on V are equivalent) for τ < ε, and hence they lie in a closed ball in L 2 ([0, N ]; V) and in L ∞ ([0, N ]; V). By the Banach-Alaoglu theorem the former ball is weak-compact and the latter ball is weak*-compact. Hence for any τ ′ n ↓ 0 there exists τ ′′ n a subsequence of τ ′ n and z ∈ L 2 ([0, N ]; V) and w ∈ L ∞ ([0, N ]; V) such that . We claim that z = w a.e. on [0, N ]. By the definitions of the weak and weak* topologies we have that for all f ∈ L 2 ([0, N ]; V) and Hence z i = w i a.e. for each i ∈ V , so z = w a.e. on [0, N ]. Finally, we extend to [0, ∞) by a "local-to-global" diagonal argument. First, we take N = 1: by above we can choose a subsequence τ (1) of τ ′ such that z τ (1) n converges in both the weak topology on L 2 and the weak* topology on L ∞ to some z on [0, 1] . Then to move from N to N + 1 we likewise choose a subsequence τ (N +1) of τ (N ) such that z τ (N +1) Hence for all f ∈ L 2 (T ; V),

Hence for any
Claim (B) is a direct consequence of weak convergence. Claim (C) follows by the Banach-Saks theorem [2], which states that weak L p convergence on a bounded interval entails strong convergence of Cesàro sums on that interval along an appropriate subsequence, and a "local-to-global" diagonal argument as in the above proof to extract a subsequence that works on all of [0, ∞). Claim (D) follows since f → e s/ε e −s∆ f is continuous on L ∞ (T ; V) and on L 1 (T ; V), for T bounded, and with respect to the pairing of L ∞ with L 1 , for all f ∈ L ∞ (T ; V) and g ∈ L 1 (T ; V) T e s/ε e −s∆ f (s), g(s) V ds = T f (s), e s/ε e −s∆ g(s) V ds so the map is "self-adjoint" and so (D) follows by the same argument as (A).
We now return to the question of convergence of the semi-discrete iterates. Taking τ to zero along the sequence τ n , we define for all t ≥ 0 the continuumtime functionû (t) := lim n→∞,m=⌈t/τn⌉ Therefore by (5.4) (note that m depends on both t and n, but for the sake of readability we will write m rather than m n (t)) u(t) =ū1 + lim Then finally to prove global convergence we must show the desiderata: To show (iii): We verify the sufficient conditions in Theorem 3.7. By (5.6) we have thatû has the desired integral form, and since γ −γ1 is a weak limit of locally bounded and locally integrable functions we have that γ −γ1 is locally bounded a.e. and is locally integrable. Thus it suffices to check the subdifferential condition.
We give two proofs of this result. We first recap part of the proof in [11] in order to derive the characterisation of γ in (5.7), and next we give a novel proof of this result.
Proof (A), cf. [11]. By Corollary 5.4(C), on each bounded T ⊆ [0, ∞) γ is the L 2 (T ; V) limit of γ τn as N → ∞. As L 2 convergence implies a.e. pointwise convergence along a subsequence, by a "local-to-global" diagonal argument there exists a sequence N k → ∞ such that for a.e. t ≥ 0 Recall A := ε −1 I − ∆, m := ⌈t/τ n ⌉, and e n := mτ n − t ∈ [0, τ n ). Then by Lemma 5.1 Therefore for a.e. t ≥ 0, as k → ∞ (since τ n → 0 and the convergence of a sequence implies the convergence of its Cesàro sums to the same limit), so for a.e. t ≥ 0 The result then follows as in [11]; we omit the details as they are identical to those in [11].
Proof (B).. Fix i ∈ V and bounded T ⊆ [0, ∞). For tidyness of notation, we define x n (t) := u ⌈t/τn⌉ ) i and ξ(t) := γ i (t). Let Then it suffices to show that ξ ≥ 0 a.e. on T 1 , ξ = 0 a.e. on T 2 , and ξ ≤ 0 a.e. on T 3 . By Recalling from Proof (A) that (γ τn ) i (t) = ξ n (t)+ O(τ n ), we infer that as n → ∞ By (5.5) we have by definition that for all t ∈ T 1 , x n (t) → 0. We define the (measurable) sets A N := {t ∈ T 1 | ∀n ≥ N x n (t) < 1/2}. Then by the pointwise convergence of the x n , T 1 = N A N . Suppose for contradiction that for some X ⊆ T 1 of positive measure, ξ < 0 on X. So there exists δ > 0 and Y ⊆ X of positive measure such that ξ ≤ −δ on Y . As T 1 is the union of the A N there exists N ∈ N such that Y ∩ A N is of positive measure. Taking test function f = χ Y ∩AN we infer that as n → ∞ (and µ the Lebesgue measure) ⌈t/τn⌉ ) we have that if t ∈ A N then for all n ≥ N , ξ n (t) ≥ 0, so this is a contradiction. Hence ξ ≥ 0 a.e. on T 1 . By the same argument, ξ ≤ 0 a.e. on T 3 .
Finally, for all t ∈ T 2 , since x n (t) → x(t), x n (t) is eventually in (0, 1). Define B N := {t ∈ T 2 | ∀n ≥ N x n (t) ∈ (0, 1)}, and note that T 2 = N B N and that for t ∈ B N and n ≥ N , ξ n (t) = 0 since β [τn] ⌈t/τn⌉ ∈ B(u [τn] ⌈t/τn⌉ ). Suppose for contradiction that for some X ⊆ T 2 of positive measure, ξ = 0 on X. Then WLOG there exists δ > 0 and Y ⊆ X of positive measure such that ξ ≥ δ on Y . As before there exists N ∈ N such that Y ∩ B N is of positive measure. Taking f = χ Y ∩BN we infer that as n → ∞ (for n ≥ N ) a contradiction. Therefore ξ = 0 a.e. on T 2 .
Note. Proof (B ) is also valid in the non-mass-conserving case in [11]. We thank Dr. Carolin Kreisbeck for her suggestion of using weak* L ∞ convergence which led to the development of this proof.
In summary, we have the following convergence result.
Note. For u 0 = 0 or 1, the u Note. As in [11], we can avoid passing to a subsequence in all but the last of these convergences because of Theorem 3.8. Recall the fact noted in [11]: if (X, ρ) is a topological space, x n , x ∈ X, and every subsequence of x n has a further subsequence converging to x in ρ, then x n → x in ρ. Let τ n ↓ 0, with τ n < ε for all n, and x n := t → u [τn] ⌈t/τn⌉ ∈ (V t∈[0,∞) , ρ) for ρ the topology of pointwise convergence. By Theorem 5.6 applied to τ n k , every subsequence x n k has a subsequence converging to an AC solution with initial condition u 0 . By uniqueness, these must equalû. Therefore x n →û pointwise, without passing to a subsequence. Likewise, the corresponding γ −γ1 is unique up to a.e. equivalence, so z τn − z τn 1 ⇀ z −z1 and γ τn − γ τn 1 ⇀ γ −γ1 in L 2 loc ([0, ∞; V) without passing to a subsequence. Finally, when γ is unique up to a.e. equivalence (i.e. whenû(t) / ∈ V {0,1} for all t ≥ 0) then γ τn ⇀ γ in L 2 loc ([0, ∞; V) and γ τn ⇀ * γ in L ∞ loc ([0, ∞; V) without passing to a subsequence.

Consequences of Theorem 5.6
Given this representation of the unique solution to (3.7) as a limit of semidiscrete approximations, we can deduce a number of properties of this solution. First, following [11], we verify that the unique AC solution is a decreasing flow of GL ε by considering the Lyapunov functional H for the semi-discrete scheme defined in (4.28), and in doing so obtain a control on the behaviour of GL ε (û(t)).
Next, we derive some controls on γ and thereby infer a Lipschitz condition onû.
6 Towards the multi-class case So far, we have considered only when u separates into two phases ("classes") in the Allen-Cahn flow, and likewise the MBO scheme applies a binary threshold.
In this section we begin to generalise to multiple classes, defining an Allen-Cahn flow against the multi-obstacle potential, and a corresponding multi-class semi-discrete scheme, with and without mass-conservation. In future work, we hope to use the above framework to link this to a multi-class MBO scheme, as a special case of the semi-discrete scheme, and investigate the semi-discrete scheme for λ ↑ 1 as a choice function for, and an algorithm for computing, multi-class mass-conserving MBO solutions.

Set-up
Let K denote the number of classes we wish to divide into. Then define the simplex Σ := x ∈ R K K k=1 x k = 1, x k ≥ 0 and define the function spaces We will treat U = (U ik ) i∈V,k=1..K ∈ V K interchangeably as functions on V and as real matrices in R |V |×K . Then we define the action of operators like ∆ by matrix multiplication, i.e. ∆U applies ∆ to each column of U .
Note. For U ∈ V Σ , U ik describes the proportion of class k at vertex i, e.g. if K = 3 and row i were (0.2, 0.5, 0.3) that would describe vertex i as being 20% class 1, 50% class 2, and 30% class 3 (for an interpretation of this, imagine the classes as red, green, and blue). For K = 2, each vertex is mapped to some (x, 1 − x) for x ∈ [0, 1], and we recover the setting of the earlier parts of this paper by projecting onto the first coordinate.
As we will be concerned with U ∈ V Σ , we often restrict attention to the hyperplane Π := x ∈ R K K k=1 x k = 1 and associated space V Π := {U : V → Π}, as Σ has non-empty interior in the induced topology on Π. By restricting from R K to Π we can eliminate behaviour in the normal direction to Π, i.e. parallel to (1, ..., 1) ∈ R K .
We define the multi-class inner product: where we recall that D is the diagonal matrix of degrees. As in the two-class case we define V

Allen-Cahn flow and the multi-obstacle potential
We seek to extend (3.7) to the multi-class case. First, we define the "multiobstacle" potential W : otherwise, (6.1) and we define W : and note that W(U ) = W •U, 1 V . We define the multi-class Ginzburg-Landau energy: GL ε (U ) := 1 2 U, ∆U V + 1 ε W(U ). (6.3) As this energy is infinite outside V Π , trajectories of its AC gradient flow will be contained in V Π , so we define formally an AC flow restricted to V Π with a multi-well potential as dU dt = −∆U − 1 ε ∇ VΠ W| VΠ (U ) (6.4) and we can define mass-conserving multi-well AC flow as the system of equations where (U k ) i := U ik .
Note. We restrict to V Π here and not all the way to V Σ because V Π is a translated subspace of V K , which makes the analysis run smoother. We will handle the restriction of the flow to V Σ via subdifferential terms.
However, to treat this rigourously we must account for the non-differentiability of W and W , by considering the subgradient. We make the following definition. Note that if v ∈ ∂ H0 f (x) and v ′ is the orthogonal projection of v onto H 1 then for x, y ∈H, y − x ∈ H 1 and so v, y − x = v ′ , y − x and v ′ ∈ ∂H f |H(x).
Note that for x ∈H, ∂H I A |H (x) = ∂ H0 I A (x) ∩ H 1 .
With this framework in mind, for x ∈ Π we can write, We consider the subgradient of the non-differentiable I Σ | Π term for x ∈ Σ Note that the latter condition comes from Π being of the form x 0 + (1, ..., 1) ⊥ for x 0 ∈ Π. ("Only if") There must exist at least one ℓ with x ℓ > 0. Choose an arbitrary such ℓ and an arbitrary k = ℓ, and define y ∈ Σ with y ℓ = 0, y k = x k + x ℓ and y q = x q for q = k, ℓ. Then v ∈ ∂ Π I Σ | Π (x) only if x ℓ (v k − v ℓ ) ≤ 0, i.e. v k ≤ v ℓ . As k was arbitrary and ℓ was an arbitrary ℓ such that x ℓ > 0, the desired form for v follows.
Then, we handle the non-differentiability of W via the subgradient, i.e.

Conclusion
In this paper, we have translated Rubinstein and Sternberg's mass-conserving Allen-Cahn flow [23] into the context of dynamics on graphs, and have proved existence, uniqueness and regularity properties of the resulting differential equation with a double-obstacle potential. Following [11], we have formulated a semi-discrete scheme for mass-conserving graph Allen-Cahn flow, proved that the mass-conserving graph MBO scheme emerges exactly as the λ = 1 special case of this semi-discrete scheme, and shown that the Lyapunov functional from [11] remains a Lyapunov functional in the mass-conserving case.
Using the tools of convex optimisation, we have characterised the solutions of this mass-conserving semi-discrete scheme, allowing us to prove that: • As λ ↑ 1, the semi-discrete solutions for a given λ converge in V to a solution for λ = 1, yielding a choice function for MBO solutions.
Finally, we have devised a formulation of mass-conserving multi-class Allen-Cahn flow on graphs (with the multi-obstacle potential). In future work, we seek to extend the results of this paper to the multi-class case, and so devise a choice function for the multi-class MBO scheme as a limit of the multi-class semidiscrete solutions. We shall then compare this method for solving the multi-class MBO scheme on graphs with others in the literature, e.g. the auction dynamics of Jacobs, Merkurjev and Esedoḡlu [16].