As part of its mission to “bring the world closer together," Facebook is trying to increase diversity in its ranks. But while it’s made great strides in hiring more women, the company admits it has not been hiring enough black and Hispanic employees in leadership and technical positions.

“You can build something that works, that people want to use, but you can’t actually make all the right decisions if among the builders there’s not enough diversity and perspective,” Facebook's head of diversity Maxine Williams explained to CNBC.

In a new diversity report released on Thursday, Facebook revealed women now make up 36 percent of the company, up from 31 percent in 2014. The company has achieved 100 percent pay parity between men and women. A little under one-third of its leaders are women, as well as about 22 percent of its technical workers. Williams added that 30 percent of Facebook’s new software engineers are women, which is notable given that only 19 percent of all people who graduated with a degree in computer and information sciences and support services were women, according the latest statistics from the National Center for Education Statistics.

But while black and Hispanic employees have increased from 2 to 4 percent and 4 to 5 percent over four years respectively, the numbers in technical and leadership roles are stagnant or, in some cases, decreasing. During the same time period, Facebook made no increases in the percentage of black people in technical roles — which is at a low 1 percent — nor did it increase the percentage of black leaders at the company, which is stuck at 2 percent. Hispanic employees in technical roles stayed at 3 percent, while Hispanic leaders dropped from 4 percent to 3 percent.

The lack of diversity is common in Silicon Valley tech companies. Only 2.5 percent of Google’s employees are black per its 2017 Diversity report, while 3.6 percent are Latino, each only climbing 0.1 percent since last year. Attrition rates were highest among black employees, followed by Latino employees. At Twitter, its 2017 Diversity report revealed the percentages of black and Latino employees were both 3.4 percent.

Facebook says that part of the problem is a lack of qualified black and Hispanic candidates. According to the National Center for Educational Statistics, in 2015-2016 a little less than 9 percent of people graduating with a STEM (science, technology, engineering and mathematics) bachelor's degree were black. Hispanic people made up about 12 percent.

The issue becomes more acute at Facebook and other leading technology companies, which require rigorous standards to qualify for jobs. Out of the STEM field, the company is mostly interested in computer science graduates. Further narrowing the field, Facebook wants applicants who have worked on data structures and algorithms for four years during college. Most universities don’t teach the subjects at that stage in that order, Williams admitted.

But that argument is undercut by the fact that Asian people only make up around 12 percent of STEM bachelor's degree graduates — the same ratio as Hispanic people — but 50.3 percent of people in technical roles at Facebook are Asian.