It is convenient to formulate the hypotheses as a definition.

**Definition 1.** A morphism $f:X\to Y$ is an **almost affine fibration** if $f$ is quasi-compact, quasi-separated, smooth, surjective, and for every point $y$ of $Y$, the fiber $\text{Spec}\ \kappa(y)^{\text{sep}}\times_Y X$ is $\kappa(y)^{\text{sep}}$-isomorphic to an affine space.

**Question 2.** For every almost affine fibration, for every coherent $\mathcal{O}_X$-module $\mathcal{F}$, does $R^if_*\mathcal{F}$ vanish for every $i>0$.

Of course it suffices to prove this when $Y$ is affine. By limit theorems, even assume that $Y$ is affine and Noetherian. Then also $X$ is Noetherian. Recall the following.

**Theorem 3.** [Serre's Criterion for Affineness.] A Noetherian scheme $X$ is affine if and only if $H^i(X,\mathcal{I})$ vanishes for every coherent ideal sheaf $\mathcal{I}$ and every integer $i>0$, in which case also $H^i(X,\mathcal{F})$ vanishes for every quasi-coherent $\mathcal{O}_X$-module $\mathcal{F}$ and for every integer $i>0$.

Therefore, the original question reduces to the following question.

**Question 4.** Is every almost affine fibration between Noetherian schemes an affine morphism?

**Negative answer,** $n\geq 2.$ By my previous MathOverflow answer, the answer is "no" when the fiber dimension is $\geq 2$:

Is an affine fibration over an affine space necessarily trivial?

Notice, the group of automorphisms of affine space $\mathbb{A}^n$ for $n\geq 2$ is enormous.

MR3039680

Arzhantsev, I.; Flenner, H.; Kaliman, S.; Kutzschebauch, F.; Zaidenberg, M.

Flexible varieties and automorphism groups.

Duke Math. J. 162 (2013), no. 4, 767–823.

https://projecteuclid.org/euclid.dmj/1363355693

There might be (further) pathologies caused by nonreduced group schemes in the automorphism group scheme. To avoid such pathologies, it is best to work with $\kappa(y)^{\text{sep}}$ rather than the algebraic closure $\overline{\kappa(y)}$.

**Positive result on some étale neighborhood.** There is a positive result, at least when the target is integral and after an étale base change.

**Lemma 5.** Let $f:X\to Y$ be a quasi-compact, smooth, surjective morphism to an integral scheme $Y$ whose separably closed fibers are isomorphic to affine spaces. Then there exists a dominant, quasi-compact, étale morphism $Y'\to Y$ such that $Y'\times_Y X$ is $Y'$-isomorphic to $\mathbb{A}^n_{Y'}$.

**Proof.** Denote the fraction field of $Y$ by $K$, and denote by $X_\eta$ the fiber product $\text{Spec}\ K \times_Y X$. Denote by $X_{\eta^{\text{sep}}}$ the fiber product $\text{Spec}\ K^{\text{sep}}\times_Y X$. The multiplication map, $$K^{\text{sep}}\otimes_K \mathcal{O}_{X_\eta}(X_\eta) \to \mathcal{O}_{X_\eta^{\text{sep}}}(X_{\eta^{\text{sep}}}),$$ is an isomorphism of $K^\text{sep}$-algebras. By the universal property of affine space, the $K^\text{sep}$-isomorphism from $X_{\eta^{\text{sep}}}$ to $\mathbb{A}^n_{K^{\text{sep}}}$ is given by an ordered $n$-tuple of elements in the coordinate ring of $X_{\eta^{\text{sep}}}$.

By the isomorphism above, each of these elements is a finite $K^{\text{sep}}$-linear combination of elements in the coordinate ring of $X_{\eta}$. There are finitely many $K^{\text{sep}}$-coordinates of these finitely many finite linear combinations. Thus, there exists a finite, separable extension $K'/K$ and a $K'$-morphism $$\text{Spec}\ K' \times_Y X\to \mathbb{A}^n_{K'},$$ whose base change to $K^{\text{sep}}$ is an isomorphism. Since $\text{Spec}\ K^{\text{sep}}$ is faithfully flat and quasi-compact over $\text{Spec}\ K'$, we can use fpqc descent to construct the (unique) inverse isomorphism. Thus, the given $K'$-morphism is already an isomorphism.

