Jack Dorsey, co-founder and chief executive officer of Twitter Inc., speaks during an interview in New York, U.S., on Monday, May 1, 2017.

Twitter shares rose Thursday after Goldman Sachs raised its price target for the social media stock and told clients that despite recent worries about the crackdown on fake accounts, the purge will be a net positive for user engagement.

Goldman Sachs analyst Heath Terry increased his price target on Twitter to $55 from $40, arguing that the company's efforts to drive and monetize user engagement will help contribute to 25 percent upside over the next year.

“Twitter continues to build on ‘Information Quality’ efforts they first spoke about on the fourth-quarter earnings call by moderating unwanted behavior, spam accounts, and low quality tweets through product innovation, acquisition, or more active removal of violating accounts and developer applications,” the analyst wrote. "Our ad partner checks suggest that these efforts have generally been well received by advertisers and ... are contributing to incremental ad dollars flowing onto the platform."

Terry, who reiterated his buy rating on the San Francisco-based company, also highlighted the company's goals of creating better products and services on the site, particularly in hosting other forms of content.

"Twitter continues to focus on the relevance of its product for its core user base, particularly on Video where the company highlighted in the first quarter improved click through rates," he added. "Feature introduction over the last six months including Bookmarks, video timestamps, embedding live events into notifications and the newsfeed, and redesigning the explore tab showcase the company's focus on personalizing the core Twitter product."

Twitter shares fell more than 5 percent earlier in the week after The Washington Post reported that the company has purged more than 70 million accounts in May and June as a part of its effort to rid the site of disinformation.

The company confirmed to The Post that the rate of account suspensions has more than doubled since October following revelations that Russia used fake accounts to interfere in the U.S. presidential election.

While the initial reaction on the Street may have been a reflexive reaction by traders, Goldman Sachs wasn't the only brokerage to applaud Twitter's campaign against fake accounts.

MKM Partners analyst Rob Sanderson reiterated his buy rating on the stock and commended its efforts to eradicate "bad actors" on the site. He also emphasized his thesis that the company's future depends on artificial intelligence, which thus far appears to be working.

The stock rose 1.8 percent the Goldman and MKM notes, adding to an 85 percent climb since January.

"Deep learning expertise has become a primary engineering focus for Twitter especially over the past two years," Sanderson wrote. "This is helping to police the network, but could also have game-changing potential in solving user experience challenges."

—CNBC’s Michael Bloom contributed to this report.