Photo courtesy of Niloy Gupta
Opinions expressed by contributors are their own.
At the intersection of AI and business, machine learning engineer and Lambent Logic’s cofounder and chief technology officer (CTO) Niloy Gupta tackles a crucial challenge: scaling machine learning models for realworld impact. He explains, “In my years working on machine learning systems, I’ve learned that the real challenge isn’t just building models — it’s scaling them to handle massive datasets and serve predictions so they can solve realworld problems in finance, advertising, medicine, and beyond.”
As a staff machine learning engineer and technical leader at Attentive Mobile, Niloy Gupta architects sophisticated AI systems that are revolutionizing mobile marketing. His work involves building and scaling machine learning models that drive user engagement and boost eCommerce purchases. This role represents the culmination of a career spent applying AI across industries, from optimizing ad targeting systems for a wellknown consumer app to building credit decision models for a giant fintech company.
Building expertise in machine learning
Niloy Gupta’s journey into software engineering began at Goldman Sachs, where he mastered designing and developing enterprise systems for financial data management. Working extensively with databases, web services, and data analytics solutions, he developed crucial expertise in building reliable and robust systems. This foundation would prove invaluable in his later work with advanced AI systems.
Leveraging this technical foundation, Gupta emerged as a leader in applying machine learning across industries. At Yelp, he led efforts to optimize ad targeting systems using ML models that improved revenue metrics by 10%. Simultaneously, at Affirm, he spearheaded projects related to credit underwriting and fraud detection. His innovative work on distributed model training pipelines and lowlatency model serving allowed these systems to scale efficiently.
Expanding his entrepreneurial vision, as the cofounder and CTO of Lambent Logic, Niloy developed a revenue management SaaS product for pharmaceutical manufacturers. This venture demonstrated his ability to apply machine learning solutions to diverse industry challenges.
Gupta, a Carnegie Mellon University School of Computer Science graduate, mentions, “This diverse experience across multiple sectors has enabled me to adapt machine learning technologies to solve complex problems in both consumerfacing and enterprise environments.”
Projects that speak results
Innovations in AdTech: Growing cachefriendly trees
In digital advertising, delivering the right message to the right audience at the right time is crucial for success. Recognizing this, Niloy Gupta has developed a solution to improve how businesses reach potential customers by enhancing the accuracy of clickthrough rate (CTR) prediction models used in online ad serving. These models are pivotal in determining which ads are shown to users, directly impacting Yelp’s user experience and revenue generation.
Gupta’s CTR prediction model evaluates whether an ad from a particular advertiser should be served by predicting how relevant the ad is to the user’s intent. Additionally, it calculates how much should be bid in an auction to outperform competitors. The more accurate the CTR prediction, the better the system can ensure users are shown ads they are likely to engage with, enhancing user satisfaction and business outcomes.
Gupta shares that his team initially used a logistic regression model for CTR prediction. However, he also explains, “Logistic regression is a linear classifier and cannot model complex interactions between covariates unless explicitly specified or engineered.”
The ML leader turned to gradientboosted trees (GBTs), a more powerful machine learning technique that uses an ensemble of weak learners (decision trees) to iteratively improve predictions by focusing on the residual errors of previous models.
To further optimize GBTs for realtime ad serving, Gupta pioneered an approach called “Growing CacheFriendly Trees.” This method reorganized decision trees in memory to improve cache efficiency, significantly reducing the time spent on memory lookups during inference. By placing frequently accessed nodes closer together in memory, Gupta’s system achieved a 120 percent improvement in prediction latency, allowing for faster and more accurate ad targeting.
“By carefully considering how model data is structured in memory, we were able to speed up inference without sacrificing accuracy,” Niloy Gupta explains. “This allowed us to deploy much more sophisticated models in production, leading to significant improvements in ad targeting performance.”
Investing in interpretability in FinTech
Gupta’s next career move took him to the fintech industry, where he spent four years. As a Staff Machine Learning Engineer and later Tech Lead Manager, Gupta led teams working on critical systems for credit underwriting, fraud detection, and interest rate optimization.
One of Gupta’s key contributions at Affirm was the development of Shparkley, an opensource library for scaling Shapley value computations using distributed computing. Shapley values are a powerful technique for interpreting machine learning models.
In a shared open source, Gupta explains how this model works for predictions. “The idea has its roots in cooperative game theory. Each predictor in the feature vector is considered a “player” in a game where the model prediction is the payout. Shapley values inform us how to distribute the payout among the predictors fairly,” he elaborates.
“An attribution method is considered to have a “fair payout” only if it meets the axioms of efficiency, symmetry, dummy, and additivity. Shapley value is the only method which satisfies these axioms.”
Interpretability is crucial in fintech, where leaders need to understand and explain the factors driving their models’ decisions. According to Gupta, Shparkley enabled them to generate model explanations for millions of loan applications in a reasonable timeframe.
He also played a crucial role in developing novel algorithms for optimizing financing programs. This system uses machine learning and largescale simulation to determine optimal financing options that balance customer appeal, merchant sales, and underwriter risk.
“The financing optimization project was a great example of how machine learning can create winwin scenarios in finance,” Gupta reflects. “By using AI to explore a vast parameter space, we were able to find financing options that were more attractive to customers while also managing risk for Affirm and driving sales for merchants.”
The bigger responsibility
Despite his years of experience in machine learning, Niloy Gupta remains aware of the inherent unpredictability and complexity of deploying these technologies in realworld environments. He understands that while machine learning models are powerful tools, they are imperfect and require meticulous attention to detail.
Gupta emphasizes that the success of these systems hinges on their ability to evolve and adapt over time and on continuous monitoring to ensure they are delivering the intended impact.
In this situation, Gupta recognizes the importance of lifelong learning and open collaboration. Throughout his career, he has actively contributed to the opensource community and published research on various topics, from biomedical text summarization to computer vision, with his work cited over 130 times. He also received the IEEE Computer Society Richard E. Merwin Scholarship.
He mentions, “I believe in the power of open collaboration and knowledge sharing. By opensourcing our tools and publishing our findings, we can accelerate progress across the entire field of machine learning.”
As he continues to lead the machine learning industry, Niloy Gupta sees immense potential and endless possibilities for technology. His motivation remains to know that the systems he is building have the potential to drive progress and improve people’s lives.