By the usual limit theorems, there exists a dominant, quasi-compact, étale morphism $Y'\to Y$ whose extension of function fields is $K'/K$. Denote $Y'\times_Y X$ by $X'$, and denote the generic fiber of $X'\to Y'$ by $X'_{\eta'}$. As above, up to replacing $Y'$ by a dense open subscheme, the ordered $n$-tuple of elements of the coordinate ring of $X'_{\eta'}$ extend to an ordered $n$-tuple of elements of $\mathcal{O}_{X'}(X')$. So there exists a $Y'$-morphism $$g:X'\to \mathbb{A}^n_{Y'},$$ that is an isomorphism on the generic fiber.

The fiber product of $g$ with itself is a closed subscheme $Z$ of $X'\times_{Y'} X'$ that contains the diagonal. The finitely many associated points of $Z$ other than the generic point of the diagonal each maps to a point of $Y'$ other than the generic point. Up to removing from $Y$ the Zariski closures of these points, assume that $g$ is a monomorphism. Similarly, remove from $Y$ the closure of the image of the support of $\Omega_g$. Thus, also assume that $g$ is unramified. Finally, every injective, unramified $\kappa(y)^{\text{sep}}$-morphism, $$\mathbb{A}^n_{\kappa(y)^{\text{sep}}} \to \mathbb{A}^n_{\kappa(y)^{\text{sep}}},$$
is surjective by the Ax-Grothendieck Theorem. Using Grothendieck's form of Zariski's Main Theorem, it follows that $g$ is even finite, hence an isomorphism. **QED**

By the lemma, it is clear that what goes wrong in examples is that an isomorphism need not specialize to an isomorphism.

**Positive answers for $n=1$.** The positive results for $n=1$ follow from two straightforward observations.

**Lemma 6.** For every field $k$, every non-constant $k$-morphism from $\mathbb{A}^1_k$ to $\mathbb{A}^1_k$ is finite.

**Proof.** This is well-known. The point is that every finitely generated $k$-subalgebra of the polynomial $k$-algebra $k[t]$ is itself a polynomial $k$-algebra generated by some monic polynomial of some degree $d\geq 1$. Then $k[t]$ is generated by $1,t,\dots,t^{d-1}$ over this $k$-subalgebra. **QED**

**Lemma 7.** For every field $k$, for every $2$-pointed affine curve $(C,p_0,p_1)$ that is abstractly $k$-isomorphic to $(\mathbb{A}^1_k,0,1)$, for every triple $(g,h_0,h_1)$ of an element $g\in \mathcal{O}_C(C)$ that is separable, i.e., $dg$ is not identically zero in $\Omega_{C/k}(C)$, and a pair of elements, $h_i\in \mathcal{O}_C(C\setminus\{p_i\}),$ $i=0,1$, such that $g(p_0)=0$, such that $g(p_1)=1$, such that $gh_0=1$ on $C\setminus\{p_0\}$, and such that $(g-1)h_1=1$ on $C\setminus\{p_1\}$, then $g$ defines the unique $k$-isomorphism from $(C,p_0,p_1)$ to $(\mathbb{A}^1_k,0,1)$.

**Proof.** By hypothesis, there exists a $k$-isomorphism from $(C,p_0,p_1)$ to $(\mathbb{A}^1_k,0,1)$. Thus, assume that $(C,p_0,p_1)$ equals $(\mathbb{A}^1_k,0,1)$, and let $t$ denote the usual coordinate. Since $g$ is invertible on the complement of $0$, the element $g$ must equal $ct^d$ for some $c\in k^\times$ and some integer $d\geq 0$. Since $g-1$ is invertible on the complement of $1$, $ct^d-1$ equals $c(t-1)^e$ for some integer $e\geq 0$. Thus, $c$ equals $1$ and either $d=e=1$, or $d=e=p^r$ with $p=\text{char}(k)$ and $r\geq 1$ an integer. In the second case, the differential of $g$ is identically zero. Thus, $g$ equals $t$. **QED**

**Proposition 8.** Let $R$ be a DVR, and let $X$ be a quasi-compact, quasi-separated, smooth $R$-scheme together with two disjoint $R$-sections, $\sigma_0$ and $\sigma_1$ such that the fibers over the separable closures of $\text{Frac}(R)$ and $R/\mathfrak{m}$ are isomorphic to $(\mathbb{A}^1,0,1)$. Then $X$ is $R$-isomorphic to $\mathbb{A}^1_R$ with its zero section and one section.

