The Swans have not won in eight league games, and Williams believes that they have leaked far too many goals in recent weeks.
"We are trying to work out the solution," he told the club's official website. "I don't think confidence is the problem but defensively we need to keep clean sheets. I feel as if I've never conceded so many goals in my career.
"We need to improve in that area, and that includes myself. I hold my hands up because I've been part of it. We have not won in eight and the pressure is on - we need to pick up points.
"We will not use injuries as an excuse. We have had a lot of them recently, and it's not helped as it's to key players. But we feel that we have a good team and that we can get out of danger."
Swansea are 15th in the Premier league table, and are just three points above the relegation zone.