Scotland fly-half Dan Parks proved the difference between the two sides, weighing in with 20 points, while Alex Cuthbert, who made his debut for Wales in the Australia defeat last week, scored Cardiff’s only try.
The two sides meet again at Murrayfield next week and Roberts admits there is work to be done before the return fixture.
“Our attack was quite lacklustre at times and something we need to have a look at,” said Roberts.
“Our defence was outstanding. Our defence won us the game tonight, it pulled us through.
“We have a habit of turning quick ball into slow ball, which is not the way we want to do it and we'll have to pick ourselves up as we'll face a completely different Edinburgh team at home.
“They will be under pressure to win so they'll be a different animal.
“Only half of the job is done.
“In these back-to-back games, you have got to win at home first and go away to repeat that.
“We want to go into round five and six of the Heineken Cup with our destiny in our own hands so we want four wins from four.”