**Proof.** The uniqueness of $g$ from Lemma 7 allows to descend the isomorphism from $\mathbb{A}^1_{\text{Frac}(R)^{\text{sep}}}$ to an isomorphism of generic fibers, $$g:X_{\text{Frac}(R)}\to \mathbb{A}^1_{\text{Frac}(R)}.$$ For the open immersion $$u:\mathbb{A}^1_{\text{Frac}(R)} \hookrightarrow\mathbb{P}^1_R,$$ denote by $\Gamma$ the closure of the graph of $u\circ g$ in $X\times_{\text{Spec}\ R}\mathbb{P}^1_R.$ The projection morphism from $\Gamma$ to $X$ is projective and birational, even an isomorphism over the maximal open subscheme $X_g$ of $X$ on which $g$ is regular.

By construction, $X_g$ contains the generic fiber. By the valuative criterion of properness, $X_g$ intersects the closed fiber. Since the total degree of the projection $\Gamma \to \mathbb{P}^1_R$ equals $1$ on the generic fiber, it also equals $1$ on the closed fiber. Thus, there is at most one irreducible component of the closed fiber of $\Gamma$ that is not contracted by the morphism to $\mathbb{P}^1_R$. In particular, $g$ is regular along $\sigma$, where $\sigma$ is either the zero section or the one section. Denote by $\tau$ the corresponding section of $\mathbb{A}^1_R$. The derivative of $g$ is an $R$-module homomorphism from $\sigma^*\Omega_{X/R}$ to $\tau^*\Omega_{\mathbb{A}^1_R/R}$. By Lemma 7, this is an isomorphism of $R$-modules. Thus, $g$ restricts to a nonconstant element on an open neighborhood of the closed fiber of $X$ that intersects $\sigma$.

Since the strict transform of the closed fiber of $X$ is the unique irreducible component of the closed fiber of $\Gamma$ that is not contracted, in fact the morphism $\Gamma \to X$ extracts no divisors. Thus, $g$ is everywhere regular on $X$. Since the restriction of $g$ to the closed fiber is nonconstant of degree $1$, the morphism $g$ is an isomorphism on closed fibers. Thus, $g$ is an isomorphism from the $R$-scheme $X$ to the $R$-scheme $\mathbb{A}^1_R$. **QED**

**Proposition 9.** For every almost affine fibration of relative dimension $1$, if $Y$ is normal, then the morphism is affine. Moreover, after an étale, surjective base change of $Y$, the morphism is isomorphic to projection from $\mathbb{A}^1_Y$ to $Y$.

**Proof.** For every point $y$ of $Y$, since $f$ is smooth, after a quasi-compact, dominant, étale morphism $Y'\to Y$ whose image contains $y$, there exist two disjoint sections of $f$. Call these the zero section and the one section. The identity morphism is the unique automorphism of $\mathbb{A}^1$ that preserves $0$ and $1$. By Lemma 5, this defines a morphism $g$ to $\mathbb{A}^1_{Y'}$ on a dense open subset of $X'=Y'\times_Y X$. Moreover, after deleting the closed image of the zero section, resp. of the one section, also $h_0=1/g$, resp. $h_1=1/(g-1)$, is regular on a dense open subset.

Since $Y'$ is normal and since $f$ is smooth, also $X'$ is normal. By the proposition, $g$ and $h_0$, resp. $h_1$, are regular over every codimension $1$ point of $Y$, resp. over every codimension $1$ point of $Y$ after deleting the zero section, resp. the one section. Since $X'$ is normal, a rational function to $\mathbb{A}^1_R$ that is regular at codimension $1$ points is everywhere regular. Thus, $g$ and $h_0$, resp. $h_1$, are regular on all of $X'$, resp. on the complement of the zero section, resp. the complement of the one section. By Lemma 7, the scheme $X'$ is $Y'$-isomorphic to $\mathbb{A}^1_{Y'}$. In particular, $X'\to Y'$ is an affine morphism. Since the property of affineness of a morphism can be checked after faithfully flat base change, it follows that the original morphism is also affine. **QED**

reallyasking about affineness for every smooth, surjective morphism whose geometric fibers are affine spaces $\mathbb{A}^n$. When the fibers are allowed to be $\mathbb{G}_m$, this is not true (and I have written some counterexamples in previous MO posts). However, for affine space, I suspect that this is true . . . $\endgroup$ – Jason Starr Oct 28 '18 at 10:10