Machine learning research with positive real-world impact.
Ambitious applied research, positive outcomes
Recent highlights
Our research is supported by access to massive datasets, close collaboration with world renowned academic faculty, and a uniquely scalable machine learning platform.
CVPR 2022 | X-Pool: Cross-Modal Language-Video Attention for Text-Video Retrieval
CVPR 2022 | X-Pool: Cross-Modal Language-Video Attention for Text-Video Retrieval

Abstract
In text-video retrieval, the objective is to learn a crossmodal similarity function between a text and a video that ranks relevant text-video pairs higher than irrelevant pairs. However, videos inherently express a much wider gamut of information than texts. Instead, texts often capture subregions of entire videos and are most semantically similar to certain frames within videos. Therefore, for a given text, a retrieval model should focus on the text’s most semantically similar video sub-regions to make a more relevant comparison. Yet, most existing works aggregate entire videos without directly considering text. Common text-agnostic aggregations schemes include mean-pooling or self-attention over the frames, but these are likely to encode misleading visual information not described in the given text. To address this, we propose a cross-modal attention model called XPool that reasons between a text and the frames of a video. Our core mechanism is a scaled dot product attention for a text to attend to its most semantically similar frames. We then generate an aggregated video representation conditioned on the text’s attention weights over the frames. We evaluate our method on three benchmark datasets of MSRVTT, MSVD and LSMDC, achieving new state-of-the-art results by up to 12% in relative improvement in Recall@1. Our findings thereby highlight the importance of joint textvideo reasoning to extract important visual cues according to text. Full code and demo can be found at: layer6ailabs.github.io/xpool/.
Nature Scientific Report | Federated learning and differential privacy for medical image analysis
Nature Scientific Report | Federated learning and differential privacy for medical image analysis

Abstract
The artificial intelligence revolution has been spurred forward by the availability of large-scale datasets. In contrast, the paucity of large-scale medical datasets hinders the application of machine learning in healthcare. The lack of publicly available multi-centric and diverse datasets mainly stems from confidentiality and privacy concerns around sharing medical data. To demonstrate a feasible path forward in medical image imaging, we conduct a case study of applying a differentially private federated learning framework for analysis of histopathology images, the largest and perhaps most complex medical images. We study the effects of IID and non-IID distributions along with the number of healthcare providers, i.e., hospitals and clinics, and the individual dataset sizes, using The Cancer Genome Atlas (TCGA) dataset, a public repository, to simulate a distributed environment. We empirically compare the performance of private, distributed training to conventional training and demonstrate that distributed training can achieve similar performance with strong privacy guarantees. We also study the effect of different source domains for histopathology images by evaluating the performance using external validation. Our work indicates that differentially private federated learning is a viable and reliable framework for the collaborative development of machine learning models in medical image analysis.
RecSys 2021 | User Engagement Modeling with Deep Learning and Language Models
RecSys 2021 | User Engagement Modeling with Deep Learning and Language Models

Abstract
Twitter is one of the main information sharing platforms in the world with millions of tweets created daily. To ensure that users get relevant content in their feeds Twitter extensively leverages machine learning-based recommender systems. However, given the large volume of data, all production systems must be both memory and CPU efficient. In the 2021 ACM RecSys challenge Twitter simulates the production environment with a large dataset of almost 1 bilion user-tweet engagements that span a 4 week period. The goal is to accurately predict engagement type, and all models are subject to strict run-time constraints during inference. In this paper we present our approach to the 2021 ACM Recsys challenge. We use a hybrid pipeline and leverage gradient boosting, neural network classifiers and multi-lingual language models to maximize performance. Our approach achieves strong results placing 3’rd on the public leaderboard. We further explore the complexity of language model inference, and show that through distillation it can be possible to run such models in highly constrained production environments.
ICCV 2021 | Context-aware Scene Graph Generation with Seq2Seq Transformers
Context-aware Scene Graph Generation with Seq2Seq Transformers

Abstract
Scene graph generation is an important task in computer vision aimed at improving the semantic understanding of the visual world. In this task, the model needs to detect objects and predict visual relationships between them. Most of the existing models predict relationships in parallel assuming their independence. While there are different ways to capture these dependencies, we explore a conditional approach motivated by the sequence-to-sequence (Seq2Seq) formalism. Different from the previous research, our proposed model predicts visual relationships one at a time in an autoregressive manner by explicitly conditioning on the already predicted relationships. Drawing from translation models in NLP, we propose an encoder-decoder model built using Transformers where the encoder captures global context and long range interactions. The decoder then makes sequential predictions by conditioning on the scene graph constructed so far. In addition, we introduce a novel reinforcement learning-based training strategy tailored to Seq2Seq scene graph generation. By using a self-critical policy gradient training approach with Monte Carlo search we directly optimize for the (mean) recall metrics and bridge the gap between training and evaluation. Experimental results on two public benchmark datasets demonstrate that our Seq2Seq learning approach achieves strong empirical performance, outperforming previous state-of-the-art, while remaining efficient in terms of training and inference time.
NeurIPS 2021 | Rectangular Flows for Manifold Learning
NeurIPS 2021 | Rectangular Flows for Manifold Learning

Abstract
Normalizing flows are invertible neural networks with tractable change-of-volume terms, which allow optimization of their parameters to be efficiently performed via maximum likelihood. However, data of interest are typically assumed to live in some (often unknown) low-dimensional manifold embedded in a high-dimensional ambient space. The result is a modelling mismatch since — by construction — the invertibility requirement implies high-dimensional support of the learned distribution. Injective flows, mappings from low- to high-dimensional spaces, aim to fix this discrepancy by learning distributions on manifolds, but the resulting volume-change term becomes more challenging to evaluate. Current approaches either avoid computing this term entirely using various heuristics, or assume the manifold is known beforehand and therefore are not widely applicable. Instead, we propose two methods to tractably calculate the gradient of this term with respect to the parameters of the model, relying on careful use of automatic differentiation and techniques from numerical linear algebra. Both approaches perform end-to-end nonlinear manifold learning and density estimation for data projected onto this manifold. We study the trade-offs between our proposed methods, empirically verify that we outperform approaches ignoring the volume-change term by more accurately learning manifolds and the corresponding distributions on them, and show promising results on out-of-distribution detection. Our code is available at https://github.com/layer6ai-labs/rectangular-flows.
Our research areas include recommendation systems, computer vision, time series forecasting, and natural language processing.

Big vision, deep roots
The co-founders of Layer 6, Jordan Jacobs and Tomi Poutanen, are also founders of the Vector Institute for Artificial Intelligence, and we maintain multiple research initiatives with Vector faculty. Current and former scientific advisors include professors Raquel Urtasun, Sanja Fidler, Rich Zemel, David Duvenaud, Laura Rosella and Scott Sanner.
Meaningful partnerships
Originally founded in 2011, Layer 6 now forms the AI research lab of TD Bank Group. Layer 6 impacts the lives of 25 million customers, helping more people achieve their financial goals. Partnerships with TD Securities provides Layer 6 with market data for training algo trading systems.
Layer 6 embraces opportunities to collaborate with Toronto’s world-leading medical research community, offering deep learning solutions to transform healthcare delivery and improve health outcomes. We are the first to deploy deep learning models on health data covering large population.
Passion to learn, driven to succeed
Our team represents 18 different countries of birth and we care deeply about fostering an inclusive culture where we learn from each other and win together. We are united by our passion for deep learning and a desire to apply our skills to have an outsized and positive impact on the future.
Meet some of our team
Develop your career at Layer 6
We’re growing our team exclusively with people driven to be at the top of the game in machine learning.

In the news
-
Inside TD’s AI play: How Layer 6’s technology hopes to improve old-fashioned banking advice
Globe And Mail
Read articleon Globe And Mail -
Tomi Poutanen: Geoffrey Hinton's Turing Award celebrates a life devoted to ground-breaking AI research
TD Newsroom
Read articleon TD Newsroom -
Tomi Poutanen: Chief Artificial Intelligence Officers Enter the C-Suite
Wall Street Journal
Read articleon Wall Street Journal -
TD Bank’s ‘Layer 6’ to bring machine learning personalization to diabetes care
IT Business
Read articleon IT Business -
TD Advances Innovation in Canadian Healthcare
TD Bank Group
Read articleon TD Bank Group
-
Inside TD’s AI play: How Layer 6’s technology hopes to improve old-fashioned banking advice
Globe And Mail
Read articleon Globe And Mail -
Tomi Poutanen: Geoffrey Hinton's Turing Award celebrates a life devoted to ground-breaking AI research
TD Newsroom
Read articleon TD Newsroom -
Tomi Poutanen: Chief Artificial Intelligence Officers Enter the C-Suite
Wall Street Journal
Read articleon Wall Street Journal -
TD Bank’s ‘Layer 6’ to bring machine learning personalization to diabetes care
IT Business
Read articleon IT Business -
TD Advances Innovation in Canadian Healthcare
TD Bank Group
Read articleon TD Bank Group -
Jordan Jacobs, co-founder of Vector Institute on Canada as a global AI leader
IT Business
Read articleon IT Business -
Layer 6’s Jordan Jacobs: Canada needs to promote itself as an AI leader
BetaKit
Read articleon BetaKit -
U of T alumni and graduate students part of Layer 6 AI's win in global competition
U of T News
Read articleon U of T News -
Tomi Poutanen and Michael Rhodes discuss the future of artificial intelligence with Amanda Lang
TD Bank Group
Read articleon TD Bank Group -
Get Smart – Artificial intelligence is transforming business and life
Ivey Business School
Read articleon Ivey Business School -
How TD Bank plans to use artificial intelligence
BNN Bloomberg
Read articleon BNN Bloomberg