Filtering out "forbidden" documents during information retrieval

New method optimizes the twin demands of retrieving relevant content and filtering out bad content.

Content owners make a lot of effort to eliminate bad content that may adversely affect their customers. Bad content can take many forms, such as fake news, paid reviews, spam, offensive language, etc. We call such data items (documents) forbidden docs, or f-docs, for short.

Any data-cleaning process, however, is susceptible to errors. No matter how much effort goes into the cleaning process, some bad content might remain. This week at the annual meeting of the ACM Special Interest Group on Information Retrieval (SIGIR), the Alexa Shopping research team presented a paper on information retrieval (IR) in the presence of f-docs. In particular, we’re trying to optimize the twin demands of retrieving content relevant to customer requests and filtering out f-docs.

For example, consider a question posed on a community question-answering (CQA) site, where our goal is to rank answers according to their quality and relevance while filtering out bad ones. The next table presents some answers to the question “Is the Brand X sports watch waterproof?” While some of the answers are helpful, or at least fair, there are a few that should not be exposed to our users as they significantly hurt the search experience.

Forbidden docs.png
A new metric enables information retrieval models to jointly optimize the ordering of query results and the filtration of "forbidden" content.

Filtering algorithms, however, are prone to two types of errors: (1) false positives (i.e., filtering non-f-docs) and (2) false negatives (i.e., including f-docs in the results).

Typically, ranking quality and filtering accuracy are measured independently. However, the number of f-docs left in the ranked list after filtering and their ranking positions heavily affect both the ranking score and the filtering score. Therefore, it is desirable to evaluate the system’s ranking quality as filtering decisions are being made.

The right metric

We look for an evaluation metric that reinforces a ranker according to three criteria: it (1) prunes as many f-docs from the retrieved list as possible; (2) does not prune non-f-docs from the list; and (3) ranks remaining docs according to their relevance to the query while pushing f-docs down the list.

In our paper, my colleagues Nachshon Cohen, Amir Ingber, Elad Kravi, and I analyze the types of metrics that can be used to measure the ranking and filtering quality of the search results. The natural choice is normalized discounted cumulative gain (nDCG), a metric that discounts the relevance of results that appear further down the list; that is, it evaluates a ranking algorithm according to both relevance and rank ordering.

Related content
Locality-sensitive hashing enables cache to hold more than three times as many query results.

With nDCG, relevant labels are associated with positive scores, non-relevant labels with a zero score, and the “forbidden labels” with negative scores. The nDCG score sums the scores of the individual list items, so the score for a ranked list containing f-docs will reflect the number of f-docs in the list, their relative positions in the ranking, and their degree of forbiddenness.

NDCG differs from the ordinary DCG (discounted cumulative gain) score in that the results are normalized by the DCG score of the ideal ranked list — the list ranked according to the ground truth labels. It can be interpreted as a distance between the given rank and the ideal rank.

When all label scores are non-negative — i.e,. no f-docs are among the top k documents in the results — nDCG is bounded in the range [0, 1], where 0 means that all search results are non-relevant, while 1 means that the ranking is ideal.

However, in the presence of negatively scored labels, nDCG is unbounded and therefore unreliable. For instance, unboundedness may lead to extreme over- or undervaluation on some queries, with disproportionate effect on the average metric score.

The nDCGmin metric, a modification of nDCG suggested by Gienapp et al. at CIKM’20, solves this unboundedness problem for the case of negatively scored labels. It measures the DCG scores of both the worst possible ranked list (the reverse of the ideal ranked list) and the ideal list and then performs min-max normalization with these two extreme scores.

Related content
Method using hyperboloid embeddings improves on methods that use vector embeddings by up to 33%.

However, we show in our paper that when ranking and filtering are carried out together — i.e., when the ranker is allowed to retrieve (and to rank) a sublist of the search results — nDCGmin becomes unbounded. As an alternative, we propose nDCGf, a modification of nDCGmin that solves this second unboundedness problem by modifying the normalization scheme in order to handle sublist retrieval.

In particular, nDCGf measures the DCG score of the ideal and the worst sublists over all possible sublists of the results list and then uses the extreme scores of these sublists for min-max normalization.

We show both theoretically and empirically that while nDCGmin is not suitable for the evaluation task of simultaneous ranking and filtering, nDCGf is a reliable metric. Reliability is a standard measure of a metric’s ability to capture the actual difference in performance among rankers, by measuring deviation stability over a test-set of queries.

The next figure shows the reliability of nDCG, nDCGmin, and nDCGf over datasets released for the web-track information retrieval challenge at the Text Retrieval Conference (TREC) for the years 2010-2014. For all years, the reliability of nDCG and nDCGmin is significantly lower than that of nDCGf, due to their improper normalization when negative labels and partial retrieval are allowed.

Metric reliability.png
Reliability of nDCG, nDCGmin, and nDCGf over TREC Web-track datasets for the years 2010–2014.

Model building

After establishing the relevant metric, our paper then shifts focus to jointly learning to rank and filter (LTRF). We assume an LTRF model that optimizes the ranking of the search results while also tuning a filtering threshold such that any document whose score is below this threshold is filtered out.

We experiment with two tasks for which both ranking and filtering are required, using two datasets we compiled: PR (for product reviews) and CQA (for community question answering). We have publicly released the CQA dataset to support further research by the IR community on LTRF tasks.

Related content
A new metric-learning loss function groups together superclasses and learns commonalities within them.

In the PR dataset, our task is to rank product reviews according to their helpfulness while filtering those marked as spam. Similarly, in the CQA dataset our task is to rank lists of human answers to particular questions while filtering bad answers. We show that both ranking only and filtering only fail to provide high-quality ranked-and-filtered lists, measured by nDCGf score.

A key component for model training in any learning-to-rank framework is the loss function to be optimized, which determines the “loss” of the current model with respect to an optimal model. We experiment with several loss functions for model training for the two tasks, demonstrating their success in producing effective LTRF models for the simultaneous-learning-and-filtering task.

LTRF is a new research direction that poses many challenges that deserve further investigation. While our LTRF models succeed at ranking and filtering, the volume of f-docs in the retrieved lists is still too high. Improving the LTRF models is an open challenge, and we hope that our work will encourage other researchers to tackle it.

Related content

