Algebraically characterizing morphisms of commutative rings that are a homeomorphism on the prime spectra Let us say that a morphism $\varphi\colon A\to B$ of rings (commutative, with unit) is a homeomorphism on the (prime) spectra iff the corresponding map $\operatorname{Spec}B\to\operatorname{Spec}A$ (which takes a prime ideal of $B$ to its inverse image in $A$) is a homeomorphism for the Zariski topology.
Main question: can we characterize such $\varphi$ in a purely ring-theoretic way?
(To be very precise, ideally¹ I'd like a characterization that only involves the ring elements, not ideals: that is, a single statement in the first-order two-sorted language of two rings, one sort for elements of $A$ and one for elements of $B$, whose operations are the ring operations on $A$ and $B$ and the ring morphism from one sort to the other, with quantifiers allowed over elements of $A$ or of $B$.  But I'd be happy with a little less than that, e.g., a statement that also involves quantifiers over the natural numbers like “any power of $a$”, or one over polynomials with coefficients in $A$ or $B$ is also fine.  What I don't want are quantifiers over ideals or other kinds of subsets of $A$ or $B$.)

*

*Pun unintended.

Alternative questions: purely ring-theoretic characterizations of any of the following properties of $\varphi$ are also of interest to me:

*

*$\varphi$ is bijective on the spectra (this is indeed weaker than being a homeomorphism, as the example of $k[t] \to k[t,t^{-1}]\times k$ given by $f \mapsto (f,f(0))$ shows),


*$\varphi$ is a homeomorphism to its image on the spectra,


*$\varphi$ is a universal homeomorphism on the spectra (i.e., a homeomorphism on the spectra which remains such after tensoring by any $A\to A'$),


*$\varphi$ is a homeomorphism on the maximal spectra (i.e., gives rise to a map $\operatorname{Specmax}B\to\operatorname{Specmax}A$ which is a homeomorphism, where $\operatorname{Specmax}$ is the subset of $\operatorname{Spec}$ consisting of maximal ideals — including the statement that $\varphi^{-1}(\mathfrak{m})$ is maximal in $A$ for any maximal $\mathfrak{m}$ in $B$),
— or other such variations (e.g., $\varphi$ is bijective on the maximal spectra).  I don't know a purely ring-theoretic characterization of any of these.
The closest I know is EGA IV.2.4.5, which states that an integral surjective radiciel morphism of schemes is a universal homeomorphism and that the converse holds if the target is locally noetherian.
 A: EDIT:  Sorry, what I originally wrote was the opposite of what I should have said, thanks to Will and Remy.  The criteria I wrote was that the ring has no subintegral/weakly subintegral extension (in the relevant overring).
A (finite/integral) extension of rings $R \subseteq S$ is called subintegral in the commutative algebra literature if it is a bijection on prime spectra and the extensions of residue fields are all isomorphisms.
My recollection is $R \subseteq S$ is subintegral if and only if for each $x \in S$ there is a sequence of extensions $$R \subseteq R[x_1] \subseteq R[x_1, x_2] \subseteq \dots \subseteq R[x_1, \dots, x_n]$$ such that $x \in R[x_1, \dots, x_n]$ and such that $x_{i+1}^2, x_{i+1}^3 \in R[x_i]$ for all $i$.
See the papers of Greco-Traverso, Haimann, Leahy-Vitulli, Swan, Vitulli, etc.
Being a universal homeomorphism is also called weakly subintegral in some of the commutative algebra literature.  Ie, a (integral/finite) inclusion $R \subseteq S$ is called weakly subintegral if it induces a bijection on prime spectra and the induces maps on residue fields are isomorphisms.  If $R$ is local and the residual characteristic is $p$, then I believe $S$ being weakly subintegral over $R$ is characterized by the property that for each $x \in S$, there is a sequence of extensions:
$$R \subseteq R[x_1] \subseteq R[x_1, x_2] \subseteq \dots \subseteq R[x_1, \dots, x_n]$$ such that $x \in R[x_1, \dots, x_n]$ and such that, for every $i$, either $x_{i+1}^2, x_{i+1}^3 \in R[x_i]$ or that $px_{i+1}, x_{i+1}^p \in R[x_i]$.
I believe a paper of Leahy-Vitulli (I think?), and an erratum, also explores the maximal spectrum question for varieties.
