Retired Gen. James Mattis on Thursday said the U.S. must invest in innovation and prepare for the wars of tomorrow, a sign that some of the programs Defense Secretary Ash Carter began could stick around into the Trump administration.

Mattis, who testified at the Senate Armed Services Committee at a confirmation hearing to be defense secretary, said the military must focus on current readiness to fight today's conflicts, while also looking out so those who aren't even in the military yet are adequately prepared in a decade.

"We have to make sure we're not dominant and irrelevant at the same time: dominant in a form of warfare that is no longer relevant," Mattis said.

Two new members of the committee — Sen. Elizabeth Warren, D-Mass., and Sen. Gary Peters, D-Mich. — asked the former general about his commitment to cybersecurity and other new technology, especially artificial intelligence. Mattis responded that he would prioritize an investment in innovation.

It suggests that the next defense secretary will share at least some of Carter's interest in building partnerships with technology hubs and forcing a culture of innovation, experimentation and failure in the Defense Department.

Carter stood up Defense Innovation Unit Experimental hubs across the country to facilitate better relationships between start-ups and the Pentagon. He also created a Defense Innovation Board, which this week approved a recommendation to set up an artificial intelligence center of excellence within the department.

While many of the board members publicly disparaged Trump, they said they would stay on into the next administration if they were asked because of a commitment to the Constitution and the troops.