GB, London
How can Amazon improve the advertising experience for customers around the world? How can we help advertisers and customers find each other in a meaningful way? Amazon Advertising creates and transforms the connection between retailers/service providers and customers. Our teams strive to reinvent the way advertisers and agencies build brands and drive performance in their advertising. By using Amazon's foundation in e-commerce, we help brands connect with the right customers through creative solutions and formats across screens and devices, and in the physical world. Amazon Advertising seeks a Data Scientist with strong Data Analysis skills to join the ADSP engineering team split across Edinburgh and London. We make Guidance products that help optimise our customer's advertising campaign workflows and performance. As a scientist on the team, you will be involved in many aspects of the process - from idea generation, business analysis and scientific research, through to development - giving you a real sense of ownership. The systems that you help to build will operate at massive scale to advertising customers around the world. Our ideal candidate is an experienced Data scientist who has a track-record of performing analysis, applying statistical techniques and building basic ML models to solve real business problems, who has great leadership and communication skills, and who is motivated to achieve results in a fast-paced environment. Key job responsibilities Rapidly design, prototype and test many possible hypotheses in a high-ambiguity environment, making use of both quantitative analysis and business judgment. Collaborate with software engineering teams to integrate successful experimental results into large-scale, highly complex Amazon production systems. Report results in a manner which is both statistically rigorous and compellingly relevant, exemplifying good scientific practice in a business environment. Promote the culture of experimentation at Amazon.
US, NY, New York
Amazon is looking for a passionate, talented, and inventive Applied Scientist with a strong machine learning background to help build industry-leading language technology. AWS Utility Computing (UC) provides product innovations — from foundational services such as Amazon’s Simple Storage Service (S3) and Amazon Elastic Compute Cloud (EC2), to consistently released new product innovations that continue to set AWS’s services and features apart in the industry. As a member of the UC organization, you’ll support the development and management of Compute, Database, Storage, Internet of Things (Iot), Platform, and Productivity Apps services in AWS, including support for customers who require specialized security solutions for their cloud services. Our mission is to provide a delightful experience to Amazon’s customers by pushing the envelope in Natural Language Processing (NLP), Generative AI, Large Language Model (LLM), Natural Language Understanding (NLU), Machine Learning (ML), Retrieval-Augmented Generation, Responsible AI, Agent, Evaluation, and Model Adaptation. As part of our AI team in Amazon AWS, you will work alongside internationally recognized experts to develop novel algorithms and modeling techniques to advance the state-of-the-art in human language technology. Your work will directly impact millions of our customers in the form of products and services, as well as contributing to the wider research community. You will gain hands on experience with Amazon’s heterogeneous text and structured data sources, and large-scale computing resources to accelerate advances in language understanding. The Science team at AWS Bedrock builds science foundations of Bedrock, which is a fully managed service that makes high-performing foundation models available for use through a unified API. We are adamant about continuously learning state-of-the-art NLP/ML/LLM technology and exploring creative ways to delight our customers. In our daily job we are exposed to large scale NLP needs and we apply rigorous research methods to respond to them with efficient and scalable innovative solutions. At AWS Bedrock, you’ll experience the benefits of working in a dynamic, entrepreneurial environment, while leveraging AWS resources, one of the world’s leading cloud companies and you’ll be able to publish your work in top tier conferences and journals. We are building a brand new team to help develop a new NLP service for AWS. You will have the opportunity to conduct novel research and influence the science roadmap and direction of the team. Come join this greenfield opportunity! About the team Diverse Experiences AWS values diverse experiences. Even if you do not meet all of the qualifications and skills listed in the job description, we encourage candidates to apply. If your career is just starting, hasn’t followed a traditional path, or includes alternative experiences, don’t let it stop you from applying. Why AWS? Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform. We pioneered cloud computing and never stopped innovating — that’s why customers from the most successful startups to Global 500 companies trust our robust suite of products and services to power their businesses. Inclusive Team Culture Here at AWS, it’s in our nature to learn and be curious. Our employee-led affinity groups foster a culture of inclusion that empower us to be proud of our differences. Ongoing events and learning experiences, including our Conversations on Race and Ethnicity (CORE) and AmazeCon (gender diversity) conferences, inspire us to never stop embracing our uniqueness. Mentorship & Career Growth We’re continuously raising our performance bar as we strive to become Earth’s Best Employer. That’s why you’ll find endless knowledge-sharing, mentorship and other career-advancing resources here to help you develop into a better-rounded professional. Work/Life Balance We value work-life harmony. Achieving success at work should never come at the expense of sacrifices at home, which is why we strive for flexibility as part of our working culture. When we feel supported in the workplace and at home, there’s nothing we can’t achieve in the cloud.
US, CA, Sunnyvale
The Artificial General Intelligence (AGI) team is looking for a highly skilled and experienced Senior Applied Scientist, to lead the development and implementation of cutting-edge algorithms and models for supervised fine-tuning and reinforcement learning through human feedback; with a focus across text, image, and video modalities. As a Senior Applied Scientist, you will play a critical role in driving the development of Generative AI (GenAI) technologies that can handle Amazon-scale use cases and have a significant impact on our customers' experiences. Key job responsibilities - Collaborate with cross-functional teams of engineers, product managers, and scientists to identify and solve complex problems in GenAI - Design and execute experiments to evaluate the performance of different algorithms and models, and iterate quickly to improve results - Think big about the arc of development of GenAI over a multi-year horizon, and identify new opportunities to apply these technologies to solve real-world problems - Communicate results and insights to both technical and non-technical audiences, including through presentations and written reports - Mentor and guide junior scientists and engineers, and contribute to the overall growth and development of the team
JP, 13, Tokyo
Amazon Japan is seeking an experienced Sr. Data Scientist to join our growing team. In this critical role, you will leverage your strong quantitative and analytical skills to drive data-driven insights that shape our FMCG (fast-moving consumer goods) business and other key strategic initiatives. Your responsibilities will include: - Solving complex, ambiguous business problems using appropriate statistical methodologies, modeling techniques, and data science best practices to lead business insights for FMCG business growth. You will work closely with cross-functional partners to translate business requirements into actionable data science solutions. - Designing and implementing scalable, reliable, and efficient data pipelines to extract valuable insights from diverse data sources. This includes making appropriate trade-offs between short-term and long-term needs. - Communicating your findings and recommendations clearly and persuasively to technical and non-technical stakeholders. You will document your work to the highest standards and ensure your solutions have a measurable impact on the business. - Mentoring and developing more junior data scientists on your team. You will actively participate in the hiring process and contribute to the growth of Amazon's data science community. - Staying abreast of the latest advancements in data science and applying innovative techniques where appropriate to tackle challenging business problems.
US, WA, Seattle
We are seeking a talented applied researcher to join the Whole Page Planning and Optimization (WPPO) Science team in Search. The latest data from Business Insider shows that almost 50% of online shoppers visit Amazon first. The Search WPPO Science team is responsible for developing reinforcement learning systems for the next generation Amazon shopping experience and delivering it to millions of customers. We believe that shopping on Amazon should be simple, delightful, and full of WOW moments for EVERYONE, whether you are technically savvy or new to online shopping. As an Applied Scientist, you will be working closely with a team of applied scientists and engineers to build systems that shape the future of Amazon's shopping experience by automatically generating relevant content and building a whole page experience that is coherent, dynamic, and interesting. You will improve ranking and optimization in our algorithm. You will participate in driving features from idea to deployment, and your work will directly impact millions of customers. You are going to love this job because you will: * Apply state-of-the-art Machine Learning (ML) algorithms, including Deep Learning and Reinforcement Learning, to improve hundreds of millions of customers’ shopping experience. * Have measurable business impact using A/B testing. * Work in a dynamic team that provides continuous opportunities for learning and growth. * Work with leaders in the field of machine learning.
US, WA, Bellevue
Conversational AI ModEling and Learning (CAMEL) team is part of Amazon Devices organization where our mission is to build a best-in-class Conversational AI that is intuitive, intelligent, and responsive, by developing superior Large Language Models (LLM) solutions and services which increase the capabilities built into the model and which enable utilizing thousands of APIs and external knowledge sources to provide the best experience for each request across millions of customers and endpoints. We are looking for a passionate, talented, and resourceful Applied Scientist in the field of LLM, Artificial Intelligence (AI), Natural Language Processing (NLP), Recommender Systems and/or Information Retrieval, to invent and build scalable solutions for a state-of-the-art context-aware conversational AI. A successful candidate will have strong machine learning background and a desire to push the envelope in one or more of the above areas. The ideal candidate would also have hands-on experiences in building Generative AI solutions with LLMs, enjoy operating in dynamic environments, be self-motivated to take on challenging problems to deliver big customer impact, moving fast to ship solutions and then iterating on user feedback and interactions. Key job responsibilities As an Applied Scientist, you will leverage your technical expertise and experience to collaborate with other talented applied scientists and engineers to research and develop novel algorithms and modeling techniques to reduce friction and enable natural and contextual conversations. You will analyze, understand and improve user experiences by leveraging Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in artificial intelligence. You will work on core LLM technologies, including Prompt Engineering and Optimization, Supervised Fine-Tuning, Learning from Human Feedback, Evaluation, Self-Learning, etc. Your work will directly impact our customers in the form of novel products and services.
US, WA, Bellevue
Conversational AI ModEling and Learning (CAMEL) team is part of Amazon Artificial General Intelligence (AGI) organization where our mission is to create a best-in-class Conversational AI that is intuitive, intelligent, and responsive, by developing superior Large Language Models (LLM) solutions and services which increase the capabilities built into the model and which enable utilizing thousands of APIs and external knowledge sources to provide the best experience for each request across millions of customers and endpoints. We are looking for a passionate, talented, and resourceful Applied Scientist in the field of LLM, Artificial Intelligence (AI), Natural Language Processing (NLP), Recommender Systems and/or Information Retrieval, to invent and build scalable solutions for a state-of-the-art context-aware conversational AI. A successful candidate will have strong machine learning background and a desire to push the envelope in one or more of the above areas. The ideal candidate would also have hands-on experiences in building Generative AI solutions with LLMs, enjoy operating in dynamic environments, be self-motivated to take on challenging problems to deliver big customer impact, moving fast to ship solutions and then iterating on user feedback and interactions. Key job responsibilities As an Applied Scientist, you will leverage your technical expertise and experience to collaborate with other talented applied scientists and engineers to research and develop novel algorithms and modeling techniques to reduce friction and enable natural and contextual conversations. You will analyze, understand and improve user experiences by leveraging Amazon’s heterogeneous data sources and large-scale computing resources to accelerate advances in artificial intelligence. You will work on core LLM technologies, including Supervised Fine-Tuning (SFT), In-Context Learning (ICL), Learning from Human Feedback (LHF), etc. Your work will directly impact our customers in the form of novel products and services.
IL, Tel Aviv
Are you an inventive, curious, and driven Applied Scientist with a strong background in AI and Deep Learning? Join Amazon’s AWS Multimodal generative AI science team and be a catalyst for groundbreaking advancements in Computer Vision, Generative AI, and foundational models. As part of the AWS Multimodal generative AI science team, you’ll lead innovative research projects, develop state-of-the-art algorithms, and pioneer solutions that will directly impact millions of Amazon customers. Leveraging Amazon’s vast computing power, you’ll work alongside a supportive and diverse group of top-tier scientists and engineers, contributing to products that redefine the industry. Key job responsibilities * Lead research initiatives in Multimodal generative AI, pushing the boundaries of model efficiency, accuracy, and scalability. * Design, implement, and evaluate deep learning models in a production environment. * Collaborate with cross-functional teams to transfer research outcomes into scalable AWS services. * Publish in top-tier conferences and journals, keeping Amazon at the forefront of innovation. * Mentor and guide other scientists and engineers, fostering a culture of scientific curiosity and excellence.
US, WA, Seattle
The Search Supply & Experiences team, within Sponsored Products, is seeking an Applied Scientist to solve challenging problems in natural language understanding, personalization, and other areas using the latest techniques in machine learning. In our team, you will have the opportunity to create new ads experiences that elevate the shopping experience for our hundreds of millions customers worldwide. As an Applied Scientist, you will partner with other talented scientists and engineers to design, train, test, and deploy machine learning models. You will be responsible for translating business and engineering requirements into deliverables, and performing detailed experiment analysis to determine how shoppers are responding to your changes. We are looking for candidates who thrive in an exciting, fast-paced environment and who have a strong personal interest in learning, researching, and creating new technologies with high customer impact. Key job responsibilities As an Applied Scientist on the Search Supply & Experiences team you will: - Perform hands-on analysis and modeling of enormous datasets to develop insights that increase traffic monetization and merchandise sales, without compromising the shopper experience. - Drive end-to-end machine learning projects that have a high degree of ambiguity, scale, and complexity. - Build machine learning models, perform proof-of-concept, experiment, optimize, and deploy your models into production; work closely with software engineers to assist in productionizing your ML models. - Run A/B experiments, gather data, and perform statistical analysis. - Establish scalable, efficient, automated processes for large-scale data analysis, machine-learning model development, model validation and serving. - Stay up to date on the latest advances in machine learning. About the team We are a customer-obsessed team of engineers, technologists, product leaders, and scientists. We are focused on continuous exploration of contexts and creatives where advertising delivers value to shoppers and advertisers. We specifically work on new ads experiences globally with the goal of helping shoppers make the most informed purchase decision. We obsess about our customers and we are continuously innovating on their behalf to enrich their shopping experience on Amazon
US, WA, Seattle
We are seeking a highly skilled economist to measure and understand how each Customer Service activity impacts customers. This candidate's analysis will assist teams across Amazon to prioritize defect elimination efforts and optimize how we respond to customer contacts. This candidate will partner closely with our product, program, and tech teams to deliver their findings to users via systems and dashboards that guide Customer Service planning and policy rules. Key job responsibilities - Develop Causal, Economic, and Machine Learning models at scale. - Engage in economic analysis and raise the bar for research. - Inform strategic discussions with senior leaders across the company to guide policies. A day in the life If you are not sure that every qualification on the list above describes you exactly, we'd still love to hear from you! At Amazon, we value people with unique backgrounds, experiences, and skillsets. If you’re passionate about this role and want to make an impact on a global scale, please apply! Amazon offers a full range of benefits that support you and eligible family members, including domestic partners and their children. Benefits can vary by location, the number of regularly scheduled hours you work, length of employment, and job status such as seasonal or temporary employment. The benefits that generally apply to regular, full-time employees include: 1. Medical, Dental, and Vision Coverage 2. Maternity and Parental Leave Options 3. Paid Time Off (PTO) 4. 401(k) Plan About the team The Worldwide defect elimination team's mission is to understand and resolve all issues impacting customers at scale. The Customer Service Economics and Optimization team is a force multiplier within this group, helping to understand the impact of these issues and our actions to optimize the customer experience.