The resistance switching (RS) behaviors of TiO2 and TiO2/NiO thin films were examined. The presence of conductive nano-filaments was confirmed directly by high-resolution transmission electron microscopy (HRTEM) in a Pt/TiO2/Pt system. The HRTEM images identified Magnéli structured filaments (mostly Ti4O7 phase) of both set and reset states. The local electrical properties were confirmed by in-situ current-voltage measurements in HRTEM. The in-situ HRTEM observation confirmed the structural change of the filament during set and reset switching. The RS behaviour of a stacked material composed of n-type TiO2 and p-type NiO was also examined. The switching time could be decreased by ~ 1,000 times compared to the single layer material by stacking the two layers.