After a cyclist has gone $ \frac{2}{3}$ of his route, he gets a flat tire. Finishing on foot, he spends twice as long walking as he did riding. How many times as fast does he ride as walk?
1. Let the total distance of the route be \( D \).
2. The cyclist rides \( \frac{2}{3}D \) of the route and walks the remaining \( \frac{1}{3}D \).
3. Let \( t_r \) be the time spent riding and \( t_w \) be the time spent walking.
4. According to the problem, the time spent walking is twice the time spent riding: 
   \[
   t_w = 2t_r
   \]
5. Let \( v_r \) be the riding speed and \( v_w \) be the walking speed.
6. Using the relationship between distance, speed, and time, we have:
   \[
   \frac{2}{3}D = v_r t_r \quad \text{(1)}
   \]
   \[
   \frac{1}{3}D = v_w t_w \quad \text{(2)}
   \]
7. Substitute \( t_w = 2t_r \) into equation (2):
   \[
   \frac{1}{3}D = v_w (2t_r)
   \]
   \[
   \frac{1}{3}D = 2v_w t_r \quad \text{(3)}
   \]
8. From equation (1), solve for \( t_r \):
   \[
   t_r = \frac{\frac{2}{3}D}{v_r} = \frac{2D}{3v_r}
   \]
9. Substitute \( t_r \) from above into equation (3):
   \[
   \frac{1}{3}D = 2v_w \left(\frac{2D}{3v_r}\right)
   \]
   \[
   \frac{1}{3}D = \frac{4D v_w}{3v_r}
   \]
10. Cancel \( D \) from both sides:
    \[
    \frac{1}{3} = \frac{4 v_w}{3 v_r}
    \]
11. Multiply both sides by \( 3v_r \):
    \[
    v_r = 4 v_w
    \]
12. Therefore, the cyclist rides 4 times as fast as he walks.

The final answer is \( \boxed{4